From 0714db514eee017a89a47df6f1474f1613b4051c Mon Sep 17 00:00:00 2001 From: Azure PowerShell <65331932+azure-powershell-bot@users.noreply.github.com> Date: Tue, 7 May 2024 09:31:10 +0800 Subject: [PATCH] Migrate EventHub from generation to main (#24810) * Move EventHub to main * suppress the breaking changes * update changelog --------- Co-authored-by: YanaXu --- .../Az.EventHub.format.ps1xml | 8 +- .../EventHub.Autorest/Az.EventHub.psd1 | 4 +- src/EventHub/EventHub.Autorest/README.md | 72 +- .../EventHub.Autorest/build-module.ps1 | 16 +- .../EventHub.Autorest/check-dependencies.ps1 | 6 +- .../create-model-cmdlets.ps1 | 105 +- ...ve-AzEventHubPrivateEndpointConnection.ps1 | 2 +- ...ny-AzEventHubPrivateEndpointConnection.ps1 | 2 +- .../Get-AzEventHubAuthorizationRule.ps1 | 2 +- .../custom/Get-AzEventHubKey.ps1 | 2 +- .../New-AzEventHubAuthorizationRule.ps1 | 7 +- .../custom/New-AzEventHubIPRuleConfig.ps1 | 7 +- .../custom/New-AzEventHubKey.ps1 | 7 +- .../custom/New-AzEventHubNamespace.ps1 | 15 +- .../New-AzEventHubThrottlingPolicyConfig.ps1 | 9 +- ...New-AzEventHubVirtualNetworkRuleConfig.ps1 | 4 +- .../Remove-AzEventHubAuthorizationRule.ps1 | 2 +- .../custom/Set-AzEventHub.ps1 | 11 +- .../custom/Set-AzEventHubApplicationGroup.ps1 | 4 +- .../Set-AzEventHubAuthorizationRule.ps1 | 6 +- .../custom/Set-AzEventHubCluster.ps1 | 4 +- .../custom/Set-AzEventHubConsumerGroup.ps1 | 2 +- .../custom/Set-AzEventHubNamespace.ps1 | 12 +- .../custom/Set-AzEventHubNetworkRuleSet.ps1 | 12 +- .../custom/Test-AzEventHubName.ps1 | 2 +- ...New-AzEventHubKeyVaultPropertiesObject.ps1 | 8 +- ...Get-AzEventHubPrivateEndpointConnection.md | 2 +- .../EventHub.Autorest/export-surface.ps1 | 6 +- ...ve-AzEventHubPrivateEndpointConnection.ps1 | 8 +- ...ny-AzEventHubPrivateEndpointConnection.ps1 | 8 +- .../exports/Get-AzEventHub.ps1 | 30 +- .../Get-AzEventHubApplicationGroup.ps1 | 30 +- .../Get-AzEventHubAuthorizationRule.ps1 | 8 +- .../exports/Get-AzEventHubCluster.ps1 | 7 +- .../Get-AzEventHubClusterNamespace.ps1 | 6 +- .../Get-AzEventHubClustersAvailableRegion.ps1 | 6 +- .../exports/Get-AzEventHubConsumerGroup.ps1 | 54 +- .../Get-AzEventHubGeoDRConfiguration.ps1 | 30 +- .../exports/Get-AzEventHubKey.ps1 | 6 +- .../exports/Get-AzEventHubNamespace.ps1 | 7 +- .../exports/Get-AzEventHubNetworkRuleSet.ps1 | 9 +- ...et-AzEventHubPrivateEndpointConnection.ps1 | 34 +- .../exports/Get-AzEventHubPrivateLink.ps1 | 8 +- .../exports/Get-AzEventHubSchemaGroup.ps1 | 30 +- .../exports/New-AzEventHub.ps1 | 140 +- .../New-AzEventHubApplicationGroup.ps1 | 68 +- .../New-AzEventHubAuthorizationRule.ps1 | 8 +- .../exports/New-AzEventHubCluster.ps1 | 14 +- .../exports/New-AzEventHubConsumerGroup.ps1 | 100 +- .../New-AzEventHubGeoDRConfiguration.ps1 | 64 +- .../exports/New-AzEventHubIPRuleConfig.ps1 | 6 +- .../exports/New-AzEventHubKey.ps1 | 8 +- ...New-AzEventHubKeyVaultPropertiesObject.ps1 | 6 +- .../exports/New-AzEventHubNamespace.ps1 | 15 +- .../exports/New-AzEventHubSchemaGroup.ps1 | 79 +- .../New-AzEventHubThrottlingPolicyConfig.ps1 | 6 +- ...New-AzEventHubVirtualNetworkRuleConfig.ps1 | 4 +- .../exports/ProxyCmdletDefinitions.ps1 | 1100 +- .../exports/Remove-AzEventHub.ps1 | 26 +- .../Remove-AzEventHubApplicationGroup.ps1 | 26 +- .../Remove-AzEventHubAuthorizationRule.ps1 | 8 +- .../exports/Remove-AzEventHubCluster.ps1 | 3 +- .../Remove-AzEventHubConsumerGroup.ps1 | 50 +- .../Remove-AzEventHubGeoDRConfiguration.ps1 | 26 +- .../exports/Remove-AzEventHubNamespace.ps1 | 3 +- ...ve-AzEventHubPrivateEndpointConnection.ps1 | 28 +- .../exports/Remove-AzEventHubSchemaGroup.ps1 | 26 +- .../exports/Set-AzEventHub.ps1 | 14 +- .../Set-AzEventHubApplicationGroup.ps1 | 13 +- .../Set-AzEventHubAuthorizationRule.ps1 | 10 +- .../exports/Set-AzEventHubCluster.ps1 | 11 +- .../exports/Set-AzEventHubConsumerGroup.ps1 | 8 +- ...-AzEventHubGeoDRConfigurationBreakPair.ps1 | 4 +- ...t-AzEventHubGeoDRConfigurationFailOver.ps1 | 4 +- .../exports/Set-AzEventHubNamespace.ps1 | 15 +- .../exports/Set-AzEventHubNetworkRuleSet.ps1 | 20 +- .../exports/Test-AzEventHubName.ps1 | 6 +- .../EventHub.Autorest/generate-help.ps1 | 6 +- .../EventHub.Autorest/generate-portal-ux.ps1 | 23 +- .../EventHub.Autorest/generated/Module.cs | 27 +- .../generated/api/EventHub.cs | 20935 ++++++++++++---- .../AccessKeys.PowerShell.cs | 48 +- .../AccessKeys.TypeConverter.cs | 6 +- .../{Api202301Preview => }/AccessKeys.cs | 41 +- .../{Api202301Preview => }/AccessKeys.json.cs | 38 +- .../generated/api/Models/Any.PowerShell.cs | 4 +- .../generated/api/Models/Any.cs | 6 +- .../generated/api/Models/Any.json.cs | 2 +- .../Api202301Preview/Cluster.PowerShell.cs | 332 - .../EhNamespace.PowerShell.cs | 516 - .../EhNamespaceProperties.PowerShell.cs | 342 - .../Api202301Preview/Eventhub.PowerShell.cs | 476 - .../EventhubProperties.PowerShell.cs | 380 - .../NetworkRuleSet.PowerShell.cs | 292 - ...curityPerimeterConfiguration.PowerShell.cs | 337 - ...meterConfigurationProperties.PowerShell.cs | 297 - .../PrivateEndpointConnection.PowerShell.cs | 302 - .../SchemaGroup.PowerShell.cs | 300 - .../ApplicationGroup.PowerShell.cs | 80 +- .../ApplicationGroup.TypeConverter.cs | 6 +- .../ApplicationGroup.cs | 142 +- .../ApplicationGroup.json.cs | 16 +- .../ApplicationGroupListResult.PowerShell.cs | 30 +- ...pplicationGroupListResult.TypeConverter.cs | 6 +- .../ApplicationGroupListResult.cs | 24 +- .../ApplicationGroupListResult.json.cs | 14 +- .../ApplicationGroupPolicy.PowerShell.cs | 30 +- .../ApplicationGroupPolicy.TypeConverter.cs | 6 +- .../ApplicationGroupPolicy.cs | 14 +- .../ApplicationGroupPolicy.json.cs | 16 +- .../ApplicationGroupProperties.PowerShell.cs | 34 +- ...pplicationGroupProperties.TypeConverter.cs | 6 +- .../ApplicationGroupProperties.cs | 25 +- .../ApplicationGroupProperties.json.cs | 14 +- .../ArmDisasterRecovery.PowerShell.cs | 88 +- .../ArmDisasterRecovery.TypeConverter.cs | 6 +- .../ArmDisasterRecovery.cs | 176 +- .../ArmDisasterRecovery.json.cs | 16 +- ...rmDisasterRecoveryListResult.PowerShell.cs | 30 +- ...isasterRecoveryListResult.TypeConverter.cs | 6 +- .../ArmDisasterRecoveryListResult.cs | 24 +- .../ArmDisasterRecoveryListResult.json.cs | 14 +- ...rmDisasterRecoveryProperties.PowerShell.cs | 42 +- ...isasterRecoveryProperties.TypeConverter.cs | 6 +- .../ArmDisasterRecoveryProperties.cs | 51 +- .../ArmDisasterRecoveryProperties.json.cs | 24 +- .../AuthorizationRule.PowerShell.cs | 72 +- .../AuthorizationRule.TypeConverter.cs | 6 +- .../AuthorizationRule.cs | 134 +- .../AuthorizationRule.json.cs | 16 +- .../AuthorizationRuleListResult.PowerShell.cs | 30 +- ...thorizationRuleListResult.TypeConverter.cs | 6 +- .../AuthorizationRuleListResult.cs | 22 +- .../AuthorizationRuleListResult.json.cs | 12 +- .../AuthorizationRuleProperties.PowerShell.cs | 26 +- ...thorizationRuleProperties.TypeConverter.cs | 6 +- .../AuthorizationRuleProperties.cs | 21 +- .../AuthorizationRuleProperties.json.cs | 10 +- .../AvailableCluster.PowerShell.cs | 24 +- .../AvailableCluster.TypeConverter.cs | 6 +- .../AvailableCluster.cs | 9 +- .../AvailableCluster.json.cs | 10 +- .../AvailableClustersList.PowerShell.cs | 26 +- .../AvailableClustersList.TypeConverter.cs | 6 +- .../AvailableClustersList.cs | 19 +- .../AvailableClustersList.json.cs | 10 +- .../CaptureDescription.PowerShell.cs | 88 +- .../CaptureDescription.TypeConverter.cs | 6 +- .../CaptureDescription.cs | 102 +- .../CaptureDescription.json.cs | 20 +- .../CaptureIdentity.PowerShell.cs | 28 +- .../CaptureIdentity.TypeConverter.cs | 6 +- .../{Api202301Preview => }/CaptureIdentity.cs | 24 +- .../CaptureIdentity.json.cs | 12 +- ...eckNameAvailabilityParameter.PowerShell.cs | 26 +- ...NameAvailabilityParameter.TypeConverter.cs | 6 +- .../CheckNameAvailabilityParameter.cs | 9 +- .../CheckNameAvailabilityParameter.json.cs | 10 +- .../CheckNameAvailabilityResult.PowerShell.cs | 34 +- ...eckNameAvailabilityResult.TypeConverter.cs | 6 +- .../CheckNameAvailabilityResult.cs | 29 +- .../CheckNameAvailabilityResult.json.cs | 16 +- .../api/Models/Cluster.PowerShell.cs | 332 + .../Cluster.TypeConverter.cs | 6 +- .../Models/{Api202301Preview => }/Cluster.cs | 193 +- .../{Api202301Preview => }/Cluster.json.cs | 20 +- .../ClusterListResult.PowerShell.cs | 28 +- .../ClusterListResult.TypeConverter.cs | 6 +- .../ClusterListResult.cs | 22 +- .../ClusterListResult.json.cs | 12 +- .../ClusterProperties.PowerShell.cs | 44 +- .../ClusterProperties.TypeConverter.cs | 6 +- .../ClusterProperties.cs | 46 +- .../ClusterProperties.json.cs | 30 +- .../ClusterSku.PowerShell.cs | 28 +- .../ClusterSku.TypeConverter.cs | 6 +- .../{Api202301Preview => }/ClusterSku.cs | 14 +- .../{Api202301Preview => }/ClusterSku.json.cs | 14 +- .../ConnectionState.PowerShell.cs | 28 +- .../ConnectionState.TypeConverter.cs | 6 +- .../{Api202301Preview => }/ConnectionState.cs | 24 +- .../ConnectionState.json.cs | 12 +- .../ConsumerGroup.PowerShell.cs | 80 +- .../ConsumerGroup.TypeConverter.cs | 6 +- .../{Api202301Preview => }/ConsumerGroup.cs | 148 +- .../ConsumerGroup.json.cs | 16 +- .../ConsumerGroupListResult.PowerShell.cs | 30 +- .../ConsumerGroupListResult.TypeConverter.cs | 6 +- .../ConsumerGroupListResult.cs | 22 +- .../ConsumerGroupListResult.json.cs | 12 +- .../ConsumerGroupProperties.PowerShell.cs | 34 +- .../ConsumerGroupProperties.TypeConverter.cs | 6 +- .../ConsumerGroupProperties.cs | 19 +- .../ConsumerGroupProperties.json.cs | 18 +- .../Destination.PowerShell.cs | 64 +- .../Destination.TypeConverter.cs | 6 +- .../{Api202301Preview => }/Destination.cs | 73 +- .../Destination.json.cs | 16 +- .../DestinationProperties.PowerShell.cs | 46 +- .../DestinationProperties.TypeConverter.cs | 6 +- .../DestinationProperties.cs | 24 +- .../DestinationProperties.json.cs | 20 +- .../api/Models/EhNamespace.PowerShell.cs | 516 + .../EhNamespace.TypeConverter.cs | 6 +- .../{Api202301Preview => }/EhNamespace.cs | 377 +- .../EhNamespace.json.cs | 22 +- .../EhNamespaceIdContainer.PowerShell.cs | 26 +- .../EhNamespaceIdContainer.TypeConverter.cs | 6 +- .../EhNamespaceIdContainer.cs | 9 +- .../EhNamespaceIdContainer.json.cs | 10 +- .../EhNamespaceIdListResult.PowerShell.cs | 26 +- .../EhNamespaceIdListResult.TypeConverter.cs | 6 +- .../EhNamespaceIdListResult.cs | 19 +- .../EhNamespaceIdListResult.json.cs | 10 +- .../EhNamespaceListResult.PowerShell.cs | 30 +- .../EhNamespaceListResult.TypeConverter.cs | 6 +- .../EhNamespaceListResult.cs | 22 +- .../EhNamespaceListResult.json.cs | 12 +- .../EhNamespaceProperties.PowerShell.cs | 340 + .../EhNamespaceProperties.TypeConverter.cs | 6 +- .../EhNamespaceProperties.cs | 161 +- .../EhNamespaceProperties.json.cs | 56 +- .../Encryption.PowerShell.cs | 32 +- .../Encryption.TypeConverter.cs | 6 +- .../{Api202301Preview => }/Encryption.cs | 37 +- .../{Api202301Preview => }/Encryption.json.cs | 16 +- .../ErrorAdditionalInfo.PowerShell.cs | 28 +- .../ErrorAdditionalInfo.TypeConverter.cs | 6 +- .../Models/{Api20 => }/ErrorAdditionalInfo.cs | 16 +- .../{Api20 => }/ErrorAdditionalInfo.json.cs | 16 +- .../{Api20 => }/ErrorDetail.PowerShell.cs | 40 +- .../{Api20 => }/ErrorDetail.TypeConverter.cs | 6 +- .../api/Models/{Api20 => }/ErrorDetail.cs | 51 +- .../Models/{Api20 => }/ErrorDetail.json.cs | 30 +- .../ErrorDetailAutoGenerated.PowerShell.cs | 40 +- .../ErrorDetailAutoGenerated.TypeConverter.cs | 6 +- .../{Api20 => }/ErrorDetailAutoGenerated.cs | 51 +- .../ErrorDetailAutoGenerated.json.cs | 28 +- .../{Api20 => }/ErrorResponse.PowerShell.cs | 44 +- .../ErrorResponse.TypeConverter.cs | 6 +- .../api/Models/{Api20 => }/ErrorResponse.cs | 61 +- .../Models/{Api20 => }/ErrorResponse.json.cs | 10 +- .../ErrorResponseAutoGenerated.PowerShell.cs | 44 +- ...rrorResponseAutoGenerated.TypeConverter.cs | 6 +- .../{Api20 => }/ErrorResponseAutoGenerated.cs | 61 +- .../ErrorResponseAutoGenerated.json.cs | 10 +- .../generated/api/Models/EventHubIdentity.cs | 39 + .../api/Models/EventHubIdentity.json.cs | 26 +- .../EventHubListResult.PowerShell.cs | 28 +- .../EventHubListResult.TypeConverter.cs | 6 +- .../EventHubListResult.cs | 22 +- .../EventHubListResult.json.cs | 12 +- .../api/Models/Eventhub.PowerShell.cs | 476 + .../Eventhub.TypeConverter.cs | 6 +- .../Models/{Api202301Preview => }/Eventhub.cs | 306 +- .../{Api202301Preview => }/Eventhub.json.cs | 18 +- .../Models/EventhubProperties.PowerShell.cs | 380 + .../EventhubProperties.TypeConverter.cs | 6 +- .../EventhubProperties.cs | 187 +- .../EventhubProperties.json.cs | 30 +- .../FailOver.PowerShell.cs | 32 +- .../FailOver.TypeConverter.cs | 6 +- .../Models/{Api202301Preview => }/FailOver.cs | 24 +- .../{Api202301Preview => }/FailOver.json.cs | 12 +- .../FailOverProperties.PowerShell.cs | 28 +- .../FailOverProperties.TypeConverter.cs | 6 +- .../FailOverProperties.cs | 12 +- .../FailOverProperties.json.cs | 12 +- ...GeoDataReplicationProperties.PowerShell.cs | 30 +- ...DataReplicationProperties.TypeConverter.cs | 6 +- .../GeoDataReplicationProperties.cs | 22 +- .../GeoDataReplicationProperties.json.cs | 12 +- .../Identity.PowerShell.cs | 36 +- .../Identity.TypeConverter.cs | 6 +- .../Models/{Api202301Preview => }/Identity.cs | 44 +- .../{Api202301Preview => }/Identity.json.cs | 22 +- ...entityUserAssignedIdentities.PowerShell.cs | 22 +- ...ityUserAssignedIdentities.TypeConverter.cs | 6 +- .../IdentityUserAssignedIdentities.cs | 8 +- ...entityUserAssignedIdentities.dictionary.cs | 26 +- .../IdentityUserAssignedIdentities.json.cs | 12 +- .../KeyVaultProperties.PowerShell.cs | 40 +- .../KeyVaultProperties.TypeConverter.cs | 6 +- .../KeyVaultProperties.cs | 28 +- .../KeyVaultProperties.json.cs | 16 +- .../NamespaceReplicaLocation.PowerShell.cs | 34 +- .../NamespaceReplicaLocation.TypeConverter.cs | 6 +- .../NamespaceReplicaLocation.cs | 27 +- .../NamespaceReplicaLocation.json.cs | 14 +- ...mespacesFailoverAcceptedResponseHeaders.cs | 6 + .../api/Models/NetworkRuleSet.PowerShell.cs | 292 + .../NetworkRuleSet.TypeConverter.cs | 6 +- .../{Api202301Preview => }/NetworkRuleSet.cs | 174 +- .../NetworkRuleSet.json.cs | 16 +- .../NetworkRuleSetListResult.PowerShell.cs | 30 +- .../NetworkRuleSetListResult.TypeConverter.cs | 6 +- .../NetworkRuleSetListResult.cs | 22 +- .../NetworkRuleSetListResult.json.cs | 12 +- .../NetworkRuleSetProperties.PowerShell.cs | 42 +- .../NetworkRuleSetProperties.TypeConverter.cs | 6 +- .../NetworkRuleSetProperties.cs | 65 +- .../NetworkRuleSetProperties.json.cs | 18 +- .../NetworkSecurityPerimeter.PowerShell.cs | 34 +- .../NetworkSecurityPerimeter.TypeConverter.cs | 6 +- .../NetworkSecurityPerimeter.cs | 15 +- .../NetworkSecurityPerimeter.json.cs | 14 +- ...curityPerimeterConfiguration.PowerShell.cs | 335 + ...ityPerimeterConfiguration.TypeConverter.cs | 6 +- .../NetworkSecurityPerimeterConfiguration.cs | 209 +- ...workSecurityPerimeterConfiguration.json.cs | 14 +- ...tyPerimeterConfigurationList.PowerShell.cs | 24 +- ...erimeterConfigurationList.TypeConverter.cs | 6 +- ...tworkSecurityPerimeterConfigurationList.cs | 21 +- ...SecurityPerimeterConfigurationList.json.cs | 12 +- ...meterConfigurationProperties.PowerShell.cs | 297 + ...erConfigurationProperties.TypeConverter.cs | 6 +- ...ecurityPerimeterConfigurationProperties.cs | 168 +- ...tyPerimeterConfigurationProperties.json.cs | 40 +- ...nfigurationPropertiesProfile.PowerShell.cs | 32 +- ...gurationPropertiesProfile.TypeConverter.cs | 6 +- ...PerimeterConfigurationPropertiesProfile.cs | 25 +- ...eterConfigurationPropertiesProfile.json.cs | 14 +- ...ropertiesResourceAssociation.PowerShell.cs | 28 +- ...ertiesResourceAssociation.TypeConverter.cs | 6 +- ...figurationPropertiesResourceAssociation.cs | 24 +- ...ationPropertiesResourceAssociation.json.cs | 12 +- .../NspAccessRule.PowerShell.cs | 56 +- .../NspAccessRule.TypeConverter.cs | 6 +- .../{Api202301Preview => }/NspAccessRule.cs | 86 +- .../NspAccessRule.json.cs | 18 +- .../NspAccessRuleProperties.PowerShell.cs | 42 +- .../NspAccessRuleProperties.TypeConverter.cs | 6 +- .../NspAccessRuleProperties.cs | 73 +- .../NspAccessRuleProperties.json.cs | 22 +- ...ePropertiesSubscriptionsItem.PowerShell.cs | 24 +- ...opertiesSubscriptionsItem.TypeConverter.cs | 6 +- ...spAccessRulePropertiesSubscriptionsItem.cs | 9 +- ...essRulePropertiesSubscriptionsItem.json.cs | 10 +- .../NwRuleSetIPRules.PowerShell.cs | 28 +- .../NwRuleSetIPRules.TypeConverter.cs | 6 +- .../NwRuleSetIPRules.cs | 24 +- .../NwRuleSetIPRules.json.cs | 12 +- ...NwRuleSetVirtualNetworkRules.PowerShell.cs | 34 +- ...uleSetVirtualNetworkRules.TypeConverter.cs | 6 +- .../NwRuleSetVirtualNetworkRules.cs | 22 +- .../NwRuleSetVirtualNetworkRules.json.cs | 12 +- .../Operation.PowerShell.cs | 56 +- .../Operation.TypeConverter.cs | 6 +- .../{Api202301Preview => }/Operation.cs | 56 +- .../{Api202301Preview => }/Operation.json.cs | 22 +- .../OperationDisplay.PowerShell.cs | 36 +- .../OperationDisplay.TypeConverter.cs | 6 +- .../OperationDisplay.cs | 26 +- .../OperationDisplay.json.cs | 24 +- .../OperationListResult.PowerShell.cs | 28 +- .../OperationListResult.TypeConverter.cs | 6 +- .../OperationListResult.cs | 26 +- .../OperationListResult.json.cs | 16 +- .../PrivateEndpoint.PowerShell.cs | 24 +- .../PrivateEndpoint.TypeConverter.cs | 6 +- .../{Api202301Preview => }/PrivateEndpoint.cs | 9 +- .../PrivateEndpoint.json.cs | 10 +- .../PrivateEndpointConnection.PowerShell.cs | 300 + ...PrivateEndpointConnection.TypeConverter.cs | 6 +- .../PrivateEndpointConnection.cs | 173 +- .../PrivateEndpointConnection.json.cs | 16 +- ...EndpointConnectionListResult.PowerShell.cs | 30 +- ...pointConnectionListResult.TypeConverter.cs | 6 +- .../PrivateEndpointConnectionListResult.cs | 22 +- ...rivateEndpointConnectionListResult.json.cs | 12 +- ...EndpointConnectionProperties.PowerShell.cs | 46 +- ...pointConnectionProperties.TypeConverter.cs | 6 +- .../PrivateEndpointConnectionProperties.cs | 60 +- ...rivateEndpointConnectionProperties.json.cs | 14 +- .../PrivateLinkResource.PowerShell.cs | 48 +- .../PrivateLinkResource.TypeConverter.cs | 6 +- .../PrivateLinkResource.cs | 46 +- .../PrivateLinkResource.json.cs | 16 +- ...rivateLinkResourceProperties.PowerShell.cs | 34 +- ...ateLinkResourceProperties.TypeConverter.cs | 6 +- .../PrivateLinkResourceProperties.cs | 31 +- .../PrivateLinkResourceProperties.json.cs | 14 +- ...ivateLinkResourcesListResult.PowerShell.cs | 30 +- ...teLinkResourcesListResult.TypeConverter.cs | 6 +- .../PrivateLinkResourcesListResult.cs | 22 +- .../PrivateLinkResourcesListResult.json.cs | 12 +- .../ProvisioningIssue.PowerShell.cs | 36 +- .../ProvisioningIssue.TypeConverter.cs | 6 +- .../ProvisioningIssue.cs | 35 +- .../ProvisioningIssue.json.cs | 14 +- .../ProvisioningIssueProperties.PowerShell.cs | 30 +- ...ovisioningIssueProperties.TypeConverter.cs | 6 +- .../ProvisioningIssueProperties.cs | 12 +- .../ProvisioningIssueProperties.json.cs | 12 +- .../{Api20 => }/ProxyResource.PowerShell.cs | 36 +- .../ProxyResource.TypeConverter.cs | 6 +- .../api/Models/{Api20 => }/ProxyResource.cs | 26 +- .../Models/{Api20 => }/ProxyResource.json.cs | 24 +- ...egenerateAccessKeyParameters.PowerShell.cs | 30 +- ...nerateAccessKeyParameters.TypeConverter.cs | 6 +- .../RegenerateAccessKeyParameters.cs | 24 +- .../RegenerateAccessKeyParameters.json.cs | 12 +- .../Models/{Api10 => }/Resource.PowerShell.cs | 32 +- .../{Api10 => }/Resource.TypeConverter.cs | 6 +- .../api/Models/{Api10 => }/Resource.cs | 21 +- .../api/Models/{Api10 => }/Resource.json.cs | 22 +- .../RetentionDescription.PowerShell.cs | 32 +- .../RetentionDescription.TypeConverter.cs | 6 +- .../RetentionDescription.cs | 27 +- .../RetentionDescription.json.cs | 14 +- .../api/Models/SchemaGroup.PowerShell.cs | 300 + .../SchemaGroup.TypeConverter.cs | 6 +- .../{Api202301Preview => }/SchemaGroup.cs | 171 +- .../SchemaGroup.json.cs | 18 +- .../SchemaGroupListResult.PowerShell.cs | 30 +- .../SchemaGroupListResult.TypeConverter.cs | 6 +- .../SchemaGroupListResult.cs | 22 +- .../SchemaGroupListResult.json.cs | 12 +- .../SchemaGroupProperties.PowerShell.cs | 22 +- .../SchemaGroupProperties.TypeConverter.cs | 6 +- .../SchemaGroupProperties.cs | 6 +- .../SchemaGroupProperties.dictionary.cs | 4 +- .../SchemaGroupProperties.json.cs | 8 +- .../SchemaGroupProperties1.PowerShell.cs | 46 +- .../SchemaGroupProperties1.TypeConverter.cs | 6 +- .../SchemaGroupProperties1.cs | 64 +- .../SchemaGroupProperties1.json.cs | 26 +- .../{Api202301Preview => }/Sku.PowerShell.cs | 32 +- .../Sku.TypeConverter.cs | 6 +- .../api/Models/{Api202301Preview => }/Sku.cs | 39 +- .../Models/{Api202301Preview => }/Sku.json.cs | 16 +- .../Subnet.PowerShell.cs | 24 +- .../Subnet.TypeConverter.cs | 6 +- .../Models/{Api202301Preview => }/Subnet.cs | 9 +- .../{Api202301Preview => }/Subnet.json.cs | 12 +- .../{Api10 => }/SystemData.PowerShell.cs | 44 +- .../{Api10 => }/SystemData.TypeConverter.cs | 6 +- .../api/Models/{Api10 => }/SystemData.cs | 48 +- .../api/Models/{Api10 => }/SystemData.json.cs | 22 +- .../ThrottlingPolicy.PowerShell.cs | 36 +- .../ThrottlingPolicy.TypeConverter.cs | 6 +- .../ThrottlingPolicy.cs | 39 +- .../ThrottlingPolicy.json.cs | 14 +- .../{Api10 => }/TrackedResource.PowerShell.cs | 40 +- .../TrackedResource.TypeConverter.cs | 6 +- .../api/Models/{Api10 => }/TrackedResource.cs | 42 +- .../{Api10 => }/TrackedResource.json.cs | 19 +- .../TrackedResourceTags.PowerShell.cs | 20 +- .../TrackedResourceTags.TypeConverter.cs | 6 +- .../Models/{Api10 => }/TrackedResourceTags.cs | 6 +- .../TrackedResourceTags.dictionary.cs | 4 +- .../{Api10 => }/TrackedResourceTags.json.cs | 8 +- .../UserAssignedIdentity.PowerShell.cs | 28 +- .../UserAssignedIdentity.TypeConverter.cs | 6 +- .../UserAssignedIdentity.cs | 16 +- .../UserAssignedIdentity.json.cs | 16 +- ...erAssignedIdentityProperties.PowerShell.cs | 26 +- ...ssignedIdentityProperties.TypeConverter.cs | 6 +- .../UserAssignedIdentityProperties.cs | 9 +- .../UserAssignedIdentityProperties.json.cs | 10 +- .../api/Support/AccessRights.Completer.cs | 43 - .../api/Support/AccessRights.TypeConverter.cs | 59 - .../generated/api/Support/AccessRights.cs | 99 - .../Support/CaptureIdentityType.Completer.cs | 39 - .../CaptureIdentityType.TypeConverter.cs | 59 - .../api/Support/CaptureIdentityType.cs | 98 - ...nupPolicyRetentionDescription.Completer.cs | 39 - ...olicyRetentionDescription.TypeConverter.cs | 59 - .../CleanupPolicyRetentionDescription.cs | 104 - .../api/Support/CreatedByType.Completer.cs | 47 - .../Support/CreatedByType.TypeConverter.cs | 59 - .../generated/api/Support/CreatedByType.cs | 102 - .../api/Support/DefaultAction.Completer.cs | 39 - .../Support/DefaultAction.TypeConverter.cs | 59 - .../generated/api/Support/DefaultAction.cs | 98 - .../EncodingCaptureDescription.Completer.cs | 42 - ...ncodingCaptureDescription.TypeConverter.cs | 62 - .../api/Support/EncodingCaptureDescription.cs | 103 - .../EndPointProvisioningState.Completer.cs | 55 - ...EndPointProvisioningState.TypeConverter.cs | 59 - .../api/Support/EndPointProvisioningState.cs | 106 - .../api/Support/EntityStatus.Completer.cs | 67 - .../api/Support/EntityStatus.TypeConverter.cs | 59 - .../generated/api/Support/EntityStatus.cs | 112 - .../api/Support/GeoDrRoleType.Completer.cs | 39 - .../Support/GeoDrRoleType.TypeConverter.cs | 59 - .../generated/api/Support/GeoDrRoleType.cs | 98 - .../api/Support/KeySource.Completer.cs | 35 - .../api/Support/KeySource.TypeConverter.cs | 59 - .../generated/api/Support/KeySource.cs | 96 - .../api/Support/KeyType.Completer.cs | 39 - .../api/Support/KeyType.TypeConverter.cs | 59 - .../generated/api/Support/KeyType.cs | 98 - .../ManagedServiceIdentityType.Completer.cs | 47 - ...anagedServiceIdentityType.TypeConverter.cs | 59 - .../api/Support/ManagedServiceIdentityType.cs | 104 - .../api/Support/MetricId.Completer.cs | 50 - .../api/Support/MetricId.TypeConverter.cs | 62 - .../generated/api/Support/MetricId.cs | 105 - .../Support/NetworkRuleIPAction.Completer.cs | 35 - .../NetworkRuleIPAction.TypeConverter.cs | 59 - .../api/Support/NetworkRuleIPAction.cs | 96 - ...onfigurationProvisioningState.Completer.cs | 75 - ...gurationProvisioningState.TypeConverter.cs | 60 - ...PerimeterConfigurationProvisioningState.cs | 141 - .../NspAccessRuleDirection.Completer.cs | 39 - .../NspAccessRuleDirection.TypeConverter.cs | 59 - .../api/Support/NspAccessRuleDirection.cs | 98 - .../PrivateLinkConnectionStatus.Completer.cs | 47 - ...ivateLinkConnectionStatus.TypeConverter.cs | 59 - .../Support/PrivateLinkConnectionStatus.cs | 106 - .../Support/ProvisioningState.Completer.cs | 63 - .../ProvisioningState.TypeConverter.cs | 59 - .../api/Support/ProvisioningState.cs | 110 - .../Support/ProvisioningStateDr.Completer.cs | 45 - .../ProvisioningStateDr.TypeConverter.cs | 61 - .../api/Support/ProvisioningStateDr.cs | 102 - .../Support/PublicNetworkAccess.Completer.cs | 45 - .../PublicNetworkAccess.TypeConverter.cs | 61 - .../api/Support/PublicNetworkAccess.cs | 102 - .../PublicNetworkAccessFlag.Completer.cs | 46 - .../PublicNetworkAccessFlag.TypeConverter.cs | 62 - .../api/Support/PublicNetworkAccessFlag.cs | 103 - ...ResourceAssociationAccessMode.Completer.cs | 51 - ...urceAssociationAccessMode.TypeConverter.cs | 59 - .../Support/ResourceAssociationAccessMode.cs | 110 - .../Support/RoleDisasterRecovery.Completer.cs | 45 - .../RoleDisasterRecovery.TypeConverter.cs | 61 - .../api/Support/RoleDisasterRecovery.cs | 102 - .../Support/SchemaCompatibility.Completer.cs | 43 - .../SchemaCompatibility.TypeConverter.cs | 59 - .../api/Support/SchemaCompatibility.cs | 99 - .../api/Support/SchemaType.Completer.cs | 39 - .../api/Support/SchemaType.TypeConverter.cs | 59 - .../generated/api/Support/SchemaType.cs | 97 - .../api/Support/SkuName.Completer.cs | 43 - .../api/Support/SkuName.TypeConverter.cs | 59 - .../generated/api/Support/SkuName.cs | 100 - .../api/Support/SkuTier.Completer.cs | 43 - .../api/Support/SkuTier.TypeConverter.cs | 59 - .../generated/api/Support/SkuTier.cs | 100 - .../api/Support/TlsVersion.Completer.cs | 43 - .../api/Support/TlsVersion.TypeConverter.cs | 59 - .../generated/api/Support/TlsVersion.cs | 100 - .../Support/UnavailableReason.Completer.cs | 55 - .../UnavailableReason.TypeConverter.cs | 59 - .../api/Support/UnavailableReason.cs | 106 - .../GetAzEventHubApplicationGroup_Get.cs | 114 +- ...EventHubApplicationGroup_GetViaIdentity.cs | 115 +- ...pplicationGroup_GetViaIdentityNamespace.cs | 501 + .../GetAzEventHubApplicationGroup_List.cs | 121 +- .../GetAzEventHubAuthorizationRule_Get.cs | 114 +- ...ventHubAuthorizationRule_GetViaIdentity.cs | 115 +- ...uthorizationRule_GetViaIdentityEventhub.cs | 505 + ...thorizationRule_GetViaIdentityNamespace.cs | 515 + .../GetAzEventHubAuthorizationRule_List.cs | 121 +- .../GetAzEventHubClusterNamespace_List.cs | 116 +- .../cmdlets/GetAzEventHubCluster_Get.cs | 112 +- .../GetAzEventHubCluster_GetViaIdentity.cs | 105 +- .../cmdlets/GetAzEventHubCluster_List.cs | 119 +- .../cmdlets/GetAzEventHubCluster_List1.cs | 119 +- ...tAzEventHubClustersAvailableRegion_List.cs | 116 +- .../cmdlets/GetAzEventHubConsumerGroup_Get.cs | 114 +- ...tAzEventHubConsumerGroup_GetViaIdentity.cs | 115 +- ...HubConsumerGroup_GetViaIdentityEventhub.cs | 505 + ...ubConsumerGroup_GetViaIdentityNamespace.cs | 515 + .../GetAzEventHubConsumerGroup_List.cs | 121 +- ...sterRecoveryConfigAuthorizationRule_Get.cs | 114 +- ...yConfigAuthorizationRule_GetViaIdentity.cs | 115 +- ...le_GetViaIdentityDisasterRecoveryConfig.cs | 506 + ...thorizationRule_GetViaIdentityNamespace.cs | 516 + ...terRecoveryConfigAuthorizationRule_List.cs | 121 +- ...zEventHubDisasterRecoveryConfigKey_List.cs | 114 +- .../GetAzEventHubGeoDRConfiguration_Get.cs | 114 +- ...entHubGeoDRConfiguration_GetViaIdentity.cs | 115 +- ...DRConfiguration_GetViaIdentityNamespace.cs | 502 + .../GetAzEventHubGeoDRConfiguration_List.cs | 121 +- .../cmdlets/GetAzEventHubKey_List.cs | 114 +- ...zEventHubNamespaceAuthorizationRule_Get.cs | 114 +- ...mespaceAuthorizationRule_GetViaIdentity.cs | 115 +- ...thorizationRule_GetViaIdentityNamespace.cs | 502 + ...EventHubNamespaceAuthorizationRule_List.cs | 121 +- .../cmdlets/GetAzEventHubNamespaceKey_List.cs | 114 +- .../cmdlets/GetAzEventHubNamespace_Get.cs | 114 +- .../GetAzEventHubNamespace_GetViaIdentity.cs | 115 +- .../cmdlets/GetAzEventHubNamespace_List.cs | 119 +- .../cmdlets/GetAzEventHubNamespace_List1.cs | 121 +- .../GetAzEventHubNetworkRuleSet_Get.cs | 114 +- ...AzEventHubNetworkRuleSet_GetViaIdentity.cs | 115 +- .../GetAzEventHubNetworkRuleSet_List.cs | 121 +- .../cmdlets/GetAzEventHubOperation_List.cs | 112 +- ...AzEventHubPrivateEndpointConnection_Get.cs | 115 +- ...rivateEndpointConnection_GetViaIdentity.cs | 116 +- ...pointConnection_GetViaIdentityNamespace.cs | 503 + ...zEventHubPrivateEndpointConnection_List.cs | 122 +- .../cmdlets/GetAzEventHubPrivateLink_Get.cs | 122 +- .../cmdlets/GetAzEventHubSchemaGroup_Get.cs | 114 +- ...GetAzEventHubSchemaGroup_GetViaIdentity.cs | 115 +- ...tHubSchemaGroup_GetViaIdentityNamespace.cs | 501 + .../cmdlets/GetAzEventHubSchemaGroup_List.cs | 121 +- .../generated/cmdlets/GetAzEventHub_Get.cs | 116 +- .../cmdlets/GetAzEventHub_GetViaIdentity.cs | 115 +- .../GetAzEventHub_GetViaIdentityNamespace.cs | 501 + .../generated/cmdlets/GetAzEventHub_List.cs | 121 +- ...reakDisasterRecoveryConfigPairing_Break.cs | 82 +- ...rRecoveryConfigPairing_BreakViaIdentity.cs | 83 +- ...ConfigPairing_BreakViaIdentityNamespace.cs | 494 + ...tHubFailDisasterRecoveryConfigOver_Fail.cs | 82 +- ...asterRecoveryConfigOver_FailViaIdentity.cs | 83 +- ...veryConfigOver_FailViaIdentityNamespace.cs | 494 + ...EventHubApplicationGroup_CreateExpanded.cs | 124 +- ...ntHubApplicationGroup_CreateViaIdentity.cs | 132 +- ...icationGroup_CreateViaIdentityNamespace.cs | 518 + ...roup_CreateViaIdentityNamespaceExpanded.cs | 550 + ...ventHubAuthorizationRule_CreateExpanded.cs | 128 +- ...tHubAuthorizationRule_CreateViaIdentity.cs | 134 +- ...orizationRule_CreateViaIdentityEventhub.cs | 525 + ...nRule_CreateViaIdentityEventhubExpanded.cs | 528 + ...rizationRule_CreateViaIdentityNamespace.cs | 535 + ...Rule_CreateViaIdentityNamespaceExpanded.cs | 538 + .../NewAzEventHubCluster_CreateExpanded.cs | 145 +- .../NewAzEventHubCluster_CreateViaIdentity.cs | 142 +- ...wAzEventHubConsumerGroup_CreateExpanded.cs | 122 +- ...EventHubConsumerGroup_CreateViaIdentity.cs | 134 +- ...ConsumerGroup_CreateViaIdentityEventhub.cs | 522 + ...Group_CreateViaIdentityEventhubExpanded.cs | 526 + ...onsumerGroup_CreateViaIdentityNamespace.cs | 532 + ...roup_CreateViaIdentityNamespaceExpanded.cs | 537 + ...entHubGeoDRConfiguration_CreateExpanded.cs | 150 +- ...HubGeoDRConfiguration_CreateViaIdentity.cs | 162 +- ...onfiguration_CreateViaIdentityNamespace.cs | 571 + ...tion_CreateViaIdentityNamespaceExpanded.cs | 585 + .../cmdlets/NewAzEventHubKey_Regenerate.cs | 121 +- ...entHubKey_RegenerateViaIdentityEventhub.cs | 524 + ...y_RegenerateViaIdentityEventhubExpanded.cs | 538 + ...ntHubKey_RegenerateViaIdentityNamespace.cs | 534 + ..._RegenerateViaIdentityNamespaceExpanded.cs | 548 + ...AzEventHubKey_RegenerateViaJsonFilePath.cs | 555 + ...ewAzEventHubKey_RegenerateViaJsonString.cs | 553 + ...mespaceAuthorizationRule_CreateExpanded.cs | 126 +- ...paceAuthorizationRule_CreateViaIdentity.cs | 132 +- ...rizationRule_CreateViaIdentityNamespace.cs | 519 + ...Rule_CreateViaIdentityNamespaceExpanded.cs | 521 + .../NewAzEventHubNamespaceKey_Regenerate.cs | 121 +- ...spaceKey_RegenerateViaIdentityNamespace.cs | 522 + ..._RegenerateViaIdentityNamespaceExpanded.cs | 537 + ...bNamespaceKey_RegenerateViaJsonFilePath.cs | 543 + ...HubNamespaceKey_RegenerateViaJsonString.cs | 541 + .../NewAzEventHubNamespace_CreateExpanded.cs | 197 +- ...ewAzEventHubNamespace_CreateViaIdentity.cs | 150 +- ...AzEventHubNetworkRuleSet_CreateExpanded.cs | 140 +- ...ventHubNetworkRuleSet_CreateViaIdentity.cs | 132 +- ...rivateEndpointConnection_CreateExpanded.cs | 193 +- ...ateEndpointConnection_CreateViaIdentity.cs | 185 +- ...ntConnection_CreateViaIdentityNamespace.cs | 629 + ...tion_CreateViaIdentityNamespaceExpanded.cs | 664 + ...NewAzEventHubSchemaGroup_CreateExpanded.cs | 138 +- ...AzEventHubSchemaGroup_CreateViaIdentity.cs | 132 +- ...bSchemaGroup_CreateViaIdentityNamespace.cs | 518 + ...roup_CreateViaIdentityNamespaceExpanded.cs | 543 + .../cmdlets/NewAzEventHub_CreateExpanded.cs | 164 +- .../NewAzEventHub_CreateViaIdentity.cs | 132 +- ...ewAzEventHub_CreateViaIdentityNamespace.cs | 518 + ...tHub_CreateViaIdentityNamespaceExpanded.cs | 778 + ...RemoveAzEventHubApplicationGroup_Delete.cs | 82 +- ...ntHubApplicationGroup_DeleteViaIdentity.cs | 83 +- ...icationGroup_DeleteViaIdentityNamespace.cs | 525 + ...emoveAzEventHubAuthorizationRule_Delete.cs | 82 +- ...tHubAuthorizationRule_DeleteViaIdentity.cs | 83 +- ...orizationRule_DeleteViaIdentityEventhub.cs | 529 + ...rizationRule_DeleteViaIdentityNamespace.cs | 539 + .../cmdlets/RemoveAzEventHubCluster_Delete.cs | 98 +- ...moveAzEventHubCluster_DeleteViaIdentity.cs | 91 +- .../RemoveAzEventHubConsumerGroup_Delete.cs | 82 +- ...EventHubConsumerGroup_DeleteViaIdentity.cs | 83 +- ...ConsumerGroup_DeleteViaIdentityEventhub.cs | 529 + ...onsumerGroup_DeleteViaIdentityNamespace.cs | 539 + ...moveAzEventHubGeoDRConfiguration_Delete.cs | 82 +- ...HubGeoDRConfiguration_DeleteViaIdentity.cs | 83 +- ...onfiguration_DeleteViaIdentityNamespace.cs | 525 + ...entHubNamespaceAuthorizationRule_Delete.cs | 82 +- ...paceAuthorizationRule_DeleteViaIdentity.cs | 83 +- ...rizationRule_DeleteViaIdentityNamespace.cs | 526 + .../RemoveAzEventHubNamespace_Delete.cs | 102 +- ...veAzEventHubNamespace_DeleteViaIdentity.cs | 101 +- ...ventHubPrivateEndpointConnection_Delete.cs | 103 +- ...ateEndpointConnection_DeleteViaIdentity.cs | 102 +- ...ntConnection_DeleteViaIdentityNamespace.cs | 611 + .../RemoveAzEventHubSchemaGroup_Delete.cs | 82 +- ...AzEventHubSchemaGroup_DeleteViaIdentity.cs | 83 +- ...bSchemaGroup_DeleteViaIdentityNamespace.cs | 525 + .../cmdlets/RemoveAzEventHub_Delete.cs | 82 +- .../RemoveAzEventHub_DeleteViaIdentity.cs | 83 +- ...veAzEventHub_DeleteViaIdentityNamespace.cs | 525 + ...terRecoveryConfigNameAvailability_Check.cs | 119 +- ...eryConfigNameAvailability_CheckExpanded.cs | 114 +- ...ConfigNameAvailability_CheckViaIdentity.cs | 116 +- ...meAvailability_CheckViaIdentityExpanded.cs | 111 +- ...igNameAvailability_CheckViaJsonFilePath.cs | 528 + ...nfigNameAvailability_CheckViaJsonString.cs | 526 + ...EventHubNamespaceNameAvailability_Check.cs | 119 +- ...NamespaceNameAvailability_CheckExpanded.cs | 114 +- ...eNameAvailability_CheckViaJsonFilePath.cs} | 188 +- ...aceNameAvailability_CheckViaJsonString.cs} | 186 +- .../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 | 35 +- .../runtime/BuildTime/Models/PsProxyTypes.cs | 52 +- .../runtime/BuildTime/PsAttributes.cs | 10 + .../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 + ...ove-AzEventHubPrivateEndpointConnection.md | 2 +- .../EventHub.Autorest/help/Az.EventHub.md | 12 +- ...eny-AzEventHubPrivateEndpointConnection.md | 2 +- .../EventHub.Autorest/help/Get-AzEventHub.md | 26 +- .../help/Get-AzEventHubApplicationGroup.md | 26 +- .../help/Get-AzEventHubAuthorizationRule.md | 2 +- .../help/Get-AzEventHubCluster.md | 3 +- .../help/Get-AzEventHubClusterNamespace.md | 2 +- .../Get-AzEventHubClustersAvailableRegion.md | 2 +- .../help/Get-AzEventHubConsumerGroup.md | 49 +- .../help/Get-AzEventHubGeoDRConfiguration.md | 26 +- .../help/Get-AzEventHubKey.md | 2 +- .../help/Get-AzEventHubNamespace.md | 3 +- .../help/Get-AzEventHubNetworkRuleSet.md | 5 +- ...Get-AzEventHubPrivateEndpointConnection.md | 30 +- .../help/Get-AzEventHubPrivateLink.md | 4 +- .../help/Get-AzEventHubSchemaGroup.md | 26 +- .../EventHub.Autorest/help/New-AzEventHub.md | 110 +- .../help/New-AzEventHubApplicationGroup.md | 69 +- .../help/New-AzEventHubAuthorizationRule.md | 12 +- .../help/New-AzEventHubCluster.md | 6 +- .../help/New-AzEventHubConsumerGroup.md | 90 +- .../help/New-AzEventHubGeoDRConfiguration.md | 64 +- .../help/New-AzEventHubIPRuleConfig.md | 6 +- .../help/New-AzEventHubKey.md | 8 +- .../New-AzEventHubKeyVaultPropertiesObject.md | 4 +- .../help/New-AzEventHubNamespace.md | 17 +- .../help/New-AzEventHubSchemaGroup.md | 74 +- .../New-AzEventHubThrottlingPolicyConfig.md | 6 +- .../New-AzEventHubVirtualNetworkRuleConfig.md | 2 +- .../help/Remove-AzEventHub.md | 24 +- .../help/Remove-AzEventHubApplicationGroup.md | 24 +- .../Remove-AzEventHubAuthorizationRule.md | 2 +- .../help/Remove-AzEventHubCluster.md | 1 - .../help/Remove-AzEventHubConsumerGroup.md | 47 +- .../Remove-AzEventHubGeoDRConfiguration.md | 24 +- .../help/Remove-AzEventHubNamespace.md | 1 - ...ove-AzEventHubPrivateEndpointConnection.md | 26 +- .../help/Remove-AzEventHubSchemaGroup.md | 24 +- .../EventHub.Autorest/help/Set-AzEventHub.md | 29 +- .../help/Set-AzEventHubApplicationGroup.md | 7 +- .../help/Set-AzEventHubAuthorizationRule.md | 10 +- .../help/Set-AzEventHubCluster.md | 5 +- .../help/Set-AzEventHubConsumerGroup.md | 2 +- .../help/Set-AzEventHubNamespace.md | 20 +- .../help/Set-AzEventHubNetworkRuleSet.md | 18 +- .../help/Test-AzEventHubName.md | 2 +- .../Get-AzEventHubAuthorizationRule.ps1 | 54 +- ...isasterRecoveryConfigAuthorizationRule.ps1 | 54 +- ...et-AzEventHubDisasterRecoveryConfigKey.ps1 | 6 +- .../internal/Get-AzEventHubKey.ps1 | 6 +- ...t-AzEventHubNamespaceAuthorizationRule.ps1 | 30 +- .../internal/Get-AzEventHubNamespaceKey.ps1 | 6 +- .../internal/Get-AzEventHubOperation.ps1 | 4 +- ...tHubBreakDisasterRecoveryConfigPairing.ps1 | 26 +- ...EventHubFailDisasterRecoveryConfigOver.ps1 | 26 +- .../internal/New-AzEventHub.ps1 | 28 +- .../New-AzEventHubApplicationGroup.ps1 | 22 +- .../New-AzEventHubAuthorizationRule.ps1 | 86 +- .../internal/New-AzEventHubCluster.ps1 | 20 +- .../internal/New-AzEventHubConsumerGroup.ps1 | 20 +- .../New-AzEventHubGeoDRConfiguration.ps1 | 20 +- .../internal/New-AzEventHubKey.ps1 | 124 +- .../internal/New-AzEventHubNamespace.ps1 | 101 +- ...w-AzEventHubNamespaceAuthorizationRule.ps1 | 56 +- .../internal/New-AzEventHubNamespaceKey.ps1 | 83 +- .../internal/New-AzEventHubNetworkRuleSet.ps1 | 50 +- ...ew-AzEventHubPrivateEndpointConnection.ps1 | 69 +- .../internal/New-AzEventHubSchemaGroup.ps1 | 26 +- .../internal/ProxyCmdletDefinitions.ps1 | 1086 +- .../Remove-AzEventHubAuthorizationRule.ps1 | 50 +- ...e-AzEventHubNamespaceAuthorizationRule.ps1 | 26 +- ...DisasterRecoveryConfigNameAvailability.ps1 | 34 +- ...st-AzEventHubNamespaceNameAvailability.ps1 | 59 +- src/EventHub/EventHub.Autorest/run-module.ps1 | 8 +- .../EventHub.Autorest/test-module.ps1 | 10 +- ...ubPrivateEndpointConnection.Recording.json | 388 +- ...ventHubPrivateEndpointConnection.Tests.ps1 | 10 +- ...ubPrivateEndpointConnection.Recording.json | 164 +- .../test/Get-AzEventHub.Recording.json | 150 +- ...-AzEventHubApplicationGroup.Recording.json | 155 +- ...AzEventHubAuthorizationRule.Recording.json | 224 +- .../test/Get-AzEventHubCluster.Recording.json | 276 + .../test/Get-AzEventHubCluster.Tests.ps1 | 18 +- ...-AzEventHubClusterNamespace.Recording.json | 24 +- .../Get-AzEventHubClusterNamespace.Tests.ps1 | 2 +- ...Get-AzEventHubConsumerGroup.Recording.json | 140 +- .../test/Get-AzEventHubKey.Recording.json | 56 +- .../Get-AzEventHubNamespaceV2.Recording.json | 166 +- .../test/Get-AzEventHubNamespaceV2.Tests.ps1 | 5 +- ...et-AzEventHubNetworkRuleSet.Recording.json | 30 +- ...ubPrivateEndpointConnection.Recording.json | 112 +- .../Get-AzEventHubPrivateLink.Recording.json | 75 +- .../test/Get-AzEventHubPrivateLink.Tests.ps1 | 3 +- .../Get-AzEventHubSchemaGroup.Recording.json | 125 +- .../test/New-AzEventHub.Recording.json | 760 +- .../test/New-AzEventHub.Tests.ps1 | 2 +- ...-AzEventHubApplicationGroup.Recording.json | 47 +- ...AzEventHubAuthorizationRule.Recording.json | 100 +- ...New-AzEventHubConsumerGroup.Recording.json | 46 +- ...zEventHubGeoDRConfiguration.Recording.json | 404 +- ...New-AzEventHubGeoDRConfiguration.Tests.ps1 | 6 +- .../test/New-AzEventHubKey.Recording.json | 240 +- .../New-AzEventHubNamespaceV2.Recording.json | 2521 +- .../test/New-AzEventHubNamespaceV2.Tests.ps1 | 25 +- .../New-AzEventHubSchemaGroup.Recording.json | 50 +- .../test/Remove-AzEventHub.Recording.json | 152 +- .../test/Remove-AzEventHub.Tests.ps1 | 4 +- ...-AzEventHubApplicationGroup.Recording.json | 214 +- ...emove-AzEventHubApplicationGroup.Tests.ps1 | 4 +- ...AzEventHubAuthorizationRule.Recording.json | 520 +- ...move-AzEventHubAuthorizationRule.Tests.ps1 | 8 +- .../test/Remove-AzEventHubCluster.Tests.ps1 | 4 +- ...ove-AzEventHubConsumerGroup.Recording.json | 148 +- .../Remove-AzEventHubConsumerGroup.Tests.ps1 | 4 +- ...emove-AzEventHubNamespaceV2.Recording.json | 450 +- .../Remove-AzEventHubNamespaceV2.Tests.ps1 | 8 +- ...ubPrivateEndpointConnection.Recording.json | 220 +- ...ventHubPrivateEndpointConnection.Tests.ps1 | 4 +- ...emove-AzEventHubSchemaGroup.Recording.json | 161 +- .../Remove-AzEventHubSchemaGroup.Tests.ps1 | 4 +- .../test/Set-AzEventHub.Recording.json | 418 +- .../test/Set-AzEventHub.Tests.ps1 | 2 +- ...-AzEventHubApplicationGroup.Recording.json | 374 - .../Set-AzEventHubApplicationGroup.Tests.ps1 | 6 +- ...AzEventHubAuthorizationRule.Recording.json | 256 +- .../test/Set-AzEventHubCluster.Tests.ps1 | 2 +- ...Set-AzEventHubConsumerGroup.Recording.json | 130 +- ...GeoDRConfigurationBreakPair.Recording.json | 1037 +- ...ntHubGeoDRConfigurationBreakPair.Tests.ps1 | 26 +- ...bGeoDRConfigurationFailOver.Recording.json | 937 +- ...entHubGeoDRConfigurationFailOver.Tests.ps1 | 35 +- .../Set-AzEventHubNamespaceV2.Recording.json | 3194 +-- .../test/Set-AzEventHubNamespaceV2.Tests.ps1 | 7 +- ...et-AzEventHubNetworkRuleSet.Recording.json | 350 +- .../Set-AzEventHubNetworkRuleSet.Tests.ps1 | 2 +- .../test/Test-AzEventHubName.Recording.json | 32 +- .../DependentResourcesParameters.json | 12 + .../DependentResourcesTemplate.json | 187 + .../disasterRecoveryParameter.json | 2 +- .../disasterRecoveryTemplate.json | 20 +- .../keyVaultParameter.json | 21 - .../keyVaultParameters.json | 12 + .../deployment-template/keyVaultTemplate.json | 82 +- .../test/deployment-template/parameter.json | 35 +- .../test/deployment-template/template.json | 148 +- src/EventHub/EventHub.Autorest/test/env.json | 110 +- .../EventHub.Autorest/test/localEnv.json | 112 +- src/EventHub/EventHub.Autorest/test/utils.ps1 | 159 +- src/EventHub/EventHub/Az.EventHub.psd1 | 12 +- src/EventHub/EventHub/ChangeLog.md | 1 + ...ove-AzEventHubPrivateEndpointConnection.md | 21 +- src/EventHub/EventHub/help/Az.EventHub.md | 12 +- ...eny-AzEventHubPrivateEndpointConnection.md | 21 +- src/EventHub/EventHub/help/Get-AzEventHub.md | 47 +- .../help/Get-AzEventHubApplicationGroup.md | 47 +- .../help/Get-AzEventHubAuthorizationRule.md | 25 +- .../EventHub/help/Get-AzEventHubCluster.md | 26 +- .../help/Get-AzEventHubClusterNamespace.md | 19 +- .../Get-AzEventHubClustersAvailableRegion.md | 19 +- .../help/Get-AzEventHubConsumerGroup.md | 70 +- .../help/Get-AzEventHubGeoDRConfiguration.md | 47 +- .../EventHub/help/Get-AzEventHubKey.md | 23 +- .../EventHub/help/Get-AzEventHubNamespace.md | 26 +- .../help/Get-AzEventHubNetworkRuleSet.md | 26 +- ...Get-AzEventHubPrivateEndpointConnection.md | 52 +- .../help/Get-AzEventHubPrivateLink.md | 22 +- .../help/Get-AzEventHubSchemaGroup.md | 47 +- src/EventHub/EventHub/help/New-AzEventHub.md | 128 +- .../help/New-AzEventHubApplicationGroup.md | 87 +- .../help/New-AzEventHubAuthorizationRule.md | 27 +- ...New-AzEventHubAuthorizationRuleSASToken.md | 17 +- .../EventHub/help/New-AzEventHubCluster.md | 23 +- .../help/New-AzEventHubConsumerGroup.md | 111 +- .../help/New-AzEventHubGeoDRConfiguration.md | 82 +- .../help/New-AzEventHubIPRuleConfig.md | 21 +- .../EventHub/help/New-AzEventHubKey.md | 27 +- .../New-AzEventHubKeyVaultPropertiesObject.md | 21 +- .../EventHub/help/New-AzEventHubNamespace.md | 35 +- .../help/New-AzEventHubSchemaGroup.md | 90 +- .../New-AzEventHubThrottlingPolicyConfig.md | 23 +- .../New-AzEventHubVirtualNetworkRuleConfig.md | 19 +- .../EventHub/help/Remove-AzEventHub.md | 43 +- .../help/Remove-AzEventHubApplicationGroup.md | 44 +- .../Remove-AzEventHubAuthorizationRule.md | 23 +- .../EventHub/help/Remove-AzEventHubCluster.md | 20 +- .../help/Remove-AzEventHubConsumerGroup.md | 68 +- .../Remove-AzEventHubGeoDRConfiguration.md | 44 +- .../help/Remove-AzEventHubNamespace.md | 20 +- ...ove-AzEventHubPrivateEndpointConnection.md | 47 +- .../help/Remove-AzEventHubSchemaGroup.md | 44 +- src/EventHub/EventHub/help/Set-AzEventHub.md | 44 +- .../help/Set-AzEventHubApplicationGroup.md | 26 +- .../help/Set-AzEventHubAuthorizationRule.md | 31 +- .../EventHub/help/Set-AzEventHubCluster.md | 24 +- .../help/Set-AzEventHubConsumerGroup.md | 21 +- ...t-AzEventHubGeoDRConfigurationBreakPair.md | 19 +- ...et-AzEventHubGeoDRConfigurationFailOver.md | 19 +- .../EventHub/help/Set-AzEventHubNamespace.md | 43 +- .../help/Set-AzEventHubNetworkRuleSet.md | 37 +- .../EventHub/help/Test-AzEventHubName.md | 21 +- .../Az.EventHub/BreakingChangeIssues.csv | 160 + 928 files changed, 77422 insertions(+), 33115 deletions(-) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/AccessKeys.PowerShell.cs (66%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/AccessKeys.TypeConverter.cs (97%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/AccessKeys.cs (85%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/AccessKeys.json.cs (89%) delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Cluster.PowerShell.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespace.PowerShell.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespaceProperties.PowerShell.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Eventhub.PowerShell.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EventhubProperties.PowerShell.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkRuleSet.PowerShell.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfiguration.PowerShell.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfigurationProperties.PowerShell.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateEndpointConnection.PowerShell.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/SchemaGroup.PowerShell.cs rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ApplicationGroup.PowerShell.cs (51%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ApplicationGroup.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ApplicationGroup.cs (64%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ApplicationGroup.json.cs (91%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ApplicationGroupListResult.PowerShell.cs (75%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ApplicationGroupListResult.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ApplicationGroupListResult.cs (74%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ApplicationGroupListResult.json.cs (88%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ApplicationGroupPolicy.PowerShell.cs (80%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ApplicationGroupPolicy.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ApplicationGroupPolicy.cs (85%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ApplicationGroupPolicy.json.cs (91%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ApplicationGroupProperties.PowerShell.cs (71%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ApplicationGroupProperties.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ApplicationGroupProperties.cs (83%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ApplicationGroupProperties.json.cs (88%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ArmDisasterRecovery.PowerShell.cs (50%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ArmDisasterRecovery.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ArmDisasterRecovery.cs (61%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ArmDisasterRecovery.json.cs (91%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ArmDisasterRecoveryListResult.PowerShell.cs (74%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ArmDisasterRecoveryListResult.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ArmDisasterRecoveryListResult.cs (74%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ArmDisasterRecoveryListResult.json.cs (88%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ArmDisasterRecoveryProperties.PowerShell.cs (66%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ArmDisasterRecoveryProperties.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ArmDisasterRecoveryProperties.cs (76%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ArmDisasterRecoveryProperties.json.cs (91%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/AuthorizationRule.PowerShell.cs (53%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/AuthorizationRule.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/AuthorizationRule.cs (60%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/AuthorizationRule.json.cs (91%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/AuthorizationRuleListResult.PowerShell.cs (74%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/AuthorizationRuleListResult.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/AuthorizationRuleListResult.cs (75%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/AuthorizationRuleListResult.json.cs (89%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/AuthorizationRuleProperties.PowerShell.cs (79%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/AuthorizationRuleProperties.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/AuthorizationRuleProperties.cs (65%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/AuthorizationRuleProperties.json.cs (88%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/AvailableCluster.PowerShell.cs (84%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/AvailableCluster.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/AvailableCluster.cs (87%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/AvailableCluster.json.cs (94%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/AvailableClustersList.PowerShell.cs (78%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/AvailableClustersList.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/AvailableClustersList.cs (69%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/AvailableClustersList.json.cs (89%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/CaptureDescription.PowerShell.cs (50%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/CaptureDescription.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/CaptureDescription.cs (74%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/CaptureDescription.json.cs (92%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/CaptureIdentity.PowerShell.cs (78%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/CaptureIdentity.TypeConverter.cs (97%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/CaptureIdentity.cs (80%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/CaptureIdentity.json.cs (93%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/CheckNameAvailabilityParameter.PowerShell.cs (83%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/CheckNameAvailabilityParameter.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/CheckNameAvailabilityParameter.cs (86%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/CheckNameAvailabilityParameter.json.cs (93%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/CheckNameAvailabilityResult.PowerShell.cs (73%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/CheckNameAvailabilityResult.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/CheckNameAvailabilityResult.cs (77%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/CheckNameAvailabilityResult.json.cs (92%) create mode 100644 src/EventHub/EventHub.Autorest/generated/api/Models/Cluster.PowerShell.cs rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/Cluster.TypeConverter.cs (97%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/Cluster.cs (62%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/Cluster.json.cs (89%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ClusterListResult.PowerShell.cs (76%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ClusterListResult.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ClusterListResult.cs (77%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ClusterListResult.json.cs (90%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ClusterProperties.PowerShell.cs (67%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ClusterProperties.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ClusterProperties.cs (79%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ClusterProperties.json.cs (89%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ClusterSku.PowerShell.cs (80%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ClusterSku.TypeConverter.cs (97%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ClusterSku.cs (87%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ClusterSku.json.cs (92%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ConnectionState.PowerShell.cs (78%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ConnectionState.TypeConverter.cs (97%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ConnectionState.cs (73%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ConnectionState.json.cs (94%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ConsumerGroup.PowerShell.cs (53%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ConsumerGroup.TypeConverter.cs (97%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ConsumerGroup.cs (64%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ConsumerGroup.json.cs (92%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ConsumerGroupListResult.PowerShell.cs (75%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ConsumerGroupListResult.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ConsumerGroupListResult.cs (75%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ConsumerGroupListResult.json.cs (89%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ConsumerGroupProperties.PowerShell.cs (72%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ConsumerGroupProperties.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ConsumerGroupProperties.cs (88%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ConsumerGroupProperties.json.cs (93%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/Destination.PowerShell.cs (58%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/Destination.TypeConverter.cs (97%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/Destination.cs (71%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/Destination.json.cs (91%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/DestinationProperties.PowerShell.cs (67%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/DestinationProperties.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/DestinationProperties.cs (92%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/DestinationProperties.json.cs (92%) create mode 100644 src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespace.PowerShell.cs rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/EhNamespace.TypeConverter.cs (97%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/EhNamespace.cs (61%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/EhNamespace.json.cs (89%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/EhNamespaceIdContainer.PowerShell.cs (83%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/EhNamespaceIdContainer.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/EhNamespaceIdContainer.cs (85%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/EhNamespaceIdContainer.json.cs (94%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/EhNamespaceIdListResult.PowerShell.cs (78%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/EhNamespaceIdListResult.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/EhNamespaceIdListResult.cs (65%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/EhNamespaceIdListResult.json.cs (89%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/EhNamespaceListResult.PowerShell.cs (75%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/EhNamespaceListResult.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/EhNamespaceListResult.cs (75%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/EhNamespaceListResult.json.cs (89%) create mode 100644 src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespaceProperties.PowerShell.cs rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/EhNamespaceProperties.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/EhNamespaceProperties.cs (73%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/EhNamespaceProperties.json.cs (88%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/Encryption.PowerShell.cs (71%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/Encryption.TypeConverter.cs (97%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/Encryption.cs (68%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/Encryption.json.cs (88%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api20 => }/ErrorAdditionalInfo.PowerShell.cs (80%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api20 => }/ErrorAdditionalInfo.TypeConverter.cs (97%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api20 => }/ErrorAdditionalInfo.cs (82%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api20 => }/ErrorAdditionalInfo.json.cs (93%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api20 => }/ErrorDetail.PowerShell.cs (68%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api20 => }/ErrorDetail.TypeConverter.cs (97%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api20 => }/ErrorDetail.cs (66%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api20 => }/ErrorDetail.json.cs (84%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api20 => }/ErrorDetailAutoGenerated.PowerShell.cs (67%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api20 => }/ErrorDetailAutoGenerated.TypeConverter.cs (97%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api20 => }/ErrorDetailAutoGenerated.cs (65%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api20 => }/ErrorDetailAutoGenerated.json.cs (84%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api20 => }/ErrorResponse.PowerShell.cs (66%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api20 => }/ErrorResponse.TypeConverter.cs (97%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api20 => }/ErrorResponse.cs (58%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api20 => }/ErrorResponse.json.cs (95%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api20 => }/ErrorResponseAutoGenerated.PowerShell.cs (64%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api20 => }/ErrorResponseAutoGenerated.TypeConverter.cs (97%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api20 => }/ErrorResponseAutoGenerated.cs (56%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api20 => }/ErrorResponseAutoGenerated.json.cs (94%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/EventHubListResult.PowerShell.cs (76%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/EventHubListResult.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/EventHubListResult.cs (75%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/EventHubListResult.json.cs (89%) create mode 100644 src/EventHub/EventHub.Autorest/generated/api/Models/Eventhub.PowerShell.cs rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/Eventhub.TypeConverter.cs (97%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/Eventhub.cs (65%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/Eventhub.json.cs (90%) create mode 100644 src/EventHub/EventHub.Autorest/generated/api/Models/EventhubProperties.PowerShell.cs rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/EventhubProperties.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/EventhubProperties.cs (69%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/EventhubProperties.json.cs (89%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/FailOver.PowerShell.cs (74%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/FailOver.TypeConverter.cs (97%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/FailOver.cs (76%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/FailOver.json.cs (92%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/FailOverProperties.PowerShell.cs (78%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/FailOverProperties.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/FailOverProperties.cs (93%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/FailOverProperties.json.cs (93%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/GeoDataReplicationProperties.PowerShell.cs (73%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/GeoDataReplicationProperties.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/GeoDataReplicationProperties.cs (79%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/GeoDataReplicationProperties.json.cs (89%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/Identity.PowerShell.cs (71%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/Identity.TypeConverter.cs (97%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/Identity.cs (70%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/Identity.json.cs (90%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/IdentityUserAssignedIdentities.PowerShell.cs (88%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/IdentityUserAssignedIdentities.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/IdentityUserAssignedIdentities.cs (77%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/IdentityUserAssignedIdentities.dictionary.cs (66%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/IdentityUserAssignedIdentities.json.cs (90%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/KeyVaultProperties.PowerShell.cs (69%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/KeyVaultProperties.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/KeyVaultProperties.cs (76%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/KeyVaultProperties.json.cs (93%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NamespaceReplicaLocation.PowerShell.cs (74%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NamespaceReplicaLocation.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NamespaceReplicaLocation.cs (81%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NamespaceReplicaLocation.json.cs (93%) create mode 100644 src/EventHub/EventHub.Autorest/generated/api/Models/NetworkRuleSet.PowerShell.cs rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NetworkRuleSet.TypeConverter.cs (97%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NetworkRuleSet.cs (58%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NetworkRuleSet.json.cs (91%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NetworkRuleSetListResult.PowerShell.cs (75%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NetworkRuleSetListResult.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NetworkRuleSetListResult.cs (75%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NetworkRuleSetListResult.json.cs (89%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NetworkRuleSetProperties.PowerShell.cs (60%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NetworkRuleSetProperties.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NetworkRuleSetProperties.cs (65%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NetworkRuleSetProperties.json.cs (86%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NetworkSecurityPerimeter.PowerShell.cs (76%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NetworkSecurityPerimeter.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NetworkSecurityPerimeter.cs (89%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NetworkSecurityPerimeter.json.cs (93%) create mode 100644 src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfiguration.PowerShell.cs rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NetworkSecurityPerimeterConfiguration.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NetworkSecurityPerimeterConfiguration.cs (53%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NetworkSecurityPerimeterConfiguration.json.cs (91%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NetworkSecurityPerimeterConfigurationList.PowerShell.cs (76%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NetworkSecurityPerimeterConfigurationList.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NetworkSecurityPerimeterConfigurationList.cs (61%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NetworkSecurityPerimeterConfigurationList.json.cs (88%) create mode 100644 src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfigurationProperties.PowerShell.cs rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NetworkSecurityPerimeterConfigurationProperties.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NetworkSecurityPerimeterConfigurationProperties.cs (58%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NetworkSecurityPerimeterConfigurationProperties.json.cs (84%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NetworkSecurityPerimeterConfigurationPropertiesProfile.PowerShell.cs (70%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NetworkSecurityPerimeterConfigurationPropertiesProfile.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NetworkSecurityPerimeterConfigurationPropertiesProfile.cs (76%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NetworkSecurityPerimeterConfigurationPropertiesProfile.json.cs (88%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation.PowerShell.cs (73%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation.cs (72%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation.json.cs (92%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NspAccessRule.PowerShell.cs (56%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NspAccessRule.TypeConverter.cs (97%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NspAccessRule.cs (56%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NspAccessRule.json.cs (92%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NspAccessRuleProperties.PowerShell.cs (60%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NspAccessRuleProperties.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NspAccessRuleProperties.cs (54%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NspAccessRuleProperties.json.cs (82%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NspAccessRulePropertiesSubscriptionsItem.PowerShell.cs (82%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NspAccessRulePropertiesSubscriptionsItem.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NspAccessRulePropertiesSubscriptionsItem.cs (85%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NspAccessRulePropertiesSubscriptionsItem.json.cs (93%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NwRuleSetIPRules.PowerShell.cs (78%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NwRuleSetIPRules.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NwRuleSetIPRules.cs (73%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NwRuleSetIPRules.json.cs (93%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NwRuleSetVirtualNetworkRules.PowerShell.cs (72%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NwRuleSetVirtualNetworkRules.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NwRuleSetVirtualNetworkRules.cs (75%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/NwRuleSetVirtualNetworkRules.json.cs (93%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/Operation.PowerShell.cs (62%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/Operation.TypeConverter.cs (97%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/Operation.cs (76%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/Operation.json.cs (91%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/OperationDisplay.PowerShell.cs (74%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/OperationDisplay.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/OperationDisplay.cs (84%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/OperationDisplay.json.cs (90%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/OperationListResult.PowerShell.cs (76%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/OperationListResult.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/OperationListResult.cs (73%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/OperationListResult.json.cs (88%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/PrivateEndpoint.PowerShell.cs (84%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/PrivateEndpoint.TypeConverter.cs (97%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/PrivateEndpoint.cs (86%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/PrivateEndpoint.json.cs (94%) create mode 100644 src/EventHub/EventHub.Autorest/generated/api/Models/PrivateEndpointConnection.PowerShell.cs rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/PrivateEndpointConnection.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/PrivateEndpointConnection.cs (56%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/PrivateEndpointConnection.json.cs (91%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/PrivateEndpointConnectionListResult.PowerShell.cs (74%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/PrivateEndpointConnectionListResult.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/PrivateEndpointConnectionListResult.cs (73%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/PrivateEndpointConnectionListResult.json.cs (89%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/PrivateEndpointConnectionProperties.PowerShell.cs (59%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/PrivateEndpointConnectionProperties.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/PrivateEndpointConnectionProperties.cs (55%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/PrivateEndpointConnectionProperties.json.cs (91%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/PrivateLinkResource.PowerShell.cs (64%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/PrivateLinkResource.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/PrivateLinkResource.cs (70%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/PrivateLinkResource.json.cs (92%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/PrivateLinkResourceProperties.PowerShell.cs (73%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/PrivateLinkResourceProperties.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/PrivateLinkResourceProperties.cs (74%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/PrivateLinkResourceProperties.json.cs (88%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/PrivateLinkResourcesListResult.PowerShell.cs (74%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/PrivateLinkResourcesListResult.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/PrivateLinkResourcesListResult.cs (73%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/PrivateLinkResourcesListResult.json.cs (89%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ProvisioningIssue.PowerShell.cs (72%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ProvisioningIssue.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ProvisioningIssue.cs (68%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ProvisioningIssue.json.cs (92%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ProvisioningIssueProperties.PowerShell.cs (78%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ProvisioningIssueProperties.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ProvisioningIssueProperties.cs (87%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ProvisioningIssueProperties.json.cs (93%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api20 => }/ProxyResource.PowerShell.cs (77%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api20 => }/ProxyResource.TypeConverter.cs (97%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api20 => }/ProxyResource.cs (88%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api20 => }/ProxyResource.json.cs (91%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/RegenerateAccessKeyParameters.PowerShell.cs (78%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/RegenerateAccessKeyParameters.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/RegenerateAccessKeyParameters.cs (77%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/RegenerateAccessKeyParameters.json.cs (93%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api10 => }/Resource.PowerShell.cs (80%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api10 => }/Resource.TypeConverter.cs (97%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api10 => }/Resource.cs (88%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api10 => }/Resource.json.cs (91%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/RetentionDescription.PowerShell.cs (72%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/RetentionDescription.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/RetentionDescription.cs (86%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/RetentionDescription.json.cs (94%) create mode 100644 src/EventHub/EventHub.Autorest/generated/api/Models/SchemaGroup.PowerShell.cs rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/SchemaGroup.TypeConverter.cs (97%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/SchemaGroup.cs (58%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/SchemaGroup.json.cs (90%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/SchemaGroupListResult.PowerShell.cs (75%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/SchemaGroupListResult.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/SchemaGroupListResult.cs (75%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/SchemaGroupListResult.json.cs (89%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/SchemaGroupProperties.PowerShell.cs (88%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/SchemaGroupProperties.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/SchemaGroupProperties.cs (79%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/SchemaGroupProperties.dictionary.cs (95%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/SchemaGroupProperties.json.cs (95%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/SchemaGroupProperties1.PowerShell.cs (61%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/SchemaGroupProperties1.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/SchemaGroupProperties1.cs (68%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/SchemaGroupProperties1.json.cs (91%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/Sku.PowerShell.cs (76%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/Sku.TypeConverter.cs (97%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/Sku.cs (74%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/Sku.json.cs (92%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/Subnet.PowerShell.cs (85%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/Subnet.TypeConverter.cs (97%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/Subnet.cs (86%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/Subnet.json.cs (93%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api10 => }/SystemData.PowerShell.cs (67%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api10 => }/SystemData.TypeConverter.cs (97%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api10 => }/SystemData.cs (78%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api10 => }/SystemData.json.cs (93%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ThrottlingPolicy.PowerShell.cs (72%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ThrottlingPolicy.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ThrottlingPolicy.cs (72%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/ThrottlingPolicy.json.cs (93%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api10 => }/TrackedResource.PowerShell.cs (73%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api10 => }/TrackedResource.TypeConverter.cs (97%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api10 => }/TrackedResource.cs (71%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api10 => }/TrackedResource.json.cs (86%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api10 => }/TrackedResourceTags.PowerShell.cs (90%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api10 => }/TrackedResourceTags.TypeConverter.cs (97%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api10 => }/TrackedResourceTags.cs (79%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api10 => }/TrackedResourceTags.dictionary.cs (95%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api10 => }/TrackedResourceTags.json.cs (95%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/UserAssignedIdentity.PowerShell.cs (79%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/UserAssignedIdentity.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/UserAssignedIdentity.cs (83%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/UserAssignedIdentity.json.cs (92%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/UserAssignedIdentityProperties.PowerShell.cs (82%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/UserAssignedIdentityProperties.TypeConverter.cs (96%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/UserAssignedIdentityProperties.cs (85%) rename src/EventHub/EventHub.Autorest/generated/api/Models/{Api202301Preview => }/UserAssignedIdentityProperties.json.cs (93%) delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/AccessRights.Completer.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/AccessRights.TypeConverter.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/AccessRights.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/CaptureIdentityType.Completer.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/CaptureIdentityType.TypeConverter.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/CaptureIdentityType.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/CleanupPolicyRetentionDescription.Completer.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/CleanupPolicyRetentionDescription.TypeConverter.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/CleanupPolicyRetentionDescription.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/CreatedByType.Completer.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/CreatedByType.TypeConverter.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/CreatedByType.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/DefaultAction.Completer.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/DefaultAction.TypeConverter.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/DefaultAction.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/EncodingCaptureDescription.Completer.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/EncodingCaptureDescription.TypeConverter.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/EncodingCaptureDescription.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/EndPointProvisioningState.Completer.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/EndPointProvisioningState.TypeConverter.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/EndPointProvisioningState.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/EntityStatus.Completer.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/EntityStatus.TypeConverter.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/EntityStatus.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/GeoDrRoleType.Completer.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/GeoDrRoleType.TypeConverter.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/GeoDrRoleType.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/KeySource.Completer.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/KeySource.TypeConverter.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/KeySource.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/KeyType.Completer.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/KeyType.TypeConverter.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/KeyType.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/ManagedServiceIdentityType.Completer.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/ManagedServiceIdentityType.TypeConverter.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/ManagedServiceIdentityType.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/MetricId.Completer.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/MetricId.TypeConverter.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/MetricId.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/NetworkRuleIPAction.Completer.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/NetworkRuleIPAction.TypeConverter.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/NetworkRuleIPAction.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/NetworkSecurityPerimeterConfigurationProvisioningState.Completer.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/NetworkSecurityPerimeterConfigurationProvisioningState.TypeConverter.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/NetworkSecurityPerimeterConfigurationProvisioningState.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/NspAccessRuleDirection.Completer.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/NspAccessRuleDirection.TypeConverter.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/NspAccessRuleDirection.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/PrivateLinkConnectionStatus.Completer.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/PrivateLinkConnectionStatus.TypeConverter.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/PrivateLinkConnectionStatus.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/ProvisioningState.Completer.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/ProvisioningState.TypeConverter.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/ProvisioningState.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/ProvisioningStateDr.Completer.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/ProvisioningStateDr.TypeConverter.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/ProvisioningStateDr.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/PublicNetworkAccess.Completer.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/PublicNetworkAccess.TypeConverter.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/PublicNetworkAccess.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/PublicNetworkAccessFlag.Completer.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/PublicNetworkAccessFlag.TypeConverter.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/PublicNetworkAccessFlag.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/ResourceAssociationAccessMode.Completer.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/ResourceAssociationAccessMode.TypeConverter.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/ResourceAssociationAccessMode.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/RoleDisasterRecovery.Completer.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/RoleDisasterRecovery.TypeConverter.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/RoleDisasterRecovery.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/SchemaCompatibility.Completer.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/SchemaCompatibility.TypeConverter.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/SchemaCompatibility.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/SchemaType.Completer.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/SchemaType.TypeConverter.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/SchemaType.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/SkuName.Completer.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/SkuName.TypeConverter.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/SkuName.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/SkuTier.Completer.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/SkuTier.TypeConverter.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/SkuTier.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/TlsVersion.Completer.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/TlsVersion.TypeConverter.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/TlsVersion.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/UnavailableReason.Completer.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/UnavailableReason.TypeConverter.cs delete mode 100644 src/EventHub/EventHub.Autorest/generated/api/Support/UnavailableReason.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubApplicationGroup_GetViaIdentityNamespace.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubAuthorizationRule_GetViaIdentityEventhub.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubAuthorizationRule_GetViaIdentityNamespace.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubConsumerGroup_GetViaIdentityEventhub.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubConsumerGroup_GetViaIdentityNamespace.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubDisasterRecoveryConfigAuthorizationRule_GetViaIdentityDisasterRecoveryConfig.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubDisasterRecoveryConfigAuthorizationRule_GetViaIdentityNamespace.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubGeoDRConfiguration_GetViaIdentityNamespace.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubNamespaceAuthorizationRule_GetViaIdentityNamespace.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubPrivateEndpointConnection_GetViaIdentityNamespace.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubSchemaGroup_GetViaIdentityNamespace.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHub_GetViaIdentityNamespace.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/InvokeAzEventHubBreakDisasterRecoveryConfigPairing_BreakViaIdentityNamespace.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/InvokeAzEventHubFailDisasterRecoveryConfigOver_FailViaIdentityNamespace.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubApplicationGroup_CreateViaIdentityNamespace.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubApplicationGroup_CreateViaIdentityNamespaceExpanded.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubAuthorizationRule_CreateViaIdentityEventhub.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubAuthorizationRule_CreateViaIdentityEventhubExpanded.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubAuthorizationRule_CreateViaIdentityNamespace.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubAuthorizationRule_CreateViaIdentityNamespaceExpanded.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubConsumerGroup_CreateViaIdentityEventhub.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubConsumerGroup_CreateViaIdentityEventhubExpanded.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubConsumerGroup_CreateViaIdentityNamespace.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubConsumerGroup_CreateViaIdentityNamespaceExpanded.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubGeoDRConfiguration_CreateViaIdentityNamespace.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubGeoDRConfiguration_CreateViaIdentityNamespaceExpanded.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubKey_RegenerateViaIdentityEventhub.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubKey_RegenerateViaIdentityEventhubExpanded.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubKey_RegenerateViaIdentityNamespace.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubKey_RegenerateViaIdentityNamespaceExpanded.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubKey_RegenerateViaJsonFilePath.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubKey_RegenerateViaJsonString.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNamespaceAuthorizationRule_CreateViaIdentityNamespace.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNamespaceAuthorizationRule_CreateViaIdentityNamespaceExpanded.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNamespaceKey_RegenerateViaIdentityNamespace.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNamespaceKey_RegenerateViaIdentityNamespaceExpanded.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNamespaceKey_RegenerateViaJsonFilePath.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNamespaceKey_RegenerateViaJsonString.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubPrivateEndpointConnection_CreateViaIdentityNamespace.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubPrivateEndpointConnection_CreateViaIdentityNamespaceExpanded.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubSchemaGroup_CreateViaIdentityNamespace.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubSchemaGroup_CreateViaIdentityNamespaceExpanded.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHub_CreateViaIdentityNamespace.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHub_CreateViaIdentityNamespaceExpanded.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubApplicationGroup_DeleteViaIdentityNamespace.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubAuthorizationRule_DeleteViaIdentityEventhub.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubAuthorizationRule_DeleteViaIdentityNamespace.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubConsumerGroup_DeleteViaIdentityEventhub.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubConsumerGroup_DeleteViaIdentityNamespace.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubGeoDRConfiguration_DeleteViaIdentityNamespace.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubNamespaceAuthorizationRule_DeleteViaIdentityNamespace.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubPrivateEndpointConnection_DeleteViaIdentityNamespace.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubSchemaGroup_DeleteViaIdentityNamespace.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHub_DeleteViaIdentityNamespace.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckViaJsonFilePath.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/cmdlets/TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckViaJsonString.cs rename src/EventHub/EventHub.Autorest/generated/cmdlets/{TestAzEventHubNamespaceNameAvailability_CheckViaIdentity.cs => TestAzEventHubNamespaceNameAvailability_CheckViaJsonFilePath.cs} (76%) rename src/EventHub/EventHub.Autorest/generated/cmdlets/{TestAzEventHubNamespaceNameAvailability_CheckViaIdentityExpanded.cs => TestAzEventHubNamespaceNameAvailability_CheckViaJsonString.cs} (77%) create mode 100644 src/EventHub/EventHub.Autorest/generated/runtime/Attributes/ExternalDocsAttribute.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/runtime/Attributes/PSArgumentCompleterAttribute.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/runtime/Context.cs create mode 100644 src/EventHub/EventHub.Autorest/generated/runtime/InputHandler.cs create mode 100644 src/EventHub/EventHub.Autorest/test/Get-AzEventHubCluster.Recording.json delete mode 100644 src/EventHub/EventHub.Autorest/test/Set-AzEventHubApplicationGroup.Recording.json create mode 100644 src/EventHub/EventHub.Autorest/test/deployment-template/DependentResourcesParameters.json create mode 100644 src/EventHub/EventHub.Autorest/test/deployment-template/DependentResourcesTemplate.json delete mode 100644 src/EventHub/EventHub.Autorest/test/deployment-template/keyVaultParameter.json create mode 100644 src/EventHub/EventHub.Autorest/test/deployment-template/keyVaultParameters.json create mode 100644 tools/StaticAnalysis/Exceptions/Az.EventHub/BreakingChangeIssues.csv diff --git a/src/EventHub/EventHub.Autorest/Az.EventHub.format.ps1xml b/src/EventHub/EventHub.Autorest/Az.EventHub.format.ps1xml index 9c36c9f49d33..1407573a7241 100644 --- a/src/EventHub/EventHub.Autorest/Az.EventHub.format.ps1xml +++ b/src/EventHub/EventHub.Autorest/Az.EventHub.format.ps1xml @@ -2,9 +2,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.SchemaGroupProperties + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SchemaGroupProperties - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.SchemaGroupProperties + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SchemaGroupProperties#Multiple @@ -24,9 +24,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.TrackedResourceTags + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.TrackedResourceTags - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.TrackedResourceTags + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.TrackedResourceTags#Multiple diff --git a/src/EventHub/EventHub.Autorest/Az.EventHub.psd1 b/src/EventHub/EventHub.Autorest/Az.EventHub.psd1 index ba3db5fe5668..32ae5b6591f7 100644 --- a/src/EventHub/EventHub.Autorest/Az.EventHub.psd1 +++ b/src/EventHub/EventHub.Autorest/Az.EventHub.psd1 @@ -11,8 +11,8 @@ DotNetFrameworkVersion = '4.7.2' RequiredAssemblies = './bin/Az.EventHub.private.dll' FormatsToProcess = './Az.EventHub.format.ps1xml' - FunctionsToExport = 'Approve-AzEventHubPrivateEndpointConnection', 'Deny-AzEventHubPrivateEndpointConnection', 'Get-AzEventHub', 'Get-AzEventHubApplicationGroup', 'Get-AzEventHubAuthorizationRule', 'Get-AzEventHubCluster', 'Get-AzEventHubClusterNamespace', 'Get-AzEventHubClustersAvailableRegion', 'Get-AzEventHubConsumerGroup', 'Get-AzEventHubGeoDRConfiguration', 'Get-AzEventHubKey', 'Get-AzEventHubNamespace', 'Get-AzEventHubNetworkRuleSet', 'Get-AzEventHubPrivateEndpointConnection', 'Get-AzEventHubPrivateLink', 'Get-AzEventHubSchemaGroup', 'New-AzEventHub', 'New-AzEventHubApplicationGroup', 'New-AzEventHubAuthorizationRule', 'New-AzEventHubCluster', 'New-AzEventHubConsumerGroup', 'New-AzEventHubGeoDRConfiguration', 'New-AzEventHubIPRuleConfig', 'New-AzEventHubKey', 'New-AzEventHubKeyVaultPropertiesObject', 'New-AzEventHubNamespace', 'New-AzEventHubSchemaGroup', 'New-AzEventHubThrottlingPolicyConfig', 'New-AzEventHubVirtualNetworkRuleConfig', 'Remove-AzEventHub', 'Remove-AzEventHubApplicationGroup', 'Remove-AzEventHubAuthorizationRule', 'Remove-AzEventHubCluster', 'Remove-AzEventHubConsumerGroup', 'Remove-AzEventHubGeoDRConfiguration', 'Remove-AzEventHubNamespace', 'Remove-AzEventHubPrivateEndpointConnection', 'Remove-AzEventHubSchemaGroup', 'Set-AzEventHub', 'Set-AzEventHubApplicationGroup', 'Set-AzEventHubAuthorizationRule', 'Set-AzEventHubCluster', 'Set-AzEventHubConsumerGroup', 'Set-AzEventHubGeoDRConfigurationBreakPair', 'Set-AzEventHubGeoDRConfigurationFailOver', 'Set-AzEventHubNamespace', 'Set-AzEventHubNetworkRuleSet', 'Test-AzEventHubName', '*' - AliasesToExport = 'Get-AzEventHubNamespaceV2', 'New-AzEventHubNamespaceV2', 'Remove-AzEventHubNamespaceV2', 'Set-AzEventHubNamespaceV2', '*' + FunctionsToExport = 'Approve-AzEventHubPrivateEndpointConnection', 'Deny-AzEventHubPrivateEndpointConnection', 'Get-AzEventHub', 'Get-AzEventHubApplicationGroup', 'Get-AzEventHubAuthorizationRule', 'Get-AzEventHubCluster', 'Get-AzEventHubClusterNamespace', 'Get-AzEventHubClustersAvailableRegion', 'Get-AzEventHubConsumerGroup', 'Get-AzEventHubGeoDRConfiguration', 'Get-AzEventHubKey', 'Get-AzEventHubNamespace', 'Get-AzEventHubNetworkRuleSet', 'Get-AzEventHubPrivateEndpointConnection', 'Get-AzEventHubPrivateLink', 'Get-AzEventHubSchemaGroup', 'New-AzEventHub', 'New-AzEventHubApplicationGroup', 'New-AzEventHubAuthorizationRule', 'New-AzEventHubCluster', 'New-AzEventHubConsumerGroup', 'New-AzEventHubGeoDRConfiguration', 'New-AzEventHubIPRuleConfig', 'New-AzEventHubKey', 'New-AzEventHubKeyVaultPropertiesObject', 'New-AzEventHubNamespace', 'New-AzEventHubSchemaGroup', 'New-AzEventHubThrottlingPolicyConfig', 'New-AzEventHubVirtualNetworkRuleConfig', 'Remove-AzEventHub', 'Remove-AzEventHubApplicationGroup', 'Remove-AzEventHubAuthorizationRule', 'Remove-AzEventHubCluster', 'Remove-AzEventHubConsumerGroup', 'Remove-AzEventHubGeoDRConfiguration', 'Remove-AzEventHubNamespace', 'Remove-AzEventHubPrivateEndpointConnection', 'Remove-AzEventHubSchemaGroup', 'Set-AzEventHub', 'Set-AzEventHubApplicationGroup', 'Set-AzEventHubAuthorizationRule', 'Set-AzEventHubCluster', 'Set-AzEventHubConsumerGroup', 'Set-AzEventHubGeoDRConfigurationBreakPair', 'Set-AzEventHubGeoDRConfigurationFailOver', 'Set-AzEventHubNamespace', 'Set-AzEventHubNetworkRuleSet', 'Test-AzEventHubName' + AliasesToExport = 'Get-AzEventHubNamespaceV2', 'New-AzEventHubNamespaceV2', 'Remove-AzEventHubNamespaceV2', 'Set-AzEventHubNamespaceV2' PrivateData = @{ PSData = @{ Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'EventHub' diff --git a/src/EventHub/EventHub.Autorest/README.md b/src/EventHub/EventHub.Autorest/README.md index e0939dd34734..3a2b5c96dbef 100644 --- a/src/EventHub/EventHub.Autorest/README.md +++ b/src/EventHub/EventHub.Autorest/README.md @@ -59,14 +59,13 @@ subject-prefix: $(service-name) # uncomment following line to support viaIdentity for these post APIs resourcegroup-append: true nested-object-to-string: true - -# For new modules, please avoid setting 3.x using the use-extension method and instead, use 4.x as the default option -use-extension: - "@autorest/powershell": "3.x" +keep-pec-and-plr: true +disable-transform-identity-type: true +flatten-userassignedidentity : false directive: - where: - variant: ^Create$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$ + variant: ^Create$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$|^CreateViaJsonFilePath$|^CreateViaJsonString$ remove: true - where: variant: ^CreateViaIdentity$ @@ -456,64 +455,5 @@ directive: suppress-format: true - model-cmdlet: - - KeyVaultProperties - - - where: - parameter-name: IdentityType - set: - breaking-change: - old-parameter-type: CaptureIdentityType - new-parameter-type: String - deprecated-by-version: 5.0.0 - deprecated-by-azversion: 12.0.0 - change-effective-date: 2024/05/21 - - - where: - parameter-name: CleanupPolicy - set: - breaking-change: - old-parameter-type: CleanupPolicyRetentionDescription - new-parameter-type: String - deprecated-by-version: 5.0.0 - deprecated-by-azversion: 12.0.0 - change-effective-date: 2024/05/21 - - - where: - parameter-name: Status - set: - breaking-change: - old-parameter-type: EntityStatus - new-parameter-type: String - deprecated-by-version: 5.0.0 - deprecated-by-azversion: 12.0.0 - change-effective-date: 2024/05/21 - - - where: - parameter-name: Encoding - set: - breaking-change: - old-parameter-type: EncodingCaptureDescription - new-parameter-type: String - deprecated-by-version: 5.0.0 - deprecated-by-azversion: 12.0.0 - change-effective-date: 2024/05/21 - - - where: - parameter-name: SchemaCompatibility - set: - breaking-change: - old-parameter-type: SchemaCompatibility - new-parameter-type: String - deprecated-by-version: 5.0.0 - deprecated-by-azversion: 12.0.0 - change-effective-date: 2024/05/21 - - - where: - parameter-name: SchemaType - set: - breaking-change: - old-parameter-type: SchemaType - new-parameter-type: String - deprecated-by-version: 5.0.0 - deprecated-by-azversion: 12.0.0 - change-effective-date: 2024/05/21 + - model-name: KeyVaultProperties + cmdlet-name: New-AzEventHubKeyVaultPropertiesObject diff --git a/src/EventHub/EventHub.Autorest/build-module.ps1 b/src/EventHub/EventHub.Autorest/build-module.ps1 index 65f1080f97b6..085386995e89 100644 --- a/src/EventHub/EventHub.Autorest/build-module.ps1 +++ b/src/EventHub/EventHub.Autorest/build-module.ps1 @@ -12,17 +12,17 @@ # 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]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs) +param([switch]$NotIsolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs, [switch]$UX) $ErrorActionPreference = 'Stop' if($PSEdition -ne 'Core') { Write-Error 'This script requires PowerShell Core to execute. [Note] Generated cmdlets will work in both PowerShell Core or Windows PowerShell.' } -if(-not $Isolated -and -not $Debugger) { +if(-not $NotIsolated -and -not $Debugger) { Write-Host -ForegroundColor Green 'Creating isolated process...' $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path - & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated + & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated if($LastExitCode -ne 0) { # Build failed. Don't attempt to run the module. @@ -45,6 +45,14 @@ if(-not $Isolated -and -not $Debugger) { } } + if($UX) { + . (Join-Path $PSScriptRoot 'generate-portal-ux.ps1') + if($LastExitCode -ne 0) { + # UX generation failed. Don't attempt to run the module. + return + } + } + if($Pack) { . (Join-Path $PSScriptRoot 'pack-module.ps1') if($LastExitCode -ne 0) { @@ -122,7 +130,7 @@ $examplesFolder = Join-Path $PSScriptRoot 'examples' $null = New-Item -ItemType Directory -Force -Path $examplesFolder Write-Host -ForegroundColor Green 'Creating cmdlets for specified models...' -$modelCmdlets = @('KeyVaultProperties') +$modelCmdlets = @(@{modelName="KeyVaultProperties"; cmdletName="New-AzEventHubKeyVaultPropertiesObject"}) $modelCmdletFolder = Join-Path (Join-Path $PSScriptRoot './custom') 'autogen-model-cmdlets' if (Test-Path $modelCmdletFolder) { $null = Remove-Item -Force -Recurse -Path $modelCmdletFolder diff --git a/src/EventHub/EventHub.Autorest/check-dependencies.ps1 b/src/EventHub/EventHub.Autorest/check-dependencies.ps1 index c29591c7bfe1..90ca9867ae40 100644 --- a/src/EventHub/EventHub.Autorest/check-dependencies.ps1 +++ b/src/EventHub/EventHub.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/src/EventHub/EventHub.Autorest/create-model-cmdlets.ps1 b/src/EventHub/EventHub.Autorest/create-model-cmdlets.ps1 index a4f9caccd471..702d6fc64dbe 100644 --- a/src/EventHub/EventHub.Autorest/create-model-cmdlets.ps1 +++ b/src/EventHub/EventHub.Autorest/create-model-cmdlets.ps1 @@ -15,7 +15,7 @@ function CreateModelCmdlet { - param([string[]]$Models) + param([Hashtable[]]$Models) if ($Models.Count -eq 0) { @@ -30,7 +30,6 @@ function CreateModelCmdlet { } else { $ModuleName = 'Az.EventHub' } - $CsFiles = Get-ChildItem -Path $ModelCsPath -Recurse -Filter *.cs $Content = '' $null = $CsFiles | ForEach-Object -Process { if ($_.Name.Split('.').count -eq 2 ) @@ -39,15 +38,34 @@ function CreateModelCmdlet { $Tree = [Microsoft.CodeAnalysis.CSharp.SyntaxFactory]::ParseCompilationUnit($Content) $Nodes = $Tree.ChildNodes().ChildNodes() + $classConstantMember = @{} foreach ($Model in $Models) { - $InterfaceNode = $Nodes | Where-Object { ($_.Keyword.value -eq 'interface') -and ($_.Identifier.value -eq "I$Model") } + $ModelName = $Model.modelName + $InterfaceNode = $Nodes | Where-Object { ($_.Keyword.value -eq 'interface') -and ($_.Identifier.value -eq "I$ModelName") } + $ClassNode = $Nodes | Where-Object { ($_.Keyword.value -eq 'class') -and ($_.Identifier.value -eq "$ModelName") } + $classConstantMember = @() + foreach ($class in $ClassNode) { + foreach ($member in $class.Members) { + $isConstant = $false + foreach ($attr in $member.AttributeLists) { + $memberName = $attr.Attributes.Name.ToString() + if ($memberName.EndsWith('.Constant')) { + $isConstant = $true + break + } + } + if (($member.Modifiers.ToString() -eq 'public') -and $isConstant) { + $classConstantMember += $member.Identifier.Value + } + } + } if ($InterfaceNode.count -eq 0) { continue } # through a queue, we iterate all the parent models. $Queue = @($InterfaceNode) - $visited = @("I$Model") + $visited = @("I$ModelName") $AllInterfaceNodes = @() while ($Queue.count -ne 0) { @@ -65,7 +83,7 @@ function CreateModelCmdlet { } $Namespace = $InterfaceNode.Parent.Name - $ObjectType = $Model + $ObjectType = $ModelName $ObjectTypeWithNamespace = "${Namespace}.${ObjectType}" # remove duplicated module name if ($ObjectType.StartsWith('EventHub')) { @@ -81,10 +99,15 @@ function CreateModelCmdlet { { foreach ($Member in $Node.Members) { + if ($classConstantMember.Contains($Member.Identifier.Value)) { + # skip constant member + continue + } $Arguments = $Member.AttributeLists.Attributes.ArgumentList.Arguments $Required = $false $Description = "" $Readonly = $False + $mutability = @{Read = $true; Create = $true; Update = $true} foreach ($Argument in $Arguments) { if ($Argument.NameEquals.Name.Identifier.Value -eq "Required") @@ -99,6 +122,18 @@ function CreateModelCmdlet { { $Readonly = $Argument.Expression.Token.Value } + if ($Argument.NameEquals.Name.Identifier.Value -eq "Read") + { + $mutability.Read = $Argument.Expression.Token.Value + } + if ($Argument.NameEquals.Name.Identifier.Value -eq "Create") + { + $mutability.Create = $Argument.Expression.Token.Value + } + if ($Argument.NameEquals.Name.Identifier.Value -eq "Update") + { + $mutability.Update = $Argument.Expression.Token.Value + } } if ($Readonly) { @@ -106,8 +141,18 @@ function CreateModelCmdlet { } $Identifier = $Member.Identifier.Value $Type = $Member.Type.ToString().replace('?', '').Split("::")[-1] + $Type = $Member.Type.ToString().replace('?', '').Split("::")[-1] + if ($Type.StartsWith("System.Collections.Generic.List")) + { + # if the type is a list, we need to convert it to array + $matched = $Type -match '\<(?.+)\>$' + if ($matched) + { + $Type = $matches.Name + '[]'; + } + } $ParameterDefinePropertyList = New-Object System.Collections.Generic.List[string] - if ($Required) + if ($Required -and $mutability.Create -and $mutability.Update) { $ParameterDefinePropertyList.Add("Mandatory") } @@ -117,11 +162,9 @@ function CreateModelCmdlet { } $ParameterDefineProperty = [System.String]::Join(", ", $ParameterDefinePropertyList) # check whether completer is needed - $completer = ''; - if($Type.Split('.').Split('.')[-2] -eq 'Support') { - # If Type is an array, need to strip [] - $strippedType = $Type.Replace('[]', '') - $completer += "`n [ArgumentCompleter([${strippedType}])]" + $completer = ''; + if(IsEnumType($Member)){ + $completer += GetCompleter($Member) } $ParameterDefineScript = " [Parameter($ParameterDefineProperty)]${completer} @@ -137,6 +180,12 @@ function CreateModelCmdlet { $ParameterDefineScript = $ParameterDefineScriptList | Join-String -Separator "," $ParameterAssignScript = $ParameterAssignScriptList | Join-String -Separator "" + $cmdletName = "New-Az${ModulePrefix}${ObjectType}Object" + if ('' -ne $Model.cmdletName) { + $cmdletName = $Model.cmdletName + } + $OutputPath = Join-Path -ChildPath "${cmdletName}.ps1" -Path $OutputDir + $cmdletNameInLowerCase = $cmdletName.ToLower() $Script = " # ---------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -162,9 +211,9 @@ Create an in-memory object for ${ObjectType}. .Outputs ${ObjectTypeWithNamespace} .Link -https://learn.microsoft.com/powershell/module/${ModuleName}/new-Az${ModulePrefix}${ObjectType}Object +https://learn.microsoft.com/powershell/module/${ModuleName}/${cmdletNameInLowerCase} #> -function New-Az${ModulePrefix}${ObjectType}Object { +function ${cmdletName} { [OutputType('${ObjectTypeWithNamespace}')] [CmdletBinding(PositionalBinding=`$false)] Param( @@ -181,3 +230,33 @@ ${ParameterAssignScript} Set-Content -Path $OutputPath -Value $Script } } + +function IsEnumType { + param ( + [Microsoft.CodeAnalysis.CSharp.Syntax.PropertyDeclarationSyntax]$property + ) + $isEnum = $false + foreach ($attr in $property.AttributeLists) { + $attributeName = $attr.Attributes.Name.ToString() + if ($attributeName.Contains('ArgumentCompleter')) { + $isEnum = $true + break + } + } + return $isEnum; +} + +function GetCompleter { + param ( + [Microsoft.CodeAnalysis.CSharp.Syntax.PropertyDeclarationSyntax]$property + ) + foreach ($attr in $property.AttributeLists) { + $attributeName = $attr.Attributes.Name.ToString() + if ($attributeName.Contains('ArgumentCompleter')) { + $attributeName = $attributeName.Split("::")[-1] + $possibleValues = [System.String]::Join(", ", $attr.Attributes.ArgumentList.Arguments) + $completer += "`n [${attributeName}(${possibleValues})]" + return $completer + } + } +} diff --git a/src/EventHub/EventHub.Autorest/custom/Approve-AzEventHubPrivateEndpointConnection.ps1 b/src/EventHub/EventHub.Autorest/custom/Approve-AzEventHubPrivateEndpointConnection.ps1 index 5f7fbc7738fa..5ef403e52a6b 100644 --- a/src/EventHub/EventHub.Autorest/custom/Approve-AzEventHubPrivateEndpointConnection.ps1 +++ b/src/EventHub/EventHub.Autorest/custom/Approve-AzEventHubPrivateEndpointConnection.ps1 @@ -20,7 +20,7 @@ Approves an EventHub PrivateEndpointConnection #> function Approve-AzEventHubPrivateEndpointConnection{ - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection])] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection])] [CmdletBinding(DefaultParameterSetName = 'SetExpanded', PositionalBinding = $false, ConfirmImpact = 'Medium')] param( [Parameter(ParameterSetName = 'SetExpanded', HelpMessage = "The name of the Private Endpoint Connection")] diff --git a/src/EventHub/EventHub.Autorest/custom/Deny-AzEventHubPrivateEndpointConnection.ps1 b/src/EventHub/EventHub.Autorest/custom/Deny-AzEventHubPrivateEndpointConnection.ps1 index 8f20163fb4bc..b13ef06b6698 100644 --- a/src/EventHub/EventHub.Autorest/custom/Deny-AzEventHubPrivateEndpointConnection.ps1 +++ b/src/EventHub/EventHub.Autorest/custom/Deny-AzEventHubPrivateEndpointConnection.ps1 @@ -20,7 +20,7 @@ Denies an EventHub PrivateEndpointConnection #> function Deny-AzEventHubPrivateEndpointConnection{ - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection])] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection])] [CmdletBinding(DefaultParameterSetName = 'SetExpanded', PositionalBinding = $false, ConfirmImpact = 'Medium')] param( [Parameter(ParameterSetName = 'SetExpanded', HelpMessage = "The name of the Private Endpoint Connection")] diff --git a/src/EventHub/EventHub.Autorest/custom/Get-AzEventHubAuthorizationRule.ps1 b/src/EventHub/EventHub.Autorest/custom/Get-AzEventHubAuthorizationRule.ps1 index c1185ef7543a..c31603ce9d8c 100644 --- a/src/EventHub/EventHub.Autorest/custom/Get-AzEventHubAuthorizationRule.ps1 +++ b/src/EventHub/EventHub.Autorest/custom/Get-AzEventHubAuthorizationRule.ps1 @@ -20,7 +20,7 @@ Gets an EventHub Authorization Rule #> function Get-AzEventHubAuthorizationRule{ - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule])] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule])] [CmdletBinding(DefaultParameterSetName = 'GetExpandedNamespace', PositionalBinding = $false, ConfirmImpact = 'Medium')] param( [Parameter(ParameterSetName = 'GetExpandedEntity', HelpMessage = "The name of the Authorization Rule")] diff --git a/src/EventHub/EventHub.Autorest/custom/Get-AzEventHubKey.ps1 b/src/EventHub/EventHub.Autorest/custom/Get-AzEventHubKey.ps1 index e4465bf6168b..9d9fdf0632b8 100644 --- a/src/EventHub/EventHub.Autorest/custom/Get-AzEventHubKey.ps1 +++ b/src/EventHub/EventHub.Autorest/custom/Get-AzEventHubKey.ps1 @@ -20,7 +20,7 @@ Gets an EventHub SAS key #> function Get-AzEventHubKey{ - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys])] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys])] [CmdletBinding(DefaultParameterSetName = 'GetExpandedNamespace', PositionalBinding = $false, ConfirmImpact = 'Medium')] param( [Parameter(ParameterSetName = 'GetExpandedEntity', Mandatory, HelpMessage = "The name of the Authorization Rule")] diff --git a/src/EventHub/EventHub.Autorest/custom/New-AzEventHubAuthorizationRule.ps1 b/src/EventHub/EventHub.Autorest/custom/New-AzEventHubAuthorizationRule.ps1 index 68395cfd8276..79189f07f031 100644 --- a/src/EventHub/EventHub.Autorest/custom/New-AzEventHubAuthorizationRule.ps1 +++ b/src/EventHub/EventHub.Autorest/custom/New-AzEventHubAuthorizationRule.ps1 @@ -20,7 +20,7 @@ Creates an EventHub Authorization Rule #> function New-AzEventHubAuthorizationRule{ - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule])] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule])] [CmdletBinding(DefaultParameterSetName = 'NewExpandedNamespace', PositionalBinding = $false, SupportsShouldProcess, ConfirmImpact = 'Medium')] param( [Parameter(ParameterSetName = 'NewExpandedEntity', Mandatory, HelpMessage = "The name of the Authorization Rule")] @@ -62,9 +62,8 @@ function New-AzEventHubAuthorizationRule{ [Parameter(HelpMessage = "The rights associated with the rule.")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights[]] + [System.String[]] # The rights associated with the rule. - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ParameterBreakingChangeAttribute("Rights","12.0.0", "5.0.0","2024-05-21" )] ${Rights}, [Parameter(HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] @@ -131,7 +130,7 @@ function New-AzEventHubAuthorizationRule{ $null = $PSBoundParameters.Remove('WhatIf') $null = $PSBoundParameters.Remove('Confirm') - $authRule = [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule]@{ + $authRule = [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule]@{ Rights = $Rights } diff --git a/src/EventHub/EventHub.Autorest/custom/New-AzEventHubIPRuleConfig.ps1 b/src/EventHub/EventHub.Autorest/custom/New-AzEventHubIPRuleConfig.ps1 index 29bf256c0946..21d0fb270021 100644 --- a/src/EventHub/EventHub.Autorest/custom/New-AzEventHubIPRuleConfig.ps1 +++ b/src/EventHub/EventHub.Autorest/custom/New-AzEventHubIPRuleConfig.ps1 @@ -19,7 +19,7 @@ Constructs an INwRuleSetIPRules object that can be fed as input to Set-AzEventHu Constructs an INwRuleSetIPRules object that can be fed as input to Set-AzEventHubNetworkRuleSet #> function New-AzEventHubIPRuleConfig{ - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetIPRules])] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetIPRules])] [CmdletBinding(PositionalBinding = $false, ConfirmImpact = 'Medium')] param( [Parameter(Mandatory, HelpMessage = "IP Mask")] @@ -28,15 +28,14 @@ function New-AzEventHubIPRuleConfig{ ${IPMask}, [Parameter(HelpMessage = "The IP Filter Action")] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkRuleIPAction] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ParameterBreakingChangeAttribute("Action","12.0.0", "5.0.0","2024-05-21" )] + [System.String] # The IP Filter Action ${Action} ) process{ try{ - $ipRule = [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetIPRules]@{ + $ipRule = [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetIPRules]@{ IPMask = $IPMask Action = $Action } diff --git a/src/EventHub/EventHub.Autorest/custom/New-AzEventHubKey.ps1 b/src/EventHub/EventHub.Autorest/custom/New-AzEventHubKey.ps1 index 51d46d971126..982a239173b1 100644 --- a/src/EventHub/EventHub.Autorest/custom/New-AzEventHubKey.ps1 +++ b/src/EventHub/EventHub.Autorest/custom/New-AzEventHubKey.ps1 @@ -20,7 +20,7 @@ Regenerates an EventHub SAS key #> function New-AzEventHubKey{ - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys])] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys])] [CmdletBinding(DefaultParameterSetName = 'NewExpandedNamespace', PositionalBinding = $false, SupportsShouldProcess, ConfirmImpact = 'Medium')] param( [Parameter(ParameterSetName = 'NewExpandedEntity', Mandatory, HelpMessage = "The name of the Authorization Rule")] @@ -63,9 +63,8 @@ function New-AzEventHubKey{ [Parameter(HelpMessage = "The access key to regenerate.")] [Alias('RegenerateKey')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeyType] + [System.String] # The access key to regenerate. - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ParameterBreakingChangeAttribute("KeyType","12.0.0", "5.0.0","2024-05-21" )] ${KeyType}, [Parameter(HelpMessage = "Optional, if the key value provided, is set for KeyType or autogenerated Key value set for keyType")] @@ -140,7 +139,7 @@ function New-AzEventHubKey{ $null = $PSBoundParameters.Remove('WhatIf') $null = $PSBoundParameters.Remove('Confirm') - $accessKeys = [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRegenerateAccessKeyParameters]@{ + $accessKeys = [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRegenerateAccessKeyParameters]@{ KeyType = $KeyType } diff --git a/src/EventHub/EventHub.Autorest/custom/New-AzEventHubNamespace.ps1 b/src/EventHub/EventHub.Autorest/custom/New-AzEventHubNamespace.ps1 index 2080efe1ea9c..a3b891d8d170 100644 --- a/src/EventHub/EventHub.Autorest/custom/New-AzEventHubNamespace.ps1 +++ b/src/EventHub/EventHub.Autorest/custom/New-AzEventHubNamespace.ps1 @@ -21,7 +21,7 @@ Creates an EventHub Namespace function New-AzEventHubNamespace{ [Alias("New-AzEventHubNamespaceV2")] - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace])] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace])] [CmdletBinding(PositionalBinding = $false, SupportsShouldProcess, ConfirmImpact = 'Medium')] param( @@ -77,13 +77,12 @@ function New-AzEventHubNamespace{ [Parameter(HelpMessage = "Properties to configure Encryption")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultProperties[]] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultProperties[]] ${KeyVaultProperty}, [Parameter(HelpMessage = "Type of managed service identity.")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ParameterBreakingChangeAttribute("IdentityType","12.0.0", "5.0.0","2024-05-21" )] + [System.String] ${IdentityType}, [Parameter(HelpMessage = "Properties for User Assigned Identities")] @@ -109,14 +108,12 @@ function New-AzEventHubNamespace{ [Parameter(HelpMessage = "The minimum TLS version for the cluster to support, e.g. '1.2'")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuName] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ParameterBreakingChangeAttribute("SkuName","12.0.0", "5.0.0","2024-05-21" )] + [System.String] ${SkuName}, [Parameter(HelpMessage = "This determines if traffic is allowed over public network. By default it is enabled.")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ParameterBreakingChangeAttribute("PublicNetworkAccess","12.0.0", "5.0.0","2024-05-21" )] + [System.String] ${PublicNetworkAccess}, [Parameter(HelpMessage = "The Event Hubs throughput units for Basic or Standard tiers, where value should be 0 to 20 throughput units. The Event Hubs premium units for Premium tier, where value should be 0 to 10 premium units.")] @@ -203,7 +200,7 @@ function New-AzEventHubNamespace{ $identityHashTable = @{} foreach ($resourceID in $UserAssignedIdentityId){ - $identityHashTable.Add($resourceID, [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.UserAssignedIdentity]::new()) + $identityHashTable.Add($resourceID, [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.UserAssignedIdentity]::new()) } $PSBoundParameters.Add("UserAssignedIdentity", $identityHashTable) diff --git a/src/EventHub/EventHub.Autorest/custom/New-AzEventHubThrottlingPolicyConfig.ps1 b/src/EventHub/EventHub.Autorest/custom/New-AzEventHubThrottlingPolicyConfig.ps1 index 41cb7960f2fa..23a57ec21173 100644 --- a/src/EventHub/EventHub.Autorest/custom/New-AzEventHubThrottlingPolicyConfig.ps1 +++ b/src/EventHub/EventHub.Autorest/custom/New-AzEventHubThrottlingPolicyConfig.ps1 @@ -19,7 +19,7 @@ Constructs an IThrottlingPolicy object that can be fed as input to New-AzEventHu Constructs an IThrottlingPolicy object that can be fed as input to New-AzEventHubApplicationGroup or Set-AzEventHubApplicationGroup #> function New-AzEventHubThrottlingPolicyConfig{ - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IThrottlingPolicy])] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IThrottlingPolicy])] [CmdletBinding(PositionalBinding = $false, ConfirmImpact = 'Medium')] param( [Parameter(Mandatory, HelpMessage = "Name of Throttling Policy Config")] @@ -33,15 +33,14 @@ function New-AzEventHubThrottlingPolicyConfig{ ${RateLimitThreshold}, [Parameter(Mandatory, HelpMessage = "Metric Id on which the throttle limit should be set, MetricId can be discovered by hovering over Metric in the Metrics section of Event Hub Namespace inside Azure Portal")] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.MetricId] + [System.String] # Metric Id on which the throttle limit should be set, MetricId can be discovered by hovering over Metric in the Metrics section of Event Hub Namespace inside Azure Portal. - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ParameterBreakingChangeAttribute("MetricId","12.0.0", "5.0.0","2024-05-21" )] - ${MetricId} + ${MetricId} ) process{ try{ - $policy = [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IThrottlingPolicy]@{ + $policy = [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IThrottlingPolicy]@{ Name = $Name MetricId = $MetricId RateLimitThreshold = $RateLimitThreshold diff --git a/src/EventHub/EventHub.Autorest/custom/New-AzEventHubVirtualNetworkRuleConfig.ps1 b/src/EventHub/EventHub.Autorest/custom/New-AzEventHubVirtualNetworkRuleConfig.ps1 index b6d6cd12ea2e..377ba954613b 100644 --- a/src/EventHub/EventHub.Autorest/custom/New-AzEventHubVirtualNetworkRuleConfig.ps1 +++ b/src/EventHub/EventHub.Autorest/custom/New-AzEventHubVirtualNetworkRuleConfig.ps1 @@ -19,7 +19,7 @@ Constructs an INwRuleSetVirtualNetworkRules object that can be fed as input to S Constructs an INwRuleSetVirtualNetworkRules object that can be fed as input to Set-AzEventHubNetworkRuleSet #> function New-AzEventHubVirtualNetworkRuleConfig{ - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetVirtualNetworkRules])] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetVirtualNetworkRules])] [CmdletBinding(PositionalBinding = $false, ConfirmImpact = 'Medium')] param( [Parameter(Mandatory, HelpMessage = "Resource ID of Virtual Network Subnet")] @@ -35,7 +35,7 @@ function New-AzEventHubVirtualNetworkRuleConfig{ process{ try{ - $virtualNetworkRule = [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetVirtualNetworkRules]@{ + $virtualNetworkRule = [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetVirtualNetworkRules]@{ SubnetId = $SubnetId } diff --git a/src/EventHub/EventHub.Autorest/custom/Remove-AzEventHubAuthorizationRule.ps1 b/src/EventHub/EventHub.Autorest/custom/Remove-AzEventHubAuthorizationRule.ps1 index d3729314b474..42e3326c9b74 100644 --- a/src/EventHub/EventHub.Autorest/custom/Remove-AzEventHubAuthorizationRule.ps1 +++ b/src/EventHub/EventHub.Autorest/custom/Remove-AzEventHubAuthorizationRule.ps1 @@ -20,7 +20,7 @@ Removes an EventHub Authorization Rule #> function Remove-AzEventHubAuthorizationRule{ - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule])] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule])] [CmdletBinding(DefaultParameterSetName = 'RemoveExpandedNamespace', PositionalBinding = $false, SupportsShouldProcess, ConfirmImpact = 'Medium')] param( [Parameter(ParameterSetName = 'RemoveExpandedEntity', HelpMessage = "The name of the Authorization Rule")] diff --git a/src/EventHub/EventHub.Autorest/custom/Set-AzEventHub.ps1 b/src/EventHub/EventHub.Autorest/custom/Set-AzEventHub.ps1 index ab07b2b8f4f7..c05fcec21195 100644 --- a/src/EventHub/EventHub.Autorest/custom/Set-AzEventHub.ps1 +++ b/src/EventHub/EventHub.Autorest/custom/Set-AzEventHub.ps1 @@ -21,7 +21,7 @@ Updates an EventHub Entity function Set-AzEventHub{ - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventHub])] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHub])] [CmdletBinding(DefaultParameterSetName = 'SetExpanded', PositionalBinding = $false, SupportsShouldProcess, ConfirmImpact = 'Medium')] param( [Parameter(ParameterSetName = 'SetExpanded', Mandatory, HelpMessage = "The name of EventHub Entity.")] @@ -66,9 +66,8 @@ function Set-AzEventHub{ [Parameter(HelpMessage = "Enumerates the possible values for the encoding format of capture description. Note: 'AvroDeflate' will be deprecated in New API Version")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription] + [System.String] #Enumerates the possible values for the encoding format of capture description. Note: 'AvroDeflate' will be deprecated in New API Version - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ParameterBreakingChangeAttribute("Encoding","12.0.0", "5.0.0","2024-05-21" )] ${Encoding}, [Parameter(HelpMessage = "The time window allows you to set the frequency with which the capture to Azure Blobs will happen, value should between 60 to 900 seconds")] @@ -102,9 +101,8 @@ function Set-AzEventHub{ [Parameter(HelpMessage = "Enumerates the possible values for the status of the Event Hub.")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus] + [System.String] # Enumerates the possible values for the status of the Event Hub. - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ParameterBreakingChangeAttribute("Status","12.0.0", "5.0.0","2024-05-21" )] ${Status}, [Parameter(HelpMessage = "Name for capture destination")] @@ -114,8 +112,7 @@ function Set-AzEventHub{ [Parameter(HelpMessage = "Type of managed service identity.")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ParameterBreakingChangeAttribute("IdentityType","12.0.0", "5.0.0","2024-05-21" )] + [System.String] ${IdentityType}, [Parameter(HelpMessage = "Properties for User Assigned Identities")] diff --git a/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubApplicationGroup.ps1 b/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubApplicationGroup.ps1 index a153edab6f64..ade37ff43b52 100644 --- a/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubApplicationGroup.ps1 +++ b/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubApplicationGroup.ps1 @@ -19,7 +19,7 @@ Sets an EventHub Application Group Sets an EventHub Application Group #> function Set-AzEventHubApplicationGroup{ - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup])] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup])] [CmdletBinding(DefaultParameterSetName = 'SetExpanded', PositionalBinding = $false, SupportsShouldProcess, ConfirmImpact = 'Medium')] param( [Parameter(ParameterSetName = 'SetExpanded', Mandatory, HelpMessage = "The name of the Application Group.")] @@ -70,7 +70,7 @@ function Set-AzEventHubApplicationGroup{ [Parameter(ValueFromPipelineByPropertyName, HelpMessage = "List of group policies that define the behavior of application group. The policies can support resource governance scenarios such as limiting ingress or egress traffic.")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicy[]] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicy[]] # List of group policies that define the behavior of application group. The policies can support resource governance scenarios such as limiting ingress or egress traffic. ${Policy}, diff --git a/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubAuthorizationRule.ps1 b/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubAuthorizationRule.ps1 index 327222e8ec2e..7173267e7a42 100644 --- a/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubAuthorizationRule.ps1 +++ b/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubAuthorizationRule.ps1 @@ -20,8 +20,7 @@ Sets an EventHub Authorization Rule #> function Set-AzEventHubAuthorizationRule{ - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule])] - + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule])] [CmdletBinding(DefaultParameterSetName = 'SetExpandedNamespace', PositionalBinding = $false, SupportsShouldProcess, ConfirmImpact = 'Medium')] param( [Parameter(ParameterSetName = 'SetExpandedEntity', HelpMessage = "The name of the Authorization Rule")] @@ -70,9 +69,8 @@ function Set-AzEventHubAuthorizationRule{ [Parameter(Mandatory, HelpMessage = "The rights associated with the rule.")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights[]] + [System.String[]] # The rights associated with the rule. - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ParameterBreakingChangeAttribute("Rights","12.0.0", "5.0.0","2024-05-21" )] ${Rights}, [Parameter(HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] diff --git a/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubCluster.ps1 b/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubCluster.ps1 index 9e1f76d7892f..d99c7b83db72 100644 --- a/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubCluster.ps1 +++ b/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubCluster.ps1 @@ -20,7 +20,7 @@ Sets an EventHub Cluster #> function Set-AzEventHubCluster{ - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster])] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster])] [CmdletBinding(DefaultParameterSetName = 'SetExpanded', PositionalBinding = $false, SupportsShouldProcess, ConfirmImpact = 'Medium')] param( [Parameter(ParameterSetName = 'SetExpanded', Mandatory, HelpMessage = "The name of the EventHub Dedicated Cluster")] @@ -59,7 +59,7 @@ function Set-AzEventHubCluster{ [Parameter(HelpMessage = "Resource tags.")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceTags] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceTags] # Resource tags. ${Tag}, diff --git a/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubConsumerGroup.ps1 b/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubConsumerGroup.ps1 index cfdd9e5d9b41..c8ed7900d690 100644 --- a/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubConsumerGroup.ps1 +++ b/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubConsumerGroup.ps1 @@ -20,7 +20,7 @@ Sets an EventHub Consumer Group #> function Set-AzEventHubConsumerGroup{ - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup])] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup])] [CmdletBinding(DefaultParameterSetName = 'SetExpanded', PositionalBinding = $false, SupportsShouldProcess, ConfirmImpact = 'Medium')] param( [Parameter(ParameterSetName = 'SetExpanded', Mandatory, HelpMessage = "The name of the Consumer Group.")] diff --git a/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubNamespace.ps1 b/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubNamespace.ps1 index 3ce01b0c66c1..eb629fd1bdbe 100644 --- a/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubNamespace.ps1 +++ b/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubNamespace.ps1 @@ -21,7 +21,7 @@ Updates an EventHub Namespace function Set-AzEventHubNamespace{ [Alias("Set-AzEventHubNamespaceV2")] - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace])] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace])] [CmdletBinding(DefaultParameterSetName = 'SetExpanded', PositionalBinding = $false, SupportsShouldProcess, ConfirmImpact = 'Medium')] param( @@ -64,7 +64,7 @@ function Set-AzEventHubNamespace{ [Parameter(HelpMessage = "Properties to configure Encryption")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultProperties[]] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultProperties[]] ${KeyVaultProperty}, [Parameter(HelpMessage = "Enable Infrastructure Encryption (Double Encryption)")] @@ -74,8 +74,7 @@ function Set-AzEventHubNamespace{ [Parameter(HelpMessage = "Type of managed service identity.")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ParameterBreakingChangeAttribute("IdentityType","12.0.0", "5.0.0","2024-05-21" )] + [System.String] ${IdentityType}, [Parameter(HelpMessage = "Properties for User Assigned Identities")] @@ -103,8 +102,7 @@ function Set-AzEventHubNamespace{ [Parameter(HelpMessage = "This determines if traffic is allowed over public network. By default it is enabled.")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ParameterBreakingChangeAttribute("PublicNetworkAccess","12.0.0", "5.0.0","2024-05-21" )] + [System.String] ${PublicNetworkAccess}, [Parameter(HelpMessage = "The Event Hubs throughput units for Basic or Standard tiers, where value should be 0 to 20 throughput units. The Event Hubs premium units for Premium tier, where value should be 0 to 10 premium units.")] @@ -222,7 +220,7 @@ function Set-AzEventHubNamespace{ $identityHashTable = @{} foreach ($resourceID in $UserAssignedIdentityId){ - $identityHashTable.Add($resourceID, [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.UserAssignedIdentity]::new()) + $identityHashTable.Add($resourceID, [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.UserAssignedIdentity]::new()) } $eventHubNamespace.UserAssignedIdentity = $identityHashTable diff --git a/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubNetworkRuleSet.ps1 b/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubNetworkRuleSet.ps1 index 817bd87d91b4..2ef6bb267436 100644 --- a/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubNetworkRuleSet.ps1 +++ b/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubNetworkRuleSet.ps1 @@ -20,7 +20,7 @@ Sets an EventHub Namespace Network Rule Set #> function Set-AzEventHubNetworkRuleSet{ - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet])] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet])] [CmdletBinding(DefaultParameterSetName = 'SetExpanded', PositionalBinding = $false, SupportsShouldProcess, ConfirmImpact = 'Medium')] param( [Parameter(ParameterSetName = 'SetExpanded', Mandatory, HelpMessage = "The name of EventHub namespace")] @@ -52,9 +52,8 @@ function Set-AzEventHubNetworkRuleSet{ [Parameter(HelpMessage = "This determines if traffic is allowed over public network. By default it is enabled. If value is SecuredByPerimeter then Inbound and Outbound communication is controlled by the network security perimeter and profile's access rules. ")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess] + [System.String] #This determines if traffic is allowed over public network. By default it is enabled. If value is SecuredByPerimeter then Inbound and Outbound communication is controlled by the network security perimeter and profile's access rules. - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ParameterBreakingChangeAttribute("PublicNetworkAccess","12.0.0", "5.0.0","2024-05-21" )] ${PublicNetworkAccess}, [Parameter(HelpMessage = "Value that indicates whether Trusted Service Access is Enabled or not.")] @@ -65,20 +64,19 @@ function Set-AzEventHubNetworkRuleSet{ [Parameter(HelpMessage = "Default Action for Network Rule Set")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.DefaultAction] + [System.String] #Default Action for Network Rule Set - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ParameterBreakingChangeAttribute("DefaultAction","12.0.0", "5.0.0","2024-05-21" )] ${DefaultAction}, [Parameter(HelpMessage = "List of IpRules")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetIPRules[]] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetIPRules[]] # List of IpRules ${IPRule}, [Parameter(HelpMessage = "List of VirtualNetwork Rules")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetVirtualNetworkRules[]] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetVirtualNetworkRules[]] # List of VirtualNetwork Rules ${VirtualNetworkRule}, diff --git a/src/EventHub/EventHub.Autorest/custom/Test-AzEventHubName.ps1 b/src/EventHub/EventHub.Autorest/custom/Test-AzEventHubName.ps1 index 87e1ad182954..fbd148e78851 100644 --- a/src/EventHub/EventHub.Autorest/custom/Test-AzEventHubName.ps1 +++ b/src/EventHub/EventHub.Autorest/custom/Test-AzEventHubName.ps1 @@ -20,7 +20,7 @@ Checks availability of a namespace name or disaster recovery alias. #> function Test-AzEventHubName { - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult])] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult])] [CmdletBinding(DefaultParameterSetName = 'NamespaceAvailability', PositionalBinding = $false, ConfirmImpact = 'Medium')] param( [Parameter(Mandatory, ParameterSetName = 'AliasAvailability', HelpMessage = "The name of EventHub namespace")] diff --git a/src/EventHub/EventHub.Autorest/custom/autogen-model-cmdlets/New-AzEventHubKeyVaultPropertiesObject.ps1 b/src/EventHub/EventHub.Autorest/custom/autogen-model-cmdlets/New-AzEventHubKeyVaultPropertiesObject.ps1 index 5243da95a915..9ed002a20e01 100644 --- a/src/EventHub/EventHub.Autorest/custom/autogen-model-cmdlets/New-AzEventHubKeyVaultPropertiesObject.ps1 +++ b/src/EventHub/EventHub.Autorest/custom/autogen-model-cmdlets/New-AzEventHubKeyVaultPropertiesObject.ps1 @@ -21,12 +21,12 @@ Create an in-memory object for KeyVaultProperties. Create an in-memory object for KeyVaultProperties. .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.KeyVaultProperties +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.KeyVaultProperties .Link -https://learn.microsoft.com/powershell/module/Az.EventHub/new-AzEventHubKeyVaultPropertiesObject +https://learn.microsoft.com/powershell/module/Az.EventHub/new-azeventhubkeyvaultpropertiesobject #> function New-AzEventHubKeyVaultPropertiesObject { - [OutputType('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.KeyVaultProperties')] + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.KeyVaultProperties')] [CmdletBinding(PositionalBinding=$false)] Param( @@ -45,7 +45,7 @@ function New-AzEventHubKeyVaultPropertiesObject { ) process { - $Object = [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.KeyVaultProperties]::New() + $Object = [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.KeyVaultProperties]::New() if ($PSBoundParameters.ContainsKey('KeyName')) { $Object.KeyName = $KeyName diff --git a/src/EventHub/EventHub.Autorest/examples/Get-AzEventHubPrivateEndpointConnection.md b/src/EventHub/EventHub.Autorest/examples/Get-AzEventHubPrivateEndpointConnection.md index 9713379123a2..913b143327d8 100644 --- a/src/EventHub/EventHub.Autorest/examples/Get-AzEventHubPrivateEndpointConnection.md +++ b/src/EventHub/EventHub.Autorest/examples/Get-AzEventHubPrivateEndpointConnection.md @@ -22,4 +22,4 @@ Gets details of private endpoint connection `00000000000` created under EventHub Get-AzEventHubPrivateEndpointConnection -ResourceGroupName myResourceGroup -NamespaceName myNamespace ``` -Lists all private endpoint connections of EventHub namespace `myNamespace`. \ No newline at end of file +Lists all private endpoint connections of EventHub namespace `myNamespace`. diff --git a/src/EventHub/EventHub.Autorest/export-surface.ps1 b/src/EventHub/EventHub.Autorest/export-surface.ps1 index 41d899a3d23a..02f76c55aec9 100644 --- a/src/EventHub/EventHub.Autorest/export-surface.ps1 +++ b/src/EventHub/EventHub.Autorest/export-surface.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]$IncludeGeneralParameters, [switch]$UseExpandedFormat) +param([switch]$NotIsolated, [switch]$IncludeGeneralParameters, [switch]$UseExpandedFormat) $ErrorActionPreference = 'Stop' $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path -if(-not $Isolated) { +if(-not $NotIsolated) { Write-Host -ForegroundColor Green 'Creating isolated process...' - & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated + & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated return } diff --git a/src/EventHub/EventHub.Autorest/exports/Approve-AzEventHubPrivateEndpointConnection.ps1 b/src/EventHub/EventHub.Autorest/exports/Approve-AzEventHubPrivateEndpointConnection.ps1 index 295dea92e8bd..2bbe40b02ffa 100644 --- a/src/EventHub/EventHub.Autorest/exports/Approve-AzEventHubPrivateEndpointConnection.ps1 +++ b/src/EventHub/EventHub.Autorest/exports/Approve-AzEventHubPrivateEndpointConnection.ps1 @@ -28,13 +28,13 @@ Approve-AzEventHubPrivateEndpointConnection -InputObject $privateEndpoint .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity parameter. +INPUTOBJECT : Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [Alias ]: The Disaster Recovery configuration name [ApplicationGroupName ]: The Application Group name [AuthorizationRuleName ]: The authorization rule name. @@ -52,7 +52,7 @@ INPUTOBJECT : Identity parameter. https://learn.microsoft.com/powershell/module/az.eventhub/approve-azeventhubprivateendpointconnection #> function Approve-AzEventHubPrivateEndpointConnection { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection])] [CmdletBinding(DefaultParameterSetName='SetExpanded', PositionalBinding=$false)] param( [Parameter(ParameterSetName='SetExpanded', Mandatory)] @@ -183,7 +183,7 @@ begin { SetExpanded = 'Az.EventHub.custom\Approve-AzEventHubPrivateEndpointConnection'; SetViaIdentityExpanded = 'Az.EventHub.custom\Approve-AzEventHubPrivateEndpointConnection'; } - if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/exports/Deny-AzEventHubPrivateEndpointConnection.ps1 b/src/EventHub/EventHub.Autorest/exports/Deny-AzEventHubPrivateEndpointConnection.ps1 index e2c8a291c616..32c5f6f7841b 100644 --- a/src/EventHub/EventHub.Autorest/exports/Deny-AzEventHubPrivateEndpointConnection.ps1 +++ b/src/EventHub/EventHub.Autorest/exports/Deny-AzEventHubPrivateEndpointConnection.ps1 @@ -28,13 +28,13 @@ Deny-AzEventHubPrivateEndpointConnection -InputObject $privateEndpoint .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity parameter. +INPUTOBJECT : Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [Alias ]: The Disaster Recovery configuration name [ApplicationGroupName ]: The Application Group name [AuthorizationRuleName ]: The authorization rule name. @@ -52,7 +52,7 @@ INPUTOBJECT : Identity parameter. https://learn.microsoft.com/powershell/module/az.eventhub/deny-azeventhubprivateendpointconnection #> function Deny-AzEventHubPrivateEndpointConnection { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection])] [CmdletBinding(DefaultParameterSetName='SetExpanded', PositionalBinding=$false)] param( [Parameter(ParameterSetName='SetExpanded', Mandatory)] @@ -183,7 +183,7 @@ begin { SetExpanded = 'Az.EventHub.custom\Deny-AzEventHubPrivateEndpointConnection'; SetViaIdentityExpanded = 'Az.EventHub.custom\Deny-AzEventHubPrivateEndpointConnection'; } - if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/exports/Get-AzEventHub.ps1 b/src/EventHub/EventHub.Autorest/exports/Get-AzEventHub.ps1 index eccde702d9c6..c0d85d0c3a78 100644 --- a/src/EventHub/EventHub.Autorest/exports/Get-AzEventHub.ps1 +++ b/src/EventHub/EventHub.Autorest/exports/Get-AzEventHub.ps1 @@ -27,7 +27,7 @@ Get-AzEventHub -ResourceGroupName myResourceGroup -NamespaceName myNamespace .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub .Notes COMPLEX PARAMETER PROPERTIES @@ -47,14 +47,30 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: Name of the resource group within the azure subscription. [SchemaGroupName ]: The Schema Group name [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. .Link https://learn.microsoft.com/powershell/module/az.eventhub/get-azeventhub #> function Get-AzEventHub { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] [Alias('EventHubName')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] @@ -88,9 +104,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Query')] [System.Int32] @@ -181,9 +202,10 @@ begin { $mapping = @{ Get = 'Az.EventHub.private\Get-AzEventHub_Get'; GetViaIdentity = 'Az.EventHub.private\Get-AzEventHub_GetViaIdentity'; + GetViaIdentityNamespace = 'Az.EventHub.private\Get-AzEventHub_GetViaIdentityNamespace'; List = 'Az.EventHub.private\Get-AzEventHub_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/exports/Get-AzEventHubApplicationGroup.ps1 b/src/EventHub/EventHub.Autorest/exports/Get-AzEventHubApplicationGroup.ps1 index d75af914f4bc..4334a9d3ea5b 100644 --- a/src/EventHub/EventHub.Autorest/exports/Get-AzEventHubApplicationGroup.ps1 +++ b/src/EventHub/EventHub.Autorest/exports/Get-AzEventHubApplicationGroup.ps1 @@ -27,7 +27,7 @@ Get-AzEventHubApplicationGroup -ResourceGroupName myResourceGroup -NamespaceName .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup .Notes COMPLEX PARAMETER PROPERTIES @@ -47,14 +47,30 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: Name of the resource group within the azure subscription. [SchemaGroupName ]: The Schema Group name [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. .Link https://learn.microsoft.com/powershell/module/az.eventhub/get-azeventhubapplicationgroup #> function Get-AzEventHubApplicationGroup { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] [Alias('ApplicationGroupName')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] @@ -88,9 +104,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -168,9 +189,10 @@ begin { $mapping = @{ Get = 'Az.EventHub.private\Get-AzEventHubApplicationGroup_Get'; GetViaIdentity = 'Az.EventHub.private\Get-AzEventHubApplicationGroup_GetViaIdentity'; + GetViaIdentityNamespace = 'Az.EventHub.private\Get-AzEventHubApplicationGroup_GetViaIdentityNamespace'; List = 'Az.EventHub.private\Get-AzEventHubApplicationGroup_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/exports/Get-AzEventHubAuthorizationRule.ps1 b/src/EventHub/EventHub.Autorest/exports/Get-AzEventHubAuthorizationRule.ps1 index be8abc50a07a..139ea0d15f18 100644 --- a/src/EventHub/EventHub.Autorest/exports/Get-AzEventHubAuthorizationRule.ps1 +++ b/src/EventHub/EventHub.Autorest/exports/Get-AzEventHubAuthorizationRule.ps1 @@ -27,13 +27,13 @@ Get-AzEventHubAuthorizationRule -ResourceGroupName myResourceGroup -NamespaceNam .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity parameter. +INPUTOBJECT : Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [Alias ]: The Disaster Recovery configuration name [ApplicationGroupName ]: The Application Group name [AuthorizationRuleName ]: The authorization rule name. @@ -51,7 +51,7 @@ INPUTOBJECT : Identity parameter. https://learn.microsoft.com/powershell/module/az.eventhub/get-azeventhubauthorizationrule #> function Get-AzEventHubAuthorizationRule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule])] [CmdletBinding(DefaultParameterSetName='GetExpandedNamespace', PositionalBinding=$false)] param( [Parameter(ParameterSetName='GetExpandedNamespace', Mandatory)] @@ -187,7 +187,7 @@ begin { GetExpandedEntity = 'Az.EventHub.custom\Get-AzEventHubAuthorizationRule'; GetViaIdentityExpanded = 'Az.EventHub.custom\Get-AzEventHubAuthorizationRule'; } - if (('GetExpandedNamespace', 'GetExpandedAlias', 'GetExpandedEntity') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('GetExpandedNamespace', 'GetExpandedAlias', 'GetExpandedEntity') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/exports/Get-AzEventHubCluster.ps1 b/src/EventHub/EventHub.Autorest/exports/Get-AzEventHubCluster.ps1 index 5d574d97d76c..24e9a8af382d 100644 --- a/src/EventHub/EventHub.Autorest/exports/Get-AzEventHubCluster.ps1 +++ b/src/EventHub/EventHub.Autorest/exports/Get-AzEventHubCluster.ps1 @@ -25,7 +25,7 @@ Get-AzEventHubCluster -ResourceGroupName myResourceGroup -Name DefaultCluster-11 .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster .Notes COMPLEX PARAMETER PROPERTIES @@ -49,7 +49,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.eventhub/get-azeventhubcluster #> function Get-AzEventHubCluster { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -80,7 +80,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -163,7 +162,7 @@ begin { List = 'Az.EventHub.private\Get-AzEventHubCluster_List'; List1 = 'Az.EventHub.private\Get-AzEventHubCluster_List1'; } - if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + 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.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/exports/Get-AzEventHubClusterNamespace.ps1 b/src/EventHub/EventHub.Autorest/exports/Get-AzEventHubClusterNamespace.ps1 index c349f479b071..9e157f86d546 100644 --- a/src/EventHub/EventHub.Autorest/exports/Get-AzEventHubClusterNamespace.ps1 +++ b/src/EventHub/EventHub.Autorest/exports/Get-AzEventHubClusterNamespace.ps1 @@ -23,12 +23,12 @@ List all Event Hubs Namespace IDs in an Event Hubs Dedicated Cluster. Get-AzEventHubClusterNamespace -ResourceGroupName myResourceGroup -ClusterName DefaultCluster-11 .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceIdContainer +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceIdListResult .Link https://learn.microsoft.com/powershell/module/az.eventhub/get-azeventhubclusternamespace #> function Get-AzEventHubClusterNamespace { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceIdContainer])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceIdListResult])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(Mandatory)] @@ -128,7 +128,7 @@ begin { $mapping = @{ List = 'Az.EventHub.private\Get-AzEventHubClusterNamespace_List'; } - if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/exports/Get-AzEventHubClustersAvailableRegion.ps1 b/src/EventHub/EventHub.Autorest/exports/Get-AzEventHubClustersAvailableRegion.ps1 index b631dc78c172..45e5b1695360 100644 --- a/src/EventHub/EventHub.Autorest/exports/Get-AzEventHubClustersAvailableRegion.ps1 +++ b/src/EventHub/EventHub.Autorest/exports/Get-AzEventHubClustersAvailableRegion.ps1 @@ -23,12 +23,12 @@ List the quantity of available pre-provisioned Event Hubs Clusters, indexed by A Get-AzEventHubClustersAvailableRegion .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAvailableCluster +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAvailableClustersList .Link https://learn.microsoft.com/powershell/module/az.eventhub/get-azeventhubclustersavailableregion #> function Get-AzEventHubClustersAvailableRegion { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAvailableCluster])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAvailableClustersList])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter()] @@ -116,7 +116,7 @@ begin { $mapping = @{ List = 'Az.EventHub.private\Get-AzEventHubClustersAvailableRegion_List'; } - if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/exports/Get-AzEventHubConsumerGroup.ps1 b/src/EventHub/EventHub.Autorest/exports/Get-AzEventHubConsumerGroup.ps1 index af01d991bcbb..f51996ed5a13 100644 --- a/src/EventHub/EventHub.Autorest/exports/Get-AzEventHubConsumerGroup.ps1 +++ b/src/EventHub/EventHub.Autorest/exports/Get-AzEventHubConsumerGroup.ps1 @@ -27,12 +27,27 @@ Get-AzEventHubConsumerGroup -NamespaceName myNamespace -ResourceGroupName myReso .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. +EVENTHUBINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [ApplicationGroupName ]: The Application Group name @@ -47,14 +62,30 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: Name of the resource group within the azure subscription. [SchemaGroupName ]: The Schema Group name [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. .Link https://learn.microsoft.com/powershell/module/az.eventhub/get-azeventhubconsumergroup #> function Get-AzEventHubConsumerGroup { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] @@ -62,6 +93,8 @@ param( ${EventHubName}, [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityEventhub', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] [Alias('ConsumerGroupName')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] @@ -95,9 +128,20 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityEventhub', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${EventhubInputObject}, + + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Query')] [System.Int32] @@ -188,9 +232,11 @@ begin { $mapping = @{ Get = 'Az.EventHub.private\Get-AzEventHubConsumerGroup_Get'; GetViaIdentity = 'Az.EventHub.private\Get-AzEventHubConsumerGroup_GetViaIdentity'; + GetViaIdentityEventhub = 'Az.EventHub.private\Get-AzEventHubConsumerGroup_GetViaIdentityEventhub'; + GetViaIdentityNamespace = 'Az.EventHub.private\Get-AzEventHubConsumerGroup_GetViaIdentityNamespace'; List = 'Az.EventHub.private\Get-AzEventHubConsumerGroup_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/exports/Get-AzEventHubGeoDRConfiguration.ps1 b/src/EventHub/EventHub.Autorest/exports/Get-AzEventHubGeoDRConfiguration.ps1 index 9bb65b39c50f..9a97220fc151 100644 --- a/src/EventHub/EventHub.Autorest/exports/Get-AzEventHubGeoDRConfiguration.ps1 +++ b/src/EventHub/EventHub.Autorest/exports/Get-AzEventHubGeoDRConfiguration.ps1 @@ -25,7 +25,7 @@ Get-AzEventHubGeoDRConfiguration -ResourceGroupName myResourceGroup -NamespaceNa .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery .Notes COMPLEX PARAMETER PROPERTIES @@ -45,14 +45,30 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: Name of the resource group within the azure subscription. [SchemaGroupName ]: The Schema Group name [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. .Link https://learn.microsoft.com/powershell/module/az.eventhub/get-azeventhubgeodrconfiguration #> function Get-AzEventHubGeoDRConfiguration { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # The Disaster Recovery configuration name @@ -85,9 +101,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -165,9 +186,10 @@ begin { $mapping = @{ Get = 'Az.EventHub.private\Get-AzEventHubGeoDRConfiguration_Get'; GetViaIdentity = 'Az.EventHub.private\Get-AzEventHubGeoDRConfiguration_GetViaIdentity'; + GetViaIdentityNamespace = 'Az.EventHub.private\Get-AzEventHubGeoDRConfiguration_GetViaIdentityNamespace'; List = 'Az.EventHub.private\Get-AzEventHubGeoDRConfiguration_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/exports/Get-AzEventHubKey.ps1 b/src/EventHub/EventHub.Autorest/exports/Get-AzEventHubKey.ps1 index 98a394848a8b..851aecea44e1 100644 --- a/src/EventHub/EventHub.Autorest/exports/Get-AzEventHubKey.ps1 +++ b/src/EventHub/EventHub.Autorest/exports/Get-AzEventHubKey.ps1 @@ -25,12 +25,12 @@ Get-AzEventHubKey -ResourceGroupName myResourceGroup -NamespaceName myNamespace Get-AzEventHubKey -ResourceGroupName myResourceGroup -NamespaceName myNamespace -EventHubName myEventHub -Name RootManageSharedAccessKey .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys .Link https://learn.microsoft.com/powershell/module/az.eventhub/get-azeventhubkey #> function Get-AzEventHubKey { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys])] [CmdletBinding(DefaultParameterSetName='GetExpandedNamespace', PositionalBinding=$false)] param( [Parameter(Mandatory)] @@ -162,7 +162,7 @@ begin { GetExpandedAlias = 'Az.EventHub.custom\Get-AzEventHubKey'; GetExpandedEntity = 'Az.EventHub.custom\Get-AzEventHubKey'; } - if (('GetExpandedNamespace', 'GetExpandedAlias', 'GetExpandedEntity') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('GetExpandedNamespace', 'GetExpandedAlias', 'GetExpandedEntity') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/exports/Get-AzEventHubNamespace.ps1 b/src/EventHub/EventHub.Autorest/exports/Get-AzEventHubNamespace.ps1 index ce2f747964b5..6fb175783705 100644 --- a/src/EventHub/EventHub.Autorest/exports/Get-AzEventHubNamespace.ps1 +++ b/src/EventHub/EventHub.Autorest/exports/Get-AzEventHubNamespace.ps1 @@ -29,7 +29,7 @@ Get-AzEventHubNamespace .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace .Notes COMPLEX PARAMETER PROPERTIES @@ -54,7 +54,7 @@ https://learn.microsoft.com/powershell/module/az.eventhub/get-azeventhubnamespac #> function Get-AzEventHubNamespace { [Alias('Get-AzEventHubNamespaceV2')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -85,7 +85,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -168,7 +167,7 @@ begin { List = 'Az.EventHub.private\Get-AzEventHubNamespace_List'; List1 = 'Az.EventHub.private\Get-AzEventHubNamespace_List1'; } - if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + 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.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/exports/Get-AzEventHubNetworkRuleSet.ps1 b/src/EventHub/EventHub.Autorest/exports/Get-AzEventHubNetworkRuleSet.ps1 index 07846037a326..d9c8b366b647 100644 --- a/src/EventHub/EventHub.Autorest/exports/Get-AzEventHubNetworkRuleSet.ps1 +++ b/src/EventHub/EventHub.Autorest/exports/Get-AzEventHubNetworkRuleSet.ps1 @@ -25,9 +25,9 @@ Get-AzEventHubNetworkRuleSet -ResourceGroupName myResourceGroup -NamespaceName m .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetListResult +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetListResult .Notes COMPLEX PARAMETER PROPERTIES @@ -51,7 +51,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.eventhub/get-azeventhubnetworkruleset #> function Get-AzEventHubNetworkRuleSet { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet], [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetListResult])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet], [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetListResult])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -81,7 +81,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -163,7 +162,7 @@ begin { GetViaIdentity = 'Az.EventHub.private\Get-AzEventHubNetworkRuleSet_GetViaIdentity'; List = 'Az.EventHub.private\Get-AzEventHubNetworkRuleSet_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/exports/Get-AzEventHubPrivateEndpointConnection.ps1 b/src/EventHub/EventHub.Autorest/exports/Get-AzEventHubPrivateEndpointConnection.ps1 index d0ed45884f0d..f40e0696cd5d 100644 --- a/src/EventHub/EventHub.Autorest/exports/Get-AzEventHubPrivateEndpointConnection.ps1 +++ b/src/EventHub/EventHub.Autorest/exports/Get-AzEventHubPrivateEndpointConnection.ps1 @@ -27,7 +27,7 @@ Get-AzEventHubPrivateEndpointConnection -ResourceGroupName myResourceGroup -Name .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection .Notes COMPLEX PARAMETER PROPERTIES @@ -47,14 +47,34 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: Name of the resource group within the azure subscription. [SchemaGroupName ]: The Schema Group name [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. .Link https://learn.microsoft.com/powershell/module/az.eventhub/get-azeventhubprivateendpointconnection +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639379.aspx +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639412.aspx #> function Get-AzEventHubPrivateEndpointConnection { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] [Alias('PrivateEndpointConnectionName')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] @@ -88,9 +108,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -168,9 +193,10 @@ begin { $mapping = @{ Get = 'Az.EventHub.private\Get-AzEventHubPrivateEndpointConnection_Get'; GetViaIdentity = 'Az.EventHub.private\Get-AzEventHubPrivateEndpointConnection_GetViaIdentity'; + GetViaIdentityNamespace = 'Az.EventHub.private\Get-AzEventHubPrivateEndpointConnection_GetViaIdentityNamespace'; List = 'Az.EventHub.private\Get-AzEventHubPrivateEndpointConnection_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/exports/Get-AzEventHubPrivateLink.ps1 b/src/EventHub/EventHub.Autorest/exports/Get-AzEventHubPrivateLink.ps1 index 77765203781d..9523c95d9683 100644 --- a/src/EventHub/EventHub.Autorest/exports/Get-AzEventHubPrivateLink.ps1 +++ b/src/EventHub/EventHub.Autorest/exports/Get-AzEventHubPrivateLink.ps1 @@ -23,12 +23,14 @@ Gets lists of resources that supports Privatelinks. Get-AzEventHubPrivateLink -ResourceGroupName myResourceGroup -NamespaceName myNamespace .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourcesListResult +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourcesListResult .Link https://learn.microsoft.com/powershell/module/az.eventhub/get-azeventhubprivatelink +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639379.aspx #> function Get-AzEventHubPrivateLink { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourcesListResult])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourcesListResult])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(Mandatory)] @@ -128,7 +130,7 @@ begin { $mapping = @{ Get = 'Az.EventHub.private\Get-AzEventHubPrivateLink_Get'; } - if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/exports/Get-AzEventHubSchemaGroup.ps1 b/src/EventHub/EventHub.Autorest/exports/Get-AzEventHubSchemaGroup.ps1 index 3eab1d2c0beb..e165a5678ae4 100644 --- a/src/EventHub/EventHub.Autorest/exports/Get-AzEventHubSchemaGroup.ps1 +++ b/src/EventHub/EventHub.Autorest/exports/Get-AzEventHubSchemaGroup.ps1 @@ -27,7 +27,7 @@ Get-AzEventHubSchemaGroup -ResourceGroupName myResourceGroup -NamespaceName myNa .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup .Notes COMPLEX PARAMETER PROPERTIES @@ -47,14 +47,30 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: Name of the resource group within the azure subscription. [SchemaGroupName ]: The Schema Group name [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. .Link https://learn.microsoft.com/powershell/module/az.eventhub/get-azeventhubschemagroup #> function Get-AzEventHubSchemaGroup { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] [Alias('SchemaGroupName')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] @@ -88,9 +104,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Query')] [System.Int32] @@ -181,9 +202,10 @@ begin { $mapping = @{ Get = 'Az.EventHub.private\Get-AzEventHubSchemaGroup_Get'; GetViaIdentity = 'Az.EventHub.private\Get-AzEventHubSchemaGroup_GetViaIdentity'; + GetViaIdentityNamespace = 'Az.EventHub.private\Get-AzEventHubSchemaGroup_GetViaIdentityNamespace'; List = 'Az.EventHub.private\Get-AzEventHubSchemaGroup_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/exports/New-AzEventHub.ps1 b/src/EventHub/EventHub.Autorest/exports/New-AzEventHub.ps1 index d7d48c29f466..335df1a2c2a6 100644 --- a/src/EventHub/EventHub.Autorest/exports/New-AzEventHub.ps1 +++ b/src/EventHub/EventHub.Autorest/exports/New-AzEventHub.ps1 @@ -16,9 +16,9 @@ <# .Synopsis -Creates or updates a new Event Hub as a nested resource within a Namespace. +Create a new Event Hub as a nested resource within a Namespace. .Description -Creates or updates a new Event Hub as a nested resource within a Namespace. +Create a new Event Hub as a nested resource within a Namespace. .Example New-AzEventHub -Name myEventHub -ResourceGroupName myResourceGroup -NamespaceName myNamespace -RetentionTimeInHour 168 -PartitionCount 5 -CleanupPolicy Delete .Example @@ -26,13 +26,58 @@ New-AzEventHub -Name myEventHub -ResourceGroupName myResourceGroup -NamespaceNam .Example New-AzEventHub -Name myEventHub -ResourceGroupName myResourceGroup -NamespaceName myNamespace -CleanupPolicy Compact +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + +PARAMETER : Single item in List or Get Event Hub operation + [ArchiveNameFormat ]: Blob naming convention for archive, e.g. {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}. Here all the parameters (Namespace,EventHub .. etc) are mandatory irrespective of order + [BlobContainer ]: Blob container Name + [CaptureEnabled ]: A value that indicates whether capture description is enabled. + [CleanupPolicy ]: Enumerates the possible values for cleanup policy + [DataLakeAccountName ]: The Azure Data Lake Store name for the captured events + [DataLakeFolderPath ]: The destination folder path for the captured events + [DataLakeSubscriptionId ]: Subscription Id of Azure Data Lake Store + [DestinationName ]: Name for capture destination + [Encoding ]: Enumerates the possible values for the encoding format of capture description. Note: 'AvroDeflate' will be deprecated in New API Version + [IdentityType ]: Type of Azure Active Directory Managed Identity. + [IntervalInSeconds ]: The time window allows you to set the frequency with which the capture to Azure Blobs will happen, value should between 60 to 900 seconds + [MessageRetentionInDay ]: Number of days to retain the events for this Event Hub, value should be 1 to 7 days + [PartitionCount ]: Number of partitions created for the Event Hub, allowed values are from 1 to 32 partitions. + [RetentionTimeInHour ]: Number of hours to retain the events for this Event Hub. This value is only used when cleanupPolicy is Delete. If cleanupPolicy is Compact the returned value of this property is Long.MaxValue + [SizeLimitInBytes ]: The size window defines the amount of data built up in your Event Hub before an capture operation, value should be between 10485760 to 524288000 bytes + [SkipEmptyArchive ]: A value that indicates whether to Skip Empty Archives + [Status ]: Enumerates the possible values for the status of the Event Hub. + [StorageAccountResourceId ]: Resource id of the storage account to be used to create the blobs + [TombstoneRetentionTimeInHour ]: Number of hours to retain the tombstone markers of a compacted Event Hub. This value is only used when cleanupPolicy is Compact. Consumer must complete reading the tombstone marker within this specified amount of time if consumer begins from starting offset to ensure they get a valid snapshot for the specific key described by the tombstone marker within the compacted Event Hub + [UserAssignedIdentityId ]: ARM ID of Managed User Identity. This property is required is the type is UserAssignedIdentity. If type is SystemAssigned, then the System Assigned Identity Associated with the namespace will be used. .Link https://learn.microsoft.com/powershell/module/az.eventhub/new-azeventhub #> function New-AzEventHub { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -42,19 +87,19 @@ param( # The Event Hub name ${Name}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # The Namespace name ${NamespaceName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # Name of the resource group within the azure subscription. ${ResourceGroupName}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -62,7 +107,15 @@ param( # The subscription ID forms part of the URI for every service call. ${SubscriptionId}, - [Parameter()] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] [System.String] # Blob naming convention for archive, e.g. @@ -71,59 +124,68 @@ param( # etc) are mandatory irrespective of order ${ArchiveNameFormat}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] [System.String] # Blob container Name ${BlobContainer}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] [System.Management.Automation.SwitchParameter] # A value that indicates whether capture description is enabled. ${CaptureEnabled}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CleanupPolicyRetentionDescription])] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Delete", "Compact")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CleanupPolicyRetentionDescription] + [System.String] # Enumerates the possible values for cleanup policy ${CleanupPolicy}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] [System.String] # Name for capture destination ${DestinationName}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription])] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Avro", "AvroDeflate")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription] + [System.String] # Enumerates the possible values for the encoding format of capture description. # Note: 'AvroDeflate' will be deprecated in New API Version ${Encoding}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType])] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("SystemAssigned", "UserAssigned")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType] + [System.String] # Type of Azure Active Directory Managed Identity. ${IdentityType}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] [System.Int32] # The time window allows you to set the frequency with which the capture to Azure Blobs will happen, value should between 60 to 900 seconds ${IntervalInSeconds}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] [System.Int64] # Number of partitions created for the Event Hub, allowed values are from 1 to 32 partitions. ${PartitionCount}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] [System.Int64] # Number of hours to retain the events for this Event Hub. @@ -131,32 +193,37 @@ param( # If cleanupPolicy is Compact the returned value of this property is Long.MaxValue ${RetentionTimeInHour}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] [System.Int32] # The size window defines the amount of data built up in your Event Hub before an capture operation, value should be between 10485760 to 524288000 bytes ${SizeLimitInBytes}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] [System.Management.Automation.SwitchParameter] # A value that indicates whether to Skip Empty Archives ${SkipEmptyArchive}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus])] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Active", "Disabled", "Restoring", "SendDisabled", "ReceiveDisabled", "Creating", "Deleting", "Renaming", "Unknown")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus] + [System.String] # Enumerates the possible values for the status of the Event Hub. ${Status}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] [System.String] # Resource id of the storage account to be used to create the blobs ${StorageAccountResourceId}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] [System.Int32] # Number of hours to retain the tombstone markers of a compacted Event Hub. @@ -164,7 +231,8 @@ param( # Consumer must complete reading the tombstone marker within this specified amount of time if consumer begins from starting offset to ensure they get a valid snapshot for the specific key described by the tombstone marker within the compacted Event Hub ${TombstoneRetentionTimeInHour}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] [System.String] # ARM ID of Managed User Identity. @@ -172,6 +240,12 @@ param( # If type is SystemAssigned, then the System Assigned Identity Associated with the namespace will be used. ${UserAssignedIdentityId}, + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub] + # Single item in List or Get Event Hub operation + ${Parameter}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -248,8 +322,10 @@ begin { $mapping = @{ CreateExpanded = 'Az.EventHub.private\New-AzEventHub_CreateExpanded'; + CreateViaIdentityNamespace = 'Az.EventHub.private\New-AzEventHub_CreateViaIdentityNamespace'; + CreateViaIdentityNamespaceExpanded = 'Az.EventHub.private\New-AzEventHub_CreateViaIdentityNamespaceExpanded'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/exports/New-AzEventHubApplicationGroup.ps1 b/src/EventHub/EventHub.Autorest/exports/New-AzEventHubApplicationGroup.ps1 index aea9edfb8d98..5266a1f20e48 100644 --- a/src/EventHub/EventHub.Autorest/exports/New-AzEventHubApplicationGroup.ps1 +++ b/src/EventHub/EventHub.Autorest/exports/New-AzEventHubApplicationGroup.ps1 @@ -16,28 +16,53 @@ <# .Synopsis -Creates or updates an ApplicationGroup for a Namespace. +Create an ApplicationGroup for a Namespace. .Description -Creates or updates an ApplicationGroup for a Namespace. +Create an ApplicationGroup for a Namespace. .Example $t1 = New-AzEventHubThrottlingPolicyConfig -Name t1 -MetricId IncomingMessages -RateLimitThreshold 10000 $t2 = New-AzEventHubThrottlingPolicyConfig -Name t2 -MetricId OutgoingBytes -RateLimitThreshold 20000 New-AzEventHubApplicationGroup -NamespaceName myNamespace -ResourceGroupName myResourceGroup -Name myAppGroup -ClientAppGroupIdentifier NamespaceSASKeyName=a -Policy $t1,$t2 +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + +PARAMETER : The Application Group object + [ClientAppGroupIdentifier ]: The Unique identifier for application group.Supports SAS(SASKeyName=KeyName) or AAD(AADAppID=Guid) + [IsEnabled ]: Determines if Application Group is allowed to create connection with namespace or not. Once the isEnabled is set to false, all the existing connections of application group gets dropped and no new connections will be allowed + [Policy >]: List of group policies that define the behavior of application group. The policies can support resource governance scenarios such as limiting ingress or egress traffic. + Name : The Name of this policy + POLICY : List of group policies that define the behavior of application group. The policies can support resource governance scenarios such as limiting ingress or egress traffic. Name : The Name of this policy .Link https://learn.microsoft.com/powershell/module/az.eventhub/new-azeventhubapplicationgroup #> function New-AzEventHubApplicationGroup { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -47,19 +72,19 @@ param( # The Application Group name ${Name}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # The Namespace name ${NamespaceName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # Name of the resource group within the azure subscription. ${ResourceGroupName}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -67,28 +92,43 @@ param( # The subscription ID forms part of the URI for every service call. ${SubscriptionId}, - [Parameter()] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] [System.String] # The Unique identifier for application group.Supports SAS(SASKeyName=KeyName) or AAD(AADAppID=Guid) ${ClientAppGroupIdentifier}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] [System.Management.Automation.SwitchParameter] # Determines if Application Group is allowed to create connection with namespace or not. # Once the isEnabled is set to false, all the existing connections of application group gets dropped and no new connections will be allowed ${IsEnabled}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicy[]] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicy[]] # List of group policies that define the behavior of application group. # The policies can support resource governance scenarios such as limiting ingress or egress traffic. - # To construct, see NOTES section for POLICY properties and create a hash table. ${Policy}, + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup] + # The Application Group object + ${Parameter}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -165,8 +205,10 @@ begin { $mapping = @{ CreateExpanded = 'Az.EventHub.private\New-AzEventHubApplicationGroup_CreateExpanded'; + CreateViaIdentityNamespace = 'Az.EventHub.private\New-AzEventHubApplicationGroup_CreateViaIdentityNamespace'; + CreateViaIdentityNamespaceExpanded = 'Az.EventHub.private\New-AzEventHubApplicationGroup_CreateViaIdentityNamespaceExpanded'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/exports/New-AzEventHubAuthorizationRule.ps1 b/src/EventHub/EventHub.Autorest/exports/New-AzEventHubAuthorizationRule.ps1 index bea8c1ec376c..9002b7b8f75c 100644 --- a/src/EventHub/EventHub.Autorest/exports/New-AzEventHubAuthorizationRule.ps1 +++ b/src/EventHub/EventHub.Autorest/exports/New-AzEventHubAuthorizationRule.ps1 @@ -25,12 +25,12 @@ New-AzEventHubAuthorizationRule -ResourceGroupName myResourceGroup -NamespaceNam New-AzEventHubAuthorizationRule -ResourceGroupName myResourceGroup -NamespaceName myNamespace -EventHubName myEventHub -Name myAuthRule -Rights @('Manage', 'Send', 'Listen') .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule .Link https://learn.microsoft.com/powershell/module/az.eventhub/new-azeventhubauthorizationrule #> function New-AzEventHubAuthorizationRule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule])] [CmdletBinding(DefaultParameterSetName='NewExpandedNamespace', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -68,7 +68,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights[]] + [System.String[]] # The rights associated with the rule. ${Rights}, @@ -161,7 +161,7 @@ begin { NewExpandedNamespace = 'Az.EventHub.custom\New-AzEventHubAuthorizationRule'; NewExpandedEntity = 'Az.EventHub.custom\New-AzEventHubAuthorizationRule'; } - if (('NewExpandedNamespace', 'NewExpandedEntity') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('NewExpandedNamespace', 'NewExpandedEntity') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/exports/New-AzEventHubCluster.ps1 b/src/EventHub/EventHub.Autorest/exports/New-AzEventHubCluster.ps1 index e33efc39bcf2..7214c0ef4ee2 100644 --- a/src/EventHub/EventHub.Autorest/exports/New-AzEventHubCluster.ps1 +++ b/src/EventHub/EventHub.Autorest/exports/New-AzEventHubCluster.ps1 @@ -16,21 +16,21 @@ <# .Synopsis -Creates or updates an instance of an Event Hubs Cluster. +Create an instance of an Event Hubs Cluster. .Description -Creates or updates an instance of an Event Hubs Cluster. +Create an instance of an Event Hubs Cluster. .Example New-AzEventHubCluster -ResourceGroupName myResourceGroup -Name myEventHubsCluster -Location "eastasia" -SupportsScaling -Capacity 2 .Example New-AzEventHubCluster -ResourceGroupName myResourceGroup -Name myEventHubsCluster -Location "eastasia" .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster .Link https://learn.microsoft.com/powershell/module/az.eventhub/new-azeventhubcluster #> function New-AzEventHubCluster { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -75,7 +75,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, @@ -169,7 +169,7 @@ begin { $mapping = @{ CreateExpanded = 'Az.EventHub.private\New-AzEventHubCluster_CreateExpanded'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -178,7 +178,7 @@ begin { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('Capacity')) { + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('Capacity') ) { $PSBoundParameters['Capacity'] = 1 } $cmdInfo = Get-Command -Name $mapping[$parameterSet] diff --git a/src/EventHub/EventHub.Autorest/exports/New-AzEventHubConsumerGroup.ps1 b/src/EventHub/EventHub.Autorest/exports/New-AzEventHubConsumerGroup.ps1 index d8506d8eac6a..655abe1199c7 100644 --- a/src/EventHub/EventHub.Autorest/exports/New-AzEventHubConsumerGroup.ps1 +++ b/src/EventHub/EventHub.Autorest/exports/New-AzEventHubConsumerGroup.ps1 @@ -16,27 +16,62 @@ <# .Synopsis -Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. +Create an Event Hubs consumer group as a nested resource within a Namespace. .Description -Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. +Create an Event Hubs consumer group as a nested resource within a Namespace. .Example New-AzEventHubConsumerGroup -Name myConsumerGroup -NamespaceName myNamespace -ResourceGroupName myResourceGroup -EventHubName myEventHub -UserMetadata "Test ConsumerGroup" +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +EVENTHUBINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + +PARAMETER : Single item in List or Get Consumer group operation + [UserMetadata ]: User Metadata is a placeholder to store user-defined string data with maximum length 1024. e.g. it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored. .Link https://learn.microsoft.com/powershell/module/az.eventhub/new-azeventhubconsumergroup #> function New-AzEventHubConsumerGroup { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] - [System.String] - # The Event Hub name - ${EventHubName}, - [Parameter(Mandatory)] [Alias('ConsumerGroupName')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] @@ -44,19 +79,27 @@ param( # The consumer group name ${Name}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [System.String] + # The Event Hub name + ${EventHubName}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # The Namespace name ${NamespaceName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # Name of the resource group within the azure subscription. ${ResourceGroupName}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -64,7 +107,23 @@ param( # The subscription ID forms part of the URI for every service call. ${SubscriptionId}, - [Parameter()] + [Parameter(ParameterSetName='CreateViaIdentityEventhub', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityEventhubExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${EventhubInputObject}, + + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityEventhubExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] [System.String] # User Metadata is a placeholder to store user-defined string data with maximum length 1024. @@ -72,6 +131,13 @@ param( # it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored. ${UserMetadata}, + [Parameter(ParameterSetName='CreateViaIdentityEventhub', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup] + # Single item in List or Get Consumer group operation + ${Parameter}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -148,8 +214,12 @@ begin { $mapping = @{ CreateExpanded = 'Az.EventHub.private\New-AzEventHubConsumerGroup_CreateExpanded'; + CreateViaIdentityEventhub = 'Az.EventHub.private\New-AzEventHubConsumerGroup_CreateViaIdentityEventhub'; + CreateViaIdentityEventhubExpanded = 'Az.EventHub.private\New-AzEventHubConsumerGroup_CreateViaIdentityEventhubExpanded'; + CreateViaIdentityNamespace = 'Az.EventHub.private\New-AzEventHubConsumerGroup_CreateViaIdentityNamespace'; + CreateViaIdentityNamespaceExpanded = 'Az.EventHub.private\New-AzEventHubConsumerGroup_CreateViaIdentityNamespaceExpanded'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/exports/New-AzEventHubGeoDRConfiguration.ps1 b/src/EventHub/EventHub.Autorest/exports/New-AzEventHubGeoDRConfiguration.ps1 index 0e056c5ec627..a3c51c2a4b3e 100644 --- a/src/EventHub/EventHub.Autorest/exports/New-AzEventHubGeoDRConfiguration.ps1 +++ b/src/EventHub/EventHub.Autorest/exports/New-AzEventHubGeoDRConfiguration.ps1 @@ -16,19 +16,46 @@ <# .Synopsis -Creates or updates a new Alias(Disaster Recovery configuration) +Create a new Alias(Disaster Recovery configuration) .Description -Creates or updates a new Alias(Disaster Recovery configuration) +Create a new Alias(Disaster Recovery configuration) .Example New-AzEventHubGeoDRConfiguration -Name myAlias -ResourceGroupName myResourceGroup -NamespaceName myPrimaryNamespace -PartnerNamespace /subscriptions/subscriptionId/resourceGroups/myResourceGroup/providers/Microsoft.EventHub/namespaces/mySecondaryNamespace +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + +PARAMETER : Single item in List or Get Alias(Disaster Recovery configuration) operation + [AlternateName ]: Alternate name specified when alias and namespace names are same. + [PartnerNamespace ]: ARM Id of the Primary/Secondary eventhub namespace name, which is part of GEO DR pairing .Link https://learn.microsoft.com/powershell/module/az.eventhub/new-azeventhubgeodrconfiguration #> function New-AzEventHubGeoDRConfiguration { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -37,19 +64,19 @@ param( # The Disaster Recovery configuration name ${Name}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # The Namespace name ${NamespaceName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # Name of the resource group within the azure subscription. ${ResourceGroupName}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -57,18 +84,33 @@ param( # The subscription ID forms part of the URI for every service call. ${SubscriptionId}, - [Parameter()] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] [System.String] # Alternate name specified when alias and namespace names are same. ${AlternateName}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] [System.String] # ARM Id of the Primary/Secondary eventhub namespace name, which is part of GEO DR pairing ${PartnerNamespace}, + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery] + # Single item in List or Get Alias(Disaster Recovery configuration) operation + ${Parameter}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -145,8 +187,10 @@ begin { $mapping = @{ CreateExpanded = 'Az.EventHub.private\New-AzEventHubGeoDRConfiguration_CreateExpanded'; + CreateViaIdentityNamespace = 'Az.EventHub.private\New-AzEventHubGeoDRConfiguration_CreateViaIdentityNamespace'; + CreateViaIdentityNamespaceExpanded = 'Az.EventHub.private\New-AzEventHubGeoDRConfiguration_CreateViaIdentityNamespaceExpanded'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/exports/New-AzEventHubIPRuleConfig.ps1 b/src/EventHub/EventHub.Autorest/exports/New-AzEventHubIPRuleConfig.ps1 index 8cfa3ee6e113..e65aee9a4a9f 100644 --- a/src/EventHub/EventHub.Autorest/exports/New-AzEventHubIPRuleConfig.ps1 +++ b/src/EventHub/EventHub.Autorest/exports/New-AzEventHubIPRuleConfig.ps1 @@ -23,12 +23,12 @@ Constructs an INwRuleSetIPRules object that can be fed as input to Set-AzEventHu New-AzEventHubIPRuleConfig -IPMask 3.3.3.3 -Action Allow .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetIPRules +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetIPRules .Link https://learn.microsoft.com/powershell/module/az.eventhub/new-azeventhubipruleconfig #> function New-AzEventHubIPRuleConfig { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetIPRules])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetIPRules])] [CmdletBinding(PositionalBinding=$false)] param( [Parameter(Mandatory)] @@ -39,7 +39,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkRuleIPAction] + [System.String] # The IP Filter Action ${Action} ) diff --git a/src/EventHub/EventHub.Autorest/exports/New-AzEventHubKey.ps1 b/src/EventHub/EventHub.Autorest/exports/New-AzEventHubKey.ps1 index 06688b486de0..0b0aa7adfb6f 100644 --- a/src/EventHub/EventHub.Autorest/exports/New-AzEventHubKey.ps1 +++ b/src/EventHub/EventHub.Autorest/exports/New-AzEventHubKey.ps1 @@ -25,12 +25,12 @@ New-AzEventHubKey -ResourceGroupName myResourceGroup -NamespaceName myNamespace New-AzEventHubKey -ResourceGroupName myResourceGroup -NamespaceName myNamespace -EventHubName myEventHub -Name rootmanagesharedaccesskey -KeyType SecondaryKey .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys .Link https://learn.microsoft.com/powershell/module/az.eventhub/new-azeventhubkey #> function New-AzEventHubKey { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys])] [CmdletBinding(DefaultParameterSetName='NewExpandedNamespace', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -69,7 +69,7 @@ param( [Parameter()] [Alias('RegenerateKey')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeyType] + [System.String] # The access key to regenerate. ${KeyType}, @@ -168,7 +168,7 @@ begin { NewExpandedNamespace = 'Az.EventHub.custom\New-AzEventHubKey'; NewExpandedEntity = 'Az.EventHub.custom\New-AzEventHubKey'; } - if (('NewExpandedNamespace', 'NewExpandedEntity') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('NewExpandedNamespace', 'NewExpandedEntity') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/exports/New-AzEventHubKeyVaultPropertiesObject.ps1 b/src/EventHub/EventHub.Autorest/exports/New-AzEventHubKeyVaultPropertiesObject.ps1 index ed77b1fb2aa3..0507cdbca5b5 100644 --- a/src/EventHub/EventHub.Autorest/exports/New-AzEventHubKeyVaultPropertiesObject.ps1 +++ b/src/EventHub/EventHub.Autorest/exports/New-AzEventHubKeyVaultPropertiesObject.ps1 @@ -23,12 +23,12 @@ Create an in-memory object for KeyVaultProperties. New-AzEventHubKeyVaultPropertiesObject -KeyName key1 -KeyVaultUri https://testkeyvault.vault.azure.net .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.KeyVaultProperties +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.KeyVaultProperties .Link -https://learn.microsoft.com/powershell/module/Az.EventHub/new-AzEventHubKeyVaultPropertiesObject +https://learn.microsoft.com/powershell/module/Az.EventHub/new-azeventhubkeyvaultpropertiesobject #> function New-AzEventHubKeyVaultPropertiesObject { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.KeyVaultProperties])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.KeyVaultProperties])] [CmdletBinding(PositionalBinding=$false)] param( [Parameter()] diff --git a/src/EventHub/EventHub.Autorest/exports/New-AzEventHubNamespace.ps1 b/src/EventHub/EventHub.Autorest/exports/New-AzEventHubNamespace.ps1 index a59e7bc00310..11d8e03e594f 100644 --- a/src/EventHub/EventHub.Autorest/exports/New-AzEventHubNamespace.ps1 +++ b/src/EventHub/EventHub.Autorest/exports/New-AzEventHubNamespace.ps1 @@ -30,7 +30,7 @@ New-AzEventHubNamespace -ResourceGroupName myResourceGroup -Name myNamespace -Sk New-AzEventHubNamespace -ResourceGroupName myResourceGroup -Name myNamespace -SkuCapacity 10 -MaximumThroughputUnit 18 -SkuName Standard -Location southcentralus -Tag @{k1='v1'; k2='v2'} -EnableAutoInflate -DisableLocalAuth .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace .Notes COMPLEX PARAMETER PROPERTIES @@ -46,7 +46,7 @@ https://learn.microsoft.com/powershell/module/az.eventhub/new-azeventhubnamespac #> function New-AzEventHubNamespace { [Alias('New-AzEventHubNamespaceV2')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace])] [CmdletBinding(PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -107,14 +107,13 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultProperties[]] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultProperties[]] # Properties to configure Encryption - # To construct, see NOTES section for KEYVAULTPROPERTY properties and create a hash table. ${KeyVaultProperty}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType] + [System.String] # Type of managed service identity. ${IdentityType}, @@ -146,14 +145,14 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuName] + [System.String] # The minimum TLS version for the cluster to support, e.g. # '1.2' ${SkuName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess] + [System.String] # This determines if traffic is allowed over public network. # By default it is enabled. ${PublicNetworkAccess}, @@ -259,7 +258,7 @@ begin { $mapping = @{ __AllParameterSets = 'Az.EventHub.custom\New-AzEventHubNamespace'; } - if (('__AllParameterSets') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('__AllParameterSets') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/exports/New-AzEventHubSchemaGroup.ps1 b/src/EventHub/EventHub.Autorest/exports/New-AzEventHubSchemaGroup.ps1 index f6ee4e5bacdf..fb90da3a4b76 100644 --- a/src/EventHub/EventHub.Autorest/exports/New-AzEventHubSchemaGroup.ps1 +++ b/src/EventHub/EventHub.Autorest/exports/New-AzEventHubSchemaGroup.ps1 @@ -16,19 +16,48 @@ <# .Synopsis -Creates or Updates an EventHub schema group. +Create an EventHub schema group. .Description -Creates or Updates an EventHub schema group. +Create an EventHub schema group. .Example $schemaGroup = New-AzEventHubSchemaGroup -ResourceGroupName myResourceGroup -NamespaceName myNamespace -Name mySchemaGroup -SchemaCompatibility Backward -SchemaType Avro +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + +PARAMETER : Single item in List or Get Schema Group operation + [GroupProperty ]: dictionary object for SchemaGroup group properties + [(Any) ]: This indicates any property can be added to this object. + [SchemaCompatibility ]: + [SchemaType ]: .Link https://learn.microsoft.com/powershell/module/az.eventhub/new-azeventhubschemagroup #> function New-AzEventHubSchemaGroup { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -38,19 +67,19 @@ param( # The Schema Group name ${Name}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # The Namespace name ${NamespaceName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # Name of the resource group within the azure subscription. ${ResourceGroupName}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -58,27 +87,43 @@ param( # The subscription ID forms part of the URI for every service call. ${SubscriptionId}, - [Parameter()] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties]))] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties]))] [System.Collections.Hashtable] # dictionary object for SchemaGroup group properties ${GroupProperty}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaCompatibility])] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("None", "Backward", "Forward")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaCompatibility] + [System.String] # . ${SchemaCompatibility}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaType])] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Unknown", "Avro")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaType] + [System.String] # . ${SchemaType}, + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup] + # Single item in List or Get Schema Group operation + ${Parameter}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -155,8 +200,10 @@ begin { $mapping = @{ CreateExpanded = 'Az.EventHub.private\New-AzEventHubSchemaGroup_CreateExpanded'; + CreateViaIdentityNamespace = 'Az.EventHub.private\New-AzEventHubSchemaGroup_CreateViaIdentityNamespace'; + CreateViaIdentityNamespaceExpanded = 'Az.EventHub.private\New-AzEventHubSchemaGroup_CreateViaIdentityNamespaceExpanded'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/exports/New-AzEventHubThrottlingPolicyConfig.ps1 b/src/EventHub/EventHub.Autorest/exports/New-AzEventHubThrottlingPolicyConfig.ps1 index 82446676a818..1f04cd91e0c5 100644 --- a/src/EventHub/EventHub.Autorest/exports/New-AzEventHubThrottlingPolicyConfig.ps1 +++ b/src/EventHub/EventHub.Autorest/exports/New-AzEventHubThrottlingPolicyConfig.ps1 @@ -23,12 +23,12 @@ Constructs an IThrottlingPolicy object that can be fed as input to New-AzEventHu New-AzEventHubThrottlingPolicyConfig -Name t1 -RateLimitThreshold 10000 -MetricId IncomingBytes .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IThrottlingPolicy +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IThrottlingPolicy .Link https://learn.microsoft.com/powershell/module/az.eventhub/new-azeventhubthrottlingpolicyconfig #> function New-AzEventHubThrottlingPolicyConfig { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IThrottlingPolicy])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IThrottlingPolicy])] [CmdletBinding(PositionalBinding=$false)] param( [Parameter(Mandatory)] @@ -45,7 +45,7 @@ param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.MetricId] + [System.String] # Metric Id on which the throttle limit should be set, MetricId can be discovered by hovering over Metric in the Metrics section of Event Hub Namespace inside Azure Portal ${MetricId} ) diff --git a/src/EventHub/EventHub.Autorest/exports/New-AzEventHubVirtualNetworkRuleConfig.ps1 b/src/EventHub/EventHub.Autorest/exports/New-AzEventHubVirtualNetworkRuleConfig.ps1 index a0da966bc282..0d1eaae7b4f0 100644 --- a/src/EventHub/EventHub.Autorest/exports/New-AzEventHubVirtualNetworkRuleConfig.ps1 +++ b/src/EventHub/EventHub.Autorest/exports/New-AzEventHubVirtualNetworkRuleConfig.ps1 @@ -23,12 +23,12 @@ Constructs an INwRuleSetVirtualNetworkRules object that can be fed as input to S New-AzEventHubVirtualNetworkRuleConfig -SubnetId /subscriptions/subscriptionId/resourcegroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVirtualNetwork/subnets/default .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetVirtualNetworkRules +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetVirtualNetworkRules .Link https://learn.microsoft.com/powershell/module/az.eventhub/new-azeventhubvirtualnetworkruleconfig #> function New-AzEventHubVirtualNetworkRuleConfig { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetVirtualNetworkRules])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetVirtualNetworkRules])] [CmdletBinding(PositionalBinding=$false)] param( [Parameter(Mandatory)] diff --git a/src/EventHub/EventHub.Autorest/exports/ProxyCmdletDefinitions.ps1 b/src/EventHub/EventHub.Autorest/exports/ProxyCmdletDefinitions.ps1 index fd8bc37bf2d5..7901e1c08cfa 100644 --- a/src/EventHub/EventHub.Autorest/exports/ProxyCmdletDefinitions.ps1 +++ b/src/EventHub/EventHub.Autorest/exports/ProxyCmdletDefinitions.ps1 @@ -27,7 +27,7 @@ Get-AzEventHubApplicationGroup -ResourceGroupName myResourceGroup -NamespaceName .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup .Notes COMPLEX PARAMETER PROPERTIES @@ -47,14 +47,30 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: Name of the resource group within the azure subscription. [SchemaGroupName ]: The Schema Group name [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. .Link https://learn.microsoft.com/powershell/module/az.eventhub/get-azeventhubapplicationgroup #> function Get-AzEventHubApplicationGroup { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] [Alias('ApplicationGroupName')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] @@ -88,9 +104,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -168,9 +189,10 @@ begin { $mapping = @{ Get = 'Az.EventHub.private\Get-AzEventHubApplicationGroup_Get'; GetViaIdentity = 'Az.EventHub.private\Get-AzEventHubApplicationGroup_GetViaIdentity'; + GetViaIdentityNamespace = 'Az.EventHub.private\Get-AzEventHubApplicationGroup_GetViaIdentityNamespace'; List = 'Az.EventHub.private\Get-AzEventHubApplicationGroup_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -238,12 +260,12 @@ List all Event Hubs Namespace IDs in an Event Hubs Dedicated Cluster. Get-AzEventHubClusterNamespace -ResourceGroupName myResourceGroup -ClusterName DefaultCluster-11 .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceIdContainer +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceIdListResult .Link https://learn.microsoft.com/powershell/module/az.eventhub/get-azeventhubclusternamespace #> function Get-AzEventHubClusterNamespace { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceIdContainer])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceIdListResult])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(Mandatory)] @@ -343,7 +365,7 @@ begin { $mapping = @{ List = 'Az.EventHub.private\Get-AzEventHubClusterNamespace_List'; } - if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -411,12 +433,12 @@ List the quantity of available pre-provisioned Event Hubs Clusters, indexed by A Get-AzEventHubClustersAvailableRegion .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAvailableCluster +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAvailableClustersList .Link https://learn.microsoft.com/powershell/module/az.eventhub/get-azeventhubclustersavailableregion #> function Get-AzEventHubClustersAvailableRegion { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAvailableCluster])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAvailableClustersList])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter()] @@ -504,7 +526,7 @@ begin { $mapping = @{ List = 'Az.EventHub.private\Get-AzEventHubClustersAvailableRegion_List'; } - if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -574,7 +596,7 @@ Get-AzEventHubCluster -ResourceGroupName myResourceGroup -Name DefaultCluster-11 .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster .Notes COMPLEX PARAMETER PROPERTIES @@ -598,7 +620,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.eventhub/get-azeventhubcluster #> function Get-AzEventHubCluster { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -629,7 +651,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -712,7 +733,7 @@ begin { List = 'Az.EventHub.private\Get-AzEventHubCluster_List'; List1 = 'Az.EventHub.private\Get-AzEventHubCluster_List1'; } - if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + 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.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -784,12 +805,27 @@ Get-AzEventHubConsumerGroup -NamespaceName myNamespace -ResourceGroupName myReso .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. +EVENTHUBINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [ApplicationGroupName ]: The Application Group name @@ -804,14 +840,30 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: Name of the resource group within the azure subscription. [SchemaGroupName ]: The Schema Group name [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. .Link https://learn.microsoft.com/powershell/module/az.eventhub/get-azeventhubconsumergroup #> function Get-AzEventHubConsumerGroup { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] @@ -819,6 +871,8 @@ param( ${EventHubName}, [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityEventhub', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] [Alias('ConsumerGroupName')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] @@ -852,9 +906,20 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityEventhub', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${EventhubInputObject}, + + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Query')] [System.Int32] @@ -945,9 +1010,11 @@ begin { $mapping = @{ Get = 'Az.EventHub.private\Get-AzEventHubConsumerGroup_Get'; GetViaIdentity = 'Az.EventHub.private\Get-AzEventHubConsumerGroup_GetViaIdentity'; + GetViaIdentityEventhub = 'Az.EventHub.private\Get-AzEventHubConsumerGroup_GetViaIdentityEventhub'; + GetViaIdentityNamespace = 'Az.EventHub.private\Get-AzEventHubConsumerGroup_GetViaIdentityNamespace'; List = 'Az.EventHub.private\Get-AzEventHubConsumerGroup_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -1017,7 +1084,7 @@ Get-AzEventHubGeoDRConfiguration -ResourceGroupName myResourceGroup -NamespaceNa .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery .Notes COMPLEX PARAMETER PROPERTIES @@ -1037,14 +1104,30 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: Name of the resource group within the azure subscription. [SchemaGroupName ]: The Schema Group name [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. .Link https://learn.microsoft.com/powershell/module/az.eventhub/get-azeventhubgeodrconfiguration #> function Get-AzEventHubGeoDRConfiguration { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # The Disaster Recovery configuration name @@ -1077,9 +1160,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -1157,9 +1245,10 @@ begin { $mapping = @{ Get = 'Az.EventHub.private\Get-AzEventHubGeoDRConfiguration_Get'; GetViaIdentity = 'Az.EventHub.private\Get-AzEventHubGeoDRConfiguration_GetViaIdentity'; + GetViaIdentityNamespace = 'Az.EventHub.private\Get-AzEventHubGeoDRConfiguration_GetViaIdentityNamespace'; List = 'Az.EventHub.private\Get-AzEventHubGeoDRConfiguration_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -1233,7 +1322,7 @@ Get-AzEventHubNamespace .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace .Notes COMPLEX PARAMETER PROPERTIES @@ -1258,7 +1347,7 @@ https://learn.microsoft.com/powershell/module/az.eventhub/get-azeventhubnamespac #> function Get-AzEventHubNamespace { [Alias('Get-AzEventHubNamespaceV2')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -1289,7 +1378,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -1372,7 +1460,7 @@ begin { List = 'Az.EventHub.private\Get-AzEventHubNamespace_List'; List1 = 'Az.EventHub.private\Get-AzEventHubNamespace_List1'; } - if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + 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.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -1442,9 +1530,9 @@ Get-AzEventHubNetworkRuleSet -ResourceGroupName myResourceGroup -NamespaceName m .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetListResult +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetListResult .Notes COMPLEX PARAMETER PROPERTIES @@ -1468,7 +1556,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.eventhub/get-azeventhubnetworkruleset #> function Get-AzEventHubNetworkRuleSet { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet], [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetListResult])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet], [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetListResult])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -1498,7 +1586,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -1580,7 +1667,7 @@ begin { GetViaIdentity = 'Az.EventHub.private\Get-AzEventHubNetworkRuleSet_GetViaIdentity'; List = 'Az.EventHub.private\Get-AzEventHubNetworkRuleSet_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -1652,7 +1739,7 @@ Get-AzEventHubPrivateEndpointConnection -ResourceGroupName myResourceGroup -Name .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection .Notes COMPLEX PARAMETER PROPERTIES @@ -1672,14 +1759,34 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: Name of the resource group within the azure subscription. [SchemaGroupName ]: The Schema Group name [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. .Link https://learn.microsoft.com/powershell/module/az.eventhub/get-azeventhubprivateendpointconnection +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639379.aspx +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639412.aspx #> function Get-AzEventHubPrivateEndpointConnection { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] [Alias('PrivateEndpointConnectionName')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] @@ -1713,9 +1820,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -1793,9 +1905,10 @@ begin { $mapping = @{ Get = 'Az.EventHub.private\Get-AzEventHubPrivateEndpointConnection_Get'; GetViaIdentity = 'Az.EventHub.private\Get-AzEventHubPrivateEndpointConnection_GetViaIdentity'; + GetViaIdentityNamespace = 'Az.EventHub.private\Get-AzEventHubPrivateEndpointConnection_GetViaIdentityNamespace'; List = 'Az.EventHub.private\Get-AzEventHubPrivateEndpointConnection_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -1863,12 +1976,14 @@ Gets lists of resources that supports Privatelinks. Get-AzEventHubPrivateLink -ResourceGroupName myResourceGroup -NamespaceName myNamespace .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourcesListResult +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourcesListResult .Link https://learn.microsoft.com/powershell/module/az.eventhub/get-azeventhubprivatelink +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639379.aspx #> function Get-AzEventHubPrivateLink { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourcesListResult])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourcesListResult])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(Mandatory)] @@ -1968,7 +2083,7 @@ begin { $mapping = @{ Get = 'Az.EventHub.private\Get-AzEventHubPrivateLink_Get'; } - if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -2040,7 +2155,7 @@ Get-AzEventHubSchemaGroup -ResourceGroupName myResourceGroup -NamespaceName myNa .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup .Notes COMPLEX PARAMETER PROPERTIES @@ -2060,14 +2175,30 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: Name of the resource group within the azure subscription. [SchemaGroupName ]: The Schema Group name [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. .Link https://learn.microsoft.com/powershell/module/az.eventhub/get-azeventhubschemagroup #> function Get-AzEventHubSchemaGroup { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] [Alias('SchemaGroupName')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] @@ -2101,9 +2232,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Query')] [System.Int32] @@ -2194,9 +2330,10 @@ begin { $mapping = @{ Get = 'Az.EventHub.private\Get-AzEventHubSchemaGroup_Get'; GetViaIdentity = 'Az.EventHub.private\Get-AzEventHubSchemaGroup_GetViaIdentity'; + GetViaIdentityNamespace = 'Az.EventHub.private\Get-AzEventHubSchemaGroup_GetViaIdentityNamespace'; List = 'Az.EventHub.private\Get-AzEventHubSchemaGroup_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -2268,7 +2405,7 @@ Get-AzEventHub -ResourceGroupName myResourceGroup -NamespaceName myNamespace .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub .Notes COMPLEX PARAMETER PROPERTIES @@ -2288,14 +2425,30 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: Name of the resource group within the azure subscription. [SchemaGroupName ]: The Schema Group name [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. .Link https://learn.microsoft.com/powershell/module/az.eventhub/get-azeventhub #> function Get-AzEventHub { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] [Alias('EventHubName')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] @@ -2329,9 +2482,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Query')] [System.Int32] @@ -2422,9 +2580,10 @@ begin { $mapping = @{ Get = 'Az.EventHub.private\Get-AzEventHub_Get'; GetViaIdentity = 'Az.EventHub.private\Get-AzEventHub_GetViaIdentity'; + GetViaIdentityNamespace = 'Az.EventHub.private\Get-AzEventHub_GetViaIdentityNamespace'; List = 'Az.EventHub.private\Get-AzEventHub_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -2485,28 +2644,53 @@ end { <# .Synopsis -Creates or updates an ApplicationGroup for a Namespace. +Create an ApplicationGroup for a Namespace. .Description -Creates or updates an ApplicationGroup for a Namespace. +Create an ApplicationGroup for a Namespace. .Example $t1 = New-AzEventHubThrottlingPolicyConfig -Name t1 -MetricId IncomingMessages -RateLimitThreshold 10000 $t2 = New-AzEventHubThrottlingPolicyConfig -Name t2 -MetricId OutgoingBytes -RateLimitThreshold 20000 New-AzEventHubApplicationGroup -NamespaceName myNamespace -ResourceGroupName myResourceGroup -Name myAppGroup -ClientAppGroupIdentifier NamespaceSASKeyName=a -Policy $t1,$t2 +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + +PARAMETER : The Application Group object + [ClientAppGroupIdentifier ]: The Unique identifier for application group.Supports SAS(SASKeyName=KeyName) or AAD(AADAppID=Guid) + [IsEnabled ]: Determines if Application Group is allowed to create connection with namespace or not. Once the isEnabled is set to false, all the existing connections of application group gets dropped and no new connections will be allowed + [Policy >]: List of group policies that define the behavior of application group. The policies can support resource governance scenarios such as limiting ingress or egress traffic. + Name : The Name of this policy + POLICY : List of group policies that define the behavior of application group. The policies can support resource governance scenarios such as limiting ingress or egress traffic. Name : The Name of this policy .Link https://learn.microsoft.com/powershell/module/az.eventhub/new-azeventhubapplicationgroup #> function New-AzEventHubApplicationGroup { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -2516,19 +2700,19 @@ param( # The Application Group name ${Name}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # The Namespace name ${NamespaceName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # Name of the resource group within the azure subscription. ${ResourceGroupName}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -2536,28 +2720,43 @@ param( # The subscription ID forms part of the URI for every service call. ${SubscriptionId}, - [Parameter()] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] [System.String] # The Unique identifier for application group.Supports SAS(SASKeyName=KeyName) or AAD(AADAppID=Guid) ${ClientAppGroupIdentifier}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] [System.Management.Automation.SwitchParameter] # Determines if Application Group is allowed to create connection with namespace or not. # Once the isEnabled is set to false, all the existing connections of application group gets dropped and no new connections will be allowed ${IsEnabled}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicy[]] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicy[]] # List of group policies that define the behavior of application group. # The policies can support resource governance scenarios such as limiting ingress or egress traffic. - # To construct, see NOTES section for POLICY properties and create a hash table. ${Policy}, + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup] + # The Application Group object + ${Parameter}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -2634,8 +2833,10 @@ begin { $mapping = @{ CreateExpanded = 'Az.EventHub.private\New-AzEventHubApplicationGroup_CreateExpanded'; + CreateViaIdentityNamespace = 'Az.EventHub.private\New-AzEventHubApplicationGroup_CreateViaIdentityNamespace'; + CreateViaIdentityNamespaceExpanded = 'Az.EventHub.private\New-AzEventHubApplicationGroup_CreateViaIdentityNamespaceExpanded'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -2696,21 +2897,21 @@ end { <# .Synopsis -Creates or updates an instance of an Event Hubs Cluster. +Create an instance of an Event Hubs Cluster. .Description -Creates or updates an instance of an Event Hubs Cluster. +Create an instance of an Event Hubs Cluster. .Example New-AzEventHubCluster -ResourceGroupName myResourceGroup -Name myEventHubsCluster -Location "eastasia" -SupportsScaling -Capacity 2 .Example New-AzEventHubCluster -ResourceGroupName myResourceGroup -Name myEventHubsCluster -Location "eastasia" .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster .Link https://learn.microsoft.com/powershell/module/az.eventhub/new-azeventhubcluster #> function New-AzEventHubCluster { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -2755,7 +2956,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, @@ -2849,7 +3050,7 @@ begin { $mapping = @{ CreateExpanded = 'Az.EventHub.private\New-AzEventHubCluster_CreateExpanded'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -2858,7 +3059,7 @@ begin { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('Capacity')) { + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('Capacity') ) { $PSBoundParameters['Capacity'] = 1 } $cmdInfo = Get-Command -Name $mapping[$parameterSet] @@ -2913,27 +3114,62 @@ end { <# .Synopsis -Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. +Create an Event Hubs consumer group as a nested resource within a Namespace. .Description -Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. +Create an Event Hubs consumer group as a nested resource within a Namespace. .Example New-AzEventHubConsumerGroup -Name myConsumerGroup -NamespaceName myNamespace -ResourceGroupName myResourceGroup -EventHubName myEventHub -UserMetadata "Test ConsumerGroup" +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +EVENTHUBINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + +PARAMETER : Single item in List or Get Consumer group operation + [UserMetadata ]: User Metadata is a placeholder to store user-defined string data with maximum length 1024. e.g. it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored. .Link https://learn.microsoft.com/powershell/module/az.eventhub/new-azeventhubconsumergroup #> function New-AzEventHubConsumerGroup { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] - [System.String] - # The Event Hub name - ${EventHubName}, - [Parameter(Mandatory)] [Alias('ConsumerGroupName')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] @@ -2941,19 +3177,27 @@ param( # The consumer group name ${Name}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [System.String] + # The Event Hub name + ${EventHubName}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # The Namespace name ${NamespaceName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # Name of the resource group within the azure subscription. ${ResourceGroupName}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -2961,7 +3205,23 @@ param( # The subscription ID forms part of the URI for every service call. ${SubscriptionId}, - [Parameter()] + [Parameter(ParameterSetName='CreateViaIdentityEventhub', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityEventhubExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${EventhubInputObject}, + + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityEventhubExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] [System.String] # User Metadata is a placeholder to store user-defined string data with maximum length 1024. @@ -2969,6 +3229,13 @@ param( # it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored. ${UserMetadata}, + [Parameter(ParameterSetName='CreateViaIdentityEventhub', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup] + # Single item in List or Get Consumer group operation + ${Parameter}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -3045,8 +3312,12 @@ begin { $mapping = @{ CreateExpanded = 'Az.EventHub.private\New-AzEventHubConsumerGroup_CreateExpanded'; + CreateViaIdentityEventhub = 'Az.EventHub.private\New-AzEventHubConsumerGroup_CreateViaIdentityEventhub'; + CreateViaIdentityEventhubExpanded = 'Az.EventHub.private\New-AzEventHubConsumerGroup_CreateViaIdentityEventhubExpanded'; + CreateViaIdentityNamespace = 'Az.EventHub.private\New-AzEventHubConsumerGroup_CreateViaIdentityNamespace'; + CreateViaIdentityNamespaceExpanded = 'Az.EventHub.private\New-AzEventHubConsumerGroup_CreateViaIdentityNamespaceExpanded'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -3107,19 +3378,46 @@ end { <# .Synopsis -Creates or updates a new Alias(Disaster Recovery configuration) +Create a new Alias(Disaster Recovery configuration) .Description -Creates or updates a new Alias(Disaster Recovery configuration) +Create a new Alias(Disaster Recovery configuration) .Example New-AzEventHubGeoDRConfiguration -Name myAlias -ResourceGroupName myResourceGroup -NamespaceName myPrimaryNamespace -PartnerNamespace /subscriptions/subscriptionId/resourceGroups/myResourceGroup/providers/Microsoft.EventHub/namespaces/mySecondaryNamespace +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + +PARAMETER : Single item in List or Get Alias(Disaster Recovery configuration) operation + [AlternateName ]: Alternate name specified when alias and namespace names are same. + [PartnerNamespace ]: ARM Id of the Primary/Secondary eventhub namespace name, which is part of GEO DR pairing .Link https://learn.microsoft.com/powershell/module/az.eventhub/new-azeventhubgeodrconfiguration #> function New-AzEventHubGeoDRConfiguration { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -3128,19 +3426,19 @@ param( # The Disaster Recovery configuration name ${Name}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # The Namespace name ${NamespaceName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # Name of the resource group within the azure subscription. ${ResourceGroupName}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -3148,18 +3446,33 @@ param( # The subscription ID forms part of the URI for every service call. ${SubscriptionId}, - [Parameter()] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] [System.String] # Alternate name specified when alias and namespace names are same. ${AlternateName}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] [System.String] # ARM Id of the Primary/Secondary eventhub namespace name, which is part of GEO DR pairing ${PartnerNamespace}, + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery] + # Single item in List or Get Alias(Disaster Recovery configuration) operation + ${Parameter}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -3236,8 +3549,10 @@ begin { $mapping = @{ CreateExpanded = 'Az.EventHub.private\New-AzEventHubGeoDRConfiguration_CreateExpanded'; + CreateViaIdentityNamespace = 'Az.EventHub.private\New-AzEventHubGeoDRConfiguration_CreateViaIdentityNamespace'; + CreateViaIdentityNamespaceExpanded = 'Az.EventHub.private\New-AzEventHubGeoDRConfiguration_CreateViaIdentityNamespaceExpanded'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -3298,19 +3613,48 @@ end { <# .Synopsis -Creates or Updates an EventHub schema group. +Create an EventHub schema group. .Description -Creates or Updates an EventHub schema group. +Create an EventHub schema group. .Example $schemaGroup = New-AzEventHubSchemaGroup -ResourceGroupName myResourceGroup -NamespaceName myNamespace -Name mySchemaGroup -SchemaCompatibility Backward -SchemaType Avro +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + +PARAMETER : Single item in List or Get Schema Group operation + [GroupProperty ]: dictionary object for SchemaGroup group properties + [(Any) ]: This indicates any property can be added to this object. + [SchemaCompatibility ]: + [SchemaType ]: .Link https://learn.microsoft.com/powershell/module/az.eventhub/new-azeventhubschemagroup #> function New-AzEventHubSchemaGroup { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -3320,19 +3664,19 @@ param( # The Schema Group name ${Name}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # The Namespace name ${NamespaceName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # Name of the resource group within the azure subscription. ${ResourceGroupName}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -3340,27 +3684,43 @@ param( # The subscription ID forms part of the URI for every service call. ${SubscriptionId}, - [Parameter()] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties]))] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties]))] [System.Collections.Hashtable] # dictionary object for SchemaGroup group properties ${GroupProperty}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaCompatibility])] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("None", "Backward", "Forward")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaCompatibility] + [System.String] # . ${SchemaCompatibility}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaType])] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Unknown", "Avro")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaType] + [System.String] # . ${SchemaType}, + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup] + # Single item in List or Get Schema Group operation + ${Parameter}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -3437,8 +3797,10 @@ begin { $mapping = @{ CreateExpanded = 'Az.EventHub.private\New-AzEventHubSchemaGroup_CreateExpanded'; + CreateViaIdentityNamespace = 'Az.EventHub.private\New-AzEventHubSchemaGroup_CreateViaIdentityNamespace'; + CreateViaIdentityNamespaceExpanded = 'Az.EventHub.private\New-AzEventHubSchemaGroup_CreateViaIdentityNamespaceExpanded'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -3499,9 +3861,9 @@ end { <# .Synopsis -Creates or updates a new Event Hub as a nested resource within a Namespace. +Create a new Event Hub as a nested resource within a Namespace. .Description -Creates or updates a new Event Hub as a nested resource within a Namespace. +Create a new Event Hub as a nested resource within a Namespace. .Example New-AzEventHub -Name myEventHub -ResourceGroupName myResourceGroup -NamespaceName myNamespace -RetentionTimeInHour 168 -PartitionCount 5 -CleanupPolicy Delete .Example @@ -3509,13 +3871,58 @@ New-AzEventHub -Name myEventHub -ResourceGroupName myResourceGroup -NamespaceNam .Example New-AzEventHub -Name myEventHub -ResourceGroupName myResourceGroup -NamespaceName myNamespace -CleanupPolicy Compact +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + +PARAMETER : Single item in List or Get Event Hub operation + [ArchiveNameFormat ]: Blob naming convention for archive, e.g. {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}. Here all the parameters (Namespace,EventHub .. etc) are mandatory irrespective of order + [BlobContainer ]: Blob container Name + [CaptureEnabled ]: A value that indicates whether capture description is enabled. + [CleanupPolicy ]: Enumerates the possible values for cleanup policy + [DataLakeAccountName ]: The Azure Data Lake Store name for the captured events + [DataLakeFolderPath ]: The destination folder path for the captured events + [DataLakeSubscriptionId ]: Subscription Id of Azure Data Lake Store + [DestinationName ]: Name for capture destination + [Encoding ]: Enumerates the possible values for the encoding format of capture description. Note: 'AvroDeflate' will be deprecated in New API Version + [IdentityType ]: Type of Azure Active Directory Managed Identity. + [IntervalInSeconds ]: The time window allows you to set the frequency with which the capture to Azure Blobs will happen, value should between 60 to 900 seconds + [MessageRetentionInDay ]: Number of days to retain the events for this Event Hub, value should be 1 to 7 days + [PartitionCount ]: Number of partitions created for the Event Hub, allowed values are from 1 to 32 partitions. + [RetentionTimeInHour ]: Number of hours to retain the events for this Event Hub. This value is only used when cleanupPolicy is Delete. If cleanupPolicy is Compact the returned value of this property is Long.MaxValue + [SizeLimitInBytes ]: The size window defines the amount of data built up in your Event Hub before an capture operation, value should be between 10485760 to 524288000 bytes + [SkipEmptyArchive ]: A value that indicates whether to Skip Empty Archives + [Status ]: Enumerates the possible values for the status of the Event Hub. + [StorageAccountResourceId ]: Resource id of the storage account to be used to create the blobs + [TombstoneRetentionTimeInHour ]: Number of hours to retain the tombstone markers of a compacted Event Hub. This value is only used when cleanupPolicy is Compact. Consumer must complete reading the tombstone marker within this specified amount of time if consumer begins from starting offset to ensure they get a valid snapshot for the specific key described by the tombstone marker within the compacted Event Hub + [UserAssignedIdentityId ]: ARM ID of Managed User Identity. This property is required is the type is UserAssignedIdentity. If type is SystemAssigned, then the System Assigned Identity Associated with the namespace will be used. .Link https://learn.microsoft.com/powershell/module/az.eventhub/new-azeventhub #> function New-AzEventHub { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -3525,19 +3932,19 @@ param( # The Event Hub name ${Name}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # The Namespace name ${NamespaceName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # Name of the resource group within the azure subscription. ${ResourceGroupName}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -3545,7 +3952,15 @@ param( # The subscription ID forms part of the URI for every service call. ${SubscriptionId}, - [Parameter()] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] [System.String] # Blob naming convention for archive, e.g. @@ -3554,59 +3969,68 @@ param( # etc) are mandatory irrespective of order ${ArchiveNameFormat}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] [System.String] # Blob container Name ${BlobContainer}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] [System.Management.Automation.SwitchParameter] # A value that indicates whether capture description is enabled. ${CaptureEnabled}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CleanupPolicyRetentionDescription])] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Delete", "Compact")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CleanupPolicyRetentionDescription] + [System.String] # Enumerates the possible values for cleanup policy ${CleanupPolicy}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] [System.String] # Name for capture destination ${DestinationName}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription])] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Avro", "AvroDeflate")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription] + [System.String] # Enumerates the possible values for the encoding format of capture description. # Note: 'AvroDeflate' will be deprecated in New API Version ${Encoding}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType])] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("SystemAssigned", "UserAssigned")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType] + [System.String] # Type of Azure Active Directory Managed Identity. ${IdentityType}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] [System.Int32] # The time window allows you to set the frequency with which the capture to Azure Blobs will happen, value should between 60 to 900 seconds ${IntervalInSeconds}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] [System.Int64] # Number of partitions created for the Event Hub, allowed values are from 1 to 32 partitions. ${PartitionCount}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] [System.Int64] # Number of hours to retain the events for this Event Hub. @@ -3614,32 +4038,37 @@ param( # If cleanupPolicy is Compact the returned value of this property is Long.MaxValue ${RetentionTimeInHour}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] [System.Int32] # The size window defines the amount of data built up in your Event Hub before an capture operation, value should be between 10485760 to 524288000 bytes ${SizeLimitInBytes}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] [System.Management.Automation.SwitchParameter] # A value that indicates whether to Skip Empty Archives ${SkipEmptyArchive}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus])] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Active", "Disabled", "Restoring", "SendDisabled", "ReceiveDisabled", "Creating", "Deleting", "Renaming", "Unknown")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus] + [System.String] # Enumerates the possible values for the status of the Event Hub. ${Status}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] [System.String] # Resource id of the storage account to be used to create the blobs ${StorageAccountResourceId}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] [System.Int32] # Number of hours to retain the tombstone markers of a compacted Event Hub. @@ -3647,7 +4076,8 @@ param( # Consumer must complete reading the tombstone marker within this specified amount of time if consumer begins from starting offset to ensure they get a valid snapshot for the specific key described by the tombstone marker within the compacted Event Hub ${TombstoneRetentionTimeInHour}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] [System.String] # ARM ID of Managed User Identity. @@ -3655,6 +4085,12 @@ param( # If type is SystemAssigned, then the System Assigned Identity Associated with the namespace will be used. ${UserAssignedIdentityId}, + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub] + # Single item in List or Get Event Hub operation + ${Parameter}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -3731,8 +4167,10 @@ begin { $mapping = @{ CreateExpanded = 'Az.EventHub.private\New-AzEventHub_CreateExpanded'; + CreateViaIdentityNamespace = 'Az.EventHub.private\New-AzEventHub_CreateViaIdentityNamespace'; + CreateViaIdentityNamespaceExpanded = 'Az.EventHub.private\New-AzEventHub_CreateViaIdentityNamespaceExpanded'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -3822,6 +4260,21 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: Name of the resource group within the azure subscription. [SchemaGroupName ]: The Schema Group name [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. .Link https://learn.microsoft.com/powershell/module/az.eventhub/remove-azeventhubapplicationgroup #> @@ -3830,6 +4283,7 @@ function Remove-AzEventHubApplicationGroup { [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory)] [Alias('ApplicationGroupName')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] @@ -3860,9 +4314,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -3946,8 +4405,9 @@ begin { $mapping = @{ Delete = 'Az.EventHub.private\Remove-AzEventHubApplicationGroup_Delete'; DeleteViaIdentity = 'Az.EventHub.private\Remove-AzEventHubApplicationGroup_DeleteViaIdentity'; + DeleteViaIdentityNamespace = 'Az.EventHub.private\Remove-AzEventHubApplicationGroup_DeleteViaIdentityNamespace'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -4071,7 +4531,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -4170,7 +4629,7 @@ begin { Delete = 'Az.EventHub.private\Remove-AzEventHubCluster_Delete'; DeleteViaIdentity = 'Az.EventHub.private\Remove-AzEventHubCluster_DeleteViaIdentity'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -4246,6 +4705,21 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. +EVENTHUBINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [ApplicationGroupName ]: The Application Group name @@ -4260,6 +4734,21 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: Name of the resource group within the azure subscription. [SchemaGroupName ]: The Schema Group name [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. .Link https://learn.microsoft.com/powershell/module/az.eventhub/remove-azeventhubconsumergroup #> @@ -4268,12 +4757,15 @@ function Remove-AzEventHubConsumerGroup { [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # The Event Hub name ${EventHubName}, [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityEventhub', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory)] [Alias('ConsumerGroupName')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] @@ -4304,9 +4796,20 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='DeleteViaIdentityEventhub', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${EventhubInputObject}, + + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -4390,8 +4893,10 @@ begin { $mapping = @{ Delete = 'Az.EventHub.private\Remove-AzEventHubConsumerGroup_Delete'; DeleteViaIdentity = 'Az.EventHub.private\Remove-AzEventHubConsumerGroup_DeleteViaIdentity'; + DeleteViaIdentityEventhub = 'Az.EventHub.private\Remove-AzEventHubConsumerGroup_DeleteViaIdentityEventhub'; + DeleteViaIdentityNamespace = 'Az.EventHub.private\Remove-AzEventHubConsumerGroup_DeleteViaIdentityNamespace'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -4481,6 +4986,21 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: Name of the resource group within the azure subscription. [SchemaGroupName ]: The Schema Group name [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. .Link https://learn.microsoft.com/powershell/module/az.eventhub/remove-azeventhubgeodrconfiguration #> @@ -4489,6 +5009,7 @@ function Remove-AzEventHubGeoDRConfiguration { [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # The Disaster Recovery configuration name @@ -4518,9 +5039,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -4604,8 +5130,9 @@ begin { $mapping = @{ Delete = 'Az.EventHub.private\Remove-AzEventHubGeoDRConfiguration_Delete'; DeleteViaIdentity = 'Az.EventHub.private\Remove-AzEventHubGeoDRConfiguration_DeleteViaIdentity'; + DeleteViaIdentityNamespace = 'Az.EventHub.private\Remove-AzEventHubGeoDRConfiguration_DeleteViaIdentityNamespace'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -4733,7 +5260,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -4832,7 +5358,7 @@ begin { Delete = 'Az.EventHub.private\Remove-AzEventHubNamespace_Delete'; DeleteViaIdentity = 'Az.EventHub.private\Remove-AzEventHubNamespace_DeleteViaIdentity'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -4924,14 +5450,32 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: Name of the resource group within the azure subscription. [SchemaGroupName ]: The Schema Group name [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. .Link https://learn.microsoft.com/powershell/module/az.eventhub/remove-azeventhubprivateendpointconnection +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639389.aspx #> function Remove-AzEventHubPrivateEndpointConnection { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory)] [Alias('PrivateEndpointConnectionName')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] @@ -4962,9 +5506,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -5060,8 +5609,9 @@ begin { $mapping = @{ Delete = 'Az.EventHub.private\Remove-AzEventHubPrivateEndpointConnection_Delete'; DeleteViaIdentity = 'Az.EventHub.private\Remove-AzEventHubPrivateEndpointConnection_DeleteViaIdentity'; + DeleteViaIdentityNamespace = 'Az.EventHub.private\Remove-AzEventHubPrivateEndpointConnection_DeleteViaIdentityNamespace'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -5151,6 +5701,21 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: Name of the resource group within the azure subscription. [SchemaGroupName ]: The Schema Group name [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. .Link https://learn.microsoft.com/powershell/module/az.eventhub/remove-azeventhubschemagroup #> @@ -5159,6 +5724,7 @@ function Remove-AzEventHubSchemaGroup { [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory)] [Alias('SchemaGroupName')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] @@ -5189,9 +5755,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -5275,8 +5846,9 @@ begin { $mapping = @{ Delete = 'Az.EventHub.private\Remove-AzEventHubSchemaGroup_Delete'; DeleteViaIdentity = 'Az.EventHub.private\Remove-AzEventHubSchemaGroup_DeleteViaIdentity'; + DeleteViaIdentityNamespace = 'Az.EventHub.private\Remove-AzEventHubSchemaGroup_DeleteViaIdentityNamespace'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -5366,6 +5938,21 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: Name of the resource group within the azure subscription. [SchemaGroupName ]: The Schema Group name [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. .Link https://learn.microsoft.com/powershell/module/az.eventhub/remove-azeventhub #> @@ -5374,6 +5961,7 @@ function Remove-AzEventHub { [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory)] [Alias('EventHubName')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] @@ -5404,9 +5992,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -5490,8 +6083,9 @@ begin { $mapping = @{ Delete = 'Az.EventHub.private\Remove-AzEventHub_Delete'; DeleteViaIdentity = 'Az.EventHub.private\Remove-AzEventHub_DeleteViaIdentity'; + DeleteViaIdentityNamespace = 'Az.EventHub.private\Remove-AzEventHub_DeleteViaIdentityNamespace'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -5564,13 +6158,13 @@ Approve-AzEventHubPrivateEndpointConnection -InputObject $privateEndpoint .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity parameter. +INPUTOBJECT : Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [Alias ]: The Disaster Recovery configuration name [ApplicationGroupName ]: The Application Group name [AuthorizationRuleName ]: The authorization rule name. @@ -5588,7 +6182,7 @@ INPUTOBJECT : Identity parameter. https://learn.microsoft.com/powershell/module/az.eventhub/approve-azeventhubprivateendpointconnection #> function Approve-AzEventHubPrivateEndpointConnection { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection])] [CmdletBinding(DefaultParameterSetName='SetExpanded', PositionalBinding=$false)] param( [Parameter(ParameterSetName='SetExpanded', Mandatory)] @@ -5719,7 +6313,7 @@ begin { SetExpanded = 'Az.EventHub.custom\Approve-AzEventHubPrivateEndpointConnection'; SetViaIdentityExpanded = 'Az.EventHub.custom\Approve-AzEventHubPrivateEndpointConnection'; } - if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -5792,13 +6386,13 @@ Deny-AzEventHubPrivateEndpointConnection -InputObject $privateEndpoint .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity parameter. +INPUTOBJECT : Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [Alias ]: The Disaster Recovery configuration name [ApplicationGroupName ]: The Application Group name [AuthorizationRuleName ]: The authorization rule name. @@ -5816,7 +6410,7 @@ INPUTOBJECT : Identity parameter. https://learn.microsoft.com/powershell/module/az.eventhub/deny-azeventhubprivateendpointconnection #> function Deny-AzEventHubPrivateEndpointConnection { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection])] [CmdletBinding(DefaultParameterSetName='SetExpanded', PositionalBinding=$false)] param( [Parameter(ParameterSetName='SetExpanded', Mandatory)] @@ -5947,7 +6541,7 @@ begin { SetExpanded = 'Az.EventHub.custom\Deny-AzEventHubPrivateEndpointConnection'; SetViaIdentityExpanded = 'Az.EventHub.custom\Deny-AzEventHubPrivateEndpointConnection'; } - if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -6019,13 +6613,13 @@ Get-AzEventHubAuthorizationRule -ResourceGroupName myResourceGroup -NamespaceNam .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity parameter. +INPUTOBJECT : Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [Alias ]: The Disaster Recovery configuration name [ApplicationGroupName ]: The Application Group name [AuthorizationRuleName ]: The authorization rule name. @@ -6043,7 +6637,7 @@ INPUTOBJECT : Identity parameter. https://learn.microsoft.com/powershell/module/az.eventhub/get-azeventhubauthorizationrule #> function Get-AzEventHubAuthorizationRule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule])] [CmdletBinding(DefaultParameterSetName='GetExpandedNamespace', PositionalBinding=$false)] param( [Parameter(ParameterSetName='GetExpandedNamespace', Mandatory)] @@ -6179,7 +6773,7 @@ begin { GetExpandedEntity = 'Az.EventHub.custom\Get-AzEventHubAuthorizationRule'; GetViaIdentityExpanded = 'Az.EventHub.custom\Get-AzEventHubAuthorizationRule'; } - if (('GetExpandedNamespace', 'GetExpandedAlias', 'GetExpandedEntity') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('GetExpandedNamespace', 'GetExpandedAlias', 'GetExpandedEntity') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -6249,12 +6843,12 @@ Get-AzEventHubKey -ResourceGroupName myResourceGroup -NamespaceName myNamespace Get-AzEventHubKey -ResourceGroupName myResourceGroup -NamespaceName myNamespace -EventHubName myEventHub -Name RootManageSharedAccessKey .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys .Link https://learn.microsoft.com/powershell/module/az.eventhub/get-azeventhubkey #> function Get-AzEventHubKey { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys])] [CmdletBinding(DefaultParameterSetName='GetExpandedNamespace', PositionalBinding=$false)] param( [Parameter(Mandatory)] @@ -6386,7 +6980,7 @@ begin { GetExpandedAlias = 'Az.EventHub.custom\Get-AzEventHubKey'; GetExpandedEntity = 'Az.EventHub.custom\Get-AzEventHubKey'; } - if (('GetExpandedNamespace', 'GetExpandedAlias', 'GetExpandedEntity') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('GetExpandedNamespace', 'GetExpandedAlias', 'GetExpandedEntity') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -6456,12 +7050,12 @@ New-AzEventHubAuthorizationRule -ResourceGroupName myResourceGroup -NamespaceNam New-AzEventHubAuthorizationRule -ResourceGroupName myResourceGroup -NamespaceName myNamespace -EventHubName myEventHub -Name myAuthRule -Rights @('Manage', 'Send', 'Listen') .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule .Link https://learn.microsoft.com/powershell/module/az.eventhub/new-azeventhubauthorizationrule #> function New-AzEventHubAuthorizationRule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule])] [CmdletBinding(DefaultParameterSetName='NewExpandedNamespace', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -6499,7 +7093,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights[]] + [System.String[]] # The rights associated with the rule. ${Rights}, @@ -6592,7 +7186,7 @@ begin { NewExpandedNamespace = 'Az.EventHub.custom\New-AzEventHubAuthorizationRule'; NewExpandedEntity = 'Az.EventHub.custom\New-AzEventHubAuthorizationRule'; } - if (('NewExpandedNamespace', 'NewExpandedEntity') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('NewExpandedNamespace', 'NewExpandedEntity') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -6660,12 +7254,12 @@ Constructs an INwRuleSetIPRules object that can be fed as input to Set-AzEventHu New-AzEventHubIPRuleConfig -IPMask 3.3.3.3 -Action Allow .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetIPRules +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetIPRules .Link https://learn.microsoft.com/powershell/module/az.eventhub/new-azeventhubipruleconfig #> function New-AzEventHubIPRuleConfig { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetIPRules])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetIPRules])] [CmdletBinding(PositionalBinding=$false)] param( [Parameter(Mandatory)] @@ -6676,7 +7270,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkRuleIPAction] + [System.String] # The IP Filter Action ${Action} ) @@ -6770,12 +7364,12 @@ New-AzEventHubKey -ResourceGroupName myResourceGroup -NamespaceName myNamespace New-AzEventHubKey -ResourceGroupName myResourceGroup -NamespaceName myNamespace -EventHubName myEventHub -Name rootmanagesharedaccesskey -KeyType SecondaryKey .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys .Link https://learn.microsoft.com/powershell/module/az.eventhub/new-azeventhubkey #> function New-AzEventHubKey { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys])] [CmdletBinding(DefaultParameterSetName='NewExpandedNamespace', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -6814,7 +7408,7 @@ param( [Parameter()] [Alias('RegenerateKey')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeyType] + [System.String] # The access key to regenerate. ${KeyType}, @@ -6913,7 +7507,7 @@ begin { NewExpandedNamespace = 'Az.EventHub.custom\New-AzEventHubKey'; NewExpandedEntity = 'Az.EventHub.custom\New-AzEventHubKey'; } - if (('NewExpandedNamespace', 'NewExpandedEntity') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('NewExpandedNamespace', 'NewExpandedEntity') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -6981,12 +7575,12 @@ Create an in-memory object for KeyVaultProperties. New-AzEventHubKeyVaultPropertiesObject -KeyName key1 -KeyVaultUri https://testkeyvault.vault.azure.net .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.KeyVaultProperties +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.KeyVaultProperties .Link -https://learn.microsoft.com/powershell/module/Az.EventHub/new-AzEventHubKeyVaultPropertiesObject +https://learn.microsoft.com/powershell/module/Az.EventHub/new-azeventhubkeyvaultpropertiesobject #> function New-AzEventHubKeyVaultPropertiesObject { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.KeyVaultProperties])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.KeyVaultProperties])] [CmdletBinding(PositionalBinding=$false)] param( [Parameter()] @@ -7108,7 +7702,7 @@ New-AzEventHubNamespace -ResourceGroupName myResourceGroup -Name myNamespace -Sk New-AzEventHubNamespace -ResourceGroupName myResourceGroup -Name myNamespace -SkuCapacity 10 -MaximumThroughputUnit 18 -SkuName Standard -Location southcentralus -Tag @{k1='v1'; k2='v2'} -EnableAutoInflate -DisableLocalAuth .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace .Notes COMPLEX PARAMETER PROPERTIES @@ -7124,7 +7718,7 @@ https://learn.microsoft.com/powershell/module/az.eventhub/new-azeventhubnamespac #> function New-AzEventHubNamespace { [Alias('New-AzEventHubNamespaceV2')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace])] [CmdletBinding(PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -7185,14 +7779,13 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultProperties[]] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultProperties[]] # Properties to configure Encryption - # To construct, see NOTES section for KEYVAULTPROPERTY properties and create a hash table. ${KeyVaultProperty}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType] + [System.String] # Type of managed service identity. ${IdentityType}, @@ -7224,14 +7817,14 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuName] + [System.String] # The minimum TLS version for the cluster to support, e.g. # '1.2' ${SkuName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess] + [System.String] # This determines if traffic is allowed over public network. # By default it is enabled. ${PublicNetworkAccess}, @@ -7337,7 +7930,7 @@ begin { $mapping = @{ __AllParameterSets = 'Az.EventHub.custom\New-AzEventHubNamespace'; } - if (('__AllParameterSets') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('__AllParameterSets') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -7405,12 +7998,12 @@ Constructs an IThrottlingPolicy object that can be fed as input to New-AzEventHu New-AzEventHubThrottlingPolicyConfig -Name t1 -RateLimitThreshold 10000 -MetricId IncomingBytes .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IThrottlingPolicy +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IThrottlingPolicy .Link https://learn.microsoft.com/powershell/module/az.eventhub/new-azeventhubthrottlingpolicyconfig #> function New-AzEventHubThrottlingPolicyConfig { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IThrottlingPolicy])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IThrottlingPolicy])] [CmdletBinding(PositionalBinding=$false)] param( [Parameter(Mandatory)] @@ -7427,7 +8020,7 @@ param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.MetricId] + [System.String] # Metric Id on which the throttle limit should be set, MetricId can be discovered by hovering over Metric in the Metrics section of Event Hub Namespace inside Azure Portal ${MetricId} ) @@ -7519,12 +8112,12 @@ Constructs an INwRuleSetVirtualNetworkRules object that can be fed as input to S New-AzEventHubVirtualNetworkRuleConfig -SubnetId /subscriptions/subscriptionId/resourcegroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVirtualNetwork/subnets/default .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetVirtualNetworkRules +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetVirtualNetworkRules .Link https://learn.microsoft.com/powershell/module/az.eventhub/new-azeventhubvirtualnetworkruleconfig #> function New-AzEventHubVirtualNetworkRuleConfig { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetVirtualNetworkRules])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetVirtualNetworkRules])] [CmdletBinding(PositionalBinding=$false)] param( [Parameter(Mandatory)] @@ -7631,13 +8224,13 @@ Remove-AzEventHubAuthorizationRule -ResourceGroupName myResourceGroup -Namespace .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity parameter. +INPUTOBJECT : Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [Alias ]: The Disaster Recovery configuration name [ApplicationGroupName ]: The Application Group name [AuthorizationRuleName ]: The authorization rule name. @@ -7655,7 +8248,7 @@ INPUTOBJECT : Identity parameter. https://learn.microsoft.com/powershell/module/az.eventhub/remove-azeventhubauthorizationrule #> function Remove-AzEventHubAuthorizationRule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule])] [CmdletBinding(DefaultParameterSetName='RemoveExpandedNamespace', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='RemoveExpandedNamespace', Mandatory)] @@ -7792,7 +8385,7 @@ begin { RemoveExpandedEntity = 'Az.EventHub.custom\Remove-AzEventHubAuthorizationRule'; RemoveViaIdentityExpanded = 'Az.EventHub.custom\Remove-AzEventHubAuthorizationRule'; } - if (('RemoveExpandedNamespace', 'RemoveExpandedEntity') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('RemoveExpandedNamespace', 'RemoveExpandedEntity') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -7865,13 +8458,13 @@ Set-AzEventHub -InputObject $eventhub -RetentionTimeInHour 72 .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity parameter. +INPUTOBJECT : Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [Alias ]: The Disaster Recovery configuration name [ApplicationGroupName ]: The Application Group name [AuthorizationRuleName ]: The authorization rule name. @@ -7889,7 +8482,7 @@ INPUTOBJECT : Identity parameter. https://learn.microsoft.com/powershell/module/az.eventhub/set-azeventhub #> function Set-AzEventHub { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub])] [CmdletBinding(DefaultParameterSetName='SetExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='SetExpanded', Mandatory)] @@ -7934,7 +8527,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription] + [System.String] # Enumerates the possible values for the encoding format of capture description. # Note: 'AvroDeflate' will be deprecated in New API Version ${Encoding}, @@ -7975,7 +8568,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus] + [System.String] # Enumerates the possible values for the status of the Event Hub. ${Status}, @@ -7987,7 +8580,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType] + [System.String] # Type of managed service identity. ${IdentityType}, @@ -8114,7 +8707,7 @@ begin { SetExpanded = 'Az.EventHub.custom\Set-AzEventHub'; SetViaIdentityExpanded = 'Az.EventHub.custom\Set-AzEventHub'; } - if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -8188,7 +8781,7 @@ $appGroup = Get-AzEventHubApplicationGroup -ResourceGroupName myResourceGroup -N Set-AzEventHubApplicationGroup -InputObject $appGroup -IsEnabled:$false .Inputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicy[] +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicy[] .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Inputs @@ -8196,13 +8789,13 @@ System.Management.Automation.SwitchParameter .Inputs System.String .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity parameter. +INPUTOBJECT : Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [Alias ]: The Disaster Recovery configuration name [ApplicationGroupName ]: The Application Group name [AuthorizationRuleName ]: The authorization rule name. @@ -8223,7 +8816,7 @@ POLICY : List of group policies that define the behav https://learn.microsoft.com/powershell/module/az.eventhub/set-azeventhubapplicationgroup #> function Set-AzEventHubApplicationGroup { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup])] [CmdletBinding(DefaultParameterSetName='SetExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='SetExpanded', Mandatory)] @@ -8275,10 +8868,9 @@ param( [Parameter(ValueFromPipelineByPropertyName)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicy[]] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicy[]] # List of group policies that define the behavior of application group. # The policies can support resource governance scenarios such as limiting ingress or egress traffic. - # To construct, see NOTES section for POLICY properties and create a hash table. ${Policy}, [Parameter()] @@ -8370,7 +8962,7 @@ begin { SetExpanded = 'Az.EventHub.custom\Set-AzEventHubApplicationGroup'; SetViaIdentityExpanded = 'Az.EventHub.custom\Set-AzEventHubApplicationGroup'; } - if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -8442,13 +9034,13 @@ Set-AzEventHubAuthorizationRule -ResourceGroupName myResourceGroup -NamespaceNam .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity parameter. +INPUTOBJECT : Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [Alias ]: The Disaster Recovery configuration name [ApplicationGroupName ]: The Application Group name [AuthorizationRuleName ]: The authorization rule name. @@ -8466,7 +9058,7 @@ INPUTOBJECT : Identity parameter. https://learn.microsoft.com/powershell/module/az.eventhub/set-azeventhubauthorizationrule #> function Set-AzEventHubAuthorizationRule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule])] [CmdletBinding(DefaultParameterSetName='SetExpandedNamespace', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='SetExpandedNamespace', Mandatory)] @@ -8515,7 +9107,7 @@ param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights[]] + [System.String[]] # The rights associated with the rule. ${Rights}, @@ -8609,7 +9201,7 @@ begin { SetExpandedEntity = 'Az.EventHub.custom\Set-AzEventHubAuthorizationRule'; SetViaIdentityExpanded = 'Az.EventHub.custom\Set-AzEventHubAuthorizationRule'; } - if (('SetExpandedNamespace', 'SetExpandedEntity') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('SetExpandedNamespace', 'SetExpandedEntity') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -8682,13 +9274,13 @@ Set-AzEventHubCluster -InputObject $cluster -Capacity 3 .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity parameter. +INPUTOBJECT : Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [Alias ]: The Disaster Recovery configuration name [ApplicationGroupName ]: The Application Group name [AuthorizationRuleName ]: The authorization rule name. @@ -8709,7 +9301,7 @@ TAG : Resource tags. https://learn.microsoft.com/powershell/module/az.eventhub/set-azeventhubcluster #> function Set-AzEventHubCluster { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster])] [CmdletBinding(DefaultParameterSetName='SetExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='SetExpanded', Mandatory)] @@ -8748,9 +9340,8 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceTags] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceTags] # Resource tags. - # To construct, see NOTES section for TAG properties and create a hash table. ${Tag}, [Parameter()] @@ -8842,7 +9433,7 @@ begin { SetExpanded = 'Az.EventHub.custom\Set-AzEventHubCluster'; SetViaIdentityExpanded = 'Az.EventHub.custom\Set-AzEventHubCluster'; } - if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -8915,13 +9506,13 @@ Set-AzEventHubConsumerGroup -InputObject $consumerGroup -UserMetadata "Example M .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity parameter. +INPUTOBJECT : Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [Alias ]: The Disaster Recovery configuration name [ApplicationGroupName ]: The Application Group name [AuthorizationRuleName ]: The authorization rule name. @@ -8939,7 +9530,7 @@ INPUTOBJECT : Identity parameter. https://learn.microsoft.com/powershell/module/az.eventhub/set-azeventhubconsumergroup #> function Set-AzEventHubConsumerGroup { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup])] [CmdletBinding(DefaultParameterSetName='SetExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='SetExpanded', Mandatory)] @@ -9079,7 +9670,7 @@ begin { SetExpanded = 'Az.EventHub.custom\Set-AzEventHubConsumerGroup'; SetViaIdentityExpanded = 'Az.EventHub.custom\Set-AzEventHubConsumerGroup'; } - if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -9155,7 +9746,7 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity parameter. +INPUTOBJECT : Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [Alias ]: The Disaster Recovery configuration name [ApplicationGroupName ]: The Application Group name [AuthorizationRuleName ]: The authorization rule name. @@ -9298,7 +9889,7 @@ begin { Break = 'Az.EventHub.custom\Set-AzEventHubGeoDRConfigurationBreakPair'; BreakViaIdentity = 'Az.EventHub.custom\Set-AzEventHubGeoDRConfigurationBreakPair'; } - if (('Break') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Break') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -9374,7 +9965,7 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity parameter. +INPUTOBJECT : Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [Alias ]: The Disaster Recovery configuration name [ApplicationGroupName ]: The Application Group name [AuthorizationRuleName ]: The authorization rule name. @@ -9517,7 +10108,7 @@ begin { Fail = 'Az.EventHub.custom\Set-AzEventHubGeoDRConfigurationFailOver'; FailViaIdentity = 'Az.EventHub.custom\Set-AzEventHubGeoDRConfigurationFailOver'; } - if (('Fail') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Fail') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -9613,13 +10204,13 @@ $eventHubNamespace = Set-AzEventHubNamespace -ResourceGroupName myResourceGroup .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity parameter. +INPUTOBJECT : Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [Alias ]: The Disaster Recovery configuration name [ApplicationGroupName ]: The Application Group name [AuthorizationRuleName ]: The authorization rule name. @@ -9644,7 +10235,7 @@ https://learn.microsoft.com/powershell/module/az.eventhub/set-azeventhubnamespac #> function Set-AzEventHubNamespace { [Alias('Set-AzEventHubNamespaceV2')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace])] [CmdletBinding(DefaultParameterSetName='SetExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='SetExpanded', Mandatory)] @@ -9688,9 +10279,8 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultProperties[]] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultProperties[]] # Properties to configure Encryption - # To construct, see NOTES section for KEYVAULTPROPERTY properties and create a hash table. ${KeyVaultProperty}, [Parameter()] @@ -9701,7 +10291,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType] + [System.String] # Type of managed service identity. ${IdentityType}, @@ -9733,7 +10323,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess] + [System.String] # This determines if traffic is allowed over public network. # By default it is enabled. ${PublicNetworkAccess}, @@ -9840,7 +10430,7 @@ begin { SetExpanded = 'Az.EventHub.custom\Set-AzEventHubNamespace'; SetViaIdentityExpanded = 'Az.EventHub.custom\Set-AzEventHubNamespace'; } - if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -9919,13 +10509,13 @@ Set-AzEventHubNetworkRuleSet -ResourceGroupName myResourceGroup -NamespaceName m .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity parameter. +INPUTOBJECT : Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [Alias ]: The Disaster Recovery configuration name [ApplicationGroupName ]: The Application Group name [AuthorizationRuleName ]: The authorization rule name. @@ -9941,7 +10531,7 @@ INPUTOBJECT : Identity parameter. [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. IPRULE : List of IpRules - [Action ]: The IP Filter Action + [Action ]: The IP Filter Action [IPMask ]: IP Mask VIRTUALNETWORKRULE : List of VirtualNetwork Rules @@ -9951,7 +10541,7 @@ VIRTUALNETWORKRULE : List of VirtualNetwork Rul https://learn.microsoft.com/powershell/module/az.eventhub/set-azeventhubnetworkruleset #> function Set-AzEventHubNetworkRuleSet { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet])] [CmdletBinding(DefaultParameterSetName='SetExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='SetExpanded', Mandatory)] @@ -9983,7 +10573,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess] + [System.String] # This determines if traffic is allowed over public network. # By default it is enabled. # If value is SecuredByPerimeter then Inbound and Outbound communication is controlled by the network security perimeter and profile's access rules. @@ -9997,22 +10587,20 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.DefaultAction] + [System.String] # Default Action for Network Rule Set ${DefaultAction}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetIPRules[]] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetIPRules[]] # List of IpRules - # To construct, see NOTES section for IPRULE properties and create a hash table. ${IPRule}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetVirtualNetworkRules[]] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetVirtualNetworkRules[]] # List of VirtualNetwork Rules - # To construct, see NOTES section for VIRTUALNETWORKRULE properties and create a hash table. ${VirtualNetworkRule}, [Parameter()] @@ -10104,7 +10692,7 @@ begin { SetExpanded = 'Az.EventHub.custom\Set-AzEventHubNetworkRuleSet'; SetViaIdentityExpanded = 'Az.EventHub.custom\Set-AzEventHubNetworkRuleSet'; } - if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -10174,12 +10762,12 @@ Test-AzEventHubName -NamespaceName myNamespace Test-AzEventHubName -NamespaceName myNamespace -ResourceGroupName myResourceGroup -AliasName myAlias .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult .Link https://learn.microsoft.com/powershell/module/az.eventhub/test-azeventhubname #> function Test-AzEventHubName { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult])] [CmdletBinding(DefaultParameterSetName='NamespaceAvailability', PositionalBinding=$false)] param( [Parameter(Mandatory)] @@ -10296,7 +10884,7 @@ begin { NamespaceAvailability = 'Az.EventHub.custom\Test-AzEventHubName'; AliasAvailability = 'Az.EventHub.custom\Test-AzEventHubName'; } - if (('NamespaceAvailability', 'AliasAvailability') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('NamespaceAvailability', 'AliasAvailability') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/exports/Remove-AzEventHub.ps1 b/src/EventHub/EventHub.Autorest/exports/Remove-AzEventHub.ps1 index 2385b750af57..b6def9b25c03 100644 --- a/src/EventHub/EventHub.Autorest/exports/Remove-AzEventHub.ps1 +++ b/src/EventHub/EventHub.Autorest/exports/Remove-AzEventHub.ps1 @@ -45,6 +45,21 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: Name of the resource group within the azure subscription. [SchemaGroupName ]: The Schema Group name [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. .Link https://learn.microsoft.com/powershell/module/az.eventhub/remove-azeventhub #> @@ -53,6 +68,7 @@ function Remove-AzEventHub { [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory)] [Alias('EventHubName')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] @@ -83,9 +99,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -169,8 +190,9 @@ begin { $mapping = @{ Delete = 'Az.EventHub.private\Remove-AzEventHub_Delete'; DeleteViaIdentity = 'Az.EventHub.private\Remove-AzEventHub_DeleteViaIdentity'; + DeleteViaIdentityNamespace = 'Az.EventHub.private\Remove-AzEventHub_DeleteViaIdentityNamespace'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/exports/Remove-AzEventHubApplicationGroup.ps1 b/src/EventHub/EventHub.Autorest/exports/Remove-AzEventHubApplicationGroup.ps1 index b576ba76ba8f..1d40df106fac 100644 --- a/src/EventHub/EventHub.Autorest/exports/Remove-AzEventHubApplicationGroup.ps1 +++ b/src/EventHub/EventHub.Autorest/exports/Remove-AzEventHubApplicationGroup.ps1 @@ -45,6 +45,21 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: Name of the resource group within the azure subscription. [SchemaGroupName ]: The Schema Group name [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. .Link https://learn.microsoft.com/powershell/module/az.eventhub/remove-azeventhubapplicationgroup #> @@ -53,6 +68,7 @@ function Remove-AzEventHubApplicationGroup { [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory)] [Alias('ApplicationGroupName')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] @@ -83,9 +99,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -169,8 +190,9 @@ begin { $mapping = @{ Delete = 'Az.EventHub.private\Remove-AzEventHubApplicationGroup_Delete'; DeleteViaIdentity = 'Az.EventHub.private\Remove-AzEventHubApplicationGroup_DeleteViaIdentity'; + DeleteViaIdentityNamespace = 'Az.EventHub.private\Remove-AzEventHubApplicationGroup_DeleteViaIdentityNamespace'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/exports/Remove-AzEventHubAuthorizationRule.ps1 b/src/EventHub/EventHub.Autorest/exports/Remove-AzEventHubAuthorizationRule.ps1 index 47a0421b7187..f8ddf7d08fc7 100644 --- a/src/EventHub/EventHub.Autorest/exports/Remove-AzEventHubAuthorizationRule.ps1 +++ b/src/EventHub/EventHub.Autorest/exports/Remove-AzEventHubAuthorizationRule.ps1 @@ -27,13 +27,13 @@ Remove-AzEventHubAuthorizationRule -ResourceGroupName myResourceGroup -Namespace .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity parameter. +INPUTOBJECT : Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [Alias ]: The Disaster Recovery configuration name [ApplicationGroupName ]: The Application Group name [AuthorizationRuleName ]: The authorization rule name. @@ -51,7 +51,7 @@ INPUTOBJECT : Identity parameter. https://learn.microsoft.com/powershell/module/az.eventhub/remove-azeventhubauthorizationrule #> function Remove-AzEventHubAuthorizationRule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule])] [CmdletBinding(DefaultParameterSetName='RemoveExpandedNamespace', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='RemoveExpandedNamespace', Mandatory)] @@ -188,7 +188,7 @@ begin { RemoveExpandedEntity = 'Az.EventHub.custom\Remove-AzEventHubAuthorizationRule'; RemoveViaIdentityExpanded = 'Az.EventHub.custom\Remove-AzEventHubAuthorizationRule'; } - if (('RemoveExpandedNamespace', 'RemoveExpandedEntity') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('RemoveExpandedNamespace', 'RemoveExpandedEntity') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/exports/Remove-AzEventHubCluster.ps1 b/src/EventHub/EventHub.Autorest/exports/Remove-AzEventHubCluster.ps1 index fde4383df1a4..37aefb5d36e1 100644 --- a/src/EventHub/EventHub.Autorest/exports/Remove-AzEventHubCluster.ps1 +++ b/src/EventHub/EventHub.Autorest/exports/Remove-AzEventHubCluster.ps1 @@ -79,7 +79,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -178,7 +177,7 @@ begin { Delete = 'Az.EventHub.private\Remove-AzEventHubCluster_Delete'; DeleteViaIdentity = 'Az.EventHub.private\Remove-AzEventHubCluster_DeleteViaIdentity'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/exports/Remove-AzEventHubConsumerGroup.ps1 b/src/EventHub/EventHub.Autorest/exports/Remove-AzEventHubConsumerGroup.ps1 index 93e8dbaeb9d3..43db6c0ea609 100644 --- a/src/EventHub/EventHub.Autorest/exports/Remove-AzEventHubConsumerGroup.ps1 +++ b/src/EventHub/EventHub.Autorest/exports/Remove-AzEventHubConsumerGroup.ps1 @@ -31,6 +31,21 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. +EVENTHUBINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [ApplicationGroupName ]: The Application Group name @@ -45,6 +60,21 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: Name of the resource group within the azure subscription. [SchemaGroupName ]: The Schema Group name [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. .Link https://learn.microsoft.com/powershell/module/az.eventhub/remove-azeventhubconsumergroup #> @@ -53,12 +83,15 @@ function Remove-AzEventHubConsumerGroup { [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # The Event Hub name ${EventHubName}, [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityEventhub', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory)] [Alias('ConsumerGroupName')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] @@ -89,9 +122,20 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='DeleteViaIdentityEventhub', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${EventhubInputObject}, + + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -175,8 +219,10 @@ begin { $mapping = @{ Delete = 'Az.EventHub.private\Remove-AzEventHubConsumerGroup_Delete'; DeleteViaIdentity = 'Az.EventHub.private\Remove-AzEventHubConsumerGroup_DeleteViaIdentity'; + DeleteViaIdentityEventhub = 'Az.EventHub.private\Remove-AzEventHubConsumerGroup_DeleteViaIdentityEventhub'; + DeleteViaIdentityNamespace = 'Az.EventHub.private\Remove-AzEventHubConsumerGroup_DeleteViaIdentityNamespace'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/exports/Remove-AzEventHubGeoDRConfiguration.ps1 b/src/EventHub/EventHub.Autorest/exports/Remove-AzEventHubGeoDRConfiguration.ps1 index 2a7a7da483f1..d5479e3142ba 100644 --- a/src/EventHub/EventHub.Autorest/exports/Remove-AzEventHubGeoDRConfiguration.ps1 +++ b/src/EventHub/EventHub.Autorest/exports/Remove-AzEventHubGeoDRConfiguration.ps1 @@ -45,6 +45,21 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: Name of the resource group within the azure subscription. [SchemaGroupName ]: The Schema Group name [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. .Link https://learn.microsoft.com/powershell/module/az.eventhub/remove-azeventhubgeodrconfiguration #> @@ -53,6 +68,7 @@ function Remove-AzEventHubGeoDRConfiguration { [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # The Disaster Recovery configuration name @@ -82,9 +98,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -168,8 +189,9 @@ begin { $mapping = @{ Delete = 'Az.EventHub.private\Remove-AzEventHubGeoDRConfiguration_Delete'; DeleteViaIdentity = 'Az.EventHub.private\Remove-AzEventHubGeoDRConfiguration_DeleteViaIdentity'; + DeleteViaIdentityNamespace = 'Az.EventHub.private\Remove-AzEventHubGeoDRConfiguration_DeleteViaIdentityNamespace'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/exports/Remove-AzEventHubNamespace.ps1 b/src/EventHub/EventHub.Autorest/exports/Remove-AzEventHubNamespace.ps1 index 1d1029b88ce7..1a67b94e3aaf 100644 --- a/src/EventHub/EventHub.Autorest/exports/Remove-AzEventHubNamespace.ps1 +++ b/src/EventHub/EventHub.Autorest/exports/Remove-AzEventHubNamespace.ps1 @@ -83,7 +83,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -182,7 +181,7 @@ begin { Delete = 'Az.EventHub.private\Remove-AzEventHubNamespace_Delete'; DeleteViaIdentity = 'Az.EventHub.private\Remove-AzEventHubNamespace_DeleteViaIdentity'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/exports/Remove-AzEventHubPrivateEndpointConnection.ps1 b/src/EventHub/EventHub.Autorest/exports/Remove-AzEventHubPrivateEndpointConnection.ps1 index 6f9714154c2e..c019ccffdc78 100644 --- a/src/EventHub/EventHub.Autorest/exports/Remove-AzEventHubPrivateEndpointConnection.ps1 +++ b/src/EventHub/EventHub.Autorest/exports/Remove-AzEventHubPrivateEndpointConnection.ps1 @@ -47,14 +47,32 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: Name of the resource group within the azure subscription. [SchemaGroupName ]: The Schema Group name [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. .Link https://learn.microsoft.com/powershell/module/az.eventhub/remove-azeventhubprivateendpointconnection +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639389.aspx #> function Remove-AzEventHubPrivateEndpointConnection { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory)] [Alias('PrivateEndpointConnectionName')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] @@ -85,9 +103,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -183,8 +206,9 @@ begin { $mapping = @{ Delete = 'Az.EventHub.private\Remove-AzEventHubPrivateEndpointConnection_Delete'; DeleteViaIdentity = 'Az.EventHub.private\Remove-AzEventHubPrivateEndpointConnection_DeleteViaIdentity'; + DeleteViaIdentityNamespace = 'Az.EventHub.private\Remove-AzEventHubPrivateEndpointConnection_DeleteViaIdentityNamespace'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/exports/Remove-AzEventHubSchemaGroup.ps1 b/src/EventHub/EventHub.Autorest/exports/Remove-AzEventHubSchemaGroup.ps1 index 6a0bae5303fc..98773cec336f 100644 --- a/src/EventHub/EventHub.Autorest/exports/Remove-AzEventHubSchemaGroup.ps1 +++ b/src/EventHub/EventHub.Autorest/exports/Remove-AzEventHubSchemaGroup.ps1 @@ -45,6 +45,21 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: Name of the resource group within the azure subscription. [SchemaGroupName ]: The Schema Group name [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. .Link https://learn.microsoft.com/powershell/module/az.eventhub/remove-azeventhubschemagroup #> @@ -53,6 +68,7 @@ function Remove-AzEventHubSchemaGroup { [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory)] [Alias('SchemaGroupName')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] @@ -83,9 +99,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -169,8 +190,9 @@ begin { $mapping = @{ Delete = 'Az.EventHub.private\Remove-AzEventHubSchemaGroup_Delete'; DeleteViaIdentity = 'Az.EventHub.private\Remove-AzEventHubSchemaGroup_DeleteViaIdentity'; + DeleteViaIdentityNamespace = 'Az.EventHub.private\Remove-AzEventHubSchemaGroup_DeleteViaIdentityNamespace'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/exports/Set-AzEventHub.ps1 b/src/EventHub/EventHub.Autorest/exports/Set-AzEventHub.ps1 index 025482285945..4b3baf90cc9c 100644 --- a/src/EventHub/EventHub.Autorest/exports/Set-AzEventHub.ps1 +++ b/src/EventHub/EventHub.Autorest/exports/Set-AzEventHub.ps1 @@ -28,13 +28,13 @@ Set-AzEventHub -InputObject $eventhub -RetentionTimeInHour 72 .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity parameter. +INPUTOBJECT : Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [Alias ]: The Disaster Recovery configuration name [ApplicationGroupName ]: The Application Group name [AuthorizationRuleName ]: The authorization rule name. @@ -52,7 +52,7 @@ INPUTOBJECT : Identity parameter. https://learn.microsoft.com/powershell/module/az.eventhub/set-azeventhub #> function Set-AzEventHub { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub])] [CmdletBinding(DefaultParameterSetName='SetExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='SetExpanded', Mandatory)] @@ -97,7 +97,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription] + [System.String] # Enumerates the possible values for the encoding format of capture description. # Note: 'AvroDeflate' will be deprecated in New API Version ${Encoding}, @@ -138,7 +138,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus] + [System.String] # Enumerates the possible values for the status of the Event Hub. ${Status}, @@ -150,7 +150,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType] + [System.String] # Type of managed service identity. ${IdentityType}, @@ -277,7 +277,7 @@ begin { SetExpanded = 'Az.EventHub.custom\Set-AzEventHub'; SetViaIdentityExpanded = 'Az.EventHub.custom\Set-AzEventHub'; } - if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/exports/Set-AzEventHubApplicationGroup.ps1 b/src/EventHub/EventHub.Autorest/exports/Set-AzEventHubApplicationGroup.ps1 index 52ab2b673309..3981de348ab6 100644 --- a/src/EventHub/EventHub.Autorest/exports/Set-AzEventHubApplicationGroup.ps1 +++ b/src/EventHub/EventHub.Autorest/exports/Set-AzEventHubApplicationGroup.ps1 @@ -29,7 +29,7 @@ $appGroup = Get-AzEventHubApplicationGroup -ResourceGroupName myResourceGroup -N Set-AzEventHubApplicationGroup -InputObject $appGroup -IsEnabled:$false .Inputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicy[] +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicy[] .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Inputs @@ -37,13 +37,13 @@ System.Management.Automation.SwitchParameter .Inputs System.String .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity parameter. +INPUTOBJECT : Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [Alias ]: The Disaster Recovery configuration name [ApplicationGroupName ]: The Application Group name [AuthorizationRuleName ]: The authorization rule name. @@ -64,7 +64,7 @@ POLICY : List of group policies that define the behav https://learn.microsoft.com/powershell/module/az.eventhub/set-azeventhubapplicationgroup #> function Set-AzEventHubApplicationGroup { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup])] [CmdletBinding(DefaultParameterSetName='SetExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='SetExpanded', Mandatory)] @@ -116,10 +116,9 @@ param( [Parameter(ValueFromPipelineByPropertyName)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicy[]] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicy[]] # List of group policies that define the behavior of application group. # The policies can support resource governance scenarios such as limiting ingress or egress traffic. - # To construct, see NOTES section for POLICY properties and create a hash table. ${Policy}, [Parameter()] @@ -211,7 +210,7 @@ begin { SetExpanded = 'Az.EventHub.custom\Set-AzEventHubApplicationGroup'; SetViaIdentityExpanded = 'Az.EventHub.custom\Set-AzEventHubApplicationGroup'; } - if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/exports/Set-AzEventHubAuthorizationRule.ps1 b/src/EventHub/EventHub.Autorest/exports/Set-AzEventHubAuthorizationRule.ps1 index 04da66524438..dcf6d24fc978 100644 --- a/src/EventHub/EventHub.Autorest/exports/Set-AzEventHubAuthorizationRule.ps1 +++ b/src/EventHub/EventHub.Autorest/exports/Set-AzEventHubAuthorizationRule.ps1 @@ -27,13 +27,13 @@ Set-AzEventHubAuthorizationRule -ResourceGroupName myResourceGroup -NamespaceNam .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity parameter. +INPUTOBJECT : Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [Alias ]: The Disaster Recovery configuration name [ApplicationGroupName ]: The Application Group name [AuthorizationRuleName ]: The authorization rule name. @@ -51,7 +51,7 @@ INPUTOBJECT : Identity parameter. https://learn.microsoft.com/powershell/module/az.eventhub/set-azeventhubauthorizationrule #> function Set-AzEventHubAuthorizationRule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule])] [CmdletBinding(DefaultParameterSetName='SetExpandedNamespace', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='SetExpandedNamespace', Mandatory)] @@ -100,7 +100,7 @@ param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights[]] + [System.String[]] # The rights associated with the rule. ${Rights}, @@ -194,7 +194,7 @@ begin { SetExpandedEntity = 'Az.EventHub.custom\Set-AzEventHubAuthorizationRule'; SetViaIdentityExpanded = 'Az.EventHub.custom\Set-AzEventHubAuthorizationRule'; } - if (('SetExpandedNamespace', 'SetExpandedEntity') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('SetExpandedNamespace', 'SetExpandedEntity') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/exports/Set-AzEventHubCluster.ps1 b/src/EventHub/EventHub.Autorest/exports/Set-AzEventHubCluster.ps1 index 5a357b4a343d..a28c57027fd5 100644 --- a/src/EventHub/EventHub.Autorest/exports/Set-AzEventHubCluster.ps1 +++ b/src/EventHub/EventHub.Autorest/exports/Set-AzEventHubCluster.ps1 @@ -28,13 +28,13 @@ Set-AzEventHubCluster -InputObject $cluster -Capacity 3 .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity parameter. +INPUTOBJECT : Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [Alias ]: The Disaster Recovery configuration name [ApplicationGroupName ]: The Application Group name [AuthorizationRuleName ]: The authorization rule name. @@ -55,7 +55,7 @@ TAG : Resource tags. https://learn.microsoft.com/powershell/module/az.eventhub/set-azeventhubcluster #> function Set-AzEventHubCluster { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster])] [CmdletBinding(DefaultParameterSetName='SetExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='SetExpanded', Mandatory)] @@ -94,9 +94,8 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceTags] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceTags] # Resource tags. - # To construct, see NOTES section for TAG properties and create a hash table. ${Tag}, [Parameter()] @@ -188,7 +187,7 @@ begin { SetExpanded = 'Az.EventHub.custom\Set-AzEventHubCluster'; SetViaIdentityExpanded = 'Az.EventHub.custom\Set-AzEventHubCluster'; } - if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/exports/Set-AzEventHubConsumerGroup.ps1 b/src/EventHub/EventHub.Autorest/exports/Set-AzEventHubConsumerGroup.ps1 index b3aa3623841f..00a19e1aea59 100644 --- a/src/EventHub/EventHub.Autorest/exports/Set-AzEventHubConsumerGroup.ps1 +++ b/src/EventHub/EventHub.Autorest/exports/Set-AzEventHubConsumerGroup.ps1 @@ -28,13 +28,13 @@ Set-AzEventHubConsumerGroup -InputObject $consumerGroup -UserMetadata "Example M .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity parameter. +INPUTOBJECT : Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [Alias ]: The Disaster Recovery configuration name [ApplicationGroupName ]: The Application Group name [AuthorizationRuleName ]: The authorization rule name. @@ -52,7 +52,7 @@ INPUTOBJECT : Identity parameter. https://learn.microsoft.com/powershell/module/az.eventhub/set-azeventhubconsumergroup #> function Set-AzEventHubConsumerGroup { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup])] [CmdletBinding(DefaultParameterSetName='SetExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='SetExpanded', Mandatory)] @@ -192,7 +192,7 @@ begin { SetExpanded = 'Az.EventHub.custom\Set-AzEventHubConsumerGroup'; SetViaIdentityExpanded = 'Az.EventHub.custom\Set-AzEventHubConsumerGroup'; } - if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/exports/Set-AzEventHubGeoDRConfigurationBreakPair.ps1 b/src/EventHub/EventHub.Autorest/exports/Set-AzEventHubGeoDRConfigurationBreakPair.ps1 index 04ced6f50b4d..d4447f3e419e 100644 --- a/src/EventHub/EventHub.Autorest/exports/Set-AzEventHubGeoDRConfigurationBreakPair.ps1 +++ b/src/EventHub/EventHub.Autorest/exports/Set-AzEventHubGeoDRConfigurationBreakPair.ps1 @@ -31,7 +31,7 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity parameter. +INPUTOBJECT : Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [Alias ]: The Disaster Recovery configuration name [ApplicationGroupName ]: The Application Group name [AuthorizationRuleName ]: The authorization rule name. @@ -174,7 +174,7 @@ begin { Break = 'Az.EventHub.custom\Set-AzEventHubGeoDRConfigurationBreakPair'; BreakViaIdentity = 'Az.EventHub.custom\Set-AzEventHubGeoDRConfigurationBreakPair'; } - if (('Break') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Break') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/exports/Set-AzEventHubGeoDRConfigurationFailOver.ps1 b/src/EventHub/EventHub.Autorest/exports/Set-AzEventHubGeoDRConfigurationFailOver.ps1 index 490980766fd4..7b6c8a6b3f21 100644 --- a/src/EventHub/EventHub.Autorest/exports/Set-AzEventHubGeoDRConfigurationFailOver.ps1 +++ b/src/EventHub/EventHub.Autorest/exports/Set-AzEventHubGeoDRConfigurationFailOver.ps1 @@ -31,7 +31,7 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity parameter. +INPUTOBJECT : Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [Alias ]: The Disaster Recovery configuration name [ApplicationGroupName ]: The Application Group name [AuthorizationRuleName ]: The authorization rule name. @@ -174,7 +174,7 @@ begin { Fail = 'Az.EventHub.custom\Set-AzEventHubGeoDRConfigurationFailOver'; FailViaIdentity = 'Az.EventHub.custom\Set-AzEventHubGeoDRConfigurationFailOver'; } - if (('Fail') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Fail') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/exports/Set-AzEventHubNamespace.ps1 b/src/EventHub/EventHub.Autorest/exports/Set-AzEventHubNamespace.ps1 index dfb4cb1d2a13..245d7a48703d 100644 --- a/src/EventHub/EventHub.Autorest/exports/Set-AzEventHubNamespace.ps1 +++ b/src/EventHub/EventHub.Autorest/exports/Set-AzEventHubNamespace.ps1 @@ -51,13 +51,13 @@ $eventHubNamespace = Set-AzEventHubNamespace -ResourceGroupName myResourceGroup .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity parameter. +INPUTOBJECT : Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [Alias ]: The Disaster Recovery configuration name [ApplicationGroupName ]: The Application Group name [AuthorizationRuleName ]: The authorization rule name. @@ -82,7 +82,7 @@ https://learn.microsoft.com/powershell/module/az.eventhub/set-azeventhubnamespac #> function Set-AzEventHubNamespace { [Alias('Set-AzEventHubNamespaceV2')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace])] [CmdletBinding(DefaultParameterSetName='SetExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='SetExpanded', Mandatory)] @@ -126,9 +126,8 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultProperties[]] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultProperties[]] # Properties to configure Encryption - # To construct, see NOTES section for KEYVAULTPROPERTY properties and create a hash table. ${KeyVaultProperty}, [Parameter()] @@ -139,7 +138,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType] + [System.String] # Type of managed service identity. ${IdentityType}, @@ -171,7 +170,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess] + [System.String] # This determines if traffic is allowed over public network. # By default it is enabled. ${PublicNetworkAccess}, @@ -278,7 +277,7 @@ begin { SetExpanded = 'Az.EventHub.custom\Set-AzEventHubNamespace'; SetViaIdentityExpanded = 'Az.EventHub.custom\Set-AzEventHubNamespace'; } - if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/exports/Set-AzEventHubNetworkRuleSet.ps1 b/src/EventHub/EventHub.Autorest/exports/Set-AzEventHubNetworkRuleSet.ps1 index d6a4f0eaba59..8da61e619367 100644 --- a/src/EventHub/EventHub.Autorest/exports/Set-AzEventHubNetworkRuleSet.ps1 +++ b/src/EventHub/EventHub.Autorest/exports/Set-AzEventHubNetworkRuleSet.ps1 @@ -34,13 +34,13 @@ Set-AzEventHubNetworkRuleSet -ResourceGroupName myResourceGroup -NamespaceName m .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity parameter. +INPUTOBJECT : Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [Alias ]: The Disaster Recovery configuration name [ApplicationGroupName ]: The Application Group name [AuthorizationRuleName ]: The authorization rule name. @@ -56,7 +56,7 @@ INPUTOBJECT : Identity parameter. [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. IPRULE : List of IpRules - [Action ]: The IP Filter Action + [Action ]: The IP Filter Action [IPMask ]: IP Mask VIRTUALNETWORKRULE : List of VirtualNetwork Rules @@ -66,7 +66,7 @@ VIRTUALNETWORKRULE : List of VirtualNetwork Rul https://learn.microsoft.com/powershell/module/az.eventhub/set-azeventhubnetworkruleset #> function Set-AzEventHubNetworkRuleSet { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet])] [CmdletBinding(DefaultParameterSetName='SetExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='SetExpanded', Mandatory)] @@ -98,7 +98,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess] + [System.String] # This determines if traffic is allowed over public network. # By default it is enabled. # If value is SecuredByPerimeter then Inbound and Outbound communication is controlled by the network security perimeter and profile's access rules. @@ -112,22 +112,20 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.DefaultAction] + [System.String] # Default Action for Network Rule Set ${DefaultAction}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetIPRules[]] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetIPRules[]] # List of IpRules - # To construct, see NOTES section for IPRULE properties and create a hash table. ${IPRule}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetVirtualNetworkRules[]] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetVirtualNetworkRules[]] # List of VirtualNetwork Rules - # To construct, see NOTES section for VIRTUALNETWORKRULE properties and create a hash table. ${VirtualNetworkRule}, [Parameter()] @@ -219,7 +217,7 @@ begin { SetExpanded = 'Az.EventHub.custom\Set-AzEventHubNetworkRuleSet'; SetViaIdentityExpanded = 'Az.EventHub.custom\Set-AzEventHubNetworkRuleSet'; } - if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/exports/Test-AzEventHubName.ps1 b/src/EventHub/EventHub.Autorest/exports/Test-AzEventHubName.ps1 index 963ceac1e895..e55c0241f69a 100644 --- a/src/EventHub/EventHub.Autorest/exports/Test-AzEventHubName.ps1 +++ b/src/EventHub/EventHub.Autorest/exports/Test-AzEventHubName.ps1 @@ -25,12 +25,12 @@ Test-AzEventHubName -NamespaceName myNamespace Test-AzEventHubName -NamespaceName myNamespace -ResourceGroupName myResourceGroup -AliasName myAlias .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult .Link https://learn.microsoft.com/powershell/module/az.eventhub/test-azeventhubname #> function Test-AzEventHubName { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult])] [CmdletBinding(DefaultParameterSetName='NamespaceAvailability', PositionalBinding=$false)] param( [Parameter(Mandatory)] @@ -147,7 +147,7 @@ begin { NamespaceAvailability = 'Az.EventHub.custom\Test-AzEventHubName'; AliasAvailability = 'Az.EventHub.custom\Test-AzEventHubName'; } - if (('NamespaceAvailability', 'AliasAvailability') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('NamespaceAvailability', 'AliasAvailability') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/generate-help.ps1 b/src/EventHub/EventHub.Autorest/generate-help.ps1 index 88704f2b8e16..2022c9a5292c 100644 --- a/src/EventHub/EventHub.Autorest/generate-help.ps1 +++ b/src/EventHub/EventHub.Autorest/generate-help.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) +param([switch]$NotIsolated) $ErrorActionPreference = 'Stop' $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path -if(-not $Isolated) { +if(-not $NotIsolated) { Write-Host -ForegroundColor Green 'Creating isolated process...' - & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated + & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated return } diff --git a/src/EventHub/EventHub.Autorest/generate-portal-ux.ps1 b/src/EventHub/EventHub.Autorest/generate-portal-ux.ps1 index f33cc53d04c4..a202e62e5a56 100644 --- a/src/EventHub/EventHub.Autorest/generate-portal-ux.ps1 +++ b/src/EventHub/EventHub.Autorest/generate-portal-ux.ps1 @@ -15,13 +15,13 @@ # This Script will create a folder dedicated to Azure-specific content and includes metadata files essential for enhancing the user experience (UX) within the Azure portal. # These files are utilized by the Azure portal to effectively present the usage of cmdlets related to specific resources on portal pages. # ---------------------------------------------------------------------------------- -param([switch]$Isolated) +param([switch]$NotIsolated) $ErrorActionPreference = 'Stop' $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path -if(-not $Isolated) { +if(-not $NotIsolated) { Write-Host -ForegroundColor Green 'Creating isolated process...' - & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated + & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated return } @@ -42,8 +42,6 @@ $instance = [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module]::Instance $moduleInfo = Get-Module -Name $moduleName $parameterSetsInfo = Get-Module -Name "$moduleName.private" -$buildinFunctions = @("Export-CmdletSurface", "Export-ExampleStub", "Export-FormatPs1xml", "Export-HelpMarkdown", "Export-ModelSurface", "Export-ProxyCmdlet", "Export-Psd1", "Export-TestStub", "Get-CommonParameter", "Get-ModuleGuid", "Get-ScriptCmdlet") - function Test-FunctionSupported() { [CmdletBinding()] @@ -53,12 +51,12 @@ function Test-FunctionSupported() $FunctionName ) - If ($buildinfunctions.Contains($FunctionName)) { + If (-not $FunctionName.Contains("_")) { return $false } $cmdletName, $parameterSetName = $FunctionName.Split("_") - If ($parameterSetName.Contains("List") -or $parameterSetName.Contains("ViaIdentity")) { + If ($parameterSetName.Contains("List") -or $parameterSetName.Contains("ViaIdentity") -or $parameterSetName.Contains("ViaJson")) { return $false } If ($cmdletName.StartsWith("New") -or $cmdletName.StartsWith("Set") -or $cmdletName.StartsWith("Update")) { @@ -79,6 +77,7 @@ function Test-FunctionSupported() $customFiles = Get-ChildItem -Path custom -Filter "$cmdletName.*" if ($customFiles.Length -ne 0) { + Write-Host -ForegroundColor Yellow "There are come custom files for $cmdletName, skip generate UX data for it." return $false } @@ -93,7 +92,7 @@ function Get-MappedCmdletFromFunctionName() [string] $FunctionName ) - + $cmdletName, $parameterSetName = $FunctionName.Split("_") return $cmdletName @@ -137,7 +136,7 @@ function Get-CmdletDescription() $CmdletName ) $helpInfo = Get-Help $CmdletName -Full - + $description = $helpInfo.Description.Text if ($null -eq $description) { @@ -161,7 +160,7 @@ function Test-ParameterFromSwagger() { return $false } - + $valideCategory = @('Path') if ($valideCategory -contains $category) { @@ -310,7 +309,7 @@ function New-MetadataForCmdlet() return $result } -$parameterSets = $parameterSetsInfo.ExportedCmdlets.Keys | Where-Object { Test-functionSupported($_) } +$parameterSets = $parameterSetsInfo.ExportedCmdlets.Keys | Where-Object { Test-FunctionSupported($_) } $resourceTypes = @{} foreach ($parameterSetName in $parameterSets) { @@ -372,4 +371,4 @@ foreach ($resourceType in $resourceTypes.Keys) } $resourceTypeInfo.Remove("provider") $resourceTypeInfo | ConvertTo-Json -Depth 10 | Out-File "$providerFolder/$resourceTypeFileName.json" -} \ No newline at end of file +} diff --git a/src/EventHub/EventHub.Autorest/generated/Module.cs b/src/EventHub/EventHub.Autorest/generated/Module.cs index 82ebac6587ff..38a18c7cf3ad 100644 --- a/src/EventHub/EventHub.Autorest/generated/Module.cs +++ b/src/EventHub/EventHub.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.EventHub.Module _instance; + /// the ISendAsync pipeline instance private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline _pipeline; /// the ISendAsync pipeline instance (when proxy is enabled) private Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Module _instance; - /// the singleton of this module class - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module Instance => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module._instance?? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module._instance = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module()); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub"; @@ -125,9 +130,17 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline CreatePi /// 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/src/EventHub/EventHub.Autorest/generated/api/EventHub.cs b/src/EventHub/EventHub.Autorest/generated/api/EventHub.cs index b123a2a19ced..5fbdae4de09d 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/EventHub.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/EventHub.cs @@ -14,22 +14,23 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub public partial class EventHub { - /// Creates or updates an ApplicationGroup for a Namespace. + /// Update an ApplicationGroup for a Namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. /// Name of the resource group within the azure subscription. /// The Namespace name /// The Application Group name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. /// The ApplicationGroup. /// 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.EventHub.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 ApplicationGroupCreateOrUpdateApplicationGroup(string resourceGroupName, string namespaceName, string applicationGroupName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ApplicationGroupCreateOrUpdateApplicationGroup(string subscriptionId, string resourceGroupName, string namespaceName, string applicationGroupName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -58,15 +59,15 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ApplicationGroupCreateOrUpdateApplicationGroup_Call(request,onOk,onDefault,eventListener,sender); + await this.ApplicationGroupCreateOrUpdateApplicationGroup_Call (request, onOk,onDefault,eventListener,sender); } } - /// Creates or updates an ApplicationGroup for a Namespace. + /// Update an ApplicationGroup for a Namespace. /// /// The ApplicationGroup. /// a delegate that is called when the remote service returns 200 (OK). @@ -74,10 +75,11 @@ public partial class EventHub /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 ApplicationGroupCreateOrUpdateApplicationGroupViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ApplicationGroupCreateOrUpdateApplicationGroupViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -92,10 +94,70 @@ public partial class EventHub } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; var applicationGroupName = _match.Groups["applicationGroupName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/applicationGroups/" + + applicationGroupName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ApplicationGroupCreateOrUpdateApplicationGroup_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update an ApplicationGroup for a Namespace. + /// + /// The ApplicationGroup. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 ApplicationGroupCreateOrUpdateApplicationGroupViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/(?[^/]+)/applicationGroups/(?[^/]+)$", 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.EventHub/namespaces/{namespaceName}/applicationGroups/{applicationGroupName}'"); + } + + // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var applicationGroupName = _match.Groups["applicationGroupName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -110,6 +172,58 @@ public partial class EventHub + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ApplicationGroupCreateOrUpdateApplicationGroupWithResult_Call (request, eventListener,sender); + } + } + + /// Update an ApplicationGroup for a Namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Application Group name + /// Json string supplied to the ApplicationGroupCreateOrUpdateApplicationGroup 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.EventHub.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 ApplicationGroupCreateOrUpdateApplicationGroupViaJsonString(string subscriptionId, string resourceGroupName, string namespaceName, string applicationGroupName, 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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/applicationGroups/" + + global::System.Uri.EscapeDataString(applicationGroupName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } // generate request object @@ -119,16 +233,179 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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(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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ApplicationGroupCreateOrUpdateApplicationGroup_Call(request,onOk,onDefault,eventListener,sender); + await this.ApplicationGroupCreateOrUpdateApplicationGroup_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update an ApplicationGroup for a Namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Application Group name + /// Json string supplied to the ApplicationGroupCreateOrUpdateApplicationGroup operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 ApplicationGroupCreateOrUpdateApplicationGroupViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string applicationGroupName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/applicationGroups/" + + global::System.Uri.EscapeDataString(applicationGroupName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ApplicationGroupCreateOrUpdateApplicationGroupWithResult_Call (request, eventListener,sender); + } + } + + /// Update an ApplicationGroup for a Namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Application Group name + /// The ApplicationGroup. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 ApplicationGroupCreateOrUpdateApplicationGroupWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string applicationGroupName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/applicationGroups/" + + global::System.Uri.EscapeDataString(applicationGroupName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ApplicationGroupCreateOrUpdateApplicationGroupWithResult_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.EventHub.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 ApplicationGroupCreateOrUpdateApplicationGroupWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ApplicationGroup.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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.EventHub.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). @@ -139,7 +416,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ApplicationGroupCreateOrUpdateApplicationGroup_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ApplicationGroupCreateOrUpdateApplicationGroup_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -150,6 +427,7 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -157,13 +435,13 @@ public partial class EventHub case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ApplicationGroup.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ApplicationGroup.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -182,42 +460,42 @@ public partial class EventHub /// Validation method for method. Call this like the actual /// call, but you will get validation events back. /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. /// Name of the resource group within the azure subscription. /// The Namespace name /// The Application Group name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. /// The ApplicationGroup. /// 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 ApplicationGroupCreateOrUpdateApplicationGroup_Validate(string resourceGroupName, string namespaceName, string applicationGroupName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ApplicationGroupCreateOrUpdateApplicationGroup_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string applicationGroupName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertRegEx(nameof(namespaceName),namespaceName,@"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); + await eventListener.AssertRegEx(nameof(namespaceName), namespaceName, @"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); await eventListener.AssertNotNull(nameof(applicationGroupName),applicationGroupName); await eventListener.AssertMinimumLength(nameof(applicationGroupName),applicationGroupName,1); await eventListener.AssertMaximumLength(nameof(applicationGroupName),applicationGroupName,256); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(body), body); await eventListener.AssertObjectIsValid(nameof(body), body); } } /// Deletes an ApplicationGroup for a Namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. /// Name of the resource group within the azure subscription. /// The Namespace name /// The Application Group name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. /// 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 @@ -227,7 +505,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ApplicationGroupDelete(string resourceGroupName, string namespaceName, string applicationGroupName, string subscriptionId, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ApplicationGroupDelete(string subscriptionId, string resourceGroupName, string namespaceName, string applicationGroupName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -256,7 +534,7 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ApplicationGroupDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.ApplicationGroupDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); } } @@ -271,7 +549,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ApplicationGroupDeleteViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ApplicationGroupDeleteViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -286,10 +564,10 @@ public partial class EventHub } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; var applicationGroupName = _match.Groups["applicationGroupName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -313,11 +591,11 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ApplicationGroupDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.ApplicationGroupDelete_Call (request, onOk,onNoContent,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 204 (NoContent). @@ -328,7 +606,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ApplicationGroupDelete_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ApplicationGroupDelete_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -339,6 +617,7 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -358,7 +637,7 @@ public partial class EventHub default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -377,39 +656,39 @@ public partial class EventHub /// Validation method for method. Call this like the actual call, but you will get validation /// events back. /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. /// Name of the resource group within the azure subscription. /// The Namespace name /// The Application Group name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. /// 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 ApplicationGroupDelete_Validate(string resourceGroupName, string namespaceName, string applicationGroupName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ApplicationGroupDelete_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string applicationGroupName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertRegEx(nameof(namespaceName),namespaceName,@"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); + await eventListener.AssertRegEx(nameof(namespaceName), namespaceName, @"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); await eventListener.AssertNotNull(nameof(applicationGroupName),applicationGroupName); await eventListener.AssertMinimumLength(nameof(applicationGroupName),applicationGroupName,1); await eventListener.AssertMaximumLength(nameof(applicationGroupName),applicationGroupName,256); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); } } /// Gets an ApplicationGroup for a Namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. /// Name of the resource group within the azure subscription. /// The Namespace name /// The Application Group name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. /// 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). @@ -418,7 +697,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ApplicationGroupGet(string resourceGroupName, string namespaceName, string applicationGroupName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ApplicationGroupGet(string subscriptionId, string resourceGroupName, string namespaceName, string applicationGroupName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -447,7 +726,7 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ApplicationGroupGet_Call(request,onOk,onDefault,eventListener,sender); + await this.ApplicationGroupGet_Call (request, onOk,onDefault,eventListener,sender); } } @@ -461,7 +740,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ApplicationGroupGetViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ApplicationGroupGetViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -476,10 +755,10 @@ public partial class EventHub } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; var applicationGroupName = _match.Groups["applicationGroupName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -503,104 +782,77 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ApplicationGroupGet_Call(request,onOk,onDefault,eventListener,sender); + await this.ApplicationGroupGet_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). + /// Gets an ApplicationGroup for a Namespace. + /// /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 ApplicationGroupGet_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ApplicationGroupGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; + // verify that Identity format is an exact match for uri - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ApplicationGroup.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/applicationGroups/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/applicationGroups/{applicationGroupName}'"); } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var applicationGroupName = _match.Groups["applicationGroupName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/applicationGroups/" + + applicationGroupName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ApplicationGroupGetWithResult_Call (request, eventListener,sender); } } - /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. - /// - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// The Application Group name + /// Gets an ApplicationGroup for a Namespace. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// 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 ApplicationGroupGet_Validate(string resourceGroupName, string namespaceName, string applicationGroupName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); - await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); - await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertRegEx(nameof(namespaceName),namespaceName,@"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(applicationGroupName),applicationGroupName); - await eventListener.AssertMinimumLength(nameof(applicationGroupName),applicationGroupName,1); - await eventListener.AssertMaximumLength(nameof(applicationGroupName),applicationGroupName,256); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - } - } - - /// Gets a list of application groups for a Namespace. /// Name of the resource group within the azure subscription. /// The Namespace name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// 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 Application Group name /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 ApplicationGroupListByNamespace(string resourceGroupName, string namespaceName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ApplicationGroupGetWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string applicationGroupName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -614,79 +866,86 @@ public partial class EventHub + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.EventHub/namespaces/" + global::System.Uri.EscapeDataString(namespaceName) - + "/applicationGroups" + + "/applicationGroups/" + + global::System.Uri.EscapeDataString(applicationGroupName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.ApplicationGroupListByNamespace_Call(request,onOk,onDefault,eventListener,sender); + return await this.ApplicationGroupGetWithResult_Call (request, eventListener,sender); } } - /// Gets a list of application groups for a Namespace. - /// - /// 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). + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 ApplicationGroupListByNamespaceViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ApplicationGroupGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01-preview"; - // Constant Parameters using( NoSynchronizationContext ) { - // verify that Identity format is an exact match for uri + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/applicationGroups$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ApplicationGroup.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/applicationGroups'"); + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); } - - // replace URI parameters with values from identity - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var namespaceName = _match.Groups["namespaceName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.EventHub/namespaces/" - + namespaceName - + "/applicationGroups" - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.ApplicationGroupListByNamespace_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 @@ -696,7 +955,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ApplicationGroupListByNamespace_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ApplicationGroupGet_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -707,6 +966,7 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -714,13 +974,13 @@ public partial class EventHub case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ApplicationGroupListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ApplicationGroup.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -736,38 +996,41 @@ public partial class EventHub } /// - /// Validation method for method. Call this like the actual call, but you will - /// get validation events back. + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. /// - /// Name of the resource group within the azure subscription. - /// The Namespace name /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Application Group name /// 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 ApplicationGroupListByNamespace_Validate(string resourceGroupName, string namespaceName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ApplicationGroupGet_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string applicationGroupName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertRegEx(nameof(namespaceName),namespaceName,@"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(namespaceName), namespaceName, @"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); + await eventListener.AssertNotNull(nameof(applicationGroupName),applicationGroupName); + await eventListener.AssertMinimumLength(nameof(applicationGroupName),applicationGroupName,1); + await eventListener.AssertMaximumLength(nameof(applicationGroupName),applicationGroupName,256); } } - /// Creates or updates an instance of an Event Hubs Cluster. + /// Gets a list of application groups for a Namespace. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// Name of the resource group within the azure subscription. - /// The name of the Event Hubs Cluster. - /// Parameters for creating a eventhub cluster resource. + /// The Namespace name /// 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). @@ -776,7 +1039,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ClustersCreateOrUpdate(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ApplicationGroupListByNamespace(string subscriptionId, string resourceGroupName, string namespaceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -788,8 +1051,9 @@ public partial class EventHub + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.EventHub/clusters/" - + global::System.Uri.EscapeDataString(clusterName) + + "/providers/Microsoft.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/applicationGroups" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -798,22 +1062,17 @@ public partial class EventHub // 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.EventHub.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ClustersCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.ApplicationGroupListByNamespace_Call (request, onOk,onDefault,eventListener,sender); } } - /// Creates or updates an instance of an Event Hubs Cluster. + /// Gets a list of application groups for a Namespace. /// - /// Parameters for creating a eventhub cluster 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). @@ -822,7 +1081,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ClustersCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ApplicationGroupListByNamespaceViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -830,24 +1089,25 @@ public partial class EventHub { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/clusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/applicationGroups$", 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.EventHub/clusters/{clusterName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/applicationGroups'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var clusterName = _match.Groups["clusterName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.EventHub/clusters/" - + clusterName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/applicationGroups" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -856,139 +1116,194 @@ public partial class EventHub // 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.EventHub.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ClustersCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.ApplicationGroupListByNamespace_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). + /// Gets a list of application groups for a Namespace. + /// /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 ClustersCreateOrUpdate_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ApplicationGroupListByNamespaceViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { + var apiVersion = @"2023-01-01-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - global::System.Net.Http.HttpResponseMessage _response = null; - try + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/applicationGroups$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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: default - 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 ) - { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/applicationGroups'"); + } - // 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.EventHub.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/applicationGroups" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.URLCreated, pathAndQuery); 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"))) { - 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.EventHub.Runtime.Method.Get); + // 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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - // 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; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ApplicationGroupListByNamespaceWithResult_Call (request, eventListener,sender); + } + } - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } + /// Gets a list of application groups for a Namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 ApplicationGroupListByNamespaceWithResult(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/applicationGroups" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - // drop the old response - _response?.Dispose(); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Polling, _response); 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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); 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.EventHub.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.UndeclaredResponseException(_response); - } - } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ApplicationGroupListByNamespaceWithResult_Call (request, eventListener,sender); + } + } - // check for terminal status code - if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 ApplicationGroupListByNamespaceWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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: { - continue; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ApplicationGroupListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; } - // we are done polling, do a request on final target? - if (!string.IsNullOrWhiteSpace(_originalUri)) + default: { - // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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.EventHub.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.EventHub.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 ApplicationGroupListByNamespace_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -996,13 +1311,13 @@ public partial class EventHub case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.Cluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ApplicationGroupListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -1018,19 +1333,18 @@ public partial class EventHub } /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. /// /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// Name of the resource group within the azure subscription. - /// The name of the Event Hubs Cluster. - /// Parameters for creating a eventhub cluster resource. + /// The Namespace name /// 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 ClustersCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ApplicationGroupListByNamespace_Validate(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -1038,29 +1352,29 @@ public partial class EventHub await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(clusterName),clusterName); - await eventListener.AssertMinimumLength(nameof(clusterName),clusterName,6); - await eventListener.AssertMaximumLength(nameof(clusterName),clusterName,50); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); + await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); + await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); + await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); + await eventListener.AssertRegEx(nameof(namespaceName), namespaceName, @"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); } } - /// Deletes an existing Event Hubs Cluster. This operation is idempotent. + /// Update an instance of an Event Hubs Cluster. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// Name of the resource group within the azure subscription. /// The name of the Event Hubs Cluster. + /// Parameters for creating a eventhub cluster 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. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 ClustersDelete(string subscriptionId, string resourceGroupName, string clusterName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ClustersCreateOrUpdate(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -1082,27 +1396,32 @@ public partial class EventHub // 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.EventHub.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ClustersDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.ClustersCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// Deletes an existing Event Hubs Cluster. This operation is idempotent. + /// Update an instance of an Event Hubs Cluster. /// + /// Parameters for creating a eventhub cluster 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. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 ClustersDeleteViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ClustersCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -1136,157 +1455,498 @@ public partial class EventHub // 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.EventHub.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ClustersDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.ClustersCreateOrUpdate_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 204 (NoContent). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// Update an instance of an Event Hubs Cluster. + /// + /// Parameters for creating a eventhub cluster resource. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 ClustersDelete_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ClustersCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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: default - var _finalUri = _response.GetFirstHeader(@"Location"); - 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 ) - { + // verify that Identity format is an exact match for uri - // 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.EventHub.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/clusters/(?[^/]+)$", 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.EventHub/clusters/{clusterName}'"); + } - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var clusterName = _match.Groups["clusterName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/clusters/" + + clusterName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - // 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.EventHub.Runtime.Method.Get); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - // 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; + // 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.EventHub.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ClustersCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } - // drop the old response - _response?.Dispose(); + /// Update an instance of an Event Hubs Cluster. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The name of the Event Hubs Cluster. + /// Json string supplied to the ClustersCreateOrUpdate 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.EventHub.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 ClustersCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string clusterName, 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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/clusters/" + + global::System.Uri.EscapeDataString(clusterName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.URLCreated, pathAndQuery); 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.EventHub.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.UndeclaredResponseException(_response); - } - } + // 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.EventHub.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - // check for terminal status code + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ClustersCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update an instance of an Event Hubs Cluster. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The name of the Event Hubs Cluster. + /// Json string supplied to the ClustersCreateOrUpdate operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 ClustersCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string clusterName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/clusters/" + + global::System.Uri.EscapeDataString(clusterName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ClustersCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Update an instance of an Event Hubs Cluster. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The name of the Event Hubs Cluster. + /// Parameters for creating a eventhub cluster resource. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 ClustersCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/clusters/" + + global::System.Uri.EscapeDataString(clusterName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ClustersCreateOrUpdateWithResult_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.EventHub.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 ClustersCreateOrUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + 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 ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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"))) { + 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.EventHub.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.EventHub.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.EventHub.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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? - if (!string.IsNullOrWhiteSpace(_finalUri)) + if (!string.IsNullOrWhiteSpace(_originalUri)) { // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Get); + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } break; } } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Cluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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.EventHub.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.EventHub.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 ClustersCreateOrUpdate_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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: default + 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 ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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"); + } + 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.EventHub.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.EventHub.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.EventHub.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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? + if (!string.IsNullOrWhiteSpace(_originalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } break; } - case global::System.Net.HttpStatusCode.NoContent: + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Cluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -1302,18 +1962,19 @@ public partial class EventHub } /// - /// Validation method for method. Call this like the actual call, but you will get validation + /// Validation method for method. Call this like the actual call, but you will get validation /// events back. /// /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// Name of the resource group within the azure subscription. /// The name of the Event Hubs Cluster. + /// Parameters for creating a eventhub cluster resource. /// 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 ClustersDelete_Validate(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ClustersCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -1324,15 +1985,18 @@ public partial class EventHub await eventListener.AssertNotNull(nameof(clusterName),clusterName); await eventListener.AssertMinimumLength(nameof(clusterName),clusterName,6); await eventListener.AssertMaximumLength(nameof(clusterName),clusterName,50); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Gets the resource description of the specified Event Hubs Cluster. + /// Deletes an existing Event Hubs Cluster. This operation is idempotent. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// Name of the resource group within the azure subscription. /// The name of the Event Hubs Cluster. /// 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. @@ -1340,7 +2004,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ClustersGet(string subscriptionId, string resourceGroupName, string clusterName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ClustersDelete(string subscriptionId, string resourceGroupName, string clusterName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -1362,18 +2026,19 @@ public partial class EventHub // 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.EventHub.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Delete, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ClustersGet_Call(request,onOk,onDefault,eventListener,sender); + await this.ClustersDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); } } - /// Gets the resource description of the specified Event Hubs Cluster. + /// Deletes an existing Event Hubs Cluster. This operation is idempotent. /// /// 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. @@ -1381,7 +2046,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ClustersGetViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ClustersDeleteViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -1415,18 +2080,19 @@ public partial class EventHub // 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.EventHub.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Delete, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ClustersGet_Call(request,onOk,onDefault,eventListener,sender); + await this.ClustersDelete_Call (request, onOk,onNoContent,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 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. @@ -1434,7 +2100,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ClustersGet_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ClustersDelete_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1443,22 +2109,121 @@ public partial class EventHub { var sendTask = sender.SendAsync(request, eventListener); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; - - switch ( _response.StatusCode ) + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var _finalUri = _response.GetFirstHeader(@"Location"); + 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 ) { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.Cluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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"); + } + 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.EventHub.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.EventHub.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.EventHub.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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? + if (!string.IsNullOrWhiteSpace(_finalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -1474,8 +2239,8 @@ public partial class EventHub } /// - /// Validation method for method. Call this like the actual call, but you will get validation events - /// back. + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. /// /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. @@ -1485,7 +2250,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ClustersGet_Validate(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ClustersDelete_Validate(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -1499,11 +2264,11 @@ public partial class EventHub } } - /// - /// List the quantity of available pre-provisioned Event Hubs Clusters, indexed by Azure region. - /// + /// Gets the resource description of the specified Event Hubs Cluster. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The name of the Event Hubs Cluster. /// 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). @@ -1512,7 +2277,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ClustersListAvailableClusterRegion(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ClustersGet(string subscriptionId, string resourceGroupName, string clusterName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -1522,7 +2287,10 @@ public partial class EventHub var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) - + "/providers/Microsoft.EventHub/availableClusterRegions" + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.EventHub/clusters/" + + global::System.Uri.EscapeDataString(clusterName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1536,13 +2304,11 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ClustersListAvailableClusterRegion_Call(request,onOk,onDefault,eventListener,sender); + await this.ClustersGet_Call (request, onOk,onDefault,eventListener,sender); } } - /// - /// List the quantity of available pre-provisioned Event Hubs Clusters, indexed by Azure region. - /// + /// Gets the resource description of the specified Event Hubs Cluster. /// /// 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 @@ -1552,7 +2318,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ClustersListAvailableClusterRegionViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ClustersGetViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -1560,19 +2326,24 @@ public partial class EventHub { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.EventHub/availableClusterRegions$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/clusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.EventHub/availableClusterRegions'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var clusterName = _match.Groups["clusterName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId - + "/providers/Microsoft.EventHub/availableClusterRegions" + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/clusters/" + + clusterName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1586,11 +2357,164 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ClustersListAvailableClusterRegion_Call(request,onOk,onDefault,eventListener,sender); + await this.ClustersGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets the resource description of the specified Event Hubs Cluster. + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 ClustersGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/clusters/(?[^/]+)$", 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.EventHub/clusters/{clusterName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var clusterName = _match.Groups["clusterName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/clusters/" + + clusterName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ClustersGetWithResult_Call (request, eventListener,sender); + } + } + + /// Gets the resource description of the specified Event Hubs Cluster. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The name of the Event Hubs Cluster. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 ClustersGetWithResult(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/clusters/" + + global::System.Uri.EscapeDataString(clusterName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ClustersGetWithResult_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.EventHub.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 ClustersGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Cluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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.EventHub.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 @@ -1600,7 +2524,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ClustersListAvailableClusterRegion_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ClustersGet_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1611,6 +2535,7 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -1618,13 +2543,13 @@ public partial class EventHub case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.AvailableClustersList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Cluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -1640,27 +2565,36 @@ public partial class EventHub } /// - /// Validation method for method. Call this like the actual call, but you - /// will get validation events back. + /// Validation method for method. Call this like the actual call, but you will get validation events + /// back. /// /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The name of the Event Hubs Cluster. /// 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 ClustersListAvailableClusterRegion_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ClustersGet_Validate(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(clusterName),clusterName); + await eventListener.AssertMinimumLength(nameof(clusterName),clusterName,6); + await eventListener.AssertMaximumLength(nameof(clusterName),clusterName,50); } } - /// Lists the available Event Hubs Clusters within an ARM resource group + /// + /// List the quantity of available pre-provisioned Event Hubs Clusters, indexed by Azure region. + /// /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// Name of the resource group within the azure 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). @@ -1669,7 +2603,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ClustersListByResourceGroup(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ClustersListAvailableClusterRegion(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -1679,9 +2613,7 @@ public partial class EventHub var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.EventHub/clusters" + + "/providers/Microsoft.EventHub/availableClusterRegions" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1695,11 +2627,13 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ClustersListByResourceGroup_Call(request,onOk,onDefault,eventListener,sender); + await this.ClustersListAvailableClusterRegion_Call (request, onOk,onDefault,eventListener,sender); } } - /// Lists the available Event Hubs Clusters within an ARM resource group + /// + /// List the quantity of available pre-provisioned Event Hubs Clusters, indexed by Azure region. + /// /// /// 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 @@ -1709,7 +2643,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ClustersListByResourceGroupViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ClustersListAvailableClusterRegionViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -1717,22 +2651,19 @@ public partial class EventHub { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/clusters$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.EventHub/availableClusterRegions$", 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.EventHub/clusters'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.EventHub/availableClusterRegions'"); } // 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.EventHub/clusters" + + "/providers/Microsoft.EventHub/availableClusterRegions" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1746,93 +2677,70 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ClustersListByResourceGroup_Call(request,onOk,onDefault,eventListener,sender); + await this.ClustersListAvailableClusterRegion_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). + /// + /// List the quantity of available pre-provisioned Event Hubs Clusters, indexed by Azure region. + /// + /// /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 ClustersListByResourceGroup_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ClustersListAvailableClusterRegionViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; + // verify that Identity format is an exact match for uri - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ClusterListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.EventHub/availableClusterRegions$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.EventHub/availableClusterRegions'"); } + + // 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.EventHub/availableClusterRegions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ClustersListAvailableClusterRegionWithResult_Call (request, eventListener,sender); } } /// - /// Validation method for method. Call this like the actual call, but you will - /// get validation events back. + /// List the quantity of available pre-provisioned Event Hubs Clusters, indexed by Azure region. /// /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// Name of the resource group within the azure 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 ClustersListByResourceGroup_Validate(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - } - } - - /// Lists the available Event Hubs Clusters within an ARM resource group - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// 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.EventHub.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 ClustersListBySubscription(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ClustersListAvailableClusterRegionWithResult(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -1842,73 +2750,87 @@ public partial class EventHub var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) - + "/providers/Microsoft.EventHub/clusters" + + "/providers/Microsoft.EventHub/availableClusterRegions" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.ClustersListBySubscription_Call(request,onOk,onDefault,eventListener,sender); + return await this.ClustersListAvailableClusterRegionWithResult_Call (request, eventListener,sender); } } - /// Lists the available Event Hubs Clusters within an ARM 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). + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 ClustersListBySubscriptionViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ClustersListAvailableClusterRegionWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01-preview"; - // Constant Parameters using( NoSynchronizationContext ) { - // verify that Identity format is an exact match for uri + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.EventHub/clusters$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.AvailableClustersList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.EventHub/clusters'"); + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); } - - // 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.EventHub/clusters" - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.ClustersListBySubscription_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 @@ -1918,7 +2840,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ClustersListBySubscription_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ClustersListAvailableClusterRegion_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1929,6 +2851,7 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -1936,13 +2859,13 @@ public partial class EventHub case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ClusterListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.AvailableClustersList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -1958,8 +2881,8 @@ public partial class EventHub } /// - /// Validation method for method. Call this like the actual call, but you will get - /// validation events back. + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. /// /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. @@ -1967,7 +2890,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ClustersListBySubscription_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ClustersListAvailableClusterRegion_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -1975,11 +2898,10 @@ public partial class EventHub } } - /// List all Event Hubs Namespace IDs in an Event Hubs Dedicated Cluster. + /// Lists the available Event Hubs Clusters within an ARM resource group /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// Name of the resource group within the azure subscription. - /// The name of the Event Hubs Cluster. /// 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). @@ -1988,7 +2910,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ClustersListNamespaces(string subscriptionId, string resourceGroupName, string clusterName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ClustersListByResourceGroup(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -2000,9 +2922,7 @@ public partial class EventHub + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.EventHub/clusters/" - + global::System.Uri.EscapeDataString(clusterName) - + "/namespaces" + + "/providers/Microsoft.EventHub/clusters" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2016,11 +2936,11 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ClustersListNamespaces_Call(request,onOk,onDefault,eventListener,sender); + await this.ClustersListByResourceGroup_Call (request, onOk,onDefault,eventListener,sender); } } - /// List all Event Hubs Namespace IDs in an Event Hubs Dedicated Cluster. + /// Lists the available Event Hubs Clusters within an ARM 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 @@ -2030,7 +2950,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ClustersListNamespacesViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ClustersListByResourceGroupViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -2038,25 +2958,22 @@ public partial class EventHub { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/clusters/(?[^/]+)/namespaces$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/clusters$", 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.EventHub/clusters/{clusterName}/namespaces'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var clusterName = _match.Groups["clusterName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.EventHub/clusters/" - + clusterName - + "/namespaces" + + "/providers/Microsoft.EventHub/clusters" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2070,21 +2987,110 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ClustersListNamespaces_Call(request,onOk,onDefault,eventListener,sender); + await this.ClustersListByResourceGroup_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Lists the available Event Hubs Clusters within an ARM resource group + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 ClustersListByResourceGroupViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/clusters$", 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.EventHub/clusters'"); + } + + // 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.EventHub/clusters" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ClustersListByResourceGroupWithResult_Call (request, eventListener,sender); + } + } + + /// Lists the available Event Hubs Clusters within an ARM resource group + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 ClustersListByResourceGroupWithResult(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/clusters" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ClustersListByResourceGroupWithResult_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 default (any response code not handled - /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 ClustersListNamespaces_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ClustersListByResourceGroupWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2092,24 +3098,37 @@ public partial class EventHub try { var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.EhNamespaceIdListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ClusterListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; } default: { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } } } } @@ -2123,144 +3142,7 @@ public partial class EventHub } } - /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. - /// - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// Name of the resource group within the azure subscription. - /// The name of the Event Hubs Cluster. - /// 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 ClustersListNamespaces_Validate(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(clusterName),clusterName); - await eventListener.AssertMinimumLength(nameof(clusterName),clusterName,6); - await eventListener.AssertMaximumLength(nameof(clusterName),clusterName,50); - } - } - - /// - /// Modifies mutable properties on the Event Hubs Cluster. This operation is idempotent. - /// - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// Name of the resource group within the azure subscription. - /// The name of the Event Hubs Cluster. - /// The properties of the Event Hubs Cluster which should be updated. - /// 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.EventHub.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 ClustersUpdate(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) - { - var apiVersion = @"2023-01-01-preview"; - // 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.EventHub/clusters/" - + global::System.Uri.EscapeDataString(clusterName) - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Patch, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.ClustersUpdate_Call(request,onOk,onDefault,eventListener,sender); - } - } - - /// - /// Modifies mutable properties on the Event Hubs Cluster. This operation is idempotent. - /// - /// - /// The properties of the Event Hubs Cluster which should be updated. - /// 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.EventHub.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 ClustersUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) - { - var apiVersion = @"2023-01-01-preview"; - // 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.EventHub/clusters/(?[^/]+)$", 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.EventHub/clusters/{clusterName}'"); - } - - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var clusterName = _match.Groups["clusterName"].Value; - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.EventHub/clusters/" - + clusterName - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Patch, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.ClustersUpdate_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 @@ -2270,7 +3152,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ClustersUpdate_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ClustersListByResourceGroup_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2281,105 +3163,7 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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: default - 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.EventHub.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.EventHub.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.EventHub.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.EventHub.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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? - if (!string.IsNullOrWhiteSpace(_originalUri)) - { - // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; - } - } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -2387,13 +3171,13 @@ public partial class EventHub case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.Cluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ClusterListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -2409,19 +3193,17 @@ public partial class EventHub } /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. /// /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// Name of the resource group within the azure subscription. - /// The name of the Event Hubs Cluster. - /// The properties of the Event Hubs Cluster which should be updated. /// 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 ClustersUpdate_Validate(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ClustersListByResourceGroup_Validate(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -2429,24 +3211,12 @@ public partial class EventHub await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(clusterName),clusterName); - await eventListener.AssertMinimumLength(nameof(clusterName),clusterName,6); - await eventListener.AssertMaximumLength(nameof(clusterName),clusterName,50); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// - /// Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. - /// - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// The Event Hub name - /// The consumer group name + /// Lists the available Event Hubs Clusters within an ARM resource group /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// Parameters supplied to create or update a consumer group 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). @@ -2455,7 +3225,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ConsumerGroupsCreateOrUpdate(string resourceGroupName, string namespaceName, string eventHubName, string consumerGroupName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ClustersListBySubscription(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -2465,14 +3235,7 @@ public partial class EventHub var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.EventHub/namespaces/" - + global::System.Uri.EscapeDataString(namespaceName) - + "/eventhubs/" - + global::System.Uri.EscapeDataString(eventHubName) - + "/consumergroups/" - + global::System.Uri.EscapeDataString(consumerGroupName) + + "/providers/Microsoft.EventHub/clusters" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2481,24 +3244,17 @@ public partial class EventHub // 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.EventHub.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ConsumerGroupsCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.ClustersListBySubscription_Call (request, onOk,onDefault,eventListener,sender); } } - /// - /// Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. - /// + /// Lists the available Event Hubs Clusters within an ARM resource group /// - /// Parameters supplied to create or update a consumer group 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). @@ -2507,7 +3263,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ConsumerGroupsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ClustersListBySubscriptionViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -2515,30 +3271,19 @@ public partial class EventHub { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/eventhubs/(?[^/]+)/consumergroups/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.EventHub/clusters$", 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.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.EventHub/clusters'"); } // replace URI parameters with values from identity - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var namespaceName = _match.Groups["namespaceName"].Value; - var eventHubName = _match.Groups["eventHubName"].Value; - var consumerGroupName = _match.Groups["consumerGroupName"].Value; var subscriptionId = _match.Groups["subscriptionId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.EventHub/namespaces/" - + namespaceName - + "/eventhubs/" - + eventHubName - + "/consumergroups/" - + consumerGroupName + + "/providers/Microsoft.EventHub/clusters" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2547,123 +3292,71 @@ public partial class EventHub // 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.EventHub.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ConsumerGroupsCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.ClustersListBySubscription_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). + /// Lists the available Event Hubs Clusters within an ARM resource group + /// /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 ConsumerGroupsCreateOrUpdate_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ClustersListBySubscriptionViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { + var apiVersion = @"2023-01-01-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - global::System.Net.Http.HttpResponseMessage _response = null; - try + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.EventHub/clusters$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ConsumerGroup.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally - { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.EventHub/clusters'"); } - } - } - /// - /// Validation method for method. Call this like the actual call, but you will - /// get validation events back. - /// - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// The Event Hub name - /// The consumer group name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// Parameters supplied to create or update a consumer group resource. - /// 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 ConsumerGroupsCreateOrUpdate_Validate(string resourceGroupName, string namespaceName, string eventHubName, string consumerGroupName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); - await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); - await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertRegEx(nameof(namespaceName),namespaceName,@"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(eventHubName),eventHubName); - await eventListener.AssertMinimumLength(nameof(eventHubName),eventHubName,1); - await eventListener.AssertMaximumLength(nameof(eventHubName),eventHubName,256); - await eventListener.AssertNotNull(nameof(consumerGroupName),consumerGroupName); - await eventListener.AssertMinimumLength(nameof(consumerGroupName),consumerGroupName,1); - await eventListener.AssertMaximumLength(nameof(consumerGroupName),consumerGroupName,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); + // 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.EventHub/clusters" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ClustersListBySubscriptionWithResult_Call (request, eventListener,sender); } } - /// Deletes a consumer group from the specified Event Hub and resource group. - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// The Event Hub name - /// The consumer group name + /// Lists the available Event Hubs Clusters within an ARM resource group /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// 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.EventHub.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 ConsumerGroupsDelete(string resourceGroupName, string namespaceName, string eventHubName, string consumerGroupName, string subscriptionId, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ClustersListBySubscriptionWithResult(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -2673,95 +3366,89 @@ public partial class EventHub var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.EventHub/namespaces/" - + global::System.Uri.EscapeDataString(namespaceName) - + "/eventhubs/" - + global::System.Uri.EscapeDataString(eventHubName) - + "/consumergroups/" - + global::System.Uri.EscapeDataString(consumerGroupName) + + "/providers/Microsoft.EventHub/clusters" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Delete, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.ConsumerGroupsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + return await this.ClustersListBySubscriptionWithResult_Call (request, eventListener,sender); } } - /// Deletes a consumer group from the specified Event Hub and resource group. - /// - /// 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). + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 ConsumerGroupsDeleteViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ClustersListBySubscriptionWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01-preview"; - // Constant Parameters using( NoSynchronizationContext ) { - // verify that Identity format is an exact match for uri + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/eventhubs/(?[^/]+)/consumergroups/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ClusterListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}'"); + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); } - - // replace URI parameters with values from identity - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var namespaceName = _match.Groups["namespaceName"].Value; - var eventHubName = _match.Groups["eventHubName"].Value; - var consumerGroupName = _match.Groups["consumerGroupName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.EventHub/namespaces/" - + namespaceName - + "/eventhubs/" - + eventHubName - + "/consumergroups/" - + consumerGroupName - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Delete, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.ConsumerGroupsDelete_Call(request,onOk,onNoContent,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 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. @@ -2769,7 +3456,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ConsumerGroupsDelete_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ClustersListBySubscription_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2780,6 +3467,7 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -2787,19 +3475,13 @@ public partial class EventHub case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ClusterListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -2815,47 +3497,28 @@ public partial class EventHub } /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. /// - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// The Event Hub name - /// The consumer group name /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// 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 ConsumerGroupsDelete_Validate(string resourceGroupName, string namespaceName, string eventHubName, string consumerGroupName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ClustersListBySubscription_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); - await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); - await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertRegEx(nameof(namespaceName),namespaceName,@"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(eventHubName),eventHubName); - await eventListener.AssertMinimumLength(nameof(eventHubName),eventHubName,1); - await eventListener.AssertMaximumLength(nameof(eventHubName),eventHubName,256); - await eventListener.AssertNotNull(nameof(consumerGroupName),consumerGroupName); - await eventListener.AssertMinimumLength(nameof(consumerGroupName),consumerGroupName,1); - await eventListener.AssertMaximumLength(nameof(consumerGroupName),consumerGroupName,50); await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); } } - /// Gets a description for the specified consumer group. - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// The Event Hub name - /// The consumer group name + /// List all Event Hubs Namespace IDs in an Event Hubs Dedicated Cluster. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The name of the Event Hubs Cluster. /// 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). @@ -2864,7 +3527,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ConsumerGroupsGet(string resourceGroupName, string namespaceName, string eventHubName, string consumerGroupName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ClustersListNamespaces(string subscriptionId, string resourceGroupName, string clusterName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -2876,12 +3539,9 @@ public partial class EventHub + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.EventHub/namespaces/" - + global::System.Uri.EscapeDataString(namespaceName) - + "/eventhubs/" - + global::System.Uri.EscapeDataString(eventHubName) - + "/consumergroups/" - + global::System.Uri.EscapeDataString(consumerGroupName) + + "/providers/Microsoft.EventHub/clusters/" + + global::System.Uri.EscapeDataString(clusterName) + + "/namespaces" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2895,11 +3555,11 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ConsumerGroupsGet_Call(request,onOk,onDefault,eventListener,sender); + await this.ClustersListNamespaces_Call (request, onOk,onDefault,eventListener,sender); } } - /// Gets a description for the specified consumer group. + /// List all Event Hubs Namespace IDs in an Event Hubs Dedicated Cluster. /// /// 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 @@ -2909,7 +3569,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ConsumerGroupsGetViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ClustersListNamespacesViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -2917,30 +3577,25 @@ public partial class EventHub { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/eventhubs/(?[^/]+)/consumergroups/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/clusters/(?[^/]+)/namespaces$", 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.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}/namespaces'"); } // replace URI parameters with values from identity - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var namespaceName = _match.Groups["namespaceName"].Value; - var eventHubName = _match.Groups["eventHubName"].Value; - var consumerGroupName = _match.Groups["consumerGroupName"].Value; var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var clusterName = _match.Groups["clusterName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.EventHub/namespaces/" - + namespaceName - + "/eventhubs/" - + eventHubName - + "/consumergroups/" - + consumerGroupName + + "/providers/Microsoft.EventHub/clusters/" + + clusterName + + "/namespaces" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2954,115 +3609,74 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ConsumerGroupsGet_Call(request,onOk,onDefault,eventListener,sender); + await this.ClustersListNamespaces_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). + /// List all Event Hubs Namespace IDs in an Event Hubs Dedicated Cluster. + /// /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 ConsumerGroupsGet_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ClustersListNamespacesViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; + // verify that Identity format is an exact match for uri - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ConsumerGroup.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/clusters/(?[^/]+)/namespaces$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}/namespaces'"); } - } - } - /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. - /// - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// The Event Hub name - /// The consumer group name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// 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 ConsumerGroupsGet_Validate(string resourceGroupName, string namespaceName, string eventHubName, string consumerGroupName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); - await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); - await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertRegEx(nameof(namespaceName),namespaceName,@"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(eventHubName),eventHubName); - await eventListener.AssertMinimumLength(nameof(eventHubName),eventHubName,1); - await eventListener.AssertMaximumLength(nameof(eventHubName),eventHubName,256); - await eventListener.AssertNotNull(nameof(consumerGroupName),consumerGroupName); - await eventListener.AssertMinimumLength(nameof(consumerGroupName),consumerGroupName,1); - await eventListener.AssertMaximumLength(nameof(consumerGroupName),consumerGroupName,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var clusterName = _match.Groups["clusterName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/clusters/" + + clusterName + + "/namespaces" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ClustersListNamespacesWithResult_Call (request, eventListener,sender); } } - /// - /// Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the Namespace. - /// - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// The Event Hub name + /// List all Event Hubs Namespace IDs in an Event Hubs Dedicated Cluster. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// Skip is only used if a previous operation returned a partial result. If a previous response contains - /// a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to - /// use for subsequent calls. - /// May be used to limit the number of results to the most recent N usageDetails. - /// 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). + /// Name of the resource group within the azure subscription. + /// The name of the Event Hubs Cluster. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 ConsumerGroupsListByEventHub(string resourceGroupName, string namespaceName, string eventHubName, string subscriptionId, int? Skip, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ClustersListNamespacesWithResult(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -3074,100 +3688,87 @@ public partial class EventHub + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.EventHub/namespaces/" - + global::System.Uri.EscapeDataString(namespaceName) - + "/eventhubs/" - + global::System.Uri.EscapeDataString(eventHubName) - + "/consumergroups" + + "/providers/Microsoft.EventHub/clusters/" + + global::System.Uri.EscapeDataString(clusterName) + + "/namespaces" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) - + "&" - + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.ConsumerGroupsListByEventHub_Call(request,onOk,onDefault,eventListener,sender); + return await this.ClustersListNamespacesWithResult_Call (request, eventListener,sender); } } - /// - /// Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the Namespace. - /// - /// - /// Skip is only used if a previous operation returned a partial result. If a previous response contains - /// a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to - /// use for subsequent calls. - /// May be used to limit the number of results to the most recent N usageDetails. - /// 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). + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 ConsumerGroupsListByEventHubViaIdentity(global::System.String viaIdentity, int? Skip, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ClustersListNamespacesWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01-preview"; - // Constant Parameters using( NoSynchronizationContext ) { - // verify that Identity format is an exact match for uri + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/eventhubs/(?[^/]+)/consumergroups$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.EhNamespaceIdListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups'"); + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); } - - // replace URI parameters with values from identity - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var namespaceName = _match.Groups["namespaceName"].Value; - var eventHubName = _match.Groups["eventHubName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.EventHub/namespaces/" - + namespaceName - + "/eventhubs/" - + eventHubName - + "/consumergroups" - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) - + "&" - + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.ConsumerGroupsListByEventHub_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 @@ -3177,7 +3778,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ConsumerGroupsListByEventHub_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ClustersListNamespaces_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -3188,6 +3789,7 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -3195,13 +3797,13 @@ public partial class EventHub case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ConsumerGroupListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.EhNamespaceIdListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -3217,60 +3819,49 @@ public partial class EventHub } /// - /// Validation method for method. Call this like the actual call, but you will - /// get validation events back. + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. /// - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// The Event Hub name /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// Skip is only used if a previous operation returned a partial result. If a previous response contains - /// a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to - /// use for subsequent calls. - /// May be used to limit the number of results to the most recent N usageDetails. + /// Name of the resource group within the azure subscription. + /// The name of the Event Hubs Cluster. /// 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 ConsumerGroupsListByEventHub_Validate(string resourceGroupName, string namespaceName, string eventHubName, string subscriptionId, int? Skip, int? Top, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ClustersListNamespaces_Validate(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); - await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); - await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertRegEx(nameof(namespaceName),namespaceName,@"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(eventHubName),eventHubName); - await eventListener.AssertMinimumLength(nameof(eventHubName),eventHubName,1); - await eventListener.AssertMaximumLength(nameof(eventHubName),eventHubName,256); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertIsLessThanOrEqual(nameof(Skip),Skip,1000); - await eventListener.AssertIsGreaterThanOrEqual(nameof(Top),Top,1); - await eventListener.AssertIsLessThanOrEqual(nameof(Top),Top,1000); + await eventListener.AssertNotNull(nameof(clusterName),clusterName); + await eventListener.AssertMinimumLength(nameof(clusterName),clusterName,6); + await eventListener.AssertMaximumLength(nameof(clusterName),clusterName,50); } } /// - /// This operation disables the Disaster Recovery and stops replicating changes from primary to secondary namespaces + /// Modifies mutable properties on the Event Hubs Cluster. This operation is idempotent. /// - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// The Disaster Recovery configuration name /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The name of the Event Hubs Cluster. + /// The properties of the Event Hubs Cluster which should be updated. /// 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.EventHub.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 DisasterRecoveryConfigsBreakPairing(string resourceGroupName, string namespaceName, string alias, string subscriptionId, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ClustersUpdate(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -3282,11 +3873,8 @@ public partial class EventHub + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.EventHub/namespaces/" - + global::System.Uri.EscapeDataString(namespaceName) - + "/disasterRecoveryConfigs/" - + global::System.Uri.EscapeDataString(alias) - + "/breakPairing" + + "/providers/Microsoft.EventHub/clusters/" + + global::System.Uri.EscapeDataString(clusterName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3295,28 +3883,34 @@ public partial class EventHub // 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.EventHub.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Patch, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DisasterRecoveryConfigsBreakPairing_Call(request,onOk,onDefault,eventListener,sender); + await this.ClustersUpdate_Call (request, onOk,onDefault,eventListener,sender); } } /// - /// This operation disables the Disaster Recovery and stops replicating changes from primary to secondary namespaces + /// Modifies mutable properties on the Event Hubs Cluster. This operation is idempotent. /// /// + /// The properties of the Event Hubs Cluster which should be updated. /// 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.EventHub.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 DisasterRecoveryConfigsBreakPairingViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ClustersUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -3324,28 +3918,24 @@ public partial class EventHub { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/disasterRecoveryConfigs/(?[^/]+)/breakPairing$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/clusters/(?[^/]+)$", 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.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/breakPairing'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}'"); } // replace URI parameters with values from identity - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var namespaceName = _match.Groups["namespaceName"].Value; - var alias = _match.Groups["alias"].Value; var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var clusterName = _match.Groups["clusterName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.EventHub/namespaces/" - + namespaceName - + "/disasterRecoveryConfigs/" - + alias - + "/breakPairing" + + "/providers/Microsoft.EventHub/clusters/" + + clusterName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3354,101 +3944,86 @@ public partial class EventHub // 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.EventHub.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Patch, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DisasterRecoveryConfigsBreakPairing_Call(request,onOk,onDefault,eventListener,sender); + await this.ClustersUpdate_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). + /// + /// Modifies mutable properties on the Event Hubs Cluster. This operation is idempotent. + /// + /// + /// The properties of the Event Hubs Cluster which should be updated. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 DisasterRecoveryConfigsBreakPairing_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ClustersUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; + // verify that Identity format is an exact match for uri - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/clusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}'"); } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var clusterName = _match.Groups["clusterName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/clusters/" + + clusterName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ClustersUpdateWithResult_Call (request, eventListener,sender); } } /// - /// Validation method for method. Call this like the actual call, but you - /// will get validation events back. + /// Modifies mutable properties on the Event Hubs Cluster. This operation is idempotent. /// - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// The Disaster Recovery configuration name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// 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 DisasterRecoveryConfigsBreakPairing_Validate(string resourceGroupName, string namespaceName, string alias, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); - await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); - await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertRegEx(nameof(namespaceName),namespaceName,@"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(alias),alias); - await eventListener.AssertMinimumLength(nameof(alias),alias,1); - await eventListener.AssertMaximumLength(nameof(alias),alias,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - } - } - - /// Check the give Namespace name availability. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// Name of the resource group within the azure subscription. - /// The Namespace name - /// Parameters to check availability of the given Alias name + /// The name of the Event Hubs Cluster. + /// Json string supplied to the ClustersUpdate 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). @@ -3457,7 +4032,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsCheckNameAvailability(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityParameter body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ClustersUpdateViaJsonString(string subscriptionId, string resourceGroupName, string clusterName, 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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -3469,9 +4044,8 @@ public partial class EventHub + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.EventHub/namespaces/" - + global::System.Uri.EscapeDataString(namespaceName) - + "/disasterRecoveryConfigs/checkNameAvailability" + + "/providers/Microsoft.EventHub/clusters/" + + global::System.Uri.EscapeDataString(clusterName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3480,176 +4054,84 @@ public partial class EventHub // 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.EventHub.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Patch, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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(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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DisasterRecoveryConfigsCheckNameAvailability_Call(request,onOk,onDefault,eventListener,sender); + await this.ClustersUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// Check the give Namespace name availability. - /// - /// Parameters to check availability of the given Alias name - /// 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). + /// + /// Modifies mutable properties on the Event Hubs Cluster. This operation is idempotent. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The name of the Event Hubs Cluster. + /// Json string supplied to the ClustersUpdate operation /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 DisasterRecoveryConfigsCheckNameAvailabilityViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityParameter body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ClustersUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string clusterName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // 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.EventHub/namespaces/(?[^/]+)/disasterRecoveryConfigs/checkNameAvailability$", 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.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/checkNameAvailability'"); - } - - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var namespaceName = _match.Groups["namespaceName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + subscriptionId + + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.EventHub/namespaces/" - + namespaceName - + "/disasterRecoveryConfigs/checkNameAvailability" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.EventHub/clusters/" + + global::System.Uri.EscapeDataString(clusterName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Post, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.DisasterRecoveryConfigsCheckNameAvailability_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.EventHub.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 DisasterRecoveryConfigsCheckNameAvailability_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.CheckNameAvailabilityResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally - { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); - } + return await this.ClustersUpdateWithResult_Call (request, eventListener,sender); } } /// - /// Validation method for method. Call this like the actual call, - /// but you will get validation events back. + /// Modifies mutable properties on the Event Hubs Cluster. This operation is idempotent. /// /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// Name of the resource group within the azure subscription. - /// The Namespace name - /// Parameters to check availability of the given Alias name - /// 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 DisasterRecoveryConfigsCheckNameAvailability_Validate(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityParameter body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); - await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); - await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertRegEx(nameof(namespaceName),namespaceName,@"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); - } - } - - /// Creates or updates a new Alias(Disaster Recovery configuration) - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// The Disaster Recovery configuration name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// Parameters required to create an Alias(Disaster Recovery configuration) - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 201 (Created). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// The name of the Event Hubs Cluster. + /// The properties of the Event Hubs Cluster which should be updated. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 DisasterRecoveryConfigsCreateOrUpdate(string resourceGroupName, string namespaceName, string alias, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ClustersUpdateWithResult(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -3661,99 +4143,183 @@ public partial class EventHub + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.EventHub/namespaces/" - + global::System.Uri.EscapeDataString(namespaceName) - + "/disasterRecoveryConfigs/" - + global::System.Uri.EscapeDataString(alias) + + "/providers/Microsoft.EventHub/clusters/" + + global::System.Uri.EscapeDataString(clusterName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Put, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.DisasterRecoveryConfigsCreateOrUpdate_Call(request,onOk,onCreated,onDefault,eventListener,sender); + return await this.ClustersUpdateWithResult_Call (request, eventListener,sender); } } - /// Creates or updates a new Alias(Disaster Recovery configuration) - /// - /// Parameters required to create an Alias(Disaster Recovery configuration) - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 201 (Created). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 DisasterRecoveryConfigsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ClustersUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01-preview"; - // 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.EventHub/namespaces/(?[^/]+)/disasterRecoveryConfigs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) + global::System.Net.Http.HttpResponseMessage _response = null; + try { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}'"); - } + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + 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 ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - // replace URI parameters with values from identity - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var namespaceName = _match.Groups["namespaceName"].Value; - var alias = _match.Groups["alias"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.EventHub/namespaces/" - + namespaceName - + "/disasterRecoveryConfigs/" - + alias - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + // 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.EventHub.Runtime.Method.Get); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + // 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(); - // 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.EventHub.Runtime.Method.Put, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + // drop the old response + _response?.Dispose(); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.DisasterRecoveryConfigsCreateOrUpdate_Call(request,onOk,onCreated,onDefault,eventListener,sender); + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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? + if (!string.IsNullOrWhiteSpace(_originalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Cluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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.EventHub.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 201 (Created). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -3761,7 +4327,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DisasterRecoveryConfigsCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ClustersUpdate_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -3770,8 +4336,100 @@ public partial class EventHub { var sendTask = sender.SendAsync(request, eventListener); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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: default + 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 ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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"); + } + 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.EventHub.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.EventHub.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.EventHub.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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? + if (!string.IsNullOrWhiteSpace(_originalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -3779,19 +4437,13 @@ public partial class EventHub case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ArmDisasterRecovery.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - case global::System.Net.HttpStatusCode.Created: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ArmDisasterRecovery.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Cluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -3807,55 +4459,52 @@ public partial class EventHub } /// - /// Validation method for method. Call this like the actual call, but - /// you will get validation events back. + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. /// - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// The Disaster Recovery configuration name /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// Parameters required to create an Alias(Disaster Recovery configuration) + /// Name of the resource group within the azure subscription. + /// The name of the Event Hubs Cluster. + /// The properties of the Event Hubs Cluster which should be updated. /// 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 DisasterRecoveryConfigsCreateOrUpdate_Validate(string resourceGroupName, string namespaceName, string alias, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ClustersUpdate_Validate(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); - await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); - await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertRegEx(nameof(namespaceName),namespaceName,@"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(alias),alias); - await eventListener.AssertMinimumLength(nameof(alias),alias,1); - await eventListener.AssertMaximumLength(nameof(alias),alias,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(clusterName),clusterName); + await eventListener.AssertMinimumLength(nameof(clusterName),clusterName,6); + await eventListener.AssertMaximumLength(nameof(clusterName),clusterName,50); await eventListener.AssertNotNull(nameof(body), body); await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Deletes an Alias(Disaster Recovery configuration) - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// The Disaster Recovery configuration name + /// Update an Event Hubs consumer group as a nested resource within a Namespace. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Event Hub name + /// The consumer group name + /// Parameters supplied to create or update a consumer group 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. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 DisasterRecoveryConfigsDelete(string resourceGroupName, string namespaceName, string alias, string subscriptionId, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ConsumerGroupsCreateOrUpdate(string subscriptionId, string resourceGroupName, string namespaceName, string eventHubName, string consumerGroupName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -3869,8 +4518,10 @@ public partial class EventHub + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.EventHub/namespaces/" + global::System.Uri.EscapeDataString(namespaceName) - + "/disasterRecoveryConfigs/" - + global::System.Uri.EscapeDataString(alias) + + "/eventhubs/" + + global::System.Uri.EscapeDataString(eventHubName) + + "/consumergroups/" + + global::System.Uri.EscapeDataString(consumerGroupName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3879,27 +4530,32 @@ public partial class EventHub // 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.EventHub.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DisasterRecoveryConfigsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.ConsumerGroupsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// Deletes an Alias(Disaster Recovery configuration) + /// Update an Event Hubs consumer group as a nested resource within a Namespace. /// + /// Parameters supplied to create or update a consumer group 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. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 DisasterRecoveryConfigsDeleteViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ConsumerGroupsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -3907,17 +4563,18 @@ public partial class EventHub { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/disasterRecoveryConfigs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/eventhubs/(?[^/]+)/consumergroups/(?[^/]+)$", 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.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; - var alias = _match.Groups["alias"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; + var eventHubName = _match.Groups["eventHubName"].Value; + var consumerGroupName = _match.Groups["consumerGroupName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -3926,8 +4583,10 @@ public partial class EventHub + resourceGroupName + "/providers/Microsoft.EventHub/namespaces/" + namespaceName - + "/disasterRecoveryConfigs/" - + alias + + "/eventhubs/" + + eventHubName + + "/consumergroups/" + + consumerGroupName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3936,119 +4595,152 @@ public partial class EventHub // 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.EventHub.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DisasterRecoveryConfigsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.ConsumerGroupsCreateOrUpdate_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 204 (NoContent). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// Update an Event Hubs consumer group as a nested resource within a Namespace. + /// + /// Parameters supplied to create or update a consumer group resource. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 DisasterRecoveryConfigsDelete_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ConsumerGroupsCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) { + var apiVersion = @"2023-01-01-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - global::System.Net.Http.HttpResponseMessage _response = null; - try + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/eventhubs/(?[^/]+)/consumergroups/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}'"); + } - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally - { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 namespaceName = _match.Groups["namespaceName"].Value; + var eventHubName = _match.Groups["eventHubName"].Value; + var consumerGroupName = _match.Groups["consumerGroupName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/eventhubs/" + + eventHubName + + "/consumergroups/" + + consumerGroupName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ConsumerGroupsCreateOrUpdateWithResult_Call (request, eventListener,sender); } } - /// - /// Validation method for method. Call this like the actual call, but you will - /// get validation events back. - /// - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// The Disaster Recovery configuration name + /// Update an Event Hubs consumer group as a nested resource within a Namespace. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Event Hub name + /// The consumer group name + /// Json string supplied to the ConsumerGroupsCreateOrUpdate 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.EventHub.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 DisasterRecoveryConfigsDelete_Validate(string resourceGroupName, string namespaceName, string alias, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + public async global::System.Threading.Tasks.Task ConsumerGroupsCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string namespaceName, string eventHubName, string consumerGroupName, 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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { + var apiVersion = @"2023-01-01-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); - await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); - await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertRegEx(nameof(namespaceName),namespaceName,@"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(alias),alias); - await eventListener.AssertMinimumLength(nameof(alias),alias,1); - await eventListener.AssertMaximumLength(nameof(alias),alias,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/eventhubs/" + + global::System.Uri.EscapeDataString(eventHubName) + + "/consumergroups/" + + global::System.Uri.EscapeDataString(consumerGroupName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ConsumerGroupsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// - /// Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace - /// - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// The Disaster Recovery configuration name + /// Update an Event Hubs consumer group as a nested resource within a Namespace. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// 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). + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Event Hub name + /// The consumer group name + /// Json string supplied to the ConsumerGroupsCreateOrUpdate operation /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 DisasterRecoveryConfigsFailOver(string resourceGroupName, string namespaceName, string alias, string subscriptionId, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ConsumerGroupsCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string eventHubName, string consumerGroupName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -4062,86 +4754,148 @@ public partial class EventHub + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.EventHub/namespaces/" + global::System.Uri.EscapeDataString(namespaceName) - + "/disasterRecoveryConfigs/" - + global::System.Uri.EscapeDataString(alias) - + "/failover" + + "/eventhubs/" + + global::System.Uri.EscapeDataString(eventHubName) + + "/consumergroups/" + + global::System.Uri.EscapeDataString(consumerGroupName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Post, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.DisasterRecoveryConfigsFailOver_Call(request,onOk,onDefault,eventListener,sender); + return await this.ConsumerGroupsCreateOrUpdateWithResult_Call (request, eventListener,sender); } } - /// - /// Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace - /// - /// - /// 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 an Event Hubs consumer group as a nested resource within a Namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Event Hub name + /// The consumer group name + /// Parameters supplied to create or update a consumer group resource. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 DisasterRecoveryConfigsFailOverViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ConsumerGroupsCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string eventHubName, string consumerGroupName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2023-01-01-preview"; // 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.EventHub/namespaces/(?[^/]+)/disasterRecoveryConfigs/(?[^/]+)/failover$", 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.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/failover'"); - } - - // replace URI parameters with values from identity - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var namespaceName = _match.Groups["namespaceName"].Value; - var alias = _match.Groups["alias"].Value; - var subscriptionId = _match.Groups["subscriptionId"].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.EventHub/namespaces/" - + namespaceName - + "/disasterRecoveryConfigs/" - + alias - + "/failover" + + global::System.Uri.EscapeDataString(namespaceName) + + "/eventhubs/" + + global::System.Uri.EscapeDataString(eventHubName) + + "/consumergroups/" + + global::System.Uri.EscapeDataString(consumerGroupName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Post, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.DisasterRecoveryConfigsFailOver_Call(request,onOk,onDefault,eventListener,sender); + return await this.ConsumerGroupsCreateOrUpdateWithResult_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.EventHub.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 ConsumerGroupsCreateOrUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ConsumerGroup.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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.EventHub.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 @@ -4151,7 +4905,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DisasterRecoveryConfigsFailOver_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ConsumerGroupsCreateOrUpdate_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -4162,6 +4916,7 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -4169,13 +4924,13 @@ public partial class EventHub case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ConsumerGroup.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -4191,93 +4946,52 @@ public partial class EventHub } /// - /// Validation method for method. Call this like the actual call, but you will + /// Validation method for method. Call this like the actual call, but you will /// get validation events back. /// - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// The Disaster Recovery configuration name /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Event Hub name + /// The consumer group name + /// Parameters supplied to create or update a consumer group resource. /// 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 DisasterRecoveryConfigsFailOver_Validate(string resourceGroupName, string namespaceName, string alias, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ConsumerGroupsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string eventHubName, string consumerGroupName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertRegEx(nameof(namespaceName),namespaceName,@"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(alias),alias); - await eventListener.AssertMinimumLength(nameof(alias),alias,1); - await eventListener.AssertMaximumLength(nameof(alias),alias,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(namespaceName), namespaceName, @"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); + await eventListener.AssertNotNull(nameof(eventHubName),eventHubName); + await eventListener.AssertMinimumLength(nameof(eventHubName),eventHubName,1); + await eventListener.AssertMaximumLength(nameof(eventHubName),eventHubName,256); + await eventListener.AssertNotNull(nameof(consumerGroupName),consumerGroupName); + await eventListener.AssertMinimumLength(nameof(consumerGroupName),consumerGroupName,1); + await eventListener.AssertMaximumLength(nameof(consumerGroupName),consumerGroupName,50); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// - /// Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace - /// - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// The Disaster Recovery configuration name + /// Deletes a consumer group from the specified Event Hub and resource group. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// 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.EventHub.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 DisasterRecoveryConfigsGet(string resourceGroupName, string namespaceName, string alias, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) - { - var apiVersion = @"2023-01-01-preview"; - // 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.EventHub/namespaces/" - + global::System.Uri.EscapeDataString(namespaceName) - + "/disasterRecoveryConfigs/" - + global::System.Uri.EscapeDataString(alias) - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.DisasterRecoveryConfigsGet_Call(request,onOk,onDefault,eventListener,sender); - } - } - - /// Gets an AuthorizationRule for a Namespace by rule name. /// Name of the resource group within the azure subscription. /// The Namespace name - /// The Disaster Recovery configuration name - /// The authorization rule name. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. + /// The Event Hub name + /// The consumer group name /// 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. @@ -4285,7 +4999,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsGetAuthorizationRule(string resourceGroupName, string namespaceName, string alias, string authorizationRuleName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ConsumerGroupsDelete(string subscriptionId, string resourceGroupName, string namespaceName, string eventHubName, string consumerGroupName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -4299,10 +5013,10 @@ public partial class EventHub + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.EventHub/namespaces/" + global::System.Uri.EscapeDataString(namespaceName) - + "/disasterRecoveryConfigs/" - + global::System.Uri.EscapeDataString(alias) - + "/authorizationRules/" - + global::System.Uri.EscapeDataString(authorizationRuleName) + + "/eventhubs/" + + global::System.Uri.EscapeDataString(eventHubName) + + "/consumergroups/" + + global::System.Uri.EscapeDataString(consumerGroupName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4311,18 +5025,19 @@ public partial class EventHub // 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.EventHub.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Delete, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DisasterRecoveryConfigsGetAuthorizationRule_Call(request,onOk,onDefault,eventListener,sender); + await this.ConsumerGroupsDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); } } - /// Gets an AuthorizationRule for a Namespace by rule name. + /// Deletes a consumer group from the specified Event Hub and resource group. /// /// 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. @@ -4330,7 +5045,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsGetAuthorizationRuleViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ConsumerGroupsDeleteViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -4338,18 +5053,18 @@ public partial class EventHub { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/disasterRecoveryConfigs/(?[^/]+)/authorizationRules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/eventhubs/(?[^/]+)/consumergroups/(?[^/]+)$", 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.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules/{authorizationRuleName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; - var alias = _match.Groups["alias"].Value; - var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; + var eventHubName = _match.Groups["eventHubName"].Value; + var consumerGroupName = _match.Groups["consumerGroupName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -4358,10 +5073,10 @@ public partial class EventHub + resourceGroupName + "/providers/Microsoft.EventHub/namespaces/" + namespaceName - + "/disasterRecoveryConfigs/" - + alias - + "/authorizationRules/" - + authorizationRuleName + + "/eventhubs/" + + eventHubName + + "/consumergroups/" + + consumerGroupName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4370,20 +5085,19 @@ public partial class EventHub // 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.EventHub.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Delete, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DisasterRecoveryConfigsGetAuthorizationRule_Call(request,onOk,onDefault,eventListener,sender); + await this.ConsumerGroupsDelete_Call (request, onOk,onNoContent,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 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. @@ -4391,7 +5105,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DisasterRecoveryConfigsGetAuthorizationRule_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ConsumerGroupsDelete_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -4402,6 +5116,7 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -4409,13 +5124,19 @@ public partial class EventHub case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.AuthorizationRule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -4431,43 +5152,47 @@ public partial class EventHub } /// - /// Validation method for method. Call this like the actual call, - /// but you will get validation events back. + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. /// - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// The Disaster Recovery configuration name - /// The authorization rule name. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Event Hub name + /// The consumer group name /// 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 DisasterRecoveryConfigsGetAuthorizationRule_Validate(string resourceGroupName, string namespaceName, string alias, string authorizationRuleName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ConsumerGroupsDelete_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string eventHubName, string consumerGroupName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertRegEx(nameof(namespaceName),namespaceName,@"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(alias),alias); - await eventListener.AssertMinimumLength(nameof(alias),alias,1); - await eventListener.AssertMaximumLength(nameof(alias),alias,50); - await eventListener.AssertNotNull(nameof(authorizationRuleName),authorizationRuleName); - await eventListener.AssertMinimumLength(nameof(authorizationRuleName),authorizationRuleName,1); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(namespaceName), namespaceName, @"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); + await eventListener.AssertNotNull(nameof(eventHubName),eventHubName); + await eventListener.AssertMinimumLength(nameof(eventHubName),eventHubName,1); + await eventListener.AssertMaximumLength(nameof(eventHubName),eventHubName,256); + await eventListener.AssertNotNull(nameof(consumerGroupName),consumerGroupName); + await eventListener.AssertMinimumLength(nameof(consumerGroupName),consumerGroupName,1); + await eventListener.AssertMaximumLength(nameof(consumerGroupName),consumerGroupName,50); } } - /// - /// Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace - /// - /// + /// Gets a description for the specified consumer group. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Event Hub name + /// The consumer group name /// 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). @@ -4476,35 +5201,24 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsGetViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ConsumerGroupsGet(string subscriptionId, string resourceGroupName, string namespaceName, string eventHubName, string consumerGroupName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // 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.EventHub/namespaces/(?[^/]+)/disasterRecoveryConfigs/(?[^/]+)$", 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.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}'"); - } - - // replace URI parameters with values from identity - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var namespaceName = _match.Groups["namespaceName"].Value; - var alias = _match.Groups["alias"].Value; - var subscriptionId = _match.Groups["subscriptionId"].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.EventHub/namespaces/" - + namespaceName - + "/disasterRecoveryConfigs/" - + alias + + global::System.Uri.EscapeDataString(namespaceName) + + "/eventhubs/" + + global::System.Uri.EscapeDataString(eventHubName) + + "/consumergroups/" + + global::System.Uri.EscapeDataString(consumerGroupName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4518,12 +5232,12 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DisasterRecoveryConfigsGet_Call(request,onOk,onDefault,eventListener,sender); + await this.ConsumerGroupsGet_Call (request, onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. + /// Gets a description for the specified consumer 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). @@ -4532,104 +5246,38 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DisasterRecoveryConfigsGet_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ConsumerGroupsGetViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; + // verify that Identity format is an exact match for uri - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ArmDisasterRecovery.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/eventhubs/(?[^/]+)/consumergroups/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}'"); } - } - } - - /// - /// Validation method for method. Call this like the actual call, but you will get - /// validation events back. - /// - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// The Disaster Recovery configuration name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// 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 DisasterRecoveryConfigsGet_Validate(string resourceGroupName, string namespaceName, string alias, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); - await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); - await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertRegEx(nameof(namespaceName),namespaceName,@"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(alias),alias); - await eventListener.AssertMinimumLength(nameof(alias),alias,1); - await eventListener.AssertMaximumLength(nameof(alias),alias,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - } - } - /// Gets all Alias(Disaster Recovery configurations) - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// 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.EventHub.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 DisasterRecoveryConfigsList(string resourceGroupName, string namespaceName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) - { - var apiVersion = @"2023-01-01-preview"; - // Constant Parameters - using( NoSynchronizationContext ) - { + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var eventHubName = _match.Groups["eventHubName"].Value; + var consumerGroupName = _match.Groups["consumerGroupName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) + + subscriptionId + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) + + resourceGroupName + "/providers/Microsoft.EventHub/namespaces/" - + global::System.Uri.EscapeDataString(namespaceName) - + "/disasterRecoveryConfigs" + + namespaceName + + "/eventhubs/" + + eventHubName + + "/consumergroups/" + + consumerGroupName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4643,118 +5291,176 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DisasterRecoveryConfigsList_Call(request,onOk,onDefault,eventListener,sender); + await this.ConsumerGroupsGet_Call (request, onOk,onDefault,eventListener,sender); } } - /// Gets a list of authorization rules for a Namespace. - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// The Disaster Recovery configuration name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// 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). + /// Gets a description for the specified consumer group. + /// /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 DisasterRecoveryConfigsListAuthorizationRules(string resourceGroupName, string namespaceName, string alias, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ConsumerGroupsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // 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.EventHub/namespaces/(?[^/]+)/eventhubs/(?[^/]+)/consumergroups/(?[^/]+)$", 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.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var eventHubName = _match.Groups["eventHubName"].Value; + var consumerGroupName = _match.Groups["consumerGroupName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) + + subscriptionId + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) + + resourceGroupName + "/providers/Microsoft.EventHub/namespaces/" - + global::System.Uri.EscapeDataString(namespaceName) - + "/disasterRecoveryConfigs/" - + global::System.Uri.EscapeDataString(alias) - + "/authorizationRules" + + namespaceName + + "/eventhubs/" + + eventHubName + + "/consumergroups/" + + consumerGroupName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.DisasterRecoveryConfigsListAuthorizationRules_Call(request,onOk,onDefault,eventListener,sender); + return await this.ConsumerGroupsGetWithResult_Call (request, eventListener,sender); } } - /// Gets a list of authorization rules for a Namespace. - /// - /// 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). + /// Gets a description for the specified consumer group. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Event Hub name + /// The consumer group name /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 DisasterRecoveryConfigsListAuthorizationRulesViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ConsumerGroupsGetWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string eventHubName, string consumerGroupName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // 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.EventHub/namespaces/(?[^/]+)/disasterRecoveryConfigs/(?[^/]+)/authorizationRules$", 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.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules'"); - } - - // replace URI parameters with values from identity - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var namespaceName = _match.Groups["namespaceName"].Value; - var alias = _match.Groups["alias"].Value; - var subscriptionId = _match.Groups["subscriptionId"].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.EventHub/namespaces/" - + namespaceName - + "/disasterRecoveryConfigs/" - + alias - + "/authorizationRules" + + global::System.Uri.EscapeDataString(namespaceName) + + "/eventhubs/" + + global::System.Uri.EscapeDataString(eventHubName) + + "/consumergroups/" + + global::System.Uri.EscapeDataString(consumerGroupName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.DisasterRecoveryConfigsListAuthorizationRules_Call(request,onOk,onDefault,eventListener,sender); + return await this.ConsumerGroupsGetWithResult_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.EventHub.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 ConsumerGroupsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ConsumerGroup.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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.EventHub.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 @@ -4764,7 +5470,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DisasterRecoveryConfigsListAuthorizationRules_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ConsumerGroupsGet_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -4775,6 +5481,7 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -4782,13 +5489,13 @@ public partial class EventHub case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.AuthorizationRuleListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ConsumerGroup.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -4804,43 +5511,52 @@ public partial class EventHub } /// - /// Validation method for method. Call this like the actual call, - /// but you will get validation events back. + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. /// - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// The Disaster Recovery configuration name /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Event Hub name + /// The consumer group name /// 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 DisasterRecoveryConfigsListAuthorizationRules_Validate(string resourceGroupName, string namespaceName, string alias, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ConsumerGroupsGet_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string eventHubName, string consumerGroupName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertRegEx(nameof(namespaceName),namespaceName,@"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(alias),alias); - await eventListener.AssertMinimumLength(nameof(alias),alias,1); - await eventListener.AssertMaximumLength(nameof(alias),alias,50); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(namespaceName), namespaceName, @"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); + await eventListener.AssertNotNull(nameof(eventHubName),eventHubName); + await eventListener.AssertMinimumLength(nameof(eventHubName),eventHubName,1); + await eventListener.AssertMaximumLength(nameof(eventHubName),eventHubName,256); + await eventListener.AssertNotNull(nameof(consumerGroupName),consumerGroupName); + await eventListener.AssertMinimumLength(nameof(consumerGroupName),consumerGroupName,1); + await eventListener.AssertMaximumLength(nameof(consumerGroupName),consumerGroupName,50); } } - /// Gets the primary and secondary connection strings for the Namespace. - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// The Disaster Recovery configuration name - /// The authorization rule name. + /// + /// Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the Namespace. + /// /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Event Hub name + /// Skip is only used if a previous operation returned a partial result. If a previous response contains + /// a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to + /// use for subsequent calls. + /// May be used to limit the number of results to the most recent N usageDetails. /// 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). @@ -4849,7 +5565,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsListKeys(string resourceGroupName, string namespaceName, string alias, string authorizationRuleName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ConsumerGroupsListByEventHub(string subscriptionId, string resourceGroupName, string namespaceName, string eventHubName, int? Skip, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -4863,30 +5579,38 @@ public partial class EventHub + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.EventHub/namespaces/" + global::System.Uri.EscapeDataString(namespaceName) - + "/disasterRecoveryConfigs/" - + global::System.Uri.EscapeDataString(alias) - + "/authorizationRules/" - + global::System.Uri.EscapeDataString(authorizationRuleName) - + "/listKeys" + + "/eventhubs/" + + global::System.Uri.EscapeDataString(eventHubName) + + "/consumergroups" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DisasterRecoveryConfigsListKeys_Call(request,onOk,onDefault,eventListener,sender); + await this.ConsumerGroupsListByEventHub_Call (request, onOk,onDefault,eventListener,sender); } } - /// Gets the primary and secondary connection strings for the Namespace. + /// + /// Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the Namespace. + /// /// + /// Skip is only used if a previous operation returned a partial result. If a previous response contains + /// a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to + /// use for subsequent calls. + /// May be used to limit the number of results to the most recent N usageDetails. /// 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). @@ -4895,7 +5619,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsListKeysViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ConsumerGroupsListByEventHubViaIdentity(global::System.String viaIdentity, int? Skip, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -4903,18 +5627,17 @@ public partial class EventHub { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/disasterRecoveryConfigs/(?[^/]+)/authorizationRules/(?[^/]+)/listKeys$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/eventhubs/(?[^/]+)/consumergroups$", 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.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules/{authorizationRuleName}/listKeys'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; - var alias = _match.Groups["alias"].Value; - var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; + var eventHubName = _match.Groups["eventHubName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -4923,166 +5646,214 @@ public partial class EventHub + resourceGroupName + "/providers/Microsoft.EventHub/namespaces/" + namespaceName - + "/disasterRecoveryConfigs/" - + alias - + "/authorizationRules/" - + authorizationRuleName - + "/listKeys" + + "/eventhubs/" + + eventHubName + + "/consumergroups" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DisasterRecoveryConfigsListKeys_Call(request,onOk,onDefault,eventListener,sender); + await this.ConsumerGroupsListByEventHub_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). + /// + /// Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the Namespace. + /// + /// + /// Skip is only used if a previous operation returned a partial result. If a previous response contains + /// a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to + /// use for subsequent calls. + /// May be used to limit the number of results to the most recent N usageDetails. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 DisasterRecoveryConfigsListKeys_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ConsumerGroupsListByEventHubViaIdentityWithResult(global::System.String viaIdentity, int? Skip, int? Top, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; + // verify that Identity format is an exact match for uri - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.AccessKeys.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/eventhubs/(?[^/]+)/consumergroups$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups'"); } - } - } - /// - /// Validation method for method. Call this like the actual call, but you will - /// get validation events back. - /// - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// The Disaster Recovery configuration name - /// The authorization rule name. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// 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 DisasterRecoveryConfigsListKeys_Validate(string resourceGroupName, string namespaceName, string alias, string authorizationRuleName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); - await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); - await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertRegEx(nameof(namespaceName),namespaceName,@"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(alias),alias); - await eventListener.AssertMinimumLength(nameof(alias),alias,1); - await eventListener.AssertMaximumLength(nameof(alias),alias,50); - await eventListener.AssertNotNull(nameof(authorizationRuleName),authorizationRuleName); - await eventListener.AssertMinimumLength(nameof(authorizationRuleName),authorizationRuleName,1); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var eventHubName = _match.Groups["eventHubName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/eventhubs/" + + eventHubName + + "/consumergroups" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ConsumerGroupsListByEventHubWithResult_Call (request, eventListener,sender); } } - /// Gets all Alias(Disaster Recovery configurations) - /// - /// 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). + /// + /// Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the Namespace. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Event Hub name + /// Skip is only used if a previous operation returned a partial result. If a previous response contains + /// a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to + /// use for subsequent calls. + /// May be used to limit the number of results to the most recent N usageDetails. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 DisasterRecoveryConfigsListViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ConsumerGroupsListByEventHubWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string eventHubName, int? Skip, int? Top, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // 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.EventHub/namespaces/(?[^/]+)/disasterRecoveryConfigs$", 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.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs'"); - } - - // replace URI parameters with values from identity - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var namespaceName = _match.Groups["namespaceName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].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.EventHub/namespaces/" - + namespaceName - + "/disasterRecoveryConfigs" + + global::System.Uri.EscapeDataString(namespaceName) + + "/eventhubs/" + + global::System.Uri.EscapeDataString(eventHubName) + + "/consumergroups" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.DisasterRecoveryConfigsList_Call(request,onOk,onDefault,eventListener,sender); + return await this.ConsumerGroupsListByEventHubWithResult_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.EventHub.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 ConsumerGroupsListByEventHubWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ConsumerGroupListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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.EventHub.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 @@ -5092,7 +5863,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DisasterRecoveryConfigsList_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ConsumerGroupsListByEventHub_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -5103,6 +5874,7 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -5110,13 +5882,13 @@ public partial class EventHub case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ArmDisasterRecoveryListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ConsumerGroupListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -5132,39 +5904,51 @@ public partial class EventHub } /// - /// Validation method for method. Call this like the actual call, but you will + /// Validation method for method. Call this like the actual call, but you will /// get validation events back. /// - /// Name of the resource group within the azure subscription. - /// The Namespace name /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Event Hub name + /// Skip is only used if a previous operation returned a partial result. If a previous response contains + /// a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to + /// use for subsequent calls. + /// May be used to limit the number of results to the most recent N usageDetails. /// 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 DisasterRecoveryConfigsList_Validate(string resourceGroupName, string namespaceName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ConsumerGroupsListByEventHub_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string eventHubName, int? Skip, int? Top, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertRegEx(nameof(namespaceName),namespaceName,@"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(namespaceName), namespaceName, @"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); + await eventListener.AssertNotNull(nameof(eventHubName),eventHubName); + await eventListener.AssertMinimumLength(nameof(eventHubName),eventHubName,1); + await eventListener.AssertMaximumLength(nameof(eventHubName),eventHubName,256); + await eventListener.AssertIsLessThanOrEqual(nameof(Skip),Skip,1000); + await eventListener.AssertIsGreaterThanOrEqual(nameof(Top),Top,1); + await eventListener.AssertIsLessThanOrEqual(nameof(Top),Top,1000); } } - /// Creates or updates a new Event Hub as a nested resource within a Namespace. - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// The Event Hub name + /// + /// This operation disables the Disaster Recovery and stops replicating changes from primary to secondary namespaces + /// /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// Parameters supplied to create an Event Hub resource. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Disaster Recovery configuration name /// 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). @@ -5173,7 +5957,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EventHubsCreateOrUpdate(string resourceGroupName, string namespaceName, string eventHubName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsBreakPairing(string subscriptionId, string resourceGroupName, string namespaceName, string alias, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -5187,8 +5971,9 @@ public partial class EventHub + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.EventHub/namespaces/" + global::System.Uri.EscapeDataString(namespaceName) - + "/eventhubs/" - + global::System.Uri.EscapeDataString(eventHubName) + + "/disasterRecoveryConfigs/" + + global::System.Uri.EscapeDataString(alias) + + "/breakPairing" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -5197,30 +5982,19 @@ public partial class EventHub // 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.EventHub.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.EventHubsCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.DisasterRecoveryConfigsBreakPairing_Call (request, onOk,onDefault,eventListener,sender); } } /// - /// Creates or updates an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule will take - /// a few seconds to take effect. + /// This operation disables the Disaster Recovery and stops replicating changes from primary to secondary namespaces /// - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// The Event Hub name - /// The authorization rule name. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The shared access AuthorizationRule. + /// /// 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). @@ -5229,24 +6003,36 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EventHubsCreateOrUpdateAuthorizationRule(string resourceGroupName, string namespaceName, string eventHubName, string authorizationRuleName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DisasterRecoveryConfigsBreakPairingViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // 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.EventHub/namespaces/(?[^/]+)/disasterRecoveryConfigs/(?[^/]+)$", 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.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var alias = _match.Groups["alias"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) + + subscriptionId + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) + + resourceGroupName + "/providers/Microsoft.EventHub/namespaces/" - + global::System.Uri.EscapeDataString(namespaceName) - + "/eventhubs/" - + global::System.Uri.EscapeDataString(eventHubName) - + "/authorizationRules/" - + global::System.Uri.EscapeDataString(authorizationRuleName) + + namespaceName + + "/disasterRecoveryConfigs/" + + alias + + "/breakPairing" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -5255,25 +6041,19 @@ public partial class EventHub // 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.EventHub.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.EventHubsCreateOrUpdateAuthorizationRule_Call(request,onOk,onDefault,eventListener,sender); + await this.DisasterRecoveryConfigsBreakPairing_Call (request, onOk,onDefault,eventListener,sender); } } /// - /// Creates or updates an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule will take - /// a few seconds to take effect. + /// Actual wire call for method. /// - /// - /// The shared access AuthorizationRule. + /// 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). @@ -5282,26 +6062,158 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EventHubsCreateOrUpdateAuthorizationRuleViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DisasterRecoveryConfigsBreakPairing_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01-preview"; - // Constant Parameters using( NoSynchronizationContext ) { - // verify that Identity format is an exact match for uri + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/eventhubs/(?[^/]+)/authorizationRules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}'"); + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); } + } + } - // replace URI parameters with values from identity - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var namespaceName = _match.Groups["namespaceName"].Value; - var eventHubName = _match.Groups["eventHubName"].Value; - var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; + /// + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Disaster Recovery configuration name + /// 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 DisasterRecoveryConfigsBreakPairing_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string alias, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); + await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); + await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); + await eventListener.AssertRegEx(nameof(namespaceName), namespaceName, @"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); + await eventListener.AssertNotNull(nameof(alias),alias); + await eventListener.AssertMinimumLength(nameof(alias),alias,1); + await eventListener.AssertMaximumLength(nameof(alias),alias,50); + } + } + + /// Check the give Namespace name availability. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// Parameters to check availability of the given Alias name + /// 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.EventHub.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 DisasterRecoveryConfigsCheckNameAvailability(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityParameter body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/disasterRecoveryConfigs/checkNameAvailability" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DisasterRecoveryConfigsCheckNameAvailability_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Check the give Namespace name availability. + /// + /// Parameters to check availability of the given Alias name + /// 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.EventHub.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 DisasterRecoveryConfigsCheckNameAvailabilityViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityParameter body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/(?[^/]+)/disasterRecoveryConfigs$", 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.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs'"); + } + + // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -5310,10 +6222,7 @@ public partial class EventHub + resourceGroupName + "/providers/Microsoft.EventHub/namespaces/" + namespaceName - + "/eventhubs/" - + eventHubName - + "/authorizationRules/" - + authorizationRuleName + + "/disasterRecoveryConfigs/checkNameAvailability" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -5322,42 +6231,8605 @@ public partial class EventHub // 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.EventHub.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DisasterRecoveryConfigsCheckNameAvailability_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Check the give Namespace name availability. + /// + /// Parameters to check availability of the given Alias name + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 DisasterRecoveryConfigsCheckNameAvailabilityViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityParameter body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/(?[^/]+)/disasterRecoveryConfigs$", 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.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/disasterRecoveryConfigs/checkNameAvailability" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DisasterRecoveryConfigsCheckNameAvailabilityWithResult_Call (request, eventListener,sender); + } + } + + /// Check the give Namespace name availability. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// Json string supplied to the DisasterRecoveryConfigsCheckNameAvailability 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.EventHub.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 DisasterRecoveryConfigsCheckNameAvailabilityViaJsonString(string subscriptionId, string resourceGroupName, string namespaceName, 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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/disasterRecoveryConfigs/checkNameAvailability" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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(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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.EventHubsCreateOrUpdateAuthorizationRule_Call(request,onOk,onDefault,eventListener,sender); + await this.DisasterRecoveryConfigsCheckNameAvailability_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Check the give Namespace name availability. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// Json string supplied to the DisasterRecoveryConfigsCheckNameAvailability operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 DisasterRecoveryConfigsCheckNameAvailabilityViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string namespaceName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/disasterRecoveryConfigs/checkNameAvailability" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DisasterRecoveryConfigsCheckNameAvailabilityWithResult_Call (request, 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.EventHub.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 EventHubsCreateOrUpdateAuthorizationRule_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + /// Check the give Namespace name availability. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// Parameters to check availability of the given Alias name + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 DisasterRecoveryConfigsCheckNameAvailabilityWithResult(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityParameter body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/disasterRecoveryConfigs/checkNameAvailability" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DisasterRecoveryConfigsCheckNameAvailabilityWithResult_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.EventHub.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 DisasterRecoveryConfigsCheckNameAvailabilityWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.CheckNameAvailabilityResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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.EventHub.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.EventHub.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 DisasterRecoveryConfigsCheckNameAvailability_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.CheckNameAvailabilityResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// Parameters to check availability of the given Alias name + /// 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 DisasterRecoveryConfigsCheckNameAvailability_Validate(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityParameter body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); + await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); + await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); + await eventListener.AssertRegEx(nameof(namespaceName), namespaceName, @"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Update a new Alias(Disaster Recovery configuration) + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Disaster Recovery configuration name + /// Parameters required to create an Alias(Disaster Recovery configuration) + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). + /// 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.EventHub.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 DisasterRecoveryConfigsCreateOrUpdate(string subscriptionId, string resourceGroupName, string namespaceName, string alias, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/disasterRecoveryConfigs/" + + global::System.Uri.EscapeDataString(alias) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DisasterRecoveryConfigsCreateOrUpdate_Call (request, onOk,onCreated,onDefault,eventListener,sender); + } + } + + /// Update a new Alias(Disaster Recovery configuration) + /// + /// Parameters required to create an Alias(Disaster Recovery configuration) + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). + /// 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.EventHub.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 DisasterRecoveryConfigsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/(?[^/]+)/disasterRecoveryConfigs/(?[^/]+)$", 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.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var alias = _match.Groups["alias"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/disasterRecoveryConfigs/" + + alias + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DisasterRecoveryConfigsCreateOrUpdate_Call (request, onOk,onCreated,onDefault,eventListener,sender); + } + } + + /// Update a new Alias(Disaster Recovery configuration) + /// + /// Parameters required to create an Alias(Disaster Recovery configuration) + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 DisasterRecoveryConfigsCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/(?[^/]+)/disasterRecoveryConfigs/(?[^/]+)$", 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.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var alias = _match.Groups["alias"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/disasterRecoveryConfigs/" + + alias + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DisasterRecoveryConfigsCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Update a new Alias(Disaster Recovery configuration) + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Disaster Recovery configuration name + /// Json string supplied to the DisasterRecoveryConfigsCreateOrUpdate operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). + /// 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.EventHub.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 DisasterRecoveryConfigsCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string namespaceName, string alias, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/disasterRecoveryConfigs/" + + global::System.Uri.EscapeDataString(alias) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DisasterRecoveryConfigsCreateOrUpdate_Call (request, onOk,onCreated,onDefault,eventListener,sender); + } + } + + /// Update a new Alias(Disaster Recovery configuration) + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Disaster Recovery configuration name + /// Json string supplied to the DisasterRecoveryConfigsCreateOrUpdate operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 DisasterRecoveryConfigsCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string alias, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/disasterRecoveryConfigs/" + + global::System.Uri.EscapeDataString(alias) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DisasterRecoveryConfigsCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Update a new Alias(Disaster Recovery configuration) + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Disaster Recovery configuration name + /// Parameters required to create an Alias(Disaster Recovery configuration) + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 DisasterRecoveryConfigsCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string alias, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/disasterRecoveryConfigs/" + + global::System.Uri.EscapeDataString(alias) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DisasterRecoveryConfigsCreateOrUpdateWithResult_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.EventHub.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 DisasterRecoveryConfigsCreateOrUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ArmDisasterRecovery.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + case global::System.Net.HttpStatusCode.Created: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ArmDisasterRecovery.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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.EventHub.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 201 (Created). + /// 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.EventHub.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 DisasterRecoveryConfigsCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ArmDisasterRecovery.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + case global::System.Net.HttpStatusCode.Created: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ArmDisasterRecovery.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Disaster Recovery configuration name + /// Parameters required to create an Alias(Disaster Recovery configuration) + /// 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 DisasterRecoveryConfigsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string alias, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); + await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); + await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); + await eventListener.AssertRegEx(nameof(namespaceName), namespaceName, @"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); + await eventListener.AssertNotNull(nameof(alias),alias); + await eventListener.AssertMinimumLength(nameof(alias),alias,1); + await eventListener.AssertMaximumLength(nameof(alias),alias,50); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Deletes an Alias(Disaster Recovery configuration) + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Disaster Recovery configuration name + /// 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.EventHub.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 DisasterRecoveryConfigsDelete(string subscriptionId, string resourceGroupName, string namespaceName, string alias, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/disasterRecoveryConfigs/" + + global::System.Uri.EscapeDataString(alias) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DisasterRecoveryConfigsDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Deletes an Alias(Disaster Recovery configuration) + /// + /// 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.EventHub.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 DisasterRecoveryConfigsDeleteViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/(?[^/]+)/disasterRecoveryConfigs/(?[^/]+)$", 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.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var alias = _match.Groups["alias"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/disasterRecoveryConfigs/" + + alias + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DisasterRecoveryConfigsDelete_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.EventHub.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 DisasterRecoveryConfigsDelete_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Disaster Recovery configuration name + /// 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 DisasterRecoveryConfigsDelete_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string alias, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); + await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); + await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); + await eventListener.AssertRegEx(nameof(namespaceName), namespaceName, @"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); + await eventListener.AssertNotNull(nameof(alias),alias); + await eventListener.AssertMinimumLength(nameof(alias),alias,1); + await eventListener.AssertMaximumLength(nameof(alias),alias,50); + } + } + + /// + /// Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Disaster Recovery configuration name + /// 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.EventHub.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 DisasterRecoveryConfigsFailOver(string subscriptionId, string resourceGroupName, string namespaceName, string alias, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/disasterRecoveryConfigs/" + + global::System.Uri.EscapeDataString(alias) + + "/failover" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DisasterRecoveryConfigsFailOver_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace + /// + /// + /// 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.EventHub.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 DisasterRecoveryConfigsFailOverViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/(?[^/]+)/disasterRecoveryConfigs/(?[^/]+)$", 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.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var alias = _match.Groups["alias"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/disasterRecoveryConfigs/" + + alias + + "/failover" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DisasterRecoveryConfigsFailOver_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.EventHub.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 DisasterRecoveryConfigsFailOver_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Disaster Recovery configuration name + /// 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 DisasterRecoveryConfigsFailOver_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string alias, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); + await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); + await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); + await eventListener.AssertRegEx(nameof(namespaceName), namespaceName, @"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); + await eventListener.AssertNotNull(nameof(alias),alias); + await eventListener.AssertMinimumLength(nameof(alias),alias,1); + await eventListener.AssertMaximumLength(nameof(alias),alias,50); + } + } + + /// + /// Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Disaster Recovery configuration name + /// 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.EventHub.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 DisasterRecoveryConfigsGet(string subscriptionId, string resourceGroupName, string namespaceName, string alias, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/disasterRecoveryConfigs/" + + global::System.Uri.EscapeDataString(alias) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DisasterRecoveryConfigsGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets an AuthorizationRule for a Namespace by rule name. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Disaster Recovery configuration name + /// The authorization rule name. + /// 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.EventHub.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 DisasterRecoveryConfigsGetAuthorizationRule(string subscriptionId, string resourceGroupName, string namespaceName, string alias, string authorizationRuleName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/disasterRecoveryConfigs/" + + global::System.Uri.EscapeDataString(alias) + + "/authorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DisasterRecoveryConfigsGetAuthorizationRule_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets an AuthorizationRule for a Namespace by rule name. + /// + /// 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.EventHub.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 DisasterRecoveryConfigsGetAuthorizationRuleViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/(?[^/]+)/disasterRecoveryConfigs/(?[^/]+)/authorizationRules/(?[^/]+)$", 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.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules/{authorizationRuleName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var alias = _match.Groups["alias"].Value; + var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/disasterRecoveryConfigs/" + + alias + + "/authorizationRules/" + + authorizationRuleName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DisasterRecoveryConfigsGetAuthorizationRule_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets an AuthorizationRule for a Namespace by rule name. + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 DisasterRecoveryConfigsGetAuthorizationRuleViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/(?[^/]+)/disasterRecoveryConfigs/(?[^/]+)/authorizationRules/(?[^/]+)$", 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.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules/{authorizationRuleName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var alias = _match.Groups["alias"].Value; + var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/disasterRecoveryConfigs/" + + alias + + "/authorizationRules/" + + authorizationRuleName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DisasterRecoveryConfigsGetAuthorizationRuleWithResult_Call (request, eventListener,sender); + } + } + + /// Gets an AuthorizationRule for a Namespace by rule name. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Disaster Recovery configuration name + /// The authorization rule name. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 DisasterRecoveryConfigsGetAuthorizationRuleWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string alias, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/disasterRecoveryConfigs/" + + global::System.Uri.EscapeDataString(alias) + + "/authorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DisasterRecoveryConfigsGetAuthorizationRuleWithResult_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.EventHub.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 DisasterRecoveryConfigsGetAuthorizationRuleWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.AuthorizationRule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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.EventHub.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.EventHub.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 DisasterRecoveryConfigsGetAuthorizationRule_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.AuthorizationRule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Disaster Recovery configuration name + /// The authorization rule name. + /// 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 DisasterRecoveryConfigsGetAuthorizationRule_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string alias, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); + await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); + await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); + await eventListener.AssertRegEx(nameof(namespaceName), namespaceName, @"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); + await eventListener.AssertNotNull(nameof(alias),alias); + await eventListener.AssertMinimumLength(nameof(alias),alias,1); + await eventListener.AssertMaximumLength(nameof(alias),alias,50); + await eventListener.AssertNotNull(nameof(authorizationRuleName),authorizationRuleName); + await eventListener.AssertMinimumLength(nameof(authorizationRuleName),authorizationRuleName,1); + } + } + + /// + /// Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace + /// + /// + /// 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.EventHub.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 DisasterRecoveryConfigsGetViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/(?[^/]+)/disasterRecoveryConfigs/(?[^/]+)$", 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.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var alias = _match.Groups["alias"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/disasterRecoveryConfigs/" + + alias + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DisasterRecoveryConfigsGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace + /// + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 DisasterRecoveryConfigsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/(?[^/]+)/disasterRecoveryConfigs/(?[^/]+)$", 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.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var alias = _match.Groups["alias"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/disasterRecoveryConfigs/" + + alias + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DisasterRecoveryConfigsGetWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Disaster Recovery configuration name + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 DisasterRecoveryConfigsGetWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string alias, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/disasterRecoveryConfigs/" + + global::System.Uri.EscapeDataString(alias) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DisasterRecoveryConfigsGetWithResult_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.EventHub.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 DisasterRecoveryConfigsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ArmDisasterRecovery.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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.EventHub.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.EventHub.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 DisasterRecoveryConfigsGet_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ArmDisasterRecovery.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Disaster Recovery configuration name + /// 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 DisasterRecoveryConfigsGet_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string alias, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); + await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); + await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); + await eventListener.AssertRegEx(nameof(namespaceName), namespaceName, @"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); + await eventListener.AssertNotNull(nameof(alias),alias); + await eventListener.AssertMinimumLength(nameof(alias),alias,1); + await eventListener.AssertMaximumLength(nameof(alias),alias,50); + } + } + + /// Gets all Alias(Disaster Recovery configurations) + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// 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.EventHub.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 DisasterRecoveryConfigsList(string subscriptionId, string resourceGroupName, string namespaceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/disasterRecoveryConfigs" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DisasterRecoveryConfigsList_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets a list of authorization rules for a Namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Disaster Recovery configuration name + /// 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.EventHub.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 DisasterRecoveryConfigsListAuthorizationRules(string subscriptionId, string resourceGroupName, string namespaceName, string alias, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/disasterRecoveryConfigs/" + + global::System.Uri.EscapeDataString(alias) + + "/authorizationRules" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DisasterRecoveryConfigsListAuthorizationRules_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets a list of authorization rules for a Namespace. + /// + /// 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.EventHub.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 DisasterRecoveryConfigsListAuthorizationRulesViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/(?[^/]+)/disasterRecoveryConfigs/(?[^/]+)/authorizationRules$", 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.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var alias = _match.Groups["alias"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/disasterRecoveryConfigs/" + + alias + + "/authorizationRules" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DisasterRecoveryConfigsListAuthorizationRules_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets a list of authorization rules for a Namespace. + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 DisasterRecoveryConfigsListAuthorizationRulesViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/(?[^/]+)/disasterRecoveryConfigs/(?[^/]+)/authorizationRules$", 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.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var alias = _match.Groups["alias"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/disasterRecoveryConfigs/" + + alias + + "/authorizationRules" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DisasterRecoveryConfigsListAuthorizationRulesWithResult_Call (request, eventListener,sender); + } + } + + /// Gets a list of authorization rules for a Namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Disaster Recovery configuration name + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 DisasterRecoveryConfigsListAuthorizationRulesWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string alias, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/disasterRecoveryConfigs/" + + global::System.Uri.EscapeDataString(alias) + + "/authorizationRules" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DisasterRecoveryConfigsListAuthorizationRulesWithResult_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.EventHub.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 DisasterRecoveryConfigsListAuthorizationRulesWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.AuthorizationRuleListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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.EventHub.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.EventHub.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 DisasterRecoveryConfigsListAuthorizationRules_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.AuthorizationRuleListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Disaster Recovery configuration name + /// 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 DisasterRecoveryConfigsListAuthorizationRules_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string alias, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); + await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); + await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); + await eventListener.AssertRegEx(nameof(namespaceName), namespaceName, @"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); + await eventListener.AssertNotNull(nameof(alias),alias); + await eventListener.AssertMinimumLength(nameof(alias),alias,1); + await eventListener.AssertMaximumLength(nameof(alias),alias,50); + } + } + + /// Gets the primary and secondary connection strings for the Namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Disaster Recovery configuration name + /// The authorization rule name. + /// 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.EventHub.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 DisasterRecoveryConfigsListKeys(string subscriptionId, string resourceGroupName, string namespaceName, string alias, string authorizationRuleName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/disasterRecoveryConfigs/" + + global::System.Uri.EscapeDataString(alias) + + "/authorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "/listKeys" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DisasterRecoveryConfigsListKeys_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets the primary and secondary connection strings for the Namespace. + /// + /// 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.EventHub.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 DisasterRecoveryConfigsListKeysViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/(?[^/]+)/disasterRecoveryConfigs/(?[^/]+)/authorizationRules/(?[^/]+)$", 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.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules/{authorizationRuleName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var alias = _match.Groups["alias"].Value; + var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/disasterRecoveryConfigs/" + + alias + + "/authorizationRules/" + + authorizationRuleName + + "/listKeys" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DisasterRecoveryConfigsListKeys_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets the primary and secondary connection strings for the Namespace. + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 DisasterRecoveryConfigsListKeysViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/(?[^/]+)/disasterRecoveryConfigs/(?[^/]+)/authorizationRules/(?[^/]+)$", 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.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules/{authorizationRuleName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var alias = _match.Groups["alias"].Value; + var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/disasterRecoveryConfigs/" + + alias + + "/authorizationRules/" + + authorizationRuleName + + "/listKeys" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DisasterRecoveryConfigsListKeysWithResult_Call (request, eventListener,sender); + } + } + + /// Gets the primary and secondary connection strings for the Namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Disaster Recovery configuration name + /// The authorization rule name. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 DisasterRecoveryConfigsListKeysWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string alias, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/disasterRecoveryConfigs/" + + global::System.Uri.EscapeDataString(alias) + + "/authorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "/listKeys" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DisasterRecoveryConfigsListKeysWithResult_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.EventHub.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 DisasterRecoveryConfigsListKeysWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.AccessKeys.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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.EventHub.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.EventHub.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 DisasterRecoveryConfigsListKeys_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.AccessKeys.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Disaster Recovery configuration name + /// The authorization rule name. + /// 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 DisasterRecoveryConfigsListKeys_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string alias, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); + await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); + await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); + await eventListener.AssertRegEx(nameof(namespaceName), namespaceName, @"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); + await eventListener.AssertNotNull(nameof(alias),alias); + await eventListener.AssertMinimumLength(nameof(alias),alias,1); + await eventListener.AssertMaximumLength(nameof(alias),alias,50); + await eventListener.AssertNotNull(nameof(authorizationRuleName),authorizationRuleName); + await eventListener.AssertMinimumLength(nameof(authorizationRuleName),authorizationRuleName,1); + } + } + + /// Gets all Alias(Disaster Recovery configurations) + /// + /// 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.EventHub.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 DisasterRecoveryConfigsListViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/(?[^/]+)/disasterRecoveryConfigs$", 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.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/disasterRecoveryConfigs" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DisasterRecoveryConfigsList_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets all Alias(Disaster Recovery configurations) + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 DisasterRecoveryConfigsListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/(?[^/]+)/disasterRecoveryConfigs$", 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.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/disasterRecoveryConfigs" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DisasterRecoveryConfigsListWithResult_Call (request, eventListener,sender); + } + } + + /// Gets all Alias(Disaster Recovery configurations) + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 DisasterRecoveryConfigsListWithResult(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/disasterRecoveryConfigs" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DisasterRecoveryConfigsListWithResult_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.EventHub.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 DisasterRecoveryConfigsListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ArmDisasterRecoveryListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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.EventHub.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.EventHub.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 DisasterRecoveryConfigsList_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ArmDisasterRecoveryListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// 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 DisasterRecoveryConfigsList_Validate(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); + await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); + await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); + await eventListener.AssertRegEx(nameof(namespaceName), namespaceName, @"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); + } + } + + /// Update a new Event Hub as a nested resource within a Namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Event Hub name + /// Parameters supplied to create an Event Hub 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.EventHub.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 EventHubsCreateOrUpdate(string subscriptionId, string resourceGroupName, string namespaceName, string eventHubName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/eventhubs/" + + global::System.Uri.EscapeDataString(eventHubName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EventHubsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Update an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule will take a few seconds + /// to take effect. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Event Hub name + /// The authorization rule name. + /// The shared access AuthorizationRule. + /// 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.EventHub.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 EventHubsCreateOrUpdateAuthorizationRule(string subscriptionId, string resourceGroupName, string namespaceName, string eventHubName, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/eventhubs/" + + global::System.Uri.EscapeDataString(eventHubName) + + "/authorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EventHubsCreateOrUpdateAuthorizationRule_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Update an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule will take a few seconds + /// to take effect. + /// + /// + /// The shared access AuthorizationRule. + /// 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.EventHub.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 EventHubsCreateOrUpdateAuthorizationRuleViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/(?[^/]+)/eventhubs/(?[^/]+)/authorizationRules/(?[^/]+)$", 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.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var eventHubName = _match.Groups["eventHubName"].Value; + var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/eventhubs/" + + eventHubName + + "/authorizationRules/" + + authorizationRuleName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EventHubsCreateOrUpdateAuthorizationRule_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Update an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule will take a few seconds + /// to take effect. + /// + /// + /// The shared access AuthorizationRule. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 EventHubsCreateOrUpdateAuthorizationRuleViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/(?[^/]+)/eventhubs/(?[^/]+)/authorizationRules/(?[^/]+)$", 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.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var eventHubName = _match.Groups["eventHubName"].Value; + var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/eventhubs/" + + eventHubName + + "/authorizationRules/" + + authorizationRuleName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.EventHubsCreateOrUpdateAuthorizationRuleWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Update an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule will take a few seconds + /// to take effect. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Event Hub name + /// The authorization rule name. + /// Json string supplied to the EventHubsCreateOrUpdateAuthorizationRule 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.EventHub.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 EventHubsCreateOrUpdateAuthorizationRuleViaJsonString(string subscriptionId, string resourceGroupName, string namespaceName, string eventHubName, string authorizationRuleName, 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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/eventhubs/" + + global::System.Uri.EscapeDataString(eventHubName) + + "/authorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EventHubsCreateOrUpdateAuthorizationRule_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Update an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule will take a few seconds + /// to take effect. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Event Hub name + /// The authorization rule name. + /// Json string supplied to the EventHubsCreateOrUpdateAuthorizationRule operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 EventHubsCreateOrUpdateAuthorizationRuleViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string eventHubName, string authorizationRuleName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/eventhubs/" + + global::System.Uri.EscapeDataString(eventHubName) + + "/authorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.EventHubsCreateOrUpdateAuthorizationRuleWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Update an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule will take a few seconds + /// to take effect. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Event Hub name + /// The authorization rule name. + /// The shared access AuthorizationRule. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 EventHubsCreateOrUpdateAuthorizationRuleWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string eventHubName, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/eventhubs/" + + global::System.Uri.EscapeDataString(eventHubName) + + "/authorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.EventHubsCreateOrUpdateAuthorizationRuleWithResult_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.EventHub.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 EventHubsCreateOrUpdateAuthorizationRuleWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.AuthorizationRule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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.EventHub.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.EventHub.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 EventHubsCreateOrUpdateAuthorizationRule_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.AuthorizationRule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Event Hub name + /// The authorization rule name. + /// The shared access AuthorizationRule. + /// 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 EventHubsCreateOrUpdateAuthorizationRule_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string eventHubName, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); + await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); + await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); + await eventListener.AssertRegEx(nameof(namespaceName), namespaceName, @"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); + await eventListener.AssertNotNull(nameof(eventHubName),eventHubName); + await eventListener.AssertMinimumLength(nameof(eventHubName),eventHubName,1); + await eventListener.AssertMaximumLength(nameof(eventHubName),eventHubName,256); + await eventListener.AssertNotNull(nameof(authorizationRuleName),authorizationRuleName); + await eventListener.AssertMinimumLength(nameof(authorizationRuleName),authorizationRuleName,1); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Update a new Event Hub as a nested resource within a Namespace. + /// + /// Parameters supplied to create an Event Hub 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.EventHub.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 EventHubsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/(?[^/]+)/eventhubs/(?[^/]+)$", 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.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var eventHubName = _match.Groups["eventHubName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/eventhubs/" + + eventHubName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EventHubsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update a new Event Hub as a nested resource within a Namespace. + /// + /// Parameters supplied to create an Event Hub resource. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 EventHubsCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/(?[^/]+)/eventhubs/(?[^/]+)$", 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.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var eventHubName = _match.Groups["eventHubName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/eventhubs/" + + eventHubName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.EventHubsCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Update a new Event Hub as a nested resource within a Namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Event Hub name + /// Json string supplied to the EventHubsCreateOrUpdate 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.EventHub.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 EventHubsCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string namespaceName, string eventHubName, 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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/eventhubs/" + + global::System.Uri.EscapeDataString(eventHubName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EventHubsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update a new Event Hub as a nested resource within a Namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Event Hub name + /// Json string supplied to the EventHubsCreateOrUpdate operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 EventHubsCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string eventHubName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/eventhubs/" + + global::System.Uri.EscapeDataString(eventHubName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.EventHubsCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Update a new Event Hub as a nested resource within a Namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Event Hub name + /// Parameters supplied to create an Event Hub resource. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 EventHubsCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string eventHubName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/eventhubs/" + + global::System.Uri.EscapeDataString(eventHubName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.EventHubsCreateOrUpdateWithResult_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.EventHub.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 EventHubsCreateOrUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Eventhub.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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.EventHub.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.EventHub.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 EventHubsCreateOrUpdate_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Eventhub.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Event Hub name + /// Parameters supplied to create an Event Hub resource. + /// 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 EventHubsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string eventHubName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); + await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); + await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); + await eventListener.AssertRegEx(nameof(namespaceName), namespaceName, @"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); + await eventListener.AssertNotNull(nameof(eventHubName),eventHubName); + await eventListener.AssertMinimumLength(nameof(eventHubName),eventHubName,1); + await eventListener.AssertMaximumLength(nameof(eventHubName),eventHubName,256); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Deletes an Event Hub from the specified Namespace and resource group. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Event Hub name + /// 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.EventHub.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 EventHubsDelete(string subscriptionId, string resourceGroupName, string namespaceName, string eventHubName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/eventhubs/" + + global::System.Uri.EscapeDataString(eventHubName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EventHubsDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Deletes an Event Hub AuthorizationRule. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Event Hub name + /// The authorization rule name. + /// 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.EventHub.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 EventHubsDeleteAuthorizationRule(string subscriptionId, string resourceGroupName, string namespaceName, string eventHubName, string authorizationRuleName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/eventhubs/" + + global::System.Uri.EscapeDataString(eventHubName) + + "/authorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EventHubsDeleteAuthorizationRule_Call (request, onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Deletes an Event Hub AuthorizationRule. + /// + /// 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.EventHub.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 EventHubsDeleteAuthorizationRuleViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/(?[^/]+)/eventhubs/(?[^/]+)/authorizationRules/(?[^/]+)$", 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.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var eventHubName = _match.Groups["eventHubName"].Value; + var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/eventhubs/" + + eventHubName + + "/authorizationRules/" + + authorizationRuleName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EventHubsDeleteAuthorizationRule_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.EventHub.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 EventHubsDeleteAuthorizationRule_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Event Hub name + /// The authorization rule name. + /// 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 EventHubsDeleteAuthorizationRule_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string eventHubName, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); + await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); + await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); + await eventListener.AssertRegEx(nameof(namespaceName), namespaceName, @"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); + await eventListener.AssertNotNull(nameof(eventHubName),eventHubName); + await eventListener.AssertMinimumLength(nameof(eventHubName),eventHubName,1); + await eventListener.AssertMaximumLength(nameof(eventHubName),eventHubName,256); + await eventListener.AssertNotNull(nameof(authorizationRuleName),authorizationRuleName); + await eventListener.AssertMinimumLength(nameof(authorizationRuleName),authorizationRuleName,1); + } + } + + /// Deletes an Event Hub from the specified Namespace and resource group. + /// + /// 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.EventHub.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 EventHubsDeleteViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/(?[^/]+)/eventhubs/(?[^/]+)$", 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.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var eventHubName = _match.Groups["eventHubName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/eventhubs/" + + eventHubName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EventHubsDelete_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.EventHub.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 EventHubsDelete_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Event Hub name + /// 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 EventHubsDelete_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string eventHubName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); + await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); + await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); + await eventListener.AssertRegEx(nameof(namespaceName), namespaceName, @"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); + await eventListener.AssertNotNull(nameof(eventHubName),eventHubName); + await eventListener.AssertMinimumLength(nameof(eventHubName),eventHubName,1); + await eventListener.AssertMaximumLength(nameof(eventHubName),eventHubName,256); + } + } + + /// Gets an Event Hubs description for the specified Event Hub. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Event Hub name + /// 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.EventHub.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 EventHubsGet(string subscriptionId, string resourceGroupName, string namespaceName, string eventHubName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/eventhubs/" + + global::System.Uri.EscapeDataString(eventHubName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EventHubsGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets an AuthorizationRule for an Event Hub by rule name. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Event Hub name + /// The authorization rule name. + /// 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.EventHub.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 EventHubsGetAuthorizationRule(string subscriptionId, string resourceGroupName, string namespaceName, string eventHubName, string authorizationRuleName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/eventhubs/" + + global::System.Uri.EscapeDataString(eventHubName) + + "/authorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EventHubsGetAuthorizationRule_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets an AuthorizationRule for an Event Hub by rule name. + /// + /// 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.EventHub.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 EventHubsGetAuthorizationRuleViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/(?[^/]+)/eventhubs/(?[^/]+)/authorizationRules/(?[^/]+)$", 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.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var eventHubName = _match.Groups["eventHubName"].Value; + var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/eventhubs/" + + eventHubName + + "/authorizationRules/" + + authorizationRuleName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EventHubsGetAuthorizationRule_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets an AuthorizationRule for an Event Hub by rule name. + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 EventHubsGetAuthorizationRuleViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/(?[^/]+)/eventhubs/(?[^/]+)/authorizationRules/(?[^/]+)$", 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.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var eventHubName = _match.Groups["eventHubName"].Value; + var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/eventhubs/" + + eventHubName + + "/authorizationRules/" + + authorizationRuleName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.EventHubsGetAuthorizationRuleWithResult_Call (request, eventListener,sender); + } + } + + /// Gets an AuthorizationRule for an Event Hub by rule name. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Event Hub name + /// The authorization rule name. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 EventHubsGetAuthorizationRuleWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string eventHubName, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/eventhubs/" + + global::System.Uri.EscapeDataString(eventHubName) + + "/authorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.EventHubsGetAuthorizationRuleWithResult_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.EventHub.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 EventHubsGetAuthorizationRuleWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.AuthorizationRule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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.EventHub.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.EventHub.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 EventHubsGetAuthorizationRule_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.AuthorizationRule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Event Hub name + /// The authorization rule name. + /// 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 EventHubsGetAuthorizationRule_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string eventHubName, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); + await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); + await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); + await eventListener.AssertRegEx(nameof(namespaceName), namespaceName, @"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); + await eventListener.AssertNotNull(nameof(eventHubName),eventHubName); + await eventListener.AssertMinimumLength(nameof(eventHubName),eventHubName,1); + await eventListener.AssertMaximumLength(nameof(eventHubName),eventHubName,256); + await eventListener.AssertNotNull(nameof(authorizationRuleName),authorizationRuleName); + await eventListener.AssertMinimumLength(nameof(authorizationRuleName),authorizationRuleName,1); + } + } + + /// Gets an Event Hubs description for the specified Event Hub. + /// + /// 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.EventHub.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 EventHubsGetViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/(?[^/]+)/eventhubs/(?[^/]+)$", 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.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var eventHubName = _match.Groups["eventHubName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/eventhubs/" + + eventHubName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EventHubsGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets an Event Hubs description for the specified Event Hub. + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 EventHubsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/(?[^/]+)/eventhubs/(?[^/]+)$", 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.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var eventHubName = _match.Groups["eventHubName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/eventhubs/" + + eventHubName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.EventHubsGetWithResult_Call (request, eventListener,sender); + } + } + + /// Gets an Event Hubs description for the specified Event Hub. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Event Hub name + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 EventHubsGetWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string eventHubName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/eventhubs/" + + global::System.Uri.EscapeDataString(eventHubName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.EventHubsGetWithResult_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.EventHub.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 EventHubsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Eventhub.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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.EventHub.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.EventHub.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 EventHubsGet_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Eventhub.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Event Hub name + /// 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 EventHubsGet_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string eventHubName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); + await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); + await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); + await eventListener.AssertRegEx(nameof(namespaceName), namespaceName, @"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); + await eventListener.AssertNotNull(nameof(eventHubName),eventHubName); + await eventListener.AssertMinimumLength(nameof(eventHubName),eventHubName,1); + await eventListener.AssertMaximumLength(nameof(eventHubName),eventHubName,256); + } + } + + /// Gets the authorization rules for an Event Hub. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Event Hub name + /// 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.EventHub.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 EventHubsListAuthorizationRules(string subscriptionId, string resourceGroupName, string namespaceName, string eventHubName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/eventhubs/" + + global::System.Uri.EscapeDataString(eventHubName) + + "/authorizationRules" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EventHubsListAuthorizationRules_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets the authorization rules for an Event Hub. + /// + /// 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.EventHub.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 EventHubsListAuthorizationRulesViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/(?[^/]+)/eventhubs/(?[^/]+)/authorizationRules$", 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.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var eventHubName = _match.Groups["eventHubName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/eventhubs/" + + eventHubName + + "/authorizationRules" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EventHubsListAuthorizationRules_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets the authorization rules for an Event Hub. + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 EventHubsListAuthorizationRulesViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/(?[^/]+)/eventhubs/(?[^/]+)/authorizationRules$", 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.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var eventHubName = _match.Groups["eventHubName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/eventhubs/" + + eventHubName + + "/authorizationRules" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.EventHubsListAuthorizationRulesWithResult_Call (request, eventListener,sender); + } + } + + /// Gets the authorization rules for an Event Hub. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Event Hub name + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 EventHubsListAuthorizationRulesWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string eventHubName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/eventhubs/" + + global::System.Uri.EscapeDataString(eventHubName) + + "/authorizationRules" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.EventHubsListAuthorizationRulesWithResult_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.EventHub.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 EventHubsListAuthorizationRulesWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.AuthorizationRuleListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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.EventHub.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.EventHub.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 EventHubsListAuthorizationRules_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.AuthorizationRuleListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Event Hub name + /// 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 EventHubsListAuthorizationRules_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string eventHubName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); + await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); + await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); + await eventListener.AssertRegEx(nameof(namespaceName), namespaceName, @"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); + await eventListener.AssertNotNull(nameof(eventHubName),eventHubName); + await eventListener.AssertMinimumLength(nameof(eventHubName),eventHubName,1); + await eventListener.AssertMaximumLength(nameof(eventHubName),eventHubName,256); + } + } + + /// Gets all the Event Hubs in a Namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// Skip is only used if a previous operation returned a partial result. If a previous response contains + /// a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to + /// use for subsequent calls. + /// May be used to limit the number of results to the most recent N usageDetails. + /// 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.EventHub.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 EventHubsListByNamespace(string subscriptionId, string resourceGroupName, string namespaceName, int? Skip, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/eventhubs" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EventHubsListByNamespace_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets all the Event Hubs in a Namespace. + /// + /// Skip is only used if a previous operation returned a partial result. If a previous response contains + /// a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to + /// use for subsequent calls. + /// May be used to limit the number of results to the most recent N usageDetails. + /// 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.EventHub.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 EventHubsListByNamespaceViaIdentity(global::System.String viaIdentity, int? Skip, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/(?[^/]+)/eventhubs$", 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.EventHub/namespaces/{namespaceName}/eventhubs'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/eventhubs" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EventHubsListByNamespace_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets all the Event Hubs in a Namespace. + /// + /// Skip is only used if a previous operation returned a partial result. If a previous response contains + /// a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to + /// use for subsequent calls. + /// May be used to limit the number of results to the most recent N usageDetails. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 EventHubsListByNamespaceViaIdentityWithResult(global::System.String viaIdentity, int? Skip, int? Top, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/(?[^/]+)/eventhubs$", 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.EventHub/namespaces/{namespaceName}/eventhubs'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/eventhubs" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.EventHubsListByNamespaceWithResult_Call (request, eventListener,sender); + } + } + + /// Gets all the Event Hubs in a Namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// Skip is only used if a previous operation returned a partial result. If a previous response contains + /// a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to + /// use for subsequent calls. + /// May be used to limit the number of results to the most recent N usageDetails. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 EventHubsListByNamespaceWithResult(string subscriptionId, string resourceGroupName, string namespaceName, int? Skip, int? Top, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/eventhubs" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.EventHubsListByNamespaceWithResult_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.EventHub.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 EventHubsListByNamespaceWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.EventHubListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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.EventHub.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.EventHub.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 EventHubsListByNamespace_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.EventHubListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// Skip is only used if a previous operation returned a partial result. If a previous response contains + /// a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to + /// use for subsequent calls. + /// May be used to limit the number of results to the most recent N usageDetails. + /// 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 EventHubsListByNamespace_Validate(string subscriptionId, string resourceGroupName, string namespaceName, int? Skip, int? Top, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); + await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); + await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); + await eventListener.AssertRegEx(nameof(namespaceName), namespaceName, @"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); + await eventListener.AssertIsLessThanOrEqual(nameof(Skip),Skip,1000); + await eventListener.AssertIsGreaterThanOrEqual(nameof(Top),Top,1); + await eventListener.AssertIsLessThanOrEqual(nameof(Top),Top,1000); + } + } + + /// Gets the ACS and SAS connection strings for the Event Hub. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Event Hub name + /// The authorization rule name. + /// 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.EventHub.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 EventHubsListKeys(string subscriptionId, string resourceGroupName, string namespaceName, string eventHubName, string authorizationRuleName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/eventhubs/" + + global::System.Uri.EscapeDataString(eventHubName) + + "/authorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "/listKeys" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EventHubsListKeys_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets the ACS and SAS connection strings for the Event Hub. + /// + /// 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.EventHub.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 EventHubsListKeysViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/(?[^/]+)/eventhubs/(?[^/]+)/authorizationRules/(?[^/]+)$", 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.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var eventHubName = _match.Groups["eventHubName"].Value; + var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/eventhubs/" + + eventHubName + + "/authorizationRules/" + + authorizationRuleName + + "/listKeys" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EventHubsListKeys_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets the ACS and SAS connection strings for the Event Hub. + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 EventHubsListKeysViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/(?[^/]+)/eventhubs/(?[^/]+)/authorizationRules/(?[^/]+)$", 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.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var eventHubName = _match.Groups["eventHubName"].Value; + var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/eventhubs/" + + eventHubName + + "/authorizationRules/" + + authorizationRuleName + + "/listKeys" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.EventHubsListKeysWithResult_Call (request, eventListener,sender); + } + } + + /// Gets the ACS and SAS connection strings for the Event Hub. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Event Hub name + /// The authorization rule name. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 EventHubsListKeysWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string eventHubName, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/eventhubs/" + + global::System.Uri.EscapeDataString(eventHubName) + + "/authorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "/listKeys" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.EventHubsListKeysWithResult_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.EventHub.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 EventHubsListKeysWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.AccessKeys.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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.EventHub.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.EventHub.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 EventHubsListKeys_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.AccessKeys.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Event Hub name + /// The authorization rule name. + /// 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 EventHubsListKeys_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string eventHubName, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); + await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); + await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); + await eventListener.AssertRegEx(nameof(namespaceName), namespaceName, @"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); + await eventListener.AssertNotNull(nameof(eventHubName),eventHubName); + await eventListener.AssertMinimumLength(nameof(eventHubName),eventHubName,1); + await eventListener.AssertMaximumLength(nameof(eventHubName),eventHubName,256); + await eventListener.AssertNotNull(nameof(authorizationRuleName),authorizationRuleName); + await eventListener.AssertMinimumLength(nameof(authorizationRuleName),authorizationRuleName,1); + } + } + + /// Regenerates the ACS and SAS connection strings for the Event Hub. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Event Hub name + /// The authorization rule name. + /// Parameters supplied to regenerate the AuthorizationRule Keys (PrimaryKey/SecondaryKey). + /// 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.EventHub.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 EventHubsRegenerateKeys(string subscriptionId, string resourceGroupName, string namespaceName, string eventHubName, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRegenerateAccessKeyParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/eventhubs/" + + global::System.Uri.EscapeDataString(eventHubName) + + "/authorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "/regenerateKeys" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EventHubsRegenerateKeys_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Regenerates the ACS and SAS connection strings for the Event Hub. + /// + /// Parameters supplied to regenerate the AuthorizationRule Keys (PrimaryKey/SecondaryKey). + /// 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.EventHub.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 EventHubsRegenerateKeysViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRegenerateAccessKeyParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/(?[^/]+)/eventhubs/(?[^/]+)/authorizationRules/(?[^/]+)$", 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.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var eventHubName = _match.Groups["eventHubName"].Value; + var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/eventhubs/" + + eventHubName + + "/authorizationRules/" + + authorizationRuleName + + "/regenerateKeys" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EventHubsRegenerateKeys_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Regenerates the ACS and SAS connection strings for the Event Hub. + /// + /// Parameters supplied to regenerate the AuthorizationRule Keys (PrimaryKey/SecondaryKey). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 EventHubsRegenerateKeysViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRegenerateAccessKeyParameters body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/(?[^/]+)/eventhubs/(?[^/]+)/authorizationRules/(?[^/]+)$", 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.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var eventHubName = _match.Groups["eventHubName"].Value; + var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/eventhubs/" + + eventHubName + + "/authorizationRules/" + + authorizationRuleName + + "/regenerateKeys" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.EventHubsRegenerateKeysWithResult_Call (request, eventListener,sender); + } + } + + /// Regenerates the ACS and SAS connection strings for the Event Hub. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Event Hub name + /// The authorization rule name. + /// Json string supplied to the EventHubsRegenerateKeys 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.EventHub.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 EventHubsRegenerateKeysViaJsonString(string subscriptionId, string resourceGroupName, string namespaceName, string eventHubName, string authorizationRuleName, 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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/eventhubs/" + + global::System.Uri.EscapeDataString(eventHubName) + + "/authorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "/regenerateKeys" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EventHubsRegenerateKeys_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Regenerates the ACS and SAS connection strings for the Event Hub. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Event Hub name + /// The authorization rule name. + /// Json string supplied to the EventHubsRegenerateKeys operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 EventHubsRegenerateKeysViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string eventHubName, string authorizationRuleName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/eventhubs/" + + global::System.Uri.EscapeDataString(eventHubName) + + "/authorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "/regenerateKeys" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.EventHubsRegenerateKeysWithResult_Call (request, eventListener,sender); + } + } + + /// Regenerates the ACS and SAS connection strings for the Event Hub. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Event Hub name + /// The authorization rule name. + /// Parameters supplied to regenerate the AuthorizationRule Keys (PrimaryKey/SecondaryKey). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 EventHubsRegenerateKeysWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string eventHubName, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRegenerateAccessKeyParameters body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/eventhubs/" + + global::System.Uri.EscapeDataString(eventHubName) + + "/authorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "/regenerateKeys" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.EventHubsRegenerateKeysWithResult_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.EventHub.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 EventHubsRegenerateKeysWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.AccessKeys.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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.EventHub.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.EventHub.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 EventHubsRegenerateKeys_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.AccessKeys.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Event Hub name + /// The authorization rule name. + /// Parameters supplied to regenerate the AuthorizationRule Keys (PrimaryKey/SecondaryKey). + /// 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 EventHubsRegenerateKeys_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string eventHubName, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRegenerateAccessKeyParameters body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); + await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); + await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); + await eventListener.AssertRegEx(nameof(namespaceName), namespaceName, @"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); + await eventListener.AssertNotNull(nameof(eventHubName),eventHubName); + await eventListener.AssertMinimumLength(nameof(eventHubName),eventHubName,1); + await eventListener.AssertMaximumLength(nameof(eventHubName),eventHubName,256); + await eventListener.AssertNotNull(nameof(authorizationRuleName),authorizationRuleName); + await eventListener.AssertMinimumLength(nameof(authorizationRuleName),authorizationRuleName,1); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Check the give Namespace name availability. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Parameters to check availability of the given Namespace name + /// 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.EventHub.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 NamespacesCheckNameAvailability(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityParameter body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-01-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.EventHub/checkNameAvailability" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.NamespacesCheckNameAvailability_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Check the give Namespace name availability. + /// + /// Parameters to check availability of the given Namespace name + /// 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.EventHub.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 NamespacesCheckNameAvailabilityViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityParameter body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.EventHub'"); + } + + // 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.EventHub/checkNameAvailability" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.NamespacesCheckNameAvailability_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Check the give Namespace name availability. + /// + /// Parameters to check availability of the given Namespace name + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 NamespacesCheckNameAvailabilityViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityParameter body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.EventHub'"); + } + + // 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.EventHub/checkNameAvailability" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesCheckNameAvailabilityWithResult_Call (request, eventListener,sender); + } + } + + /// Check the give Namespace name availability. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Json string supplied to the NamespacesCheckNameAvailability 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.EventHub.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 NamespacesCheckNameAvailabilityViaJsonString(string subscriptionId, 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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.EventHub/checkNameAvailability" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.NamespacesCheckNameAvailability_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Check the give Namespace name availability. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Json string supplied to the NamespacesCheckNameAvailability operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 NamespacesCheckNameAvailabilityViaJsonStringWithResult(string subscriptionId, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.EventHub/checkNameAvailability" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesCheckNameAvailabilityWithResult_Call (request, eventListener,sender); + } + } + + /// Check the give Namespace name availability. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Parameters to check availability of the given Namespace name + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 NamespacesCheckNameAvailabilityWithResult(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityParameter body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-01-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.EventHub/checkNameAvailability" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesCheckNameAvailabilityWithResult_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.EventHub.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 NamespacesCheckNameAvailabilityWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.CheckNameAvailabilityResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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.EventHub.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.EventHub.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 NamespacesCheckNameAvailability_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.CheckNameAvailabilityResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Parameters to check availability of the given Namespace name + /// 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 NamespacesCheckNameAvailability_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityParameter body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// + /// Update a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// Parameters for creating a namespace 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.EventHub.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 NamespacesCreateOrUpdate(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.NamespacesCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update an AuthorizationRule for a Namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The authorization rule name. + /// The shared access AuthorizationRule. + /// 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.EventHub.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 NamespacesCreateOrUpdateAuthorizationRule(string subscriptionId, string resourceGroupName, string namespaceName, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/authorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.NamespacesCreateOrUpdateAuthorizationRule_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update an AuthorizationRule for a Namespace. + /// + /// The shared access AuthorizationRule. + /// 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.EventHub.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 NamespacesCreateOrUpdateAuthorizationRuleViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/(?[^/]+)/authorizationRules/(?[^/]+)$", 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.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/authorizationRules/" + + authorizationRuleName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.NamespacesCreateOrUpdateAuthorizationRule_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update an AuthorizationRule for a Namespace. + /// + /// The shared access AuthorizationRule. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 NamespacesCreateOrUpdateAuthorizationRuleViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/(?[^/]+)/authorizationRules/(?[^/]+)$", 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.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/authorizationRules/" + + authorizationRuleName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesCreateOrUpdateAuthorizationRuleWithResult_Call (request, eventListener,sender); + } + } + + /// Update an AuthorizationRule for a Namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The authorization rule name. + /// Json string supplied to the NamespacesCreateOrUpdateAuthorizationRule 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.EventHub.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 NamespacesCreateOrUpdateAuthorizationRuleViaJsonString(string subscriptionId, string resourceGroupName, string namespaceName, string authorizationRuleName, 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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/authorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.NamespacesCreateOrUpdateAuthorizationRule_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update an AuthorizationRule for a Namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The authorization rule name. + /// Json string supplied to the NamespacesCreateOrUpdateAuthorizationRule operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 NamespacesCreateOrUpdateAuthorizationRuleViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string authorizationRuleName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/authorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesCreateOrUpdateAuthorizationRuleWithResult_Call (request, eventListener,sender); + } + } + + /// Update an AuthorizationRule for a Namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The authorization rule name. + /// The shared access AuthorizationRule. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 NamespacesCreateOrUpdateAuthorizationRuleWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/authorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesCreateOrUpdateAuthorizationRuleWithResult_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.EventHub.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 NamespacesCreateOrUpdateAuthorizationRuleWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.AuthorizationRule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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.EventHub.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.EventHub.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 NamespacesCreateOrUpdateAuthorizationRule_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.AuthorizationRule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The authorization rule name. + /// The shared access AuthorizationRule. + /// 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 NamespacesCreateOrUpdateAuthorizationRule_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); + await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); + await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); + await eventListener.AssertRegEx(nameof(namespaceName), namespaceName, @"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); + await eventListener.AssertNotNull(nameof(authorizationRuleName),authorizationRuleName); + await eventListener.AssertMinimumLength(nameof(authorizationRuleName),authorizationRuleName,1); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Update NetworkRuleSet for a Namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Namespace IpFilterRule. + /// 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.EventHub.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 NamespacesCreateOrUpdateNetworkRuleSet(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/networkRuleSets/default" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.NamespacesCreateOrUpdateNetworkRuleSet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update NetworkRuleSet for a Namespace. + /// + /// The Namespace IpFilterRule. + /// 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.EventHub.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 NamespacesCreateOrUpdateNetworkRuleSetViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/(?[^/]+)/networkRuleSets/default$", 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.EventHub/namespaces/{namespaceName}/networkRuleSets/default'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/networkRuleSets/default" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.NamespacesCreateOrUpdateNetworkRuleSet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update NetworkRuleSet for a Namespace. + /// + /// The Namespace IpFilterRule. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 NamespacesCreateOrUpdateNetworkRuleSetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/(?[^/]+)/networkRuleSets/default$", 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.EventHub/namespaces/{namespaceName}/networkRuleSets/default'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/networkRuleSets/default" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesCreateOrUpdateNetworkRuleSetWithResult_Call (request, eventListener,sender); + } + } + + /// Update NetworkRuleSet for a Namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// Json string supplied to the NamespacesCreateOrUpdateNetworkRuleSet 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.EventHub.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 NamespacesCreateOrUpdateNetworkRuleSetViaJsonString(string subscriptionId, string resourceGroupName, string namespaceName, 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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/networkRuleSets/default" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.NamespacesCreateOrUpdateNetworkRuleSet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update NetworkRuleSet for a Namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// Json string supplied to the NamespacesCreateOrUpdateNetworkRuleSet operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 NamespacesCreateOrUpdateNetworkRuleSetViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string namespaceName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/networkRuleSets/default" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesCreateOrUpdateNetworkRuleSetWithResult_Call (request, eventListener,sender); + } + } + + /// Update NetworkRuleSet for a Namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Namespace IpFilterRule. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 NamespacesCreateOrUpdateNetworkRuleSetWithResult(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/networkRuleSets/default" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesCreateOrUpdateNetworkRuleSetWithResult_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.EventHub.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 NamespacesCreateOrUpdateNetworkRuleSetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NetworkRuleSet.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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.EventHub.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.EventHub.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 NamespacesCreateOrUpdateNetworkRuleSet_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NetworkRuleSet.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Namespace IpFilterRule. + /// 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 NamespacesCreateOrUpdateNetworkRuleSet_Validate(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); + await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); + await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); + await eventListener.AssertRegEx(nameof(namespaceName), namespaceName, @"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// + /// Update a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. + /// + /// + /// Parameters for creating a namespace 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.EventHub.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 NamespacesCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/(?[^/]+)$", 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.EventHub/namespaces/{namespaceName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.NamespacesCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Update a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. + /// + /// + /// Parameters for creating a namespace resource. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 NamespacesCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/(?[^/]+)$", 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.EventHub/namespaces/{namespaceName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Update a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// Json string supplied to the NamespacesCreateOrUpdate 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.EventHub.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 NamespacesCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string namespaceName, 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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.NamespacesCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Update a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// Json string supplied to the NamespacesCreateOrUpdate operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 NamespacesCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string namespaceName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Update a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// Parameters for creating a namespace resource. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 NamespacesCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesCreateOrUpdateWithResult_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.EventHub.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 NamespacesCreateOrUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + 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 ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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"))) { + 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.EventHub.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.EventHub.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.EventHub.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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? + if (!string.IsNullOrWhiteSpace(_originalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.EhNamespace.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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.EventHub.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.EventHub.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 NamespacesCreateOrUpdate_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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: default + 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 ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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"); + } + 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.EventHub.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.EventHub.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.EventHub.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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? + if (!string.IsNullOrWhiteSpace(_originalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -5365,13 +14837,13 @@ public partial class EventHub case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.AuthorizationRule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.EhNamespace.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -5387,46 +14859,44 @@ public partial class EventHub } /// - /// Validation method for method. Call this like the actual call, - /// but you will get validation events back. + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. /// - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// The Event Hub name - /// The authorization rule name. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// The shared access AuthorizationRule. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// Parameters for creating a namespace resource. /// 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 EventHubsCreateOrUpdateAuthorizationRule_Validate(string resourceGroupName, string namespaceName, string eventHubName, string authorizationRuleName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task NamespacesCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertRegEx(nameof(namespaceName),namespaceName,@"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(eventHubName),eventHubName); - await eventListener.AssertMinimumLength(nameof(eventHubName),eventHubName,1); - await eventListener.AssertMaximumLength(nameof(eventHubName),eventHubName,256); - await eventListener.AssertNotNull(nameof(authorizationRuleName),authorizationRuleName); - await eventListener.AssertMinimumLength(nameof(authorizationRuleName),authorizationRuleName,1); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(namespaceName), namespaceName, @"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); await eventListener.AssertNotNull(nameof(body), body); await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Creates or updates a new Event Hub as a nested resource within a Namespace. - /// - /// Parameters supplied to create an Event Hub resource. + /// + /// Deletes an existing namespace. This operation also removes all associated resources under the namespace. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name /// 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. @@ -5434,35 +14904,20 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EventHubsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NamespacesDelete(string subscriptionId, string resourceGroupName, string namespaceName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // 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.EventHub/namespaces/(?[^/]+)/eventhubs/(?[^/]+)$", 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.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}'"); - } - - // replace URI parameters with values from identity - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var namespaceName = _match.Groups["namespaceName"].Value; - var eventHubName = _match.Groups["eventHubName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].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.EventHub/namespaces/" - + namespaceName - + "/eventhubs/" - + eventHubName + + global::System.Uri.EscapeDataString(namespaceName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -5471,108 +14926,21 @@ public partial class EventHub // 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.EventHub.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Delete, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.EventHubsCreateOrUpdate_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.EventHub.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 EventHubsCreateOrUpdate_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.Eventhub.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally - { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); - } + await this.NamespacesDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); } } - /// - /// Validation method for method. Call this like the actual call, but you will get - /// validation events back. - /// - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// The Event Hub name + /// Deletes an AuthorizationRule for a Namespace. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// Parameters supplied to create an Event Hub resource. - /// 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 EventHubsCreateOrUpdate_Validate(string resourceGroupName, string namespaceName, string eventHubName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); - await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); - await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertRegEx(nameof(namespaceName),namespaceName,@"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(eventHubName),eventHubName); - await eventListener.AssertMinimumLength(nameof(eventHubName),eventHubName,1); - await eventListener.AssertMaximumLength(nameof(eventHubName),eventHubName,256); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); - } - } - - /// Deletes an Event Hub from the specified Namespace and resource group. /// Name of the resource group within the azure subscription. /// The Namespace name - /// The Event Hub name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. + /// The authorization rule name. /// 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 @@ -5582,7 +14950,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EventHubsDelete(string resourceGroupName, string namespaceName, string eventHubName, string subscriptionId, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NamespacesDeleteAuthorizationRule(string subscriptionId, string resourceGroupName, string namespaceName, string authorizationRuleName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -5596,8 +14964,8 @@ public partial class EventHub + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.EventHub/namespaces/" + global::System.Uri.EscapeDataString(namespaceName) - + "/eventhubs/" - + global::System.Uri.EscapeDataString(eventHubName) + + "/authorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -5611,17 +14979,12 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.EventHubsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.NamespacesDeleteAuthorizationRule_Call (request, onOk,onNoContent,onDefault,eventListener,sender); } } - /// Deletes an Event Hub AuthorizationRule. - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// The Event Hub name - /// The authorization rule name. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. + /// Deletes an AuthorizationRule for a Namespace. + /// /// 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 @@ -5631,24 +14994,35 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EventHubsDeleteAuthorizationRule(string resourceGroupName, string namespaceName, string eventHubName, string authorizationRuleName, string subscriptionId, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NamespacesDeleteAuthorizationRuleViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // 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.EventHub/namespaces/(?[^/]+)/authorizationRules/(?[^/]+)$", 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.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) + + subscriptionId + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) + + resourceGroupName + "/providers/Microsoft.EventHub/namespaces/" - + global::System.Uri.EscapeDataString(namespaceName) - + "/eventhubs/" - + global::System.Uri.EscapeDataString(eventHubName) + + namespaceName + "/authorizationRules/" - + global::System.Uri.EscapeDataString(authorizationRuleName) + + authorizationRuleName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -5660,13 +15034,102 @@ public partial class EventHub var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Delete, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.EventHubsDeleteAuthorizationRule_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.NamespacesDeleteAuthorizationRule_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.EventHub.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 NamespacesDeleteAuthorizationRule_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The authorization rule name. + /// 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 NamespacesDeleteAuthorizationRule_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); + await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); + await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); + await eventListener.AssertRegEx(nameof(namespaceName), namespaceName, @"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); + await eventListener.AssertNotNull(nameof(authorizationRuleName),authorizationRuleName); + await eventListener.AssertMinimumLength(nameof(authorizationRuleName),authorizationRuleName,1); } } - /// Deletes an Event Hub AuthorizationRule. + /// + /// Deletes an existing namespace. This operation also removes all associated resources under the namespace. + /// /// /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns 204 (NoContent). @@ -5677,7 +15140,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EventHubsDeleteAuthorizationRuleViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NamespacesDeleteViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -5685,18 +15148,16 @@ public partial class EventHub { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/eventhubs/(?[^/]+)/authorizationRules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)$", 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.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; - var eventHubName = _match.Groups["eventHubName"].Value; - var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -5705,10 +15166,6 @@ public partial class EventHub + resourceGroupName + "/providers/Microsoft.EventHub/namespaces/" + namespaceName - + "/eventhubs/" - + eventHubName - + "/authorizationRules/" - + authorizationRuleName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -5722,11 +15179,11 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.EventHubsDeleteAuthorizationRule_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.NamespacesDelete_Call (request, onOk,onNoContent,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 204 (NoContent). @@ -5737,7 +15194,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task EventHubsDeleteAuthorizationRule_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task NamespacesDelete_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -5746,8 +15203,101 @@ public partial class EventHub { var sendTask = sender.SendAsync(request, eventListener); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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: default + var _finalUri = _response.GetFirstHeader(@"Location"); + 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 ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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"); + } + 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.EventHub.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.EventHub.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.EventHub.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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? + if (!string.IsNullOrWhiteSpace(_finalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -5767,7 +15317,7 @@ public partial class EventHub default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -5783,51 +15333,94 @@ public partial class EventHub } /// - /// Validation method for method. Call this like the actual call, but you - /// will get validation events back. + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. /// - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// The Event Hub name - /// The authorization rule name. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name /// 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 EventHubsDeleteAuthorizationRule_Validate(string resourceGroupName, string namespaceName, string eventHubName, string authorizationRuleName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task NamespacesDelete_Validate(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertRegEx(nameof(namespaceName),namespaceName,@"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(eventHubName),eventHubName); - await eventListener.AssertMinimumLength(nameof(eventHubName),eventHubName,1); - await eventListener.AssertMaximumLength(nameof(eventHubName),eventHubName,256); - await eventListener.AssertNotNull(nameof(authorizationRuleName),authorizationRuleName); - await eventListener.AssertMinimumLength(nameof(authorizationRuleName),authorizationRuleName,1); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(namespaceName), namespaceName, @"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); } } - /// Deletes an Event Hub from the specified Namespace and resource group. + /// GeoDR Failover + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// Parameters for updating a namespace resource. + /// 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.EventHub.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 NamespacesFailover(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IFailOver body, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/failover" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.NamespacesFailover_Call (request, onDefault,eventListener,sender); + } + } + + /// GeoDR Failover /// - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). + /// Parameters for updating a namespace resource. /// 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.EventHub.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 EventHubsDeleteViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NamespacesFailoverViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IFailOver body, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -5835,17 +15428,16 @@ public partial class EventHub { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/eventhubs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)$", 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.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; - var eventHubName = _match.Groups["eventHubName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -5854,8 +15446,7 @@ public partial class EventHub + resourceGroupName + "/providers/Microsoft.EventHub/namespaces/" + namespaceName - + "/eventhubs/" - + eventHubName + + "/failover" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -5864,19 +15455,70 @@ public partial class EventHub // 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.EventHub.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.NamespacesFailover_Call (request, onDefault,eventListener,sender); + } + } + + /// GeoDR Failover + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// Json string supplied to the NamespacesFailover 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.EventHub.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 NamespacesFailoverViaJsonString(string subscriptionId, string resourceGroupName, string namespaceName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/failover" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.EventHubsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.NamespacesFailover_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 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. @@ -5884,7 +15526,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task EventHubsDelete_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task NamespacesFailover_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -5893,28 +15535,109 @@ public partial class EventHub { var sendTask = sender.SendAsync(request, eventListener); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var _finalUri = _response.GetFirstHeader(@"Location"); + 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 ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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"); + } + 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.EventHub.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.EventHub.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: + // 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.EventHub.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response); - break; + continue; } - case global::System.Net.HttpStatusCode.NoContent: + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_finalUri)) { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response); + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } break; } + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponseAutoGenerated.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -5930,42 +15653,40 @@ public partial class EventHub } /// - /// Validation method for method. Call this like the actual call, but you will get validation + /// Validation method for method. Call this like the actual call, but you will get validation /// events back. /// - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// The Event Hub name /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// Parameters for updating a namespace resource. /// 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 EventHubsDelete_Validate(string resourceGroupName, string namespaceName, string eventHubName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task NamespacesFailover_Validate(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IFailOver body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertRegEx(nameof(namespaceName),namespaceName,@"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(eventHubName),eventHubName); - await eventListener.AssertMinimumLength(nameof(eventHubName),eventHubName,1); - await eventListener.AssertMaximumLength(nameof(eventHubName),eventHubName,256); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(namespaceName), namespaceName, @"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Gets an Event Hubs description for the specified Event Hub. - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// The Event Hub name + /// Gets the description of the specified namespace. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name /// 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). @@ -5974,7 +15695,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EventHubsGet(string resourceGroupName, string namespaceName, string eventHubName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NamespacesGet(string subscriptionId, string resourceGroupName, string namespaceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -5988,8 +15709,6 @@ public partial class EventHub + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.EventHub/namespaces/" + global::System.Uri.EscapeDataString(namespaceName) - + "/eventhubs/" - + global::System.Uri.EscapeDataString(eventHubName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -6003,17 +15722,16 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.EventHubsGet_Call(request,onOk,onDefault,eventListener,sender); + await this.NamespacesGet_Call (request, onOk,onDefault,eventListener,sender); } } - /// Gets an AuthorizationRule for an Event Hub by rule name. + /// Gets an AuthorizationRule for a Namespace by rule name. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. /// Name of the resource group within the azure subscription. /// The Namespace name - /// The Event Hub name /// The authorization rule name. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. /// 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). @@ -6022,7 +15740,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EventHubsGetAuthorizationRule(string resourceGroupName, string namespaceName, string eventHubName, string authorizationRuleName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NamespacesGetAuthorizationRule(string subscriptionId, string resourceGroupName, string namespaceName, string authorizationRuleName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -6036,8 +15754,6 @@ public partial class EventHub + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.EventHub/namespaces/" + global::System.Uri.EscapeDataString(namespaceName) - + "/eventhubs/" - + global::System.Uri.EscapeDataString(eventHubName) + "/authorizationRules/" + global::System.Uri.EscapeDataString(authorizationRuleName) + "?" @@ -6053,11 +15769,11 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.EventHubsGetAuthorizationRule_Call(request,onOk,onDefault,eventListener,sender); + await this.NamespacesGetAuthorizationRule_Call (request, onOk,onDefault,eventListener,sender); } } - /// Gets an AuthorizationRule for an Event Hub by rule name. + /// Gets an AuthorizationRule for a Namespace by rule name. /// /// 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 @@ -6067,7 +15783,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EventHubsGetAuthorizationRuleViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NamespacesGetAuthorizationRuleViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -6075,18 +15791,17 @@ public partial class EventHub { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/eventhubs/(?[^/]+)/authorizationRules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/authorizationRules/(?[^/]+)$", 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.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; - var eventHubName = _match.Groups["eventHubName"].Value; var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -6095,8 +15810,6 @@ public partial class EventHub + resourceGroupName + "/providers/Microsoft.EventHub/namespaces/" + namespaceName - + "/eventhubs/" - + eventHubName + "/authorizationRules/" + authorizationRuleName + "?" @@ -6112,104 +15825,19 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.EventHubsGetAuthorizationRule_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.EventHub.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 EventHubsGetAuthorizationRule_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.AuthorizationRule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally - { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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. - /// - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// The Event Hub name - /// The authorization rule name. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// 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 EventHubsGetAuthorizationRule_Validate(string resourceGroupName, string namespaceName, string eventHubName, string authorizationRuleName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); - await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); - await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertRegEx(nameof(namespaceName),namespaceName,@"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(eventHubName),eventHubName); - await eventListener.AssertMinimumLength(nameof(eventHubName),eventHubName,1); - await eventListener.AssertMaximumLength(nameof(eventHubName),eventHubName,256); - await eventListener.AssertNotNull(nameof(authorizationRuleName),authorizationRuleName); - await eventListener.AssertMinimumLength(nameof(authorizationRuleName),authorizationRuleName,1); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await this.NamespacesGetAuthorizationRule_Call (request, onOk,onDefault,eventListener,sender); } } - /// Gets an Event Hubs description for the specified Event Hub. + /// Gets an AuthorizationRule for a Namespace by rule name. /// - /// 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.EventHub.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 EventHubsGetViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NamespacesGetAuthorizationRuleViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -6217,17 +15845,17 @@ public partial class EventHub { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/eventhubs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/authorizationRules/(?[^/]+)$", 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.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; - var eventHubName = _match.Groups["eventHubName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; + var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -6236,120 +15864,38 @@ public partial class EventHub + resourceGroupName + "/providers/Microsoft.EventHub/namespaces/" + namespaceName - + "/eventhubs/" - + eventHubName + + "/authorizationRules/" + + authorizationRuleName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.EventHubsGet_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.EventHub.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 EventHubsGet_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.Eventhub.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally - { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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. - /// - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// The Event Hub name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// 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 EventHubsGet_Validate(string resourceGroupName, string namespaceName, string eventHubName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); - await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); - await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertRegEx(nameof(namespaceName),namespaceName,@"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(eventHubName),eventHubName); - await eventListener.AssertMinimumLength(nameof(eventHubName),eventHubName,1); - await eventListener.AssertMaximumLength(nameof(eventHubName),eventHubName,256); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - } - } - - /// Gets the authorization rules for an Event Hub. - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// The Event Hub name + return await this.NamespacesGetAuthorizationRuleWithResult_Call (request, eventListener,sender); + } + } + + /// Gets an AuthorizationRule for a Namespace by rule name. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// 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). + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The authorization rule name. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 EventHubsListAuthorizationRules(string resourceGroupName, string namespaceName, string eventHubName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NamespacesGetAuthorizationRuleWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -6363,84 +15909,88 @@ public partial class EventHub + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.EventHub/namespaces/" + global::System.Uri.EscapeDataString(namespaceName) - + "/eventhubs/" - + global::System.Uri.EscapeDataString(eventHubName) - + "/authorizationRules" + + "/authorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.EventHubsListAuthorizationRules_Call(request,onOk,onDefault,eventListener,sender); + return await this.NamespacesGetAuthorizationRuleWithResult_Call (request, eventListener,sender); } } - /// Gets the authorization rules for an Event Hub. - /// - /// 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). + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 EventHubsListAuthorizationRulesViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task NamespacesGetAuthorizationRuleWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01-preview"; - // Constant Parameters using( NoSynchronizationContext ) { - // verify that Identity format is an exact match for uri + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/eventhubs/(?[^/]+)/authorizationRules$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.AuthorizationRule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules'"); + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); } - - // replace URI parameters with values from identity - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var namespaceName = _match.Groups["namespaceName"].Value; - var eventHubName = _match.Groups["eventHubName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.EventHub/namespaces/" - + namespaceName - + "/eventhubs/" - + eventHubName - + "/authorizationRules" - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.EventHubsListAuthorizationRules_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 @@ -6450,7 +16000,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task EventHubsListAuthorizationRules_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task NamespacesGetAuthorizationRule_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -6461,6 +16011,7 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -6468,13 +16019,13 @@ public partial class EventHub case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.AuthorizationRuleListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.AuthorizationRule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -6490,45 +16041,40 @@ public partial class EventHub } /// - /// Validation method for method. Call this like the actual call, but you will + /// Validation method for method. Call this like the actual call, but you will /// get validation events back. /// - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// The Event Hub name /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The authorization rule name. /// 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 EventHubsListAuthorizationRules_Validate(string resourceGroupName, string namespaceName, string eventHubName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task NamespacesGetAuthorizationRule_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertRegEx(nameof(namespaceName),namespaceName,@"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(eventHubName),eventHubName); - await eventListener.AssertMinimumLength(nameof(eventHubName),eventHubName,1); - await eventListener.AssertMaximumLength(nameof(eventHubName),eventHubName,256); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(namespaceName), namespaceName, @"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); + await eventListener.AssertNotNull(nameof(authorizationRuleName),authorizationRuleName); + await eventListener.AssertMinimumLength(nameof(authorizationRuleName),authorizationRuleName,1); } } - /// Gets all the Event Hubs in a Namespace. - /// Name of the resource group within the azure subscription. - /// The Namespace name + /// Gets NetworkRuleSet for a Namespace. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// Skip is only used if a previous operation returned a partial result. If a previous response contains - /// a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to - /// use for subsequent calls. - /// May be used to limit the number of results to the most recent N usageDetails. + /// Name of the resource group within the azure subscription. + /// The Namespace name /// 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). @@ -6537,7 +16083,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EventHubsListByNamespace(string resourceGroupName, string namespaceName, string subscriptionId, int? Skip, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NamespacesGetNetworkRuleSet(string subscriptionId, string resourceGroupName, string namespaceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -6551,13 +16097,9 @@ public partial class EventHub + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.EventHub/namespaces/" + global::System.Uri.EscapeDataString(namespaceName) - + "/eventhubs" + + "/networkRuleSets/default" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) - + "&" - + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -6569,16 +16111,12 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.EventHubsListByNamespace_Call(request,onOk,onDefault,eventListener,sender); + await this.NamespacesGetNetworkRuleSet_Call (request, onOk,onDefault,eventListener,sender); } } - /// Gets all the Event Hubs in a Namespace. + /// Gets NetworkRuleSet for a Namespace. /// - /// Skip is only used if a previous operation returned a partial result. If a previous response contains - /// a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to - /// use for subsequent calls. - /// May be used to limit the number of results to the most recent N usageDetails. /// 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). @@ -6587,7 +16125,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EventHubsListByNamespaceViaIdentity(global::System.String viaIdentity, int? Skip, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NamespacesGetNetworkRuleSetViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -6595,16 +16133,16 @@ public partial class EventHub { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/eventhubs$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/networkRuleSets/default$", 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.EventHub/namespaces/{namespaceName}/eventhubs'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkRuleSets/default'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -6612,146 +16150,8 @@ public partial class EventHub + "/resourceGroups/" + resourceGroupName + "/providers/Microsoft.EventHub/namespaces/" - + namespaceName - + "/eventhubs" - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) - + "&" - + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.EventHubsListByNamespace_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.EventHub.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 EventHubsListByNamespace_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.EventHubListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally - { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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. - /// - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// Skip is only used if a previous operation returned a partial result. If a previous response contains - /// a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to - /// use for subsequent calls. - /// May be used to limit the number of results to the most recent N usageDetails. - /// 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 EventHubsListByNamespace_Validate(string resourceGroupName, string namespaceName, string subscriptionId, int? Skip, int? Top, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); - await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); - await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertRegEx(nameof(namespaceName),namespaceName,@"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertIsLessThanOrEqual(nameof(Skip),Skip,1000); - await eventListener.AssertIsGreaterThanOrEqual(nameof(Top),Top,1); - await eventListener.AssertIsLessThanOrEqual(nameof(Top),Top,1000); - } - } - - /// Gets the ACS and SAS connection strings for the Event Hub. - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// The Event Hub name - /// The authorization rule name. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// 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.EventHub.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 EventHubsListKeys(string resourceGroupName, string namespaceName, string eventHubName, string authorizationRuleName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) - { - var apiVersion = @"2023-01-01-preview"; - // 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.EventHub/namespaces/" - + global::System.Uri.EscapeDataString(namespaceName) - + "/eventhubs/" - + global::System.Uri.EscapeDataString(eventHubName) - + "/authorizationRules/" - + global::System.Uri.EscapeDataString(authorizationRuleName) - + "/listKeys" + + namespaceName + + "/networkRuleSets/default" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -6760,26 +16160,24 @@ public partial class EventHub // 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.EventHub.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.EventHubsListKeys_Call(request,onOk,onDefault,eventListener,sender); + await this.NamespacesGetNetworkRuleSet_Call (request, onOk,onDefault,eventListener,sender); } } - /// Gets the ACS and SAS connection strings for the Event Hub. + /// Gets NetworkRuleSet for a Namespace. /// - /// 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.EventHub.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 EventHubsListKeysViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NamespacesGetNetworkRuleSetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -6787,18 +16185,16 @@ public partial class EventHub { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/eventhubs/(?[^/]+)/authorizationRules/(?[^/]+)/listKeys$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/networkRuleSets/default$", 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.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}/listKeys'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkRuleSets/default'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; - var eventHubName = _match.Groups["eventHubName"].Value; - var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -6807,29 +16203,130 @@ public partial class EventHub + resourceGroupName + "/providers/Microsoft.EventHub/namespaces/" + namespaceName - + "/eventhubs/" - + eventHubName - + "/authorizationRules/" - + authorizationRuleName - + "/listKeys" + + "/networkRuleSets/default" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Post, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesGetNetworkRuleSetWithResult_Call (request, eventListener,sender); + } + } + + /// Gets NetworkRuleSet for a Namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 NamespacesGetNetworkRuleSetWithResult(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/networkRuleSets/default" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.EventHubsListKeys_Call(request,onOk,onDefault,eventListener,sender); + return await this.NamespacesGetNetworkRuleSetWithResult_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.EventHub.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 NamespacesGetNetworkRuleSetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NetworkRuleSet.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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.EventHub.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 @@ -6839,7 +16336,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task EventHubsListKeys_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task NamespacesGetNetworkRuleSet_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -6850,6 +16347,7 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -6857,13 +16355,13 @@ public partial class EventHub case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.AccessKeys.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NetworkRuleSet.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -6879,47 +16377,34 @@ public partial class EventHub } /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. /// - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// The Event Hub name - /// The authorization rule name. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name /// 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 EventHubsListKeys_Validate(string resourceGroupName, string namespaceName, string eventHubName, string authorizationRuleName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task NamespacesGetNetworkRuleSet_Validate(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertRegEx(nameof(namespaceName),namespaceName,@"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(eventHubName),eventHubName); - await eventListener.AssertMinimumLength(nameof(eventHubName),eventHubName,1); - await eventListener.AssertMaximumLength(nameof(eventHubName),eventHubName,256); - await eventListener.AssertNotNull(nameof(authorizationRuleName),authorizationRuleName); - await eventListener.AssertMinimumLength(nameof(authorizationRuleName),authorizationRuleName,1); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(namespaceName), namespaceName, @"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); } } - /// Regenerates the ACS and SAS connection strings for the Event Hub. - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// The Event Hub name - /// The authorization rule name. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// Parameters supplied to regenerate the AuthorizationRule Keys (PrimaryKey/SecondaryKey). + /// Gets the description of the specified namespace. + /// /// 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). @@ -6928,25 +16413,32 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EventHubsRegenerateKeys(string resourceGroupName, string namespaceName, string eventHubName, string authorizationRuleName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRegenerateAccessKeyParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NamespacesGetViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // 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.EventHub/namespaces/(?[^/]+)$", 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.EventHub/namespaces/{namespaceName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) + + subscriptionId + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) + + resourceGroupName + "/providers/Microsoft.EventHub/namespaces/" - + global::System.Uri.EscapeDataString(namespaceName) - + "/eventhubs/" - + global::System.Uri.EscapeDataString(eventHubName) - + "/authorizationRules/" - + global::System.Uri.EscapeDataString(authorizationRuleName) - + "/regenerateKeys" + + namespaceName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -6955,31 +16447,24 @@ public partial class EventHub // 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.EventHub.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.EventHubsRegenerateKeys_Call(request,onOk,onDefault,eventListener,sender); + await this.NamespacesGet_Call (request, onOk,onDefault,eventListener,sender); } } - /// Regenerates the ACS and SAS connection strings for the Event Hub. + /// Gets the description of the specified namespace. /// - /// Parameters supplied to regenerate the AuthorizationRule Keys (PrimaryKey/SecondaryKey). - /// 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.EventHub.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 EventHubsRegenerateKeysViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRegenerateAccessKeyParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NamespacesGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -6987,18 +16472,16 @@ public partial class EventHub { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/eventhubs/(?[^/]+)/authorizationRules/(?[^/]+)/regenerateKeys$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)$", 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.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}/regenerateKeys'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; - var eventHubName = _match.Groups["eventHubName"].Value; - var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -7007,33 +16490,126 @@ public partial class EventHub + resourceGroupName + "/providers/Microsoft.EventHub/namespaces/" + namespaceName - + "/eventhubs/" - + eventHubName - + "/authorizationRules/" - + authorizationRuleName - + "/regenerateKeys" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Post, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesGetWithResult_Call (request, eventListener,sender); + } + } + + /// Gets the description of the specified namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 NamespacesGetWithResult(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.EventHubsRegenerateKeys_Call(request,onOk,onDefault,eventListener,sender); + return await this.NamespacesGetWithResult_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.EventHub.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 NamespacesGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.EhNamespace.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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.EventHub.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 @@ -7043,7 +16619,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task EventHubsRegenerateKeys_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task NamespacesGet_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -7054,6 +16630,7 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -7061,13 +16638,13 @@ public partial class EventHub case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.AccessKeys.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.EhNamespace.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -7083,46 +16660,37 @@ public partial class EventHub } /// - /// Validation method for method. Call this like the actual call, but you will get - /// validation events back. + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. /// - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// The Event Hub name - /// The authorization rule name. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// Parameters supplied to regenerate the AuthorizationRule Keys (PrimaryKey/SecondaryKey). + /// Name of the resource group within the azure subscription. + /// The Namespace name /// 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 EventHubsRegenerateKeys_Validate(string resourceGroupName, string namespaceName, string eventHubName, string authorizationRuleName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRegenerateAccessKeyParameters body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task NamespacesGet_Validate(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertRegEx(nameof(namespaceName),namespaceName,@"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(eventHubName),eventHubName); - await eventListener.AssertMinimumLength(nameof(eventHubName),eventHubName,1); - await eventListener.AssertMaximumLength(nameof(eventHubName),eventHubName,256); - await eventListener.AssertNotNull(nameof(authorizationRuleName),authorizationRuleName); - await eventListener.AssertMinimumLength(nameof(authorizationRuleName),authorizationRuleName,1); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); + await eventListener.AssertRegEx(nameof(namespaceName), namespaceName, @"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); } } - /// Check the give Namespace name availability. + /// + /// Lists all the available Namespaces within a subscription, irrespective of the resource groups. + /// /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// Parameters to check availability of the given Namespace name /// 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). @@ -7131,7 +16699,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NamespacesCheckNameAvailability(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityParameter body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NamespacesList(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -7141,7 +16709,7 @@ public partial class EventHub var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) - + "/providers/Microsoft.EventHub/checkNameAvailability" + + "/providers/Microsoft.EventHub/namespaces" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -7150,22 +16718,62 @@ public partial class EventHub // 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.EventHub.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.NamespacesCheckNameAvailability_Call(request,onOk,onDefault,eventListener,sender); + await this.NamespacesList_Call (request, onOk,onDefault,eventListener,sender); } } - /// Check the give Namespace name availability. + /// Gets a list of authorization rules for a Namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// 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.EventHub.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 NamespacesListAuthorizationRules(string subscriptionId, string resourceGroupName, string namespaceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/authorizationRules" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.NamespacesListAuthorizationRules_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets a list of authorization rules for a Namespace. /// - /// Parameters to check availability of the given Namespace name /// 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). @@ -7174,7 +16782,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NamespacesCheckNameAvailabilityViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityParameter body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NamespacesListAuthorizationRulesViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -7182,19 +16790,25 @@ public partial class EventHub { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.EventHub/checkNameAvailability$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/authorizationRules$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.EventHub/checkNameAvailability'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId - + "/providers/Microsoft.EventHub/checkNameAvailability" + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/authorizationRules" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -7203,20 +16817,173 @@ public partial class EventHub // 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.EventHub.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.NamespacesCheckNameAvailability_Call(request,onOk,onDefault,eventListener,sender); + await this.NamespacesListAuthorizationRules_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets a list of authorization rules for a Namespace. + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 NamespacesListAuthorizationRulesViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/(?[^/]+)/authorizationRules$", 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.EventHub/namespaces/{namespaceName}/authorizationRules'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/authorizationRules" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesListAuthorizationRulesWithResult_Call (request, eventListener,sender); + } + } + + /// Gets a list of authorization rules for a Namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 NamespacesListAuthorizationRulesWithResult(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/authorizationRules" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesListAuthorizationRulesWithResult_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.EventHub.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 NamespacesListAuthorizationRulesWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.AuthorizationRuleListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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.EventHub.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 @@ -7226,7 +16993,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task NamespacesCheckNameAvailability_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task NamespacesListAuthorizationRules_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -7237,6 +17004,7 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -7244,13 +17012,13 @@ public partial class EventHub case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.CheckNameAvailabilityResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.AuthorizationRuleListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -7266,34 +17034,36 @@ public partial class EventHub } /// - /// Validation method for method. Call this like the actual call, but you will - /// get validation events back. + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. /// /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// Parameters to check availability of the given Namespace name + /// Name of the resource group within the azure subscription. + /// The Namespace name /// 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 NamespacesCheckNameAvailability_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityParameter body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task NamespacesListAuthorizationRules_Validate(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); + await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); + await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); + await eventListener.AssertRegEx(nameof(namespaceName), namespaceName, @"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); } } - /// - /// Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. - /// - /// Name of the resource group within the azure subscription. - /// The Namespace name + /// Lists the available Namespaces within a resource group. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// Parameters for creating a namespace resource. + /// Name of the resource group within the azure 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). @@ -7302,7 +17072,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NamespacesCreateOrUpdate(string resourceGroupName, string namespaceName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NamespacesListByResourceGroup(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -7314,8 +17084,7 @@ public partial class EventHub + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.EventHub/namespaces/" - + global::System.Uri.EscapeDataString(namespaceName) + + "/providers/Microsoft.EventHub/namespaces" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -7324,26 +17093,17 @@ public partial class EventHub // 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.EventHub.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.NamespacesCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.NamespacesListByResourceGroup_Call (request, onOk,onDefault,eventListener,sender); } } - /// Creates or updates an AuthorizationRule for a Namespace. - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// The authorization rule name. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The shared access AuthorizationRule. + /// Lists the available Namespaces within a 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). @@ -7352,22 +17112,30 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NamespacesCreateOrUpdateAuthorizationRule(string resourceGroupName, string namespaceName, string authorizationRuleName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NamespacesListByResourceGroupViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // 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.EventHub/namespaces$", 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.EventHub/namespaces'"); + } + + // 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/" - + global::System.Uri.EscapeDataString(subscriptionId) + + subscriptionId + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.EventHub/namespaces/" - + global::System.Uri.EscapeDataString(namespaceName) - + "/authorizationRules/" - + global::System.Uri.EscapeDataString(authorizationRuleName) + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -7376,31 +17144,24 @@ public partial class EventHub // 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.EventHub.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.NamespacesCreateOrUpdateAuthorizationRule_Call(request,onOk,onDefault,eventListener,sender); + await this.NamespacesListByResourceGroup_Call (request, onOk,onDefault,eventListener,sender); } } - /// Creates or updates an AuthorizationRule for a Namespace. + /// Lists the available Namespaces within a resource group. /// - /// The shared access AuthorizationRule. - /// 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.EventHub.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 NamespacesCreateOrUpdateAuthorizationRuleViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NamespacesListByResourceGroupViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -7408,52 +17169,143 @@ public partial class EventHub { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/authorizationRules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces$", 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.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces'"); } // replace URI parameters with values from identity - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var namespaceName = _match.Groups["namespaceName"].Value; - var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; 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.EventHub/namespaces/" - + namespaceName - + "/authorizationRules/" - + authorizationRuleName + + "/providers/Microsoft.EventHub/namespaces" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Put, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesListByResourceGroupWithResult_Call (request, eventListener,sender); + } + } + + /// Lists the available Namespaces within a resource group. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 NamespacesListByResourceGroupWithResult(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.NamespacesCreateOrUpdateAuthorizationRule_Call(request,onOk,onDefault,eventListener,sender); + return await this.NamespacesListByResourceGroupWithResult_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.EventHub.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 NamespacesListByResourceGroupWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.EhNamespaceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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.EventHub.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). @@ -7462,7 +17314,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task NamespacesCreateOrUpdateAuthorizationRule_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task NamespacesListByResourceGroup_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -7473,6 +17325,7 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -7480,13 +17333,13 @@ public partial class EventHub case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.AuthorizationRule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.EhNamespaceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -7502,44 +17355,33 @@ public partial class EventHub } /// - /// Validation method for method. Call this like the actual call, - /// but you will get validation events back. + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. /// - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// The authorization rule name. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// The shared access AuthorizationRule. + /// Name of the resource group within the azure 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 NamespacesCreateOrUpdateAuthorizationRule_Validate(string resourceGroupName, string namespaceName, string authorizationRuleName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task NamespacesListByResourceGroup_Validate(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); - await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); - await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertRegEx(nameof(namespaceName),namespaceName,@"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(authorizationRuleName),authorizationRuleName); - await eventListener.AssertMinimumLength(nameof(authorizationRuleName),authorizationRuleName,1); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Create or update NetworkRuleSet for a Namespace. - /// Name of the resource group within the azure subscription. - /// The Namespace name + /// Gets the primary and secondary connection strings for the Namespace. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// The Namespace IpFilterRule. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The authorization rule name. /// 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). @@ -7548,7 +17390,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NamespacesCreateOrUpdateNetworkRuleSet(string resourceGroupName, string namespaceName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NamespacesListKeys(string subscriptionId, string resourceGroupName, string namespaceName, string authorizationRuleName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -7562,7 +17404,9 @@ public partial class EventHub + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.EventHub/namespaces/" + global::System.Uri.EscapeDataString(namespaceName) - + "/networkRuleSets/default" + + "/authorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "/listKeys" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -7571,22 +17415,17 @@ public partial class EventHub // 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.EventHub.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.NamespacesCreateOrUpdateNetworkRuleSet_Call(request,onOk,onDefault,eventListener,sender); + await this.NamespacesListKeys_Call (request, onOk,onDefault,eventListener,sender); } } - /// Create or update NetworkRuleSet for a Namespace. + /// Gets the primary and secondary connection strings for the Namespace. /// - /// The Namespace IpFilterRule. /// 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). @@ -7595,7 +17434,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NamespacesCreateOrUpdateNetworkRuleSetViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NamespacesListKeysViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -7603,16 +17442,17 @@ public partial class EventHub { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/networkRuleSets/default$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/authorizationRules/(?[^/]+)$", 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.EventHub/namespaces/{namespaceName}/networkRuleSets/default'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; + var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -7621,7 +17461,9 @@ public partial class EventHub + resourceGroupName + "/providers/Microsoft.EventHub/namespaces/" + namespaceName - + "/networkRuleSets/default" + + "/authorizationRules/" + + authorizationRuleName + + "/listKeys" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -7630,114 +17472,24 @@ public partial class EventHub // 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.EventHub.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.NamespacesCreateOrUpdateNetworkRuleSet_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.EventHub.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 NamespacesCreateOrUpdateNetworkRuleSet_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NetworkRuleSet.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally - { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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. - /// - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The Namespace IpFilterRule. - /// 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 NamespacesCreateOrUpdateNetworkRuleSet_Validate(string resourceGroupName, string namespaceName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); - await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); - await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertRegEx(nameof(namespaceName),namespaceName,@"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); + await this.NamespacesListKeys_Call (request, onOk,onDefault,eventListener,sender); } } - /// - /// Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. - /// - /// - /// Parameters for creating a namespace 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). + /// Gets the primary and secondary connection strings for the Namespace. + /// /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 NamespacesCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NamespacesListKeysViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -7745,16 +17497,17 @@ public partial class EventHub { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/authorizationRules/(?[^/]+)$", 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.EventHub/namespaces/{namespaceName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; + var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -7763,38 +17516,81 @@ public partial class EventHub + resourceGroupName + "/providers/Microsoft.EventHub/namespaces/" + namespaceName + + "/authorizationRules/" + + authorizationRuleName + + "/listKeys" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Put, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesListKeysWithResult_Call (request, eventListener,sender); + } + } + + /// Gets the primary and secondary connection strings for the Namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The authorization rule name. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 NamespacesListKeysWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/authorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "/listKeys" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.NamespacesCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + return await this.NamespacesListKeysWithResult_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 default (any response code not handled - /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 NamespacesCreateOrUpdate_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task NamespacesListKeysWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -7802,108 +17598,72 @@ public partial class EventHub try { var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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: default - 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.EventHub.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.EventHub.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.EventHub.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.EventHub.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.UndeclaredResponseException(_response); - } - } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; - // check for terminal status code - if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: { - continue; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.AccessKeys.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; } - // we are done polling, do a request on final target? - if (!string.IsNullOrWhiteSpace(_originalUri)) + default: { - // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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.EventHub.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.EventHub.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 NamespacesListKeys_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -7911,13 +17671,13 @@ public partial class EventHub case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.EhNamespace.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.AccessKeys.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -7933,44 +17693,41 @@ public partial class EventHub } /// - /// Validation method for method. Call this like the actual call, but you will get - /// validation events back. + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. /// - /// Name of the resource group within the azure subscription. - /// The Namespace name /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// Parameters for creating a namespace resource. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The authorization rule name. /// 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 NamespacesCreateOrUpdate_Validate(string resourceGroupName, string namespaceName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task NamespacesListKeys_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertRegEx(nameof(namespaceName),namespaceName,@"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); + await eventListener.AssertRegEx(nameof(namespaceName), namespaceName, @"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); + await eventListener.AssertNotNull(nameof(authorizationRuleName),authorizationRuleName); + await eventListener.AssertMinimumLength(nameof(authorizationRuleName),authorizationRuleName,1); } } - /// - /// Deletes an existing namespace. This operation also removes all associated resources under the namespace. - /// - /// Name of the resource group within the azure subscription. - /// The Namespace name + /// Gets NetworkRuleSet for a Namespace. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name /// 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. @@ -7978,7 +17735,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NamespacesDelete(string resourceGroupName, string namespaceName, string subscriptionId, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NamespacesListNetworkRuleSet(string subscriptionId, string resourceGroupName, string namespaceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -7992,6 +17749,7 @@ public partial class EventHub + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.EventHub/namespaces/" + global::System.Uri.EscapeDataString(namespaceName) + + "/networkRuleSets" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -8000,23 +17758,18 @@ public partial class EventHub // 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.EventHub.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.NamespacesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.NamespacesListNetworkRuleSet_Call (request, onOk,onDefault,eventListener,sender); } } - /// Deletes an AuthorizationRule for a Namespace. - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// The authorization rule name. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. + /// Gets NetworkRuleSet for a Namespace. + /// /// 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. @@ -8024,22 +17777,33 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NamespacesDeleteAuthorizationRule(string resourceGroupName, string namespaceName, string authorizationRuleName, string subscriptionId, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NamespacesListNetworkRuleSetViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // 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.EventHub/namespaces/(?[^/]+)/networkRuleSets$", 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.EventHub/namespaces/{namespaceName}/networkRuleSets'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) + + subscriptionId + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) + + resourceGroupName + "/providers/Microsoft.EventHub/namespaces/" - + global::System.Uri.EscapeDataString(namespaceName) - + "/authorizationRules/" - + global::System.Uri.EscapeDataString(authorizationRuleName) + + namespaceName + + "/networkRuleSets" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -8048,27 +17812,24 @@ public partial class EventHub // 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.EventHub.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.NamespacesDeleteAuthorizationRule_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.NamespacesListNetworkRuleSet_Call (request, onOk,onDefault,eventListener,sender); } } - /// Deletes an AuthorizationRule for a Namespace. + /// Gets NetworkRuleSet for a Namespace. /// - /// 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.EventHub.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 NamespacesDeleteAuthorizationRuleViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NamespacesListNetworkRuleSetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -8076,48 +17837,150 @@ public partial class EventHub { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/authorizationRules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/networkRuleSets$", 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.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkRuleSets'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; - var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + subscriptionId + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/networkRuleSets" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesListNetworkRuleSetWithResult_Call (request, eventListener,sender); + } + } + + /// Gets NetworkRuleSet for a Namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 NamespacesListNetworkRuleSetWithResult(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" - + resourceGroupName + + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.EventHub/namespaces/" - + namespaceName - + "/authorizationRules/" - + authorizationRuleName + + global::System.Uri.EscapeDataString(namespaceName) + + "/networkRuleSets" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Delete, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.NamespacesDeleteAuthorizationRule_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + return await this.NamespacesListNetworkRuleSetWithResult_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.EventHub.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 NamespacesListNetworkRuleSetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NetworkRuleSetListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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.EventHub.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 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. @@ -8125,7 +17988,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task NamespacesDeleteAuthorizationRule_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task NamespacesListNetworkRuleSet_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -8136,6 +17999,7 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -8143,19 +18007,13 @@ public partial class EventHub case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NetworkRuleSetListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -8171,41 +18029,37 @@ public partial class EventHub } /// - /// Validation method for method. Call this like the actual call, but you - /// will get validation events back. + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. /// - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// The authorization rule name. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name /// 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 NamespacesDeleteAuthorizationRule_Validate(string resourceGroupName, string namespaceName, string authorizationRuleName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task NamespacesListNetworkRuleSet_Validate(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertRegEx(nameof(namespaceName),namespaceName,@"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(authorizationRuleName),authorizationRuleName); - await eventListener.AssertMinimumLength(nameof(authorizationRuleName),authorizationRuleName,1); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(namespaceName), namespaceName, @"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); } } /// - /// Deletes an existing namespace. This operation also removes all associated resources under the namespace. + /// Lists all the available Namespaces within a subscription, irrespective of the resource groups. /// /// /// 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. @@ -8213,7 +18067,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NamespacesDeleteViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NamespacesListViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -8221,24 +18075,19 @@ public partial class EventHub { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.EventHub/namespaces$", 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.EventHub/namespaces/{namespaceName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.EventHub/namespaces'"); } // replace URI parameters with values from identity - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var namespaceName = _match.Groups["namespaceName"].Value; var subscriptionId = _match.Groups["subscriptionId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.EventHub/namespaces/" - + namespaceName + + "/providers/Microsoft.EventHub/namespaces" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -8247,137 +18096,184 @@ public partial class EventHub // 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.EventHub.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.NamespacesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.NamespacesList_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 204 (NoContent). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// + /// Lists all the available Namespaces within a subscription, irrespective of the resource groups. + /// + /// /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 NamespacesDelete_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NamespacesListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { + var apiVersion = @"2023-01-01-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - global::System.Net.Http.HttpResponseMessage _response = null; - try + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.EventHub/namespaces$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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: default - var _finalUri = _response.GetFirstHeader(@"Location"); - 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 ) - { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.EventHub/namespaces'"); + } - // 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.EventHub.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // 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.EventHub/namespaces" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.URLCreated, pathAndQuery); 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"))) { - 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.EventHub.Runtime.Method.Get); + // 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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - // 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; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesListWithResult_Call (request, eventListener,sender); + } + } - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } + /// + /// Lists all the available Namespaces within a subscription, irrespective of the resource groups. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 NamespacesListWithResult(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.EventHub/namespaces" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - // drop the old response - _response?.Dispose(); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Polling, _response); 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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); 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.EventHub.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.UndeclaredResponseException(_response); - } - } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesListWithResult_Call (request, eventListener,sender); + } + } - // check for terminal status code - if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 NamespacesListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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: { - continue; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.EhNamespaceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; } - // we are done polling, do a request on final target? - if (!string.IsNullOrWhiteSpace(_finalUri)) + default: { - // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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.EventHub.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.EventHub.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 NamespacesList_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -8385,19 +18281,13 @@ public partial class EventHub case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.EhNamespaceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -8413,46 +18303,42 @@ public partial class EventHub } /// - /// Validation method for method. Call this like the actual call, but you will get validation + /// Validation method for method. Call this like the actual call, but you will get validation /// events back. /// - /// Name of the resource group within the azure subscription. - /// The Namespace name /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// 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 NamespacesDelete_Validate(string resourceGroupName, string namespaceName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task NamespacesList_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); - await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); - await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertRegEx(nameof(namespaceName),namespaceName,@"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); } } - /// GeoDR Failover + /// + /// Regenerates the primary or secondary connection strings for the specified Namespace. + /// /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// Name of the resource group within the azure subscription. /// The Namespace name - /// Parameters for updating a namespace resource. + /// The authorization rule name. + /// Parameters required to regenerate the connection string. + /// 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.EventHub.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 NamespacesFailover(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IFailOver body, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NamespacesRegenerateKeys(string subscriptionId, string resourceGroupName, string namespaceName, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRegenerateAccessKeyParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -8466,7 +18352,9 @@ public partial class EventHub + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.EventHub/namespaces/" + global::System.Uri.EscapeDataString(namespaceName) - + "/failover" + + "/authorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "/regenerateKeys" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -8480,25 +18368,29 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.NamespacesFailover_Call(request,onDefault,eventListener,sender); + await this.NamespacesRegenerateKeys_Call (request, onOk,onDefault,eventListener,sender); } } - /// GeoDR Failover + /// + /// Regenerates the primary or secondary connection strings for the specified Namespace. + /// /// - /// Parameters for updating a namespace resource. + /// Parameters required to regenerate the connection string. + /// 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.EventHub.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 NamespacesFailoverViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IFailOver body, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NamespacesRegenerateKeysViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRegenerateAccessKeyParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -8506,16 +18398,17 @@ public partial class EventHub { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/failover$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/authorizationRules/(?[^/]+)$", 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.EventHub/namespaces/{namespaceName}/failover'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; + var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -8524,7 +18417,9 @@ public partial class EventHub + resourceGroupName + "/providers/Microsoft.EventHub/namespaces/" + namespaceName - + "/failover" + + "/authorizationRules/" + + authorizationRuleName + + "/regenerateKeys" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -8538,191 +18433,86 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.NamespacesFailover_Call(request,onDefault,eventListener,sender); + await this.NamespacesRegenerateKeys_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 default (any response code not handled - /// elsewhere). + /// + /// Regenerates the primary or secondary connection strings for the specified Namespace. + /// + /// + /// Parameters required to regenerate the connection string. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 NamespacesFailover_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NamespacesRegenerateKeysViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRegenerateAccessKeyParameters body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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: default - var _finalUri = _response.GetFirstHeader(@"Location"); - 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.EventHub.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.EventHub.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.EventHub.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.EventHub.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.UndeclaredResponseException(_response); - } - } + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/authorizationRules/(?[^/]+)$", 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.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}'"); + } - // 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? - if (!string.IsNullOrWhiteSpace(_finalUri)) - { - // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Get); + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/authorizationRules/" + + authorizationRuleName + + "/regenerateKeys" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - // drop the old response - _response?.Dispose(); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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.EventHub.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - switch ( _response.StatusCode ) - { - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponseAutoGenerated.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally - { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); - } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesRegenerateKeysWithResult_Call (request, eventListener,sender); } } /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. + /// Regenerates the primary or secondary connection strings for the specified Namespace. /// /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// Name of the resource group within the azure subscription. /// The Namespace name - /// Parameters for updating a namespace resource. - /// 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 NamespacesFailover_Validate(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IFailOver body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); - await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); - await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertRegEx(nameof(namespaceName),namespaceName,@"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); - } - } - - /// Gets the description of the specified namespace. - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. + /// The authorization rule name. + /// Json string supplied to the NamespacesRegenerateKeys 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). @@ -8731,7 +18521,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NamespacesGet(string resourceGroupName, string namespaceName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NamespacesRegenerateKeysViaJsonString(string subscriptionId, string resourceGroupName, string namespaceName, string authorizationRuleName, 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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -8745,6 +18535,9 @@ public partial class EventHub + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.EventHub/namespaces/" + global::System.Uri.EscapeDataString(namespaceName) + + "/authorizationRules/" + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "/regenerateKeys" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -8753,30 +18546,35 @@ public partial class EventHub // 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.EventHub.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.NamespacesGet_Call(request,onOk,onDefault,eventListener,sender); + await this.NamespacesRegenerateKeys_Call (request, onOk,onDefault,eventListener,sender); } } - /// Gets an AuthorizationRule for a Namespace by rule name. + /// + /// Regenerates the primary or secondary connection strings for the specified Namespace. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. /// Name of the resource group within the azure subscription. /// The Namespace name /// The authorization rule name. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// 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). + /// Json string supplied to the NamespacesRegenerateKeys operation /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 NamespacesGetAuthorizationRule(string resourceGroupName, string namespaceName, string authorizationRuleName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NamespacesRegenerateKeysViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string authorizationRuleName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -8792,80 +18590,143 @@ public partial class EventHub + global::System.Uri.EscapeDataString(namespaceName) + "/authorizationRules/" + global::System.Uri.EscapeDataString(authorizationRuleName) + + "/regenerateKeys" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.NamespacesGetAuthorizationRule_Call(request,onOk,onDefault,eventListener,sender); + return await this.NamespacesRegenerateKeysWithResult_Call (request, eventListener,sender); } } - /// Gets an AuthorizationRule for a Namespace by rule name. - /// - /// 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). + /// + /// Regenerates the primary or secondary connection strings for the specified Namespace. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The authorization rule name. + /// Parameters required to regenerate the connection string. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 NamespacesGetAuthorizationRuleViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NamespacesRegenerateKeysWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRegenerateAccessKeyParameters body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2023-01-01-preview"; // 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.EventHub/namespaces/(?[^/]+)/authorizationRules/(?[^/]+)$", 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.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}'"); - } - - // replace URI parameters with values from identity - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var namespaceName = _match.Groups["namespaceName"].Value; - var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].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.EventHub/namespaces/" - + namespaceName + + global::System.Uri.EscapeDataString(namespaceName) + "/authorizationRules/" - + authorizationRuleName + + global::System.Uri.EscapeDataString(authorizationRuleName) + + "/regenerateKeys" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.NamespacesGetAuthorizationRule_Call(request,onOk,onDefault,eventListener,sender); + return await this.NamespacesRegenerateKeysWithResult_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.EventHub.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 NamespacesRegenerateKeysWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.AccessKeys.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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.EventHub.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 @@ -8875,7 +18736,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task NamespacesGetAuthorizationRule_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task NamespacesRegenerateKeys_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -8886,6 +18747,7 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -8893,13 +18755,13 @@ public partial class EventHub case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.AuthorizationRule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.AccessKeys.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -8915,49 +18777,58 @@ public partial class EventHub } /// - /// Validation method for method. Call this like the actual call, but you will - /// get validation events back. + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. /// Name of the resource group within the azure subscription. /// The Namespace name /// The authorization rule name. - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. + /// Parameters required to regenerate the connection string. /// 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 NamespacesGetAuthorizationRule_Validate(string resourceGroupName, string namespaceName, string authorizationRuleName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task NamespacesRegenerateKeys_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string authorizationRuleName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRegenerateAccessKeyParameters body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertRegEx(nameof(namespaceName),namespaceName,@"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); + await eventListener.AssertRegEx(nameof(namespaceName), namespaceName, @"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); await eventListener.AssertNotNull(nameof(authorizationRuleName),authorizationRuleName); await eventListener.AssertMinimumLength(nameof(authorizationRuleName),authorizationRuleName,1); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Gets NetworkRuleSet for a Namespace. - /// Name of the resource group within the azure subscription. - /// The Namespace name + /// + /// Update a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. + /// /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// Parameters for updating a namespace resource. /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). + /// 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.EventHub.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 NamespacesGetNetworkRuleSet(string resourceGroupName, string namespaceName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NamespacesUpdate(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -8971,7 +18842,6 @@ public partial class EventHub + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.EventHub/namespaces/" + global::System.Uri.EscapeDataString(namespaceName) - + "/networkRuleSets/default" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -8980,26 +18850,36 @@ public partial class EventHub // 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.EventHub.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Patch, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.NamespacesGetNetworkRuleSet_Call(request,onOk,onDefault,eventListener,sender); + await this.NamespacesUpdate_Call (request, onOk,onCreated,onAccepted,onDefault,eventListener,sender); } } - /// Gets NetworkRuleSet for a Namespace. + /// + /// Update a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. + /// /// + /// Parameters for updating a namespace resource. /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). + /// 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.EventHub.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 NamespacesGetNetworkRuleSetViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NamespacesUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -9007,16 +18887,16 @@ public partial class EventHub { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/networkRuleSets/default$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)$", 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.EventHub/namespaces/{namespaceName}/networkRuleSets/default'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -9025,7 +18905,6 @@ public partial class EventHub + resourceGroupName + "/providers/Microsoft.EventHub/namespaces/" + namespaceName - + "/networkRuleSets/default" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -9034,102 +18913,32 @@ public partial class EventHub // 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.EventHub.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Patch, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.NamespacesGetNetworkRuleSet_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.EventHub.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 NamespacesGetNetworkRuleSet_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NetworkRuleSet.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally - { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); - } + await this.NamespacesUpdate_Call (request, onOk,onCreated,onAccepted,onDefault,eventListener,sender); } } /// - /// Validation method for method. Call this like the actual call, but you will - /// get validation events back. + /// Update a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. /// - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// 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 NamespacesGetNetworkRuleSet_Validate(string resourceGroupName, string namespaceName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); - await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); - await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertRegEx(nameof(namespaceName),namespaceName,@"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - } - } - - /// Gets the description of the specified namespace. /// - /// 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). + /// Parameters for updating a namespace resource. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 NamespacesGetViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NamespacesUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -9144,116 +18953,49 @@ public partial class EventHub } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.EventHub/namespaces/" - + namespaceName - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.NamespacesGet_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.EventHub.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 NamespacesGet_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.EhNamespace.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally - { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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. - /// - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// 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 NamespacesGet_Validate(string resourceGroupName, string namespaceName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); - await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); - await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertRegEx(nameof(namespaceName),namespaceName,@"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NamespacesUpdateWithResult_Call (request, eventListener,sender); } } /// - /// Lists all the available Namespaces within a subscription, irrespective of the resource groups. + /// Update a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. /// /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// Json string supplied to the NamespacesUpdate operation /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). + /// 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. @@ -9261,7 +19003,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NamespacesList(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NamespacesUpdateViaJsonString(string subscriptionId, string resourceGroupName, string namespaceName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -9271,7 +19013,10 @@ public partial class EventHub var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) - + "/providers/Microsoft.EventHub/namespaces" + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -9280,29 +19025,34 @@ public partial class EventHub // 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.EventHub.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Patch, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.NamespacesList_Call(request,onOk,onDefault,eventListener,sender); + await this.NamespacesUpdate_Call (request, onOk,onCreated,onAccepted,onDefault,eventListener,sender); } } - /// Gets a list of authorization rules for a Namespace. - /// Name of the resource group within the azure subscription. - /// The Namespace name + /// + /// Update a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. + /// /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// 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). + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// Json string supplied to the NamespacesUpdate operation /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 NamespacesListAuthorizationRules(string resourceGroupName, string namespaceName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NamespacesUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string namespaceName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -9316,81 +19066,153 @@ public partial class EventHub + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.EventHub/namespaces/" + global::System.Uri.EscapeDataString(namespaceName) - + "/authorizationRules" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.NamespacesListAuthorizationRules_Call(request,onOk,onDefault,eventListener,sender); + return await this.NamespacesUpdateWithResult_Call (request, eventListener,sender); } } - /// Gets a list of authorization rules for a Namespace. - /// - /// 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 namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// Parameters for updating a namespace resource. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 NamespacesListAuthorizationRulesViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NamespacesUpdateWithResult(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2023-01-01-preview"; // 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.EventHub/namespaces/(?[^/]+)/authorizationRules$", 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.EventHub/namespaces/{namespaceName}/authorizationRules'"); - } - - // replace URI parameters with values from identity - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var namespaceName = _match.Groups["namespaceName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].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.EventHub/namespaces/" - + namespaceName - + "/authorizationRules" + + global::System.Uri.EscapeDataString(namespaceName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.NamespacesListAuthorizationRules_Call(request,onOk,onDefault,eventListener,sender); + return await this.NamespacesUpdateWithResult_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.EventHub.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 NamespacesUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.EhNamespace.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + case global::System.Net.HttpStatusCode.Created: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.EhNamespace.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + case global::System.Net.HttpStatusCode.Accepted: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + throw new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException(_response); + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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.EventHub.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 201 (Created). + /// 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. @@ -9398,7 +19220,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task NamespacesListAuthorizationRules_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task NamespacesUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -9409,6 +19231,7 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -9416,13 +19239,25 @@ public partial class EventHub case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.AuthorizationRuleListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.EhNamespace.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + case global::System.Net.HttpStatusCode.Created: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.EhNamespace.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + case global::System.Net.HttpStatusCode.Accepted: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onAccepted(_response); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -9438,36 +19273,40 @@ public partial class EventHub } /// - /// Validation method for method. Call this like the actual call, but you - /// will get validation events back. + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. /// - /// Name of the resource group within the azure subscription. - /// The Namespace name /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// Parameters for updating a namespace resource. /// 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 NamespacesListAuthorizationRules_Validate(string resourceGroupName, string namespaceName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task NamespacesUpdate_Validate(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertRegEx(nameof(namespaceName),namespaceName,@"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(namespaceName), namespaceName, @"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Lists the available Namespaces within a resource group. - /// Name of the resource group within the azure subscription. + /// Gets list of current NetworkSecurityPerimeterConfiguration for Namespace /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name /// 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). @@ -9476,7 +19315,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NamespacesListByResourceGroup(string resourceGroupName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NetworkSecurityPerimeterConfigurationList(string subscriptionId, string resourceGroupName, string namespaceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -9488,7 +19327,9 @@ public partial class EventHub + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.EventHub/namespaces" + + "/providers/Microsoft.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/networkSecurityPerimeterConfigurations" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -9502,11 +19343,11 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.NamespacesListByResourceGroup_Call(request,onOk,onDefault,eventListener,sender); + await this.NetworkSecurityPerimeterConfigurationList_Call (request, onOk,onDefault,eventListener,sender); } } - /// Lists the available Namespaces within a resource group. + /// Gets list of current NetworkSecurityPerimeterConfiguration for Namespace /// /// 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 @@ -9516,7 +19357,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NamespacesListByResourceGroupViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NetworkSecurityPerimeterConfigurationListViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -9524,40 +19365,202 @@ public partial class EventHub { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/networkSecurityPerimeterConfigurations$", 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.EventHub/namespaces'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkSecurityPerimeterConfigurations'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/networkSecurityPerimeterConfigurations" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.NetworkSecurityPerimeterConfigurationList_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets list of current NetworkSecurityPerimeterConfiguration for Namespace + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 NetworkSecurityPerimeterConfigurationListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/(?[^/]+)/networkSecurityPerimeterConfigurations$", 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.EventHub/namespaces/{namespaceName}/networkSecurityPerimeterConfigurations'"); + } + + // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.EventHub/namespaces" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/networkSecurityPerimeterConfigurations" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.NetworkSecurityPerimeterConfigurationListWithResult_Call (request, eventListener,sender); + } + } + + /// Gets list of current NetworkSecurityPerimeterConfiguration for Namespace + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 NetworkSecurityPerimeterConfigurationListWithResult(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/networkSecurityPerimeterConfigurations" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.NamespacesListByResourceGroup_Call(request,onOk,onDefault,eventListener,sender); + return await this.NetworkSecurityPerimeterConfigurationListWithResult_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.EventHub.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 NetworkSecurityPerimeterConfigurationListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NetworkSecurityPerimeterConfigurationList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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.EventHub.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 @@ -9567,7 +19570,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task NamespacesListByResourceGroup_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task NetworkSecurityPerimeterConfigurationList_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -9578,6 +19581,7 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -9585,13 +19589,13 @@ public partial class EventHub case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.EhNamespaceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NetworkSecurityPerimeterConfigurationList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -9607,33 +19611,38 @@ public partial class EventHub } /// - /// Validation method for method. Call this like the actual call, but you will - /// get validation events back. + /// Validation method for method. Call this like the actual call, + /// but you will get validation events back. /// - /// Name of the resource group within the azure subscription. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name /// 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 NamespacesListByResourceGroup_Validate(string resourceGroupName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task NetworkSecurityPerimeterConfigurationList_Validate(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); + await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); + await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); + await eventListener.AssertRegEx(nameof(namespaceName), namespaceName, @"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); } } - /// Gets the primary and secondary connection strings for the Namespace. - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// The authorization rule name. + /// Refreshes any information about the association. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The ResourceAssociation Name /// 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). @@ -9642,7 +19651,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NamespacesListKeys(string resourceGroupName, string namespaceName, string authorizationRuleName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NetworkSecurityPerimeterConfigurationsCreateOrUpdate(string subscriptionId, string resourceGroupName, string namespaceName, string resourceAssociationName, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -9656,9 +19665,9 @@ public partial class EventHub + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.EventHub/namespaces/" + global::System.Uri.EscapeDataString(namespaceName) - + "/authorizationRules/" - + global::System.Uri.EscapeDataString(authorizationRuleName) - + "/listKeys" + + "/networkSecurityPerimeterConfigurations/" + + global::System.Uri.EscapeDataString(resourceAssociationName) + + "/reconcile" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -9672,11 +19681,11 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.NamespacesListKeys_Call(request,onOk,onDefault,eventListener,sender); + await this.NetworkSecurityPerimeterConfigurationsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// Gets the primary and secondary connection strings for the Namespace. + /// Refreshes any information about the association. /// /// 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 @@ -9686,7 +19695,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NamespacesListKeysViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NetworkSecurityPerimeterConfigurationsCreateOrUpdateViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -9694,17 +19703,17 @@ public partial class EventHub { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/authorizationRules/(?[^/]+)/listKeys$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/networkSecurityPerimeterConfigurations/(?[^/]+)$", 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.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}/listKeys'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkSecurityPerimeterConfigurations/{resourceAssociationName}'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; - var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceAssociationName = _match.Groups["resourceAssociationName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -9713,9 +19722,9 @@ public partial class EventHub + resourceGroupName + "/providers/Microsoft.EventHub/namespaces/" + namespaceName - + "/authorizationRules/" - + authorizationRuleName - + "/listKeys" + + "/networkSecurityPerimeterConfigurations/" + + resourceAssociationName + + "/reconcile" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -9729,11 +19738,13 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.NamespacesListKeys_Call(request,onOk,onDefault,eventListener,sender); + await this.NetworkSecurityPerimeterConfigurationsCreateOrUpdate_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 @@ -9743,7 +19754,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task NamespacesListKeys_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task NetworkSecurityPerimeterConfigurationsCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -9752,8 +19763,101 @@ public partial class EventHub { var sendTask = sender.SendAsync(request, eventListener); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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: default + var _finalUri = _response.GetFirstHeader(@"Location"); + 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 ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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"); + } + 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.EventHub.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.EventHub.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.EventHub.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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? + if (!string.IsNullOrWhiteSpace(_finalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -9761,13 +19865,13 @@ public partial class EventHub case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.AccessKeys.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -9783,40 +19887,35 @@ public partial class EventHub } /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. + /// Validation method for method. Call this like the actual + /// call, but you will get validation events back. /// - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// The authorization rule name. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The ResourceAssociation Name /// 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 NamespacesListKeys_Validate(string resourceGroupName, string namespaceName, string authorizationRuleName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task NetworkSecurityPerimeterConfigurationsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string resourceAssociationName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertRegEx(nameof(namespaceName),namespaceName,@"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(authorizationRuleName),authorizationRuleName); - await eventListener.AssertMinimumLength(nameof(authorizationRuleName),authorizationRuleName,1); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(namespaceName), namespaceName, @"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); + await eventListener.AssertNotNull(nameof(resourceAssociationName),resourceAssociationName); } } - /// Gets NetworkRuleSet for a Namespace. - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. + /// Lists all of the available Event Hub REST API operations. /// 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). @@ -9825,7 +19924,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NamespacesListNetworkRuleSet(string resourceGroupName, string namespaceName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -9833,13 +19932,7 @@ public partial class EventHub { // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.EventHub/namespaces/" - + global::System.Uri.EscapeDataString(namespaceName) - + "/networkRuleSets" + "/providers/Microsoft.EventHub/operations" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -9853,11 +19946,11 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.NamespacesListNetworkRuleSet_Call(request,onOk,onDefault,eventListener,sender); + await this.OperationsList_Call (request, onOk,onDefault,eventListener,sender); } } - /// Gets NetworkRuleSet for a Namespace. + /// Lists all of the available Event Hub REST API operations. /// /// 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 @@ -9867,7 +19960,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NamespacesListNetworkRuleSetViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -9875,53 +19968,118 @@ public partial class EventHub { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/networkRuleSets$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.EventHub/operations$", 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.EventHub/namespaces/{namespaceName}/networkRuleSets'"); + throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.EventHub/operations'"); } // replace URI parameters with values from identity - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var namespaceName = _match.Groups["namespaceName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.EventHub/namespaces/" - + namespaceName - + "/networkRuleSets" + "/providers/Microsoft.EventHub/operations" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OperationsList_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Lists all of the available Event Hub REST API operations. + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.EventHub/operations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.EventHub/operations'"); + } + + // replace URI parameters with values from identity + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Microsoft.EventHub/operations" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.OperationsListWithResult_Call (request, eventListener,sender); + } + } + + /// Lists all of the available Event Hub REST API operations. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Microsoft.EventHub/operations" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.NamespacesListNetworkRuleSet_Call(request,onOk,onDefault,eventListener,sender); + return await this.OperationsListWithResult_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 default (any response code not handled - /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 NamespacesListNetworkRuleSet_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task OperationsListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -9929,24 +20087,37 @@ public partial class EventHub try { var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NetworkRuleSetListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.OperationListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; } default: { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } } } } @@ -9960,84 +20131,7 @@ public partial class EventHub } } - /// - /// Validation method for method. Call this like the actual call, but you will - /// get validation events back. - /// - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// 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 NamespacesListNetworkRuleSet_Validate(string resourceGroupName, string namespaceName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); - await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); - await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertRegEx(nameof(namespaceName),namespaceName,@"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - } - } - - /// - /// Lists all the available Namespaces within a subscription, irrespective of the resource groups. - /// - /// - /// 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.EventHub.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 NamespacesListViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) - { - var apiVersion = @"2023-01-01-preview"; - // 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.EventHub/namespaces$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) - { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.EventHub/namespaces'"); - } - - // 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.EventHub/namespaces" - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.NamespacesList_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 @@ -10047,7 +20141,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task NamespacesList_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -10058,6 +20152,7 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -10065,13 +20160,13 @@ public partial class EventHub case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.EhNamespaceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.OperationListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -10087,41 +20182,40 @@ public partial class EventHub } /// - /// Validation method for method. Call this like the actual call, but you will get validation + /// Validation method for method. Call this like the actual call, but you will get validation /// events back. /// - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. /// 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 NamespacesList_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task OperationsList_Validate(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } } - /// - /// Regenerates the primary or secondary connection strings for the specified Namespace. - /// - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// The authorization rule name. + /// Update PrivateEndpointConnections of service namespace. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// Parameters required to regenerate the connection string. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The PrivateEndpointConnection name + /// Parameters supplied to update Status of PrivateEndPoint Connection to namespace resource. /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). + /// 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.EventHub.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 NamespacesRegenerateKeys(string resourceGroupName, string namespaceName, string authorizationRuleName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRegenerateAccessKeyParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsCreateOrUpdate(string subscriptionId, string resourceGroupName, string namespaceName, string privateEndpointConnectionName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -10135,9 +20229,8 @@ public partial class EventHub + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.EventHub/namespaces/" + global::System.Uri.EscapeDataString(namespaceName) - + "/authorizationRules/" - + global::System.Uri.EscapeDataString(authorizationRuleName) - + "/regenerateKeys" + + "/privateEndpointConnections/" + + global::System.Uri.EscapeDataString(privateEndpointConnectionName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -10146,33 +20239,34 @@ public partial class EventHub // 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.EventHub.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.NamespacesRegenerateKeys_Call(request,onOk,onDefault,eventListener,sender); + await this.PrivateEndpointConnectionsCreateOrUpdate_Call (request, onOk,onCreated,onAccepted,onDefault,eventListener,sender); } } - /// - /// Regenerates the primary or secondary connection strings for the specified Namespace. - /// + /// Update PrivateEndpointConnections of service namespace. /// - /// Parameters required to regenerate the connection string. + /// Parameters supplied to update Status of PrivateEndPoint Connection to namespace resource. /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). + /// 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.EventHub.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 NamespacesRegenerateKeysViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRegenerateAccessKeyParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -10180,17 +20274,17 @@ public partial class EventHub { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/authorizationRules/(?[^/]+)/regenerateKeys$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/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.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}/regenerateKeys'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; - var authorizationRuleName = _match.Groups["authorizationRuleName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; + var privateEndpointConnectionName = _match.Groups["privateEndpointConnectionName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -10199,9 +20293,8 @@ public partial class EventHub + resourceGroupName + "/providers/Microsoft.EventHub/namespaces/" + namespaceName - + "/authorizationRules/" - + authorizationRuleName - + "/regenerateKeys" + + "/privateEndpointConnections/" + + privateEndpointConnectionName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -10210,120 +20303,147 @@ public partial class EventHub // 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.EventHub.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.NamespacesRegenerateKeys_Call(request,onOk,onDefault,eventListener,sender); + await this.PrivateEndpointConnectionsCreateOrUpdate_Call (request, onOk,onCreated,onAccepted,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 PrivateEndpointConnections of service namespace. + /// + /// Parameters supplied to update Status of PrivateEndPoint Connection to namespace resource. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 NamespacesRegenerateKeys_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; + // verify that Identity format is an exact match for uri - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.AccessKeys.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/privateEndpointConnections/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}'"); } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var privateEndpointConnectionName = _match.Groups["privateEndpointConnectionName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/privateEndpointConnections/" + + privateEndpointConnectionName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.PrivateEndpointConnectionsCreateOrUpdateWithResult_Call (request, eventListener,sender); } } - /// - /// Validation method for method. Call this like the actual call, but you will get - /// validation events back. - /// - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// The authorization rule name. + /// Update PrivateEndpointConnections of service namespace. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// Parameters required to regenerate the connection string. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The PrivateEndpointConnection name + /// Json string supplied to the PrivateEndpointConnectionsCreateOrUpdate operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). + /// 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.EventHub.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 NamespacesRegenerateKeys_Validate(string resourceGroupName, string namespaceName, string authorizationRuleName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRegenerateAccessKeyParameters body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string namespaceName, string privateEndpointConnectionName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { + var apiVersion = @"2023-01-01-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); - await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); - await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertRegEx(nameof(namespaceName),namespaceName,@"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(authorizationRuleName),authorizationRuleName); - await eventListener.AssertMinimumLength(nameof(authorizationRuleName),authorizationRuleName,1); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/privateEndpointConnections/" + + global::System.Uri.EscapeDataString(privateEndpointConnectionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.PrivateEndpointConnectionsCreateOrUpdate_Call (request, onOk,onCreated,onAccepted,onDefault,eventListener,sender); } } - /// - /// Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. - /// - /// Name of the resource group within the azure subscription. - /// The Namespace name + /// Update PrivateEndpointConnections of service namespace. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// Parameters for updating a namespace resource. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 201 (Created). - /// 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). + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The PrivateEndpointConnection name + /// Json string supplied to the PrivateEndpointConnectionsCreateOrUpdate operation /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 NamespacesUpdate(string resourceGroupName, string namespaceName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string privateEndpointConnectionName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -10337,102 +20457,91 @@ public partial class EventHub + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.EventHub/namespaces/" + global::System.Uri.EscapeDataString(namespaceName) + + "/privateEndpointConnections/" + + global::System.Uri.EscapeDataString(privateEndpointConnectionName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Patch, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.NamespacesUpdate_Call(request,onOk,onCreated,onAccepted,onDefault,eventListener,sender); + return await this.PrivateEndpointConnectionsCreateOrUpdateWithResult_Call (request, eventListener,sender); } } - /// - /// Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. - /// - /// - /// Parameters for updating a namespace resource. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 201 (Created). - /// 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). + /// Update PrivateEndpointConnections of service namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The PrivateEndpointConnection name + /// Parameters supplied to update Status of PrivateEndPoint Connection to namespace resource. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 NamespacesUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string privateEndpointConnectionName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2023-01-01-preview"; // 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.EventHub/namespaces/(?[^/]+)$", 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.EventHub/namespaces/{namespaceName}'"); - } - - // replace URI parameters with values from identity - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var namespaceName = _match.Groups["namespaceName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].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.EventHub/namespaces/" - + namespaceName + + global::System.Uri.EscapeDataString(namespaceName) + + "/privateEndpointConnections/" + + global::System.Uri.EscapeDataString(privateEndpointConnectionName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Patch, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.NamespacesUpdate_Call(request,onOk,onCreated,onAccepted,onDefault,eventListener,sender); + return await this.PrivateEndpointConnectionsCreateOrUpdateWithResult_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 201 (Created). - /// 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.EventHub.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 NamespacesUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsCreateOrUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -10440,36 +20549,49 @@ public partial class EventHub try { var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.EhNamespace.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.PrivateEndpointConnection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; } case global::System.Net.HttpStatusCode.Created: { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.EhNamespace.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.PrivateEndpointConnection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; } case global::System.Net.HttpStatusCode.Accepted: { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onAccepted(_response); - break; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.PrivateEndpointConnection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; } default: { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } } } } @@ -10484,139 +20606,12 @@ public partial class EventHub } /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. - /// - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// Parameters for updating a namespace resource. - /// 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 NamespacesUpdate_Validate(string resourceGroupName, string namespaceName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); - await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); - await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertRegEx(nameof(namespaceName),namespaceName,@"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); - } - } - - /// Gets list of current NetworkSecurityPerimeterConfiguration for Namespace - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// 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.EventHub.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 NetworkSecurityPerimeterConfigurationList(string resourceGroupName, string namespaceName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) - { - var apiVersion = @"2023-01-01-preview"; - // 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.EventHub/namespaces/" - + global::System.Uri.EscapeDataString(namespaceName) - + "/networkSecurityPerimeterConfigurations" - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.NetworkSecurityPerimeterConfigurationList_Call(request,onOk,onDefault,eventListener,sender); - } - } - - /// Gets list of current NetworkSecurityPerimeterConfiguration for Namespace - /// - /// 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.EventHub.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 NetworkSecurityPerimeterConfigurationListViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) - { - var apiVersion = @"2023-01-01-preview"; - // 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.EventHub/namespaces/(?[^/]+)/networkSecurityPerimeterConfigurations$", 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.EventHub/namespaces/{namespaceName}/networkSecurityPerimeterConfigurations'"); - } - - // replace URI parameters with values from identity - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var namespaceName = _match.Groups["namespaceName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.EventHub/namespaces/" - + namespaceName - + "/networkSecurityPerimeterConfigurations" - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.NetworkSecurityPerimeterConfigurationList_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 201 (Created). + /// 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. @@ -10624,7 +20619,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task NetworkSecurityPerimeterConfigurationList_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -10635,6 +20630,7 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -10642,13 +20638,25 @@ public partial class EventHub case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NetworkSecurityPerimeterConfigurationList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.PrivateEndpointConnection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + case global::System.Net.HttpStatusCode.Created: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.PrivateEndpointConnection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + case global::System.Net.HttpStatusCode.Accepted: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onAccepted(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.PrivateEndpointConnection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -10664,39 +20672,47 @@ public partial class EventHub } /// - /// Validation method for method. Call this like the actual call, + /// Validation method for method. Call this like the actual call, /// but you will get validation events back. /// - /// Name of the resource group within the azure subscription. - /// The Namespace name /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The PrivateEndpointConnection name + /// Parameters supplied to update Status of PrivateEndPoint Connection to namespace resource. /// 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 NetworkSecurityPerimeterConfigurationList_Validate(string resourceGroupName, string namespaceName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string privateEndpointConnectionName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertRegEx(nameof(namespaceName),namespaceName,@"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(namespaceName), namespaceName, @"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); + await eventListener.AssertNotNull(nameof(privateEndpointConnectionName),privateEndpointConnectionName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Refreshes any information about the association. + /// + /// Deletes an existing namespace. This operation also removes all associated resources under the namespace. + /// /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// Name of the resource group within the azure subscription. /// The Namespace name - /// The ResourceAssociation Name + /// The PrivateEndpointConnection name /// 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. @@ -10704,7 +20720,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NetworkSecurityPerimeterConfigurationsCreateOrUpdate(string subscriptionId, string resourceGroupName, string namespaceName, string resourceAssociationName, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsDelete(string subscriptionId, string resourceGroupName, string namespaceName, string privateEndpointConnectionName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -10718,9 +20734,8 @@ public partial class EventHub + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.EventHub/namespaces/" + global::System.Uri.EscapeDataString(namespaceName) - + "/networkSecurityPerimeterConfigurations/" - + global::System.Uri.EscapeDataString(resourceAssociationName) - + "/reconcile" + + "/privateEndpointConnections/" + + global::System.Uri.EscapeDataString(privateEndpointConnectionName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -10729,18 +20744,21 @@ public partial class EventHub // 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.EventHub.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Delete, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.NetworkSecurityPerimeterConfigurationsCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.PrivateEndpointConnectionsDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); } } - /// Refreshes any information about the association. + /// + /// Deletes an existing namespace. This operation also removes all associated resources under the namespace. + /// /// /// 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. @@ -10748,7 +20766,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NetworkSecurityPerimeterConfigurationsCreateOrUpdateViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsDeleteViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -10756,17 +20774,17 @@ public partial class EventHub { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/networkSecurityPerimeterConfigurations/(?[^/]+)/reconcile$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/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.EventHub/namespaces/{namespaceName}/networkSecurityPerimeterConfigurations/{resourceAssociationName}/reconcile'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; - var resourceAssociationName = _match.Groups["resourceAssociationName"].Value; + var privateEndpointConnectionName = _match.Groups["privateEndpointConnectionName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -10775,9 +20793,8 @@ public partial class EventHub + resourceGroupName + "/providers/Microsoft.EventHub/namespaces/" + namespaceName - + "/networkSecurityPerimeterConfigurations/" - + resourceAssociationName - + "/reconcile" + + "/privateEndpointConnections/" + + privateEndpointConnectionName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -10786,20 +20803,19 @@ public partial class EventHub // 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.EventHub.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Delete, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.NetworkSecurityPerimeterConfigurationsCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.PrivateEndpointConnectionsDelete_Call (request, onOk,onNoContent,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 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. @@ -10807,7 +20823,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task NetworkSecurityPerimeterConfigurationsCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsDelete_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -10816,6 +20832,7 @@ public partial class EventHub { var sendTask = sender.SendAsync(request, eventListener); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } // this operation supports x-ms-long-running-operation @@ -10826,13 +20843,8 @@ public partial class EventHub 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.EventHub.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.EventHub.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"))) { @@ -10846,10 +20858,6 @@ public partial class EventHub // 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(); @@ -10858,45 +20866,45 @@ public partial class EventHub _response = await sender.SendAsync(request, eventListener); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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.EventHub.Runtime.UndeclaredResponseException(_response); + } + } // check for terminal status code if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) @@ -10918,6 +20926,7 @@ public partial class EventHub break; } } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -10928,10 +20937,16 @@ public partial class EventHub await onOk(_response); break; } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -10947,19 +20962,19 @@ public partial class EventHub } /// - /// Validation method for method. Call this like the actual - /// call, but you will get validation events back. + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. /// /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// Name of the resource group within the azure subscription. /// The Namespace name - /// The ResourceAssociation Name + /// The PrivateEndpointConnection name /// 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 NetworkSecurityPerimeterConfigurationsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string resourceAssociationName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsDelete_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string privateEndpointConnectionName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -10970,12 +20985,17 @@ public partial class EventHub await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertRegEx(nameof(namespaceName),namespaceName,@"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(resourceAssociationName),resourceAssociationName); + await eventListener.AssertRegEx(nameof(namespaceName), namespaceName, @"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); + await eventListener.AssertNotNull(nameof(privateEndpointConnectionName),privateEndpointConnectionName); } } - /// Lists all of the available Event Hub REST API operations. + /// Gets a description for the specified Private Endpoint Connection name. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The PrivateEndpointConnection name /// 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). @@ -10984,7 +21004,7 @@ public partial class EventHub /// /// 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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsGet(string subscriptionId, string resourceGroupName, string namespaceName, string privateEndpointConnectionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -10992,7 +21012,14 @@ public partial class EventHub { // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/providers/Microsoft.EventHub/operations" + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/privateEndpointConnections/" + + global::System.Uri.EscapeDataString(privateEndpointConnectionName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -11006,11 +21033,11 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.OperationsList_Call(request,onOk,onDefault,eventListener,sender); + await this.PrivateEndpointConnectionsGet_Call (request, onOk,onDefault,eventListener,sender); } } - /// Lists all of the available Event Hub REST API operations. + /// Gets a description for the specified Private Endpoint Connection name. /// /// 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 @@ -11020,7 +21047,7 @@ public partial class EventHub /// /// 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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -11028,16 +21055,27 @@ public partial class EventHub { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.EventHub/operations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/privateEndpointConnections/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.EventHub/operations'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var privateEndpointConnectionName = _match.Groups["privateEndpointConnectionName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/providers/Microsoft.EventHub/operations" + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/privateEndpointConnections/" + + privateEndpointConnectionName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -11051,93 +21089,77 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.OperationsList_Call(request,onOk,onDefault,eventListener,sender); + await this.PrivateEndpointConnectionsGet_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). + /// Gets a description for the specified Private Endpoint Connection name. + /// /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; + // verify that Identity format is an exact match for uri - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.OperationListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/privateEndpointConnections/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}'"); } - } - } - /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. - /// - /// 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 OperationsList_Validate(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var privateEndpointConnectionName = _match.Groups["privateEndpointConnectionName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/privateEndpointConnections/" + + privateEndpointConnectionName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.PrivateEndpointConnectionsGetWithResult_Call (request, eventListener,sender); } } - /// Creates or updates PrivateEndpointConnections of service namespace. + /// Gets a description for the specified Private Endpoint Connection name. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// Name of the resource group within the azure subscription. /// The Namespace name /// The PrivateEndpointConnection name - /// Parameters supplied to update Status of PrivateEndPoint Connection to namespace resource. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 201 (Created). - /// 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.EventHub.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 PrivateEndpointConnectionsCreateOrUpdate(string subscriptionId, string resourceGroupName, string namespaceName, string privateEndpointConnectionName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsGetWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string privateEndpointConnectionName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -11157,93 +21179,84 @@ public partial class EventHub + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Put, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.PrivateEndpointConnectionsCreateOrUpdate_Call(request,onOk,onCreated,onAccepted,onDefault,eventListener,sender); + return await this.PrivateEndpointConnectionsGetWithResult_Call (request, eventListener,sender); } } - /// Creates or updates PrivateEndpointConnections of service namespace. - /// - /// Parameters supplied to update Status of PrivateEndPoint Connection to namespace resource. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 201 (Created). - /// 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). + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 PrivateEndpointConnectionsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01-preview"; - // Constant Parameters using( NoSynchronizationContext ) { - // verify that Identity format is an exact match for uri + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/privateEndpointConnections/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.PrivateEndpointConnection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}'"); + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 namespaceName = _match.Groups["namespaceName"].Value; - var privateEndpointConnectionName = _match.Groups["privateEndpointConnectionName"].Value; - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.EventHub/namespaces/" - + namespaceName - + "/privateEndpointConnections/" - + privateEndpointConnectionName - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Put, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.PrivateEndpointConnectionsCreateOrUpdate_Call(request,onOk,onCreated,onAccepted,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 201 (Created). - /// 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. @@ -11251,7 +21264,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -11262,32 +21275,21 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.PrivateEndpointConnection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - case global::System.Net.HttpStatusCode.Created: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.PrivateEndpointConnection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - case global::System.Net.HttpStatusCode.Accepted: + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onAccepted(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.PrivateEndpointConnection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.PrivateEndpointConnection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -11303,20 +21305,19 @@ public partial class EventHub } /// - /// Validation method for method. Call this like the actual call, - /// but you will get validation events back. + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. /// /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. /// Name of the resource group within the azure subscription. /// The Namespace name /// The PrivateEndpointConnection name - /// Parameters supplied to update Status of PrivateEndPoint Connection to namespace resource. /// 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 PrivateEndpointConnectionsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string privateEndpointConnectionName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsGet_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string privateEndpointConnectionName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -11327,23 +21328,17 @@ public partial class EventHub await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertRegEx(nameof(namespaceName),namespaceName,@"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); + await eventListener.AssertRegEx(nameof(namespaceName), namespaceName, @"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); await eventListener.AssertNotNull(nameof(privateEndpointConnectionName),privateEndpointConnectionName); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// - /// Deletes an existing namespace. This operation also removes all associated resources under the namespace. - /// - /// Name of the resource group within the azure subscription. - /// The Namespace name + /// Gets the available PrivateEndpointConnections within a namespace. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// The PrivateEndpointConnection name + /// Name of the resource group within the azure subscription. + /// The Namespace name /// 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. @@ -11351,7 +21346,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsDelete(string resourceGroupName, string namespaceName, string subscriptionId, string privateEndpointConnectionName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsList(string subscriptionId, string resourceGroupName, string namespaceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -11365,8 +21360,7 @@ public partial class EventHub + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.EventHub/namespaces/" + global::System.Uri.EscapeDataString(namespaceName) - + "/privateEndpointConnections/" - + global::System.Uri.EscapeDataString(privateEndpointConnectionName) + + "/privateEndpointConnections" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -11375,21 +21369,18 @@ public partial class EventHub // 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.EventHub.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.PrivateEndpointConnectionsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.PrivateEndpointConnectionsList_Call (request, onOk,onDefault,eventListener,sender); } } - /// - /// Deletes an existing namespace. This operation also removes all associated resources under the namespace. - /// + /// Gets the available PrivateEndpointConnections within a namespace. /// /// 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. @@ -11397,7 +21388,7 @@ public partial class EventHub /// /// 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 onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -11405,17 +21396,16 @@ public partial class EventHub { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/privateEndpointConnections/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/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.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; - var privateEndpointConnectionName = _match.Groups["privateEndpointConnectionName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -11424,8 +21414,7 @@ public partial class EventHub + resourceGroupName + "/providers/Microsoft.EventHub/namespaces/" + namespaceName - + "/privateEndpointConnections/" - + privateEndpointConnectionName + + "/privateEndpointConnections" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -11434,215 +21423,79 @@ public partial class EventHub // 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.EventHub.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.PrivateEndpointConnectionsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.PrivateEndpointConnectionsList_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 204 (NoContent). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// Gets the available PrivateEndpointConnections within a namespace. + /// /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 PrivateEndpointConnectionsDelete_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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: default - var _finalUri = _response.GetFirstHeader(@"Location"); - 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.EventHub.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.EventHub.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.EventHub.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.EventHub.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.UndeclaredResponseException(_response); - } - } + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/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.EventHub/namespaces/{namespaceName}/privateEndpointConnections'"); + } - // 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? - if (!string.IsNullOrWhiteSpace(_finalUri)) - { - // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Get); + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/privateEndpointConnections" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - // drop the old response - _response?.Dispose(); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally - { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); - } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.PrivateEndpointConnectionsListWithResult_Call (request, eventListener,sender); } } - /// - /// Validation method for method. Call this like the actual call, but you - /// will get validation events back. - /// - /// Name of the resource group within the azure subscription. - /// The Namespace name + /// Gets the available PrivateEndpointConnections within a namespace. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// The PrivateEndpointConnection name - /// 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 PrivateEndpointConnectionsDelete_Validate(string resourceGroupName, string namespaceName, string subscriptionId, string privateEndpointConnectionName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); - await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); - await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertRegEx(nameof(namespaceName),namespaceName,@"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertNotNull(nameof(privateEndpointConnectionName),privateEndpointConnectionName); - } - } - - /// Gets a description for the specified Private Endpoint Connection name. /// Name of the resource group within the azure subscription. /// The Namespace name - /// The PrivateEndpointConnection name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// 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.EventHub.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 PrivateEndpointConnectionsGet(string resourceGroupName, string namespaceName, string privateEndpointConnectionName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsListWithResult(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -11656,82 +21509,87 @@ public partial class EventHub + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.EventHub/namespaces/" + global::System.Uri.EscapeDataString(namespaceName) - + "/privateEndpointConnections/" - + global::System.Uri.EscapeDataString(privateEndpointConnectionName) + + "/privateEndpointConnections" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.PrivateEndpointConnectionsGet_Call(request,onOk,onDefault,eventListener,sender); + return await this.PrivateEndpointConnectionsListWithResult_Call (request, eventListener,sender); } } - /// Gets a description for the specified Private Endpoint Connection name. - /// - /// 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). + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) - { - var apiVersion = @"2023-01-01-preview"; - // 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.EventHub/namespaces/(?[^/]+)/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.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}'"); - } - - // replace URI parameters with values from identity - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var namespaceName = _match.Groups["namespaceName"].Value; - var privateEndpointConnectionName = _match.Groups["privateEndpointConnectionName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.EventHub/namespaces/" - + namespaceName - + "/privateEndpointConnections/" - + privateEndpointConnectionName - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + /// 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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.PrivateEndpointConnectionsGet_Call(request,onOk,onDefault,eventListener,sender); + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.PrivateEndpointConnectionListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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.EventHub.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 @@ -11741,7 +21599,7 @@ public partial class EventHub /// /// 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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -11752,6 +21610,7 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -11759,13 +21618,13 @@ public partial class EventHub case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.PrivateEndpointConnection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.PrivateEndpointConnectionListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -11781,39 +21640,37 @@ public partial class EventHub } /// - /// Validation method for method. Call this like the actual call, but you will + /// Validation method for method. Call this like the actual call, but you will /// get validation events back. /// - /// Name of the resource group within the azure subscription. - /// The Namespace name - /// The PrivateEndpointConnection name /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name /// 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 PrivateEndpointConnectionsGet_Validate(string resourceGroupName, string namespaceName, string privateEndpointConnectionName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsList_Validate(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertRegEx(nameof(namespaceName),namespaceName,@"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(privateEndpointConnectionName),privateEndpointConnectionName); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(namespaceName), namespaceName, @"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); } } - /// Gets the available PrivateEndpointConnections within a namespace. - /// Name of the resource group within the azure subscription. - /// The Namespace name + /// Gets lists of resources that supports Privatelinks. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name /// 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). @@ -11822,7 +21679,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsList(string resourceGroupName, string namespaceName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task PrivateLinkResourcesGet(string subscriptionId, string resourceGroupName, string namespaceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -11836,7 +21693,7 @@ public partial class EventHub + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.EventHub/namespaces/" + global::System.Uri.EscapeDataString(namespaceName) - + "/privateEndpointConnections" + + "/privateLinkResources" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -11850,11 +21707,11 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.PrivateEndpointConnectionsList_Call(request,onOk,onDefault,eventListener,sender); + await this.PrivateLinkResourcesGet_Call (request, onOk,onDefault,eventListener,sender); } } - /// Gets the available PrivateEndpointConnections within a namespace. + /// Gets lists of resources that supports Privatelinks. /// /// 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 @@ -11864,7 +21721,7 @@ public partial class EventHub /// /// 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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task PrivateLinkResourcesGetViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -11872,16 +21729,16 @@ public partial class EventHub { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/privateEndpointConnections$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/privateLinkResources$", 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.EventHub/namespaces/{namespaceName}/privateEndpointConnections'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateLinkResources'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -11890,7 +21747,7 @@ public partial class EventHub + resourceGroupName + "/providers/Microsoft.EventHub/namespaces/" + namespaceName - + "/privateEndpointConnections" + + "/privateLinkResources" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -11904,11 +21761,166 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.PrivateEndpointConnectionsList_Call(request,onOk,onDefault,eventListener,sender); + await this.PrivateLinkResourcesGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets lists of resources that supports Privatelinks. + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 PrivateLinkResourcesGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/(?[^/]+)/privateLinkResources$", 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.EventHub/namespaces/{namespaceName}/privateLinkResources'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/privateLinkResources" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.PrivateLinkResourcesGetWithResult_Call (request, eventListener,sender); + } + } + + /// Gets lists of resources that supports Privatelinks. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 PrivateLinkResourcesGetWithResult(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/privateLinkResources" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.PrivateLinkResourcesGetWithResult_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.EventHub.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 PrivateLinkResourcesGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.PrivateLinkResourcesListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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.EventHub.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 @@ -11918,7 +21930,7 @@ public partial class EventHub /// /// 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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task PrivateLinkResourcesGet_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -11929,6 +21941,7 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -11936,13 +21949,13 @@ public partial class EventHub case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.PrivateEndpointConnectionListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.PrivateLinkResourcesListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -11958,46 +21971,49 @@ public partial class EventHub } /// - /// Validation method for method. Call this like the actual call, but you will - /// get validation events back. + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. /// - /// Name of the resource group within the azure subscription. - /// The Namespace name /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name /// 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 PrivateEndpointConnectionsList_Validate(string resourceGroupName, string namespaceName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task PrivateLinkResourcesGet_Validate(string subscriptionId, string resourceGroupName, string namespaceName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertRegEx(nameof(namespaceName),namespaceName,@"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(namespaceName), namespaceName, @"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); } } - /// Gets lists of resources that supports Privatelinks. - /// Name of the resource group within the azure subscription. - /// The Namespace name + /// Update an EventHub schema group. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Schema Group name + /// Parameters supplied to create an Event Hub 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.EventHub.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 PrivateLinkResourcesGet(string resourceGroupName, string namespaceName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SchemaRegistryCreateOrUpdate(string subscriptionId, string resourceGroupName, string namespaceName, string schemaGroupName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -12011,7 +22027,8 @@ public partial class EventHub + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.EventHub/namespaces/" + global::System.Uri.EscapeDataString(namespaceName) - + "/privateLinkResources" + + "/schemagroups/" + + global::System.Uri.EscapeDataString(schemaGroupName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -12020,26 +22037,92 @@ public partial class EventHub // 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.EventHub.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.PrivateLinkResourcesGet_Call(request,onOk,onDefault,eventListener,sender); + await this.SchemaRegistryCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// Gets lists of resources that supports Privatelinks. + /// Update an EventHub schema group. /// + /// Parameters supplied to create an Event Hub 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.EventHub.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 SchemaRegistryCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/(?[^/]+)/schemagroups/(?[^/]+)$", 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.EventHub/namespaces/{namespaceName}/schemagroups/{schemaGroupName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var schemaGroupName = _match.Groups["schemaGroupName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/schemagroups/" + + schemaGroupName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SchemaRegistryCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update an EventHub schema group. + /// + /// Parameters supplied to create an Event Hub resource. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 PrivateLinkResourcesGetViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SchemaRegistryCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -12047,16 +22130,17 @@ public partial class EventHub { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/privateLinkResources$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.EventHub/namespaces/(?[^/]+)/schemagroups/(?[^/]+)$", 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.EventHub/namespaces/{namespaceName}/privateLinkResources'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/schemagroups/{schemaGroupName}'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; + var schemaGroupName = _match.Groups["schemaGroupName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -12065,26 +22149,36 @@ public partial class EventHub + resourceGroupName + "/providers/Microsoft.EventHub/namespaces/" + namespaceName - + "/privateLinkResources" + + "/schemagroups/" + + schemaGroupName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.PrivateLinkResourcesGet_Call(request,onOk,onDefault,eventListener,sender); + return await this.SchemaRegistryCreateOrUpdateWithResult_Call (request, eventListener,sender); } } - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. + /// Update an EventHub schema group. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Schema Group name + /// Json string supplied to the SchemaRegistryCreateOrUpdate 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). @@ -12093,88 +22187,57 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task PrivateLinkResourcesGet_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SchemaRegistryCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string namespaceName, string schemaGroupName, 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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/schemagroups/" + + global::System.Uri.EscapeDataString(schemaGroupName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.PrivateLinkResourcesListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally - { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); - } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SchemaRegistryCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// - /// Validation method for method. Call this like the actual call, but you will get - /// validation events back. - /// - /// Name of the resource group within the azure subscription. - /// The Namespace name + /// Update an EventHub schema group. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. - /// 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 PrivateLinkResourcesGet_Validate(string resourceGroupName, string namespaceName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); - await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); - await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertRegEx(nameof(namespaceName),namespaceName,@"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - } - } - - /// Creates or Updates an EventHub schema group. /// Name of the resource group within the azure subscription. /// The Namespace name /// The Schema Group name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// Parameters supplied to create an Event Hub 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). + /// Json string supplied to the SchemaRegistryCreateOrUpdate operation /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 SchemaRegistryCreateOrUpdate(string resourceGroupName, string namespaceName, string schemaGroupName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SchemaRegistryCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string schemaGroupName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -12194,85 +22257,137 @@ public partial class EventHub + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Put, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.SchemaRegistryCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + return await this.SchemaRegistryCreateOrUpdateWithResult_Call (request, eventListener,sender); } } - /// Creates or Updates an EventHub schema group. - /// + /// Update an EventHub schema group. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Schema Group name /// Parameters supplied to create an Event Hub 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.EventHub.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 SchemaRegistryCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SchemaRegistryCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string schemaGroupName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2023-01-01-preview"; // 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.EventHub/namespaces/(?[^/]+)/schemagroups/(?[^/]+)$", 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.EventHub/namespaces/{namespaceName}/schemagroups/{schemaGroupName}'"); - } - - // replace URI parameters with values from identity - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var namespaceName = _match.Groups["namespaceName"].Value; - var schemaGroupName = _match.Groups["schemaGroupName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].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.EventHub/namespaces/" - + namespaceName + + global::System.Uri.EscapeDataString(namespaceName) + "/schemagroups/" - + schemaGroupName + + global::System.Uri.EscapeDataString(schemaGroupName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Put, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.SchemaRegistryCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + return await this.SchemaRegistryCreateOrUpdateWithResult_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.EventHub.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 SchemaRegistryCreateOrUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SchemaGroup.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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.EventHub.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 @@ -12282,7 +22397,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SchemaRegistryCreateOrUpdate_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task SchemaRegistryCreateOrUpdate_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -12293,6 +22408,7 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -12300,13 +22416,13 @@ public partial class EventHub case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.SchemaGroup.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SchemaGroup.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -12325,42 +22441,42 @@ public partial class EventHub /// Validation method for method. Call this like the actual call, but you will /// get validation events back. /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. /// Name of the resource group within the azure subscription. /// The Namespace name /// The Schema Group name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. /// Parameters supplied to create an Event Hub resource. /// 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 SchemaRegistryCreateOrUpdate_Validate(string resourceGroupName, string namespaceName, string schemaGroupName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task SchemaRegistryCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string schemaGroupName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup body, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertRegEx(nameof(namespaceName),namespaceName,@"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); + await eventListener.AssertRegEx(nameof(namespaceName), namespaceName, @"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); await eventListener.AssertNotNull(nameof(schemaGroupName),schemaGroupName); await eventListener.AssertMinimumLength(nameof(schemaGroupName),schemaGroupName,1); await eventListener.AssertMaximumLength(nameof(schemaGroupName),schemaGroupName,256); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(body), body); await eventListener.AssertObjectIsValid(nameof(body), body); } } /// Deletes an EventHub schema group. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. /// Name of the resource group within the azure subscription. /// The Namespace name /// The Schema Group name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. /// 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 @@ -12370,7 +22486,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SchemaRegistryDelete(string resourceGroupName, string namespaceName, string schemaGroupName, string subscriptionId, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SchemaRegistryDelete(string subscriptionId, string resourceGroupName, string namespaceName, string schemaGroupName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -12399,7 +22515,7 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.SchemaRegistryDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.SchemaRegistryDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); } } @@ -12414,7 +22530,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SchemaRegistryDeleteViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SchemaRegistryDeleteViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -12429,10 +22545,10 @@ public partial class EventHub } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; var schemaGroupName = _match.Groups["schemaGroupName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -12456,11 +22572,11 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.SchemaRegistryDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.SchemaRegistryDelete_Call (request, onOk,onNoContent,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 204 (NoContent). @@ -12471,7 +22587,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SchemaRegistryDelete_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task SchemaRegistryDelete_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -12482,6 +22598,7 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -12501,7 +22618,7 @@ public partial class EventHub default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -12520,39 +22637,39 @@ public partial class EventHub /// Validation method for method. Call this like the actual call, but you will get validation /// events back. /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. /// Name of the resource group within the azure subscription. /// The Namespace name /// The Schema Group name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. /// 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 SchemaRegistryDelete_Validate(string resourceGroupName, string namespaceName, string schemaGroupName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task SchemaRegistryDelete_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string schemaGroupName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertRegEx(nameof(namespaceName),namespaceName,@"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); + await eventListener.AssertRegEx(nameof(namespaceName), namespaceName, @"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); await eventListener.AssertNotNull(nameof(schemaGroupName),schemaGroupName); await eventListener.AssertMinimumLength(nameof(schemaGroupName),schemaGroupName,1); await eventListener.AssertMaximumLength(nameof(schemaGroupName),schemaGroupName,256); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); } } /// Gets the details of an EventHub schema group. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. /// Name of the resource group within the azure subscription. /// The Namespace name /// The Schema Group name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. /// 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). @@ -12561,22 +22678,78 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SchemaRegistryGet(string resourceGroupName, string namespaceName, string schemaGroupName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SchemaRegistryGet(string subscriptionId, string resourceGroupName, string namespaceName, string schemaGroupName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/schemagroups/" + + global::System.Uri.EscapeDataString(schemaGroupName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SchemaRegistryGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets the details of an EventHub schema 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.EventHub.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 SchemaRegistryGetViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // 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.EventHub/namespaces/(?[^/]+)/schemagroups/(?[^/]+)$", 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.EventHub/namespaces/{namespaceName}/schemagroups/{schemaGroupName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + var schemaGroupName = _match.Groups["schemaGroupName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) + + subscriptionId + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) + + resourceGroupName + "/providers/Microsoft.EventHub/namespaces/" - + global::System.Uri.EscapeDataString(namespaceName) + + namespaceName + "/schemagroups/" - + global::System.Uri.EscapeDataString(schemaGroupName) + + schemaGroupName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -12590,21 +22763,19 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.SchemaRegistryGet_Call(request,onOk,onDefault,eventListener,sender); + await this.SchemaRegistryGet_Call (request, onOk,onDefault,eventListener,sender); } } /// Gets the details of an EventHub schema 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.EventHub.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 SchemaRegistryGetViaIdentity(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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SchemaRegistryGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -12619,10 +22790,10 @@ public partial class EventHub } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; var schemaGroupName = _match.Groups["schemaGroupName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -12637,20 +22808,125 @@ public partial class EventHub + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.SchemaRegistryGetWithResult_Call (request, eventListener,sender); + } + } + + /// Gets the details of an EventHub schema group. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// The Schema Group name + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 SchemaRegistryGetWithResult(string subscriptionId, string resourceGroupName, string namespaceName, string schemaGroupName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/schemagroups/" + + global::System.Uri.EscapeDataString(schemaGroupName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.SchemaRegistryGet_Call(request,onOk,onDefault,eventListener,sender); + return await this.SchemaRegistryGetWithResult_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.EventHub.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 SchemaRegistryGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SchemaGroup.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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.EventHub.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 @@ -12660,7 +22936,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SchemaRegistryGet_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task SchemaRegistryGet_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -12671,6 +22947,7 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -12678,13 +22955,13 @@ public partial class EventHub case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.SchemaGroup.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SchemaGroup.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -12703,38 +22980,38 @@ public partial class EventHub /// Validation method for method. Call this like the actual call, but you will get validation /// events back. /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. /// Name of the resource group within the azure subscription. /// The Namespace name /// The Schema Group name - /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. /// 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 SchemaRegistryGet_Validate(string resourceGroupName, string namespaceName, string schemaGroupName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task SchemaRegistryGet_Validate(string subscriptionId, string resourceGroupName, string namespaceName, string schemaGroupName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertRegEx(nameof(namespaceName),namespaceName,@"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); + await eventListener.AssertRegEx(nameof(namespaceName), namespaceName, @"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); await eventListener.AssertNotNull(nameof(schemaGroupName),schemaGroupName); await eventListener.AssertMinimumLength(nameof(schemaGroupName),schemaGroupName,1); await eventListener.AssertMaximumLength(nameof(schemaGroupName),schemaGroupName,256); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); } } /// Gets all the Schema Groups in a Namespace. - /// Name of the resource group within the azure subscription. - /// The Namespace name /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name /// Skip is only used if a previous operation returned a partial result. If a previous response contains /// a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to /// use for subsequent calls. @@ -12747,7 +23024,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SchemaRegistryListByNamespace(string resourceGroupName, string namespaceName, string subscriptionId, int? Skip, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SchemaRegistryListByNamespace(string subscriptionId, string resourceGroupName, string namespaceName, int? Skip, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -12779,7 +23056,7 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.SchemaRegistryListByNamespace_Call(request,onOk,onDefault,eventListener,sender); + await this.SchemaRegistryListByNamespace_Call (request, onOk,onDefault,eventListener,sender); } } @@ -12797,7 +23074,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SchemaRegistryListByNamespaceViaIdentity(global::System.String viaIdentity, int? Skip, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SchemaRegistryListByNamespaceViaIdentity(global::System.String viaIdentity, int? Skip, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { var apiVersion = @"2023-01-01-preview"; // Constant Parameters @@ -12812,9 +23089,9 @@ public partial class EventHub } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var namespaceName = _match.Groups["namespaceName"].Value; - var subscriptionId = _match.Groups["subscriptionId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -12841,11 +23118,184 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.SchemaRegistryListByNamespace_Call(request,onOk,onDefault,eventListener,sender); + await this.SchemaRegistryListByNamespace_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets all the Schema Groups in a Namespace. + /// + /// Skip is only used if a previous operation returned a partial result. If a previous response contains + /// a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to + /// use for subsequent calls. + /// May be used to limit the number of results to the most recent N usageDetails. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 SchemaRegistryListByNamespaceViaIdentityWithResult(global::System.String viaIdentity, int? Skip, int? Top, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/(?[^/]+)/schemagroups$", 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.EventHub/namespaces/{namespaceName}/schemagroups'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var namespaceName = _match.Groups["namespaceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.EventHub/namespaces/" + + namespaceName + + "/schemagroups" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.SchemaRegistryListByNamespaceWithResult_Call (request, eventListener,sender); + } + } + + /// Gets all the Schema Groups in a Namespace. + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription + /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name + /// Skip is only used if a previous operation returned a partial result. If a previous response contains + /// a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to + /// use for subsequent calls. + /// May be used to limit the number of results to the most recent N usageDetails. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventHub.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 SchemaRegistryListByNamespaceWithResult(string subscriptionId, string resourceGroupName, string namespaceName, int? Skip, int? Top, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-01-preview"; + // 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.EventHub/namespaces/" + + global::System.Uri.EscapeDataString(namespaceName) + + "/schemagroups" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.SchemaRegistryListByNamespaceWithResult_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.EventHub.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 SchemaRegistryListByNamespaceWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SchemaGroupListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.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.EventHub.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.EventHub.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 @@ -12855,7 +23305,7 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SchemaRegistryListByNamespace_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task SchemaRegistryListByNamespace_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.EventHub.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -12866,6 +23316,7 @@ public partial class EventHub await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -12873,13 +23324,13 @@ public partial class EventHub case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.SchemaGroupListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SchemaGroupListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -12898,10 +23349,10 @@ public partial class EventHub /// Validation method for method. Call this like the actual call, but you will /// get validation events back. /// - /// Name of the resource group within the azure subscription. - /// The Namespace name /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription /// ID forms part of the URI for every service call. + /// Name of the resource group within the azure subscription. + /// The Namespace name /// Skip is only used if a previous operation returned a partial result. If a previous response contains /// a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to /// use for subsequent calls. @@ -12910,18 +23361,18 @@ public partial class EventHub /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SchemaRegistryListByNamespace_Validate(string resourceGroupName, string namespaceName, string subscriptionId, int? Skip, int? Top, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task SchemaRegistryListByNamespace_Validate(string subscriptionId, string resourceGroupName, string namespaceName, int? Skip, int? Top, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(namespaceName),namespaceName); await eventListener.AssertMinimumLength(nameof(namespaceName),namespaceName,6); await eventListener.AssertMaximumLength(nameof(namespaceName),namespaceName,50); - await eventListener.AssertRegEx(nameof(namespaceName),namespaceName,@"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(namespaceName), namespaceName, @"^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"); await eventListener.AssertIsLessThanOrEqual(nameof(Skip),Skip,1000); await eventListener.AssertIsGreaterThanOrEqual(nameof(Top),Top,1); await eventListener.AssertIsLessThanOrEqual(nameof(Top),Top,1000); diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AccessKeys.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/AccessKeys.PowerShell.cs similarity index 66% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AccessKeys.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/AccessKeys.PowerShell.cs index d6dd84406a52..bdfb43399ecf 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AccessKeys.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/AccessKeys.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class AccessKeys partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,37 +78,37 @@ internal AccessKeys(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("PrimaryConnectionString")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeysInternal)this).PrimaryConnectionString = (string) content.GetValueForProperty("PrimaryConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeysInternal)this).PrimaryConnectionString, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeysInternal)this).PrimaryConnectionString = (string) content.GetValueForProperty("PrimaryConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeysInternal)this).PrimaryConnectionString, global::System.Convert.ToString); } if (content.Contains("SecondaryConnectionString")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeysInternal)this).SecondaryConnectionString = (string) content.GetValueForProperty("SecondaryConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeysInternal)this).SecondaryConnectionString, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeysInternal)this).SecondaryConnectionString = (string) content.GetValueForProperty("SecondaryConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeysInternal)this).SecondaryConnectionString, global::System.Convert.ToString); } if (content.Contains("AliasPrimaryConnectionString")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeysInternal)this).AliasPrimaryConnectionString = (string) content.GetValueForProperty("AliasPrimaryConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeysInternal)this).AliasPrimaryConnectionString, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeysInternal)this).AliasPrimaryConnectionString = (string) content.GetValueForProperty("AliasPrimaryConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeysInternal)this).AliasPrimaryConnectionString, global::System.Convert.ToString); } if (content.Contains("AliasSecondaryConnectionString")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeysInternal)this).AliasSecondaryConnectionString = (string) content.GetValueForProperty("AliasSecondaryConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeysInternal)this).AliasSecondaryConnectionString, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeysInternal)this).AliasSecondaryConnectionString = (string) content.GetValueForProperty("AliasSecondaryConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeysInternal)this).AliasSecondaryConnectionString, global::System.Convert.ToString); } if (content.Contains("PrimaryKey")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeysInternal)this).PrimaryKey = (string) content.GetValueForProperty("PrimaryKey",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeysInternal)this).PrimaryKey, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeysInternal)this).PrimaryKey = (string) content.GetValueForProperty("PrimaryKey",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeysInternal)this).PrimaryKey, global::System.Convert.ToString); } if (content.Contains("SecondaryKey")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeysInternal)this).SecondaryKey = (string) content.GetValueForProperty("SecondaryKey",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeysInternal)this).SecondaryKey, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeysInternal)this).SecondaryKey = (string) content.GetValueForProperty("SecondaryKey",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeysInternal)this).SecondaryKey, global::System.Convert.ToString); } if (content.Contains("KeyName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeysInternal)this).KeyName = (string) content.GetValueForProperty("KeyName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeysInternal)this).KeyName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeysInternal)this).KeyName = (string) content.GetValueForProperty("KeyName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeysInternal)this).KeyName, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -123,57 +123,57 @@ internal AccessKeys(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("PrimaryConnectionString")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeysInternal)this).PrimaryConnectionString = (string) content.GetValueForProperty("PrimaryConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeysInternal)this).PrimaryConnectionString, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeysInternal)this).PrimaryConnectionString = (string) content.GetValueForProperty("PrimaryConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeysInternal)this).PrimaryConnectionString, global::System.Convert.ToString); } if (content.Contains("SecondaryConnectionString")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeysInternal)this).SecondaryConnectionString = (string) content.GetValueForProperty("SecondaryConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeysInternal)this).SecondaryConnectionString, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeysInternal)this).SecondaryConnectionString = (string) content.GetValueForProperty("SecondaryConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeysInternal)this).SecondaryConnectionString, global::System.Convert.ToString); } if (content.Contains("AliasPrimaryConnectionString")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeysInternal)this).AliasPrimaryConnectionString = (string) content.GetValueForProperty("AliasPrimaryConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeysInternal)this).AliasPrimaryConnectionString, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeysInternal)this).AliasPrimaryConnectionString = (string) content.GetValueForProperty("AliasPrimaryConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeysInternal)this).AliasPrimaryConnectionString, global::System.Convert.ToString); } if (content.Contains("AliasSecondaryConnectionString")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeysInternal)this).AliasSecondaryConnectionString = (string) content.GetValueForProperty("AliasSecondaryConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeysInternal)this).AliasSecondaryConnectionString, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeysInternal)this).AliasSecondaryConnectionString = (string) content.GetValueForProperty("AliasSecondaryConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeysInternal)this).AliasSecondaryConnectionString, global::System.Convert.ToString); } if (content.Contains("PrimaryKey")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeysInternal)this).PrimaryKey = (string) content.GetValueForProperty("PrimaryKey",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeysInternal)this).PrimaryKey, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeysInternal)this).PrimaryKey = (string) content.GetValueForProperty("PrimaryKey",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeysInternal)this).PrimaryKey, global::System.Convert.ToString); } if (content.Contains("SecondaryKey")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeysInternal)this).SecondaryKey = (string) content.GetValueForProperty("SecondaryKey",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeysInternal)this).SecondaryKey, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeysInternal)this).SecondaryKey = (string) content.GetValueForProperty("SecondaryKey",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeysInternal)this).SecondaryKey, global::System.Convert.ToString); } if (content.Contains("KeyName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeysInternal)this).KeyName = (string) content.GetValueForProperty("KeyName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeysInternal)this).KeyName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeysInternal)this).KeyName = (string) content.GetValueForProperty("KeyName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeysInternal)this).KeyName, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new AccessKeys(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new AccessKeys(content); } @@ -183,7 +183,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AccessKeys.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/AccessKeys.TypeConverter.cs similarity index 97% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AccessKeys.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/AccessKeys.TypeConverter.cs index f8d71000a262..495f2c4782d2 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AccessKeys.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/AccessKeys.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AccessKeys.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/AccessKeys.cs similarity index 85% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AccessKeys.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/AccessKeys.cs index 8691945cddde..eb3d27c159bc 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AccessKeys.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/AccessKeys.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// Namespace/EventHub Connection String [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class AccessKeys : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeysInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeysInternal { /// Backing field for property. @@ -36,25 +36,25 @@ public partial class AccessKeys : public string KeyName { get => this._keyName; } /// Internal Acessors for AliasPrimaryConnectionString - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeysInternal.AliasPrimaryConnectionString { get => this._aliasPrimaryConnectionString; set { {_aliasPrimaryConnectionString = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeysInternal.AliasPrimaryConnectionString { get => this._aliasPrimaryConnectionString; set { {_aliasPrimaryConnectionString = value;} } } /// Internal Acessors for AliasSecondaryConnectionString - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeysInternal.AliasSecondaryConnectionString { get => this._aliasSecondaryConnectionString; set { {_aliasSecondaryConnectionString = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeysInternal.AliasSecondaryConnectionString { get => this._aliasSecondaryConnectionString; set { {_aliasSecondaryConnectionString = value;} } } /// Internal Acessors for KeyName - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeysInternal.KeyName { get => this._keyName; set { {_keyName = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeysInternal.KeyName { get => this._keyName; set { {_keyName = value;} } } /// Internal Acessors for PrimaryConnectionString - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeysInternal.PrimaryConnectionString { get => this._primaryConnectionString; set { {_primaryConnectionString = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeysInternal.PrimaryConnectionString { get => this._primaryConnectionString; set { {_primaryConnectionString = value;} } } /// Internal Acessors for PrimaryKey - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeysInternal.PrimaryKey { get => this._primaryKey; set { {_primaryKey = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeysInternal.PrimaryKey { get => this._primaryKey; set { {_primaryKey = value;} } } /// Internal Acessors for SecondaryConnectionString - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeysInternal.SecondaryConnectionString { get => this._secondaryConnectionString; set { {_secondaryConnectionString = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeysInternal.SecondaryConnectionString { get => this._secondaryConnectionString; set { {_secondaryConnectionString = value;} } } /// Internal Acessors for SecondaryKey - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeysInternal.SecondaryKey { get => this._secondaryKey; set { {_secondaryKey = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeysInternal.SecondaryKey { get => this._secondaryKey; set { {_secondaryKey = value;} } } /// Backing field for property. private string _primaryConnectionString; @@ -98,6 +98,9 @@ public partial interface IAccessKeys : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Primary connection string of the alias if GEO DR is enabled", SerializedName = @"aliasPrimaryConnectionString", PossibleTypes = new [] { typeof(string) })] @@ -106,6 +109,9 @@ public partial interface IAccessKeys : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Secondary connection string of the alias if GEO DR is enabled", SerializedName = @"aliasSecondaryConnectionString", PossibleTypes = new [] { typeof(string) })] @@ -114,6 +120,9 @@ public partial interface IAccessKeys : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"A string that describes the AuthorizationRule.", SerializedName = @"keyName", PossibleTypes = new [] { typeof(string) })] @@ -122,6 +131,9 @@ public partial interface IAccessKeys : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Primary connection string of the created namespace AuthorizationRule.", SerializedName = @"primaryConnectionString", PossibleTypes = new [] { typeof(string) })] @@ -130,6 +142,9 @@ public partial interface IAccessKeys : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"A base64-encoded 256-bit primary key for signing and validating the SAS token.", SerializedName = @"primaryKey", PossibleTypes = new [] { typeof(string) })] @@ -138,6 +153,9 @@ public partial interface IAccessKeys : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Secondary connection string of the created namespace AuthorizationRule.", SerializedName = @"secondaryConnectionString", PossibleTypes = new [] { typeof(string) })] @@ -146,6 +164,9 @@ public partial interface IAccessKeys : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"A base64-encoded 256-bit primary key for signing and validating the SAS token.", SerializedName = @"secondaryKey", PossibleTypes = new [] { typeof(string) })] diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AccessKeys.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/AccessKeys.json.cs similarity index 89% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AccessKeys.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/AccessKeys.json.cs index 291594743d2a..f4e8c6c0c8fd 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AccessKeys.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/AccessKeys.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -65,24 +65,22 @@ internal AccessKeys(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.Jso { return; } - {_primaryConnectionString = If( json?.PropertyT("primaryConnectionString"), out var __jsonPrimaryConnectionString) ? (string)__jsonPrimaryConnectionString : (string)PrimaryConnectionString;} - {_secondaryConnectionString = If( json?.PropertyT("secondaryConnectionString"), out var __jsonSecondaryConnectionString) ? (string)__jsonSecondaryConnectionString : (string)SecondaryConnectionString;} - {_aliasPrimaryConnectionString = If( json?.PropertyT("aliasPrimaryConnectionString"), out var __jsonAliasPrimaryConnectionString) ? (string)__jsonAliasPrimaryConnectionString : (string)AliasPrimaryConnectionString;} - {_aliasSecondaryConnectionString = If( json?.PropertyT("aliasSecondaryConnectionString"), out var __jsonAliasSecondaryConnectionString) ? (string)__jsonAliasSecondaryConnectionString : (string)AliasSecondaryConnectionString;} - {_primaryKey = If( json?.PropertyT("primaryKey"), out var __jsonPrimaryKey) ? (string)__jsonPrimaryKey : (string)PrimaryKey;} - {_secondaryKey = If( json?.PropertyT("secondaryKey"), out var __jsonSecondaryKey) ? (string)__jsonSecondaryKey : (string)SecondaryKey;} - {_keyName = If( json?.PropertyT("keyName"), out var __jsonKeyName) ? (string)__jsonKeyName : (string)KeyName;} + {_primaryConnectionString = If( json?.PropertyT("primaryConnectionString"), out var __jsonPrimaryConnectionString) ? (string)__jsonPrimaryConnectionString : (string)_primaryConnectionString;} + {_secondaryConnectionString = If( json?.PropertyT("secondaryConnectionString"), out var __jsonSecondaryConnectionString) ? (string)__jsonSecondaryConnectionString : (string)_secondaryConnectionString;} + {_aliasPrimaryConnectionString = If( json?.PropertyT("aliasPrimaryConnectionString"), out var __jsonAliasPrimaryConnectionString) ? (string)__jsonAliasPrimaryConnectionString : (string)_aliasPrimaryConnectionString;} + {_aliasSecondaryConnectionString = If( json?.PropertyT("aliasSecondaryConnectionString"), out var __jsonAliasSecondaryConnectionString) ? (string)__jsonAliasSecondaryConnectionString : (string)_aliasSecondaryConnectionString;} + {_primaryKey = If( json?.PropertyT("primaryKey"), out var __jsonPrimaryKey) ? (string)__jsonPrimaryKey : (string)_primaryKey;} + {_secondaryKey = If( json?.PropertyT("secondaryKey"), out var __jsonSecondaryKey) ? (string)__jsonSecondaryKey : (string)_secondaryKey;} + {_keyName = If( json?.PropertyT("keyName"), out var __jsonKeyName) ? (string)__jsonKeyName : (string)_keyName;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys. /// /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys. + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new AccessKeys(json) : null; } @@ -106,31 +104,31 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode ToJson( { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._primaryConnectionString)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._primaryConnectionString.ToString()) : null, "primaryConnectionString" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._secondaryConnectionString)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._secondaryConnectionString.ToString()) : null, "secondaryConnectionString" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._aliasPrimaryConnectionString)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._aliasPrimaryConnectionString.ToString()) : null, "aliasPrimaryConnectionString" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._aliasSecondaryConnectionString)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._aliasSecondaryConnectionString.ToString()) : null, "aliasSecondaryConnectionString" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._primaryKey)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._primaryKey.ToString()) : null, "primaryKey" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._secondaryKey)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._secondaryKey.ToString()) : null, "secondaryKey" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._keyName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._keyName.ToString()) : null, "keyName" ,container.Add ); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Any.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/Any.PowerShell.cs index 7c2b02dadba1..f3d3ac6ed370 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Any.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/Any.PowerShell.cs @@ -7,7 +7,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; - /// Any object + /// Anything [System.ComponentModel.TypeConverter(typeof(AnyTypeConverter))] public partial class Any { @@ -146,7 +146,7 @@ public override string ToString() return ToJsonString(); } } - /// Any object + /// Anything [System.ComponentModel.TypeConverter(typeof(AnyTypeConverter))] public partial interface IAny diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Any.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/Any.cs index 0a4eb4613c72..4de73d310f7b 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Any.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/Any.cs @@ -7,7 +7,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; - /// Any object + /// Anything public partial class Any : Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAny, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAnyInternal @@ -19,13 +19,13 @@ public Any() } } - /// Any object + /// Anything public partial interface IAny : Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IJsonSerializable { } - /// Any object + /// Anything internal partial interface IAnyInternal { diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Any.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/Any.json.cs index 6824adc452c3..5f6c68858f1b 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Any.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/Any.json.cs @@ -7,7 +7,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; - /// Any object + /// Anything public partial class Any { diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Cluster.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Cluster.PowerShell.cs deleted file mode 100644 index a206c3907e5f..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Cluster.PowerShell.cs +++ /dev/null @@ -1,332 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; - - /// Single Event Hubs Cluster resource in List or Get operations. - [System.ComponentModel.TypeConverter(typeof(ClusterTypeConverter))] - public partial class Cluster - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal Cluster(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Sku")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterSku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ClusterSkuTypeConverter.ConvertFrom); - } - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ClusterPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.TrackedResourceTagsTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("SkuName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).SkuName = (string) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).SkuName, global::System.Convert.ToString); - } - if (content.Contains("Capacity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).Capacity = (int?) content.GetValueForProperty("Capacity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).Capacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("SystemDataCreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("CreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).CreatedAt = (string) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).CreatedAt, global::System.Convert.ToString); - } - if (content.Contains("UpdatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).UpdatedAt = (string) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).UpdatedAt, global::System.Convert.ToString); - } - if (content.Contains("MetricId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).MetricId = (string) content.GetValueForProperty("MetricId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).MetricId, global::System.Convert.ToString); - } - if (content.Contains("Status")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).Status, global::System.Convert.ToString); - } - if (content.Contains("SupportsScaling")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).SupportsScaling = (bool?) content.GetValueForProperty("SupportsScaling",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).SupportsScaling, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal Cluster(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Sku")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterSku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ClusterSkuTypeConverter.ConvertFrom); - } - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ClusterPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.TrackedResourceTagsTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("SkuName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).SkuName = (string) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).SkuName, global::System.Convert.ToString); - } - if (content.Contains("Capacity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).Capacity = (int?) content.GetValueForProperty("Capacity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).Capacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("SystemDataCreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("CreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).CreatedAt = (string) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).CreatedAt, global::System.Convert.ToString); - } - if (content.Contains("UpdatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).UpdatedAt = (string) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).UpdatedAt, global::System.Convert.ToString); - } - if (content.Contains("MetricId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).MetricId = (string) content.GetValueForProperty("MetricId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).MetricId, global::System.Convert.ToString); - } - if (content.Contains("Status")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).Status, global::System.Convert.ToString); - } - if (content.Contains("SupportsScaling")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).SupportsScaling = (bool?) content.GetValueForProperty("SupportsScaling",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal)this).SupportsScaling, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new Cluster(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new Cluster(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// Single Event Hubs Cluster resource in List or Get operations. - [System.ComponentModel.TypeConverter(typeof(ClusterTypeConverter))] - public partial interface ICluster - - { - - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespace.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespace.PowerShell.cs deleted file mode 100644 index 6f3e963a0eba..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespace.PowerShell.cs +++ /dev/null @@ -1,516 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; - - /// Single Namespace item in List or Get Operation - [System.ComponentModel.TypeConverter(typeof(EhNamespaceTypeConverter))] - public partial class EhNamespace - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new EhNamespace(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new EhNamespace(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal EhNamespace(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Sku")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.SkuTypeConverter.ConvertFrom); - } - if (content.Contains("Identity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IdentityTypeConverter.ConvertFrom); - } - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.EhNamespacePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.TrackedResourceTagsTypeConverter.ConvertFrom); - } - if (content.Contains("SkuName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).SkuName = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuName) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).SkuName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuName.CreateFrom); - } - if (content.Contains("SkuTier")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).SkuTier = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuTier?) content.GetValueForProperty("SkuTier",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).SkuTier, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuTier.CreateFrom); - } - if (content.Contains("SkuCapacity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).SkuCapacity = (int?) content.GetValueForProperty("SkuCapacity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).SkuCapacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("PrincipalId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).PrincipalId, global::System.Convert.ToString); - } - if (content.Contains("TenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).TenantId, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("Encryption")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).Encryption = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEncryption) content.GetValueForProperty("Encryption",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).Encryption, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.EncryptionTypeConverter.ConvertFrom); - } - if (content.Contains("IdentityType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType?) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType.CreateFrom); - } - if (content.Contains("UserAssignedIdentity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).UserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityUserAssignedIdentities) content.GetValueForProperty("UserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).UserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IdentityUserAssignedIdentitiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("GeoDataReplication")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).GeoDataReplication = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IGeoDataReplicationProperties) content.GetValueForProperty("GeoDataReplication",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).GeoDataReplication, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.GeoDataReplicationPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("MinimumTlsVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).MinimumTlsVersion = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.TlsVersion?) content.GetValueForProperty("MinimumTlsVersion",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).MinimumTlsVersion, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.TlsVersion.CreateFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).ProvisioningState, global::System.Convert.ToString); - } - if (content.Contains("Status")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).Status, global::System.Convert.ToString); - } - if (content.Contains("CreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("UpdatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("ServiceBusEndpoint")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).ServiceBusEndpoint = (string) content.GetValueForProperty("ServiceBusEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).ServiceBusEndpoint, global::System.Convert.ToString); - } - if (content.Contains("ClusterArmId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).ClusterArmId = (string) content.GetValueForProperty("ClusterArmId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).ClusterArmId, global::System.Convert.ToString); - } - if (content.Contains("MetricId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).MetricId = (string) content.GetValueForProperty("MetricId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).MetricId, global::System.Convert.ToString); - } - if (content.Contains("EnableAutoInflate")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).EnableAutoInflate = (bool?) content.GetValueForProperty("EnableAutoInflate",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).EnableAutoInflate, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("PublicNetworkAccess")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).PublicNetworkAccess = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess?) content.GetValueForProperty("PublicNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).PublicNetworkAccess, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess.CreateFrom); - } - if (content.Contains("MaximumThroughputUnit")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).MaximumThroughputUnit = (int?) content.GetValueForProperty("MaximumThroughputUnit",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).MaximumThroughputUnit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("KafkaEnabled")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).KafkaEnabled = (bool?) content.GetValueForProperty("KafkaEnabled",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).KafkaEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("ZoneRedundant")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).ZoneRedundant = (bool?) content.GetValueForProperty("ZoneRedundant",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).ZoneRedundant, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("PrivateEndpointConnection")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).PrivateEndpointConnection = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection[]) content.GetValueForProperty("PrivateEndpointConnection",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).PrivateEndpointConnection, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.PrivateEndpointConnectionTypeConverter.ConvertFrom)); - } - if (content.Contains("DisableLocalAuth")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).DisableLocalAuth = (bool?) content.GetValueForProperty("DisableLocalAuth",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).DisableLocalAuth, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("AlternateName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).AlternateName = (string) content.GetValueForProperty("AlternateName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).AlternateName, global::System.Convert.ToString); - } - if (content.Contains("KeySource")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).KeySource = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeySource?) content.GetValueForProperty("KeySource",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).KeySource, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeySource.CreateFrom); - } - if (content.Contains("KeyVaultProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).KeyVaultProperty = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultProperties[]) content.GetValueForProperty("KeyVaultProperty",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).KeyVaultProperty, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.KeyVaultPropertiesTypeConverter.ConvertFrom)); - } - if (content.Contains("RequireInfrastructureEncryption")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).RequireInfrastructureEncryption = (bool?) content.GetValueForProperty("RequireInfrastructureEncryption",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).RequireInfrastructureEncryption, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("GeoDataReplicationMaxReplicationLagDurationInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).GeoDataReplicationMaxReplicationLagDurationInSecond = (int?) content.GetValueForProperty("GeoDataReplicationMaxReplicationLagDurationInSecond",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).GeoDataReplicationMaxReplicationLagDurationInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("GeoDataReplicationLocation")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).GeoDataReplicationLocation = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INamespaceReplicaLocation[]) content.GetValueForProperty("GeoDataReplicationLocation",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).GeoDataReplicationLocation, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NamespaceReplicaLocationTypeConverter.ConvertFrom)); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal EhNamespace(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Sku")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.SkuTypeConverter.ConvertFrom); - } - if (content.Contains("Identity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IdentityTypeConverter.ConvertFrom); - } - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.EhNamespacePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.TrackedResourceTagsTypeConverter.ConvertFrom); - } - if (content.Contains("SkuName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).SkuName = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuName) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).SkuName, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuName.CreateFrom); - } - if (content.Contains("SkuTier")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).SkuTier = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuTier?) content.GetValueForProperty("SkuTier",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).SkuTier, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuTier.CreateFrom); - } - if (content.Contains("SkuCapacity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).SkuCapacity = (int?) content.GetValueForProperty("SkuCapacity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).SkuCapacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("PrincipalId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).PrincipalId, global::System.Convert.ToString); - } - if (content.Contains("TenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).TenantId, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("Encryption")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).Encryption = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEncryption) content.GetValueForProperty("Encryption",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).Encryption, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.EncryptionTypeConverter.ConvertFrom); - } - if (content.Contains("IdentityType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType?) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType.CreateFrom); - } - if (content.Contains("UserAssignedIdentity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).UserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityUserAssignedIdentities) content.GetValueForProperty("UserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).UserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IdentityUserAssignedIdentitiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("GeoDataReplication")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).GeoDataReplication = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IGeoDataReplicationProperties) content.GetValueForProperty("GeoDataReplication",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).GeoDataReplication, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.GeoDataReplicationPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("MinimumTlsVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).MinimumTlsVersion = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.TlsVersion?) content.GetValueForProperty("MinimumTlsVersion",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).MinimumTlsVersion, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.TlsVersion.CreateFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).ProvisioningState, global::System.Convert.ToString); - } - if (content.Contains("Status")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).Status, global::System.Convert.ToString); - } - if (content.Contains("CreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("UpdatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("ServiceBusEndpoint")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).ServiceBusEndpoint = (string) content.GetValueForProperty("ServiceBusEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).ServiceBusEndpoint, global::System.Convert.ToString); - } - if (content.Contains("ClusterArmId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).ClusterArmId = (string) content.GetValueForProperty("ClusterArmId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).ClusterArmId, global::System.Convert.ToString); - } - if (content.Contains("MetricId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).MetricId = (string) content.GetValueForProperty("MetricId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).MetricId, global::System.Convert.ToString); - } - if (content.Contains("EnableAutoInflate")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).EnableAutoInflate = (bool?) content.GetValueForProperty("EnableAutoInflate",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).EnableAutoInflate, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("PublicNetworkAccess")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).PublicNetworkAccess = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess?) content.GetValueForProperty("PublicNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).PublicNetworkAccess, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess.CreateFrom); - } - if (content.Contains("MaximumThroughputUnit")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).MaximumThroughputUnit = (int?) content.GetValueForProperty("MaximumThroughputUnit",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).MaximumThroughputUnit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("KafkaEnabled")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).KafkaEnabled = (bool?) content.GetValueForProperty("KafkaEnabled",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).KafkaEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("ZoneRedundant")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).ZoneRedundant = (bool?) content.GetValueForProperty("ZoneRedundant",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).ZoneRedundant, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("PrivateEndpointConnection")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).PrivateEndpointConnection = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection[]) content.GetValueForProperty("PrivateEndpointConnection",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).PrivateEndpointConnection, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.PrivateEndpointConnectionTypeConverter.ConvertFrom)); - } - if (content.Contains("DisableLocalAuth")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).DisableLocalAuth = (bool?) content.GetValueForProperty("DisableLocalAuth",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).DisableLocalAuth, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("AlternateName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).AlternateName = (string) content.GetValueForProperty("AlternateName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).AlternateName, global::System.Convert.ToString); - } - if (content.Contains("KeySource")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).KeySource = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeySource?) content.GetValueForProperty("KeySource",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).KeySource, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeySource.CreateFrom); - } - if (content.Contains("KeyVaultProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).KeyVaultProperty = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultProperties[]) content.GetValueForProperty("KeyVaultProperty",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).KeyVaultProperty, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.KeyVaultPropertiesTypeConverter.ConvertFrom)); - } - if (content.Contains("RequireInfrastructureEncryption")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).RequireInfrastructureEncryption = (bool?) content.GetValueForProperty("RequireInfrastructureEncryption",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).RequireInfrastructureEncryption, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("GeoDataReplicationMaxReplicationLagDurationInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).GeoDataReplicationMaxReplicationLagDurationInSecond = (int?) content.GetValueForProperty("GeoDataReplicationMaxReplicationLagDurationInSecond",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).GeoDataReplicationMaxReplicationLagDurationInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("GeoDataReplicationLocation")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).GeoDataReplicationLocation = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INamespaceReplicaLocation[]) content.GetValueForProperty("GeoDataReplicationLocation",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal)this).GeoDataReplicationLocation, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NamespaceReplicaLocationTypeConverter.ConvertFrom)); - } - AfterDeserializePSObject(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// Single Namespace item in List or Get Operation - [System.ComponentModel.TypeConverter(typeof(EhNamespaceTypeConverter))] - public partial interface IEhNamespace - - { - - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespaceProperties.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespaceProperties.PowerShell.cs deleted file mode 100644 index ce87b66f1c72..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespaceProperties.PowerShell.cs +++ /dev/null @@ -1,342 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; - - /// Namespace properties supplied for create namespace operation. - [System.ComponentModel.TypeConverter(typeof(EhNamespacePropertiesTypeConverter))] - public partial class EhNamespaceProperties - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new EhNamespaceProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new EhNamespaceProperties(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal EhNamespaceProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Encryption")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).Encryption = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEncryption) content.GetValueForProperty("Encryption",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).Encryption, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.EncryptionTypeConverter.ConvertFrom); - } - if (content.Contains("GeoDataReplication")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).GeoDataReplication = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IGeoDataReplicationProperties) content.GetValueForProperty("GeoDataReplication",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).GeoDataReplication, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.GeoDataReplicationPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("MinimumTlsVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).MinimumTlsVersion = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.TlsVersion?) content.GetValueForProperty("MinimumTlsVersion",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).MinimumTlsVersion, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.TlsVersion.CreateFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); - } - if (content.Contains("Status")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).Status, global::System.Convert.ToString); - } - if (content.Contains("CreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("UpdatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("ServiceBusEndpoint")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).ServiceBusEndpoint = (string) content.GetValueForProperty("ServiceBusEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).ServiceBusEndpoint, global::System.Convert.ToString); - } - if (content.Contains("ClusterArmId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).ClusterArmId = (string) content.GetValueForProperty("ClusterArmId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).ClusterArmId, global::System.Convert.ToString); - } - if (content.Contains("MetricId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).MetricId = (string) content.GetValueForProperty("MetricId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).MetricId, global::System.Convert.ToString); - } - if (content.Contains("IsAutoInflateEnabled")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).IsAutoInflateEnabled = (bool?) content.GetValueForProperty("IsAutoInflateEnabled",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).IsAutoInflateEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("PublicNetworkAccess")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).PublicNetworkAccess = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess?) content.GetValueForProperty("PublicNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).PublicNetworkAccess, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess.CreateFrom); - } - if (content.Contains("MaximumThroughputUnit")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).MaximumThroughputUnit = (int?) content.GetValueForProperty("MaximumThroughputUnit",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).MaximumThroughputUnit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("KafkaEnabled")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).KafkaEnabled = (bool?) content.GetValueForProperty("KafkaEnabled",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).KafkaEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("ZoneRedundant")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).ZoneRedundant = (bool?) content.GetValueForProperty("ZoneRedundant",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).ZoneRedundant, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("PrivateEndpointConnection")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).PrivateEndpointConnection = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection[]) content.GetValueForProperty("PrivateEndpointConnection",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).PrivateEndpointConnection, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.PrivateEndpointConnectionTypeConverter.ConvertFrom)); - } - if (content.Contains("DisableLocalAuth")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).DisableLocalAuth = (bool?) content.GetValueForProperty("DisableLocalAuth",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).DisableLocalAuth, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("AlternateName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).AlternateName = (string) content.GetValueForProperty("AlternateName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).AlternateName, global::System.Convert.ToString); - } - if (content.Contains("EncryptionKeySource")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).EncryptionKeySource = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeySource?) content.GetValueForProperty("EncryptionKeySource",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).EncryptionKeySource, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeySource.CreateFrom); - } - if (content.Contains("EncryptionKeyVaultProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).EncryptionKeyVaultProperty = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultProperties[]) content.GetValueForProperty("EncryptionKeyVaultProperty",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).EncryptionKeyVaultProperty, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.KeyVaultPropertiesTypeConverter.ConvertFrom)); - } - if (content.Contains("EncryptionRequireInfrastructureEncryption")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).EncryptionRequireInfrastructureEncryption = (bool?) content.GetValueForProperty("EncryptionRequireInfrastructureEncryption",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).EncryptionRequireInfrastructureEncryption, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("GeoDataReplicationMaxReplicationLagDurationInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).GeoDataReplicationMaxReplicationLagDurationInSecond = (int?) content.GetValueForProperty("GeoDataReplicationMaxReplicationLagDurationInSecond",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).GeoDataReplicationMaxReplicationLagDurationInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("GeoDataReplicationLocation")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).GeoDataReplicationLocation = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INamespaceReplicaLocation[]) content.GetValueForProperty("GeoDataReplicationLocation",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).GeoDataReplicationLocation, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NamespaceReplicaLocationTypeConverter.ConvertFrom)); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal EhNamespaceProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Encryption")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).Encryption = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEncryption) content.GetValueForProperty("Encryption",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).Encryption, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.EncryptionTypeConverter.ConvertFrom); - } - if (content.Contains("GeoDataReplication")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).GeoDataReplication = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IGeoDataReplicationProperties) content.GetValueForProperty("GeoDataReplication",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).GeoDataReplication, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.GeoDataReplicationPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("MinimumTlsVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).MinimumTlsVersion = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.TlsVersion?) content.GetValueForProperty("MinimumTlsVersion",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).MinimumTlsVersion, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.TlsVersion.CreateFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); - } - if (content.Contains("Status")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).Status, global::System.Convert.ToString); - } - if (content.Contains("CreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("UpdatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("ServiceBusEndpoint")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).ServiceBusEndpoint = (string) content.GetValueForProperty("ServiceBusEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).ServiceBusEndpoint, global::System.Convert.ToString); - } - if (content.Contains("ClusterArmId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).ClusterArmId = (string) content.GetValueForProperty("ClusterArmId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).ClusterArmId, global::System.Convert.ToString); - } - if (content.Contains("MetricId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).MetricId = (string) content.GetValueForProperty("MetricId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).MetricId, global::System.Convert.ToString); - } - if (content.Contains("IsAutoInflateEnabled")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).IsAutoInflateEnabled = (bool?) content.GetValueForProperty("IsAutoInflateEnabled",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).IsAutoInflateEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("PublicNetworkAccess")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).PublicNetworkAccess = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess?) content.GetValueForProperty("PublicNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).PublicNetworkAccess, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess.CreateFrom); - } - if (content.Contains("MaximumThroughputUnit")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).MaximumThroughputUnit = (int?) content.GetValueForProperty("MaximumThroughputUnit",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).MaximumThroughputUnit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("KafkaEnabled")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).KafkaEnabled = (bool?) content.GetValueForProperty("KafkaEnabled",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).KafkaEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("ZoneRedundant")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).ZoneRedundant = (bool?) content.GetValueForProperty("ZoneRedundant",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).ZoneRedundant, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("PrivateEndpointConnection")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).PrivateEndpointConnection = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection[]) content.GetValueForProperty("PrivateEndpointConnection",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).PrivateEndpointConnection, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.PrivateEndpointConnectionTypeConverter.ConvertFrom)); - } - if (content.Contains("DisableLocalAuth")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).DisableLocalAuth = (bool?) content.GetValueForProperty("DisableLocalAuth",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).DisableLocalAuth, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("AlternateName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).AlternateName = (string) content.GetValueForProperty("AlternateName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).AlternateName, global::System.Convert.ToString); - } - if (content.Contains("EncryptionKeySource")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).EncryptionKeySource = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeySource?) content.GetValueForProperty("EncryptionKeySource",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).EncryptionKeySource, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeySource.CreateFrom); - } - if (content.Contains("EncryptionKeyVaultProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).EncryptionKeyVaultProperty = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultProperties[]) content.GetValueForProperty("EncryptionKeyVaultProperty",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).EncryptionKeyVaultProperty, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.KeyVaultPropertiesTypeConverter.ConvertFrom)); - } - if (content.Contains("EncryptionRequireInfrastructureEncryption")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).EncryptionRequireInfrastructureEncryption = (bool?) content.GetValueForProperty("EncryptionRequireInfrastructureEncryption",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).EncryptionRequireInfrastructureEncryption, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("GeoDataReplicationMaxReplicationLagDurationInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).GeoDataReplicationMaxReplicationLagDurationInSecond = (int?) content.GetValueForProperty("GeoDataReplicationMaxReplicationLagDurationInSecond",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).GeoDataReplicationMaxReplicationLagDurationInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("GeoDataReplicationLocation")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).GeoDataReplicationLocation = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INamespaceReplicaLocation[]) content.GetValueForProperty("GeoDataReplicationLocation",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)this).GeoDataReplicationLocation, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NamespaceReplicaLocationTypeConverter.ConvertFrom)); - } - AfterDeserializePSObject(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// Namespace properties supplied for create namespace operation. - [System.ComponentModel.TypeConverter(typeof(EhNamespacePropertiesTypeConverter))] - public partial interface IEhNamespaceProperties - - { - - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Eventhub.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Eventhub.PowerShell.cs deleted file mode 100644 index f9ebb7b21a8e..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Eventhub.PowerShell.cs +++ /dev/null @@ -1,476 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; - - /// Single item in List or Get Event Hub operation - [System.ComponentModel.TypeConverter(typeof(EventhubTypeConverter))] - public partial class Eventhub - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new Eventhub(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new Eventhub(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal Eventhub(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.EventhubPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("CaptureDescription")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).CaptureDescription = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescription) content.GetValueForProperty("CaptureDescription",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).CaptureDescription, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.CaptureDescriptionTypeConverter.ConvertFrom); - } - if (content.Contains("RetentionDescription")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).RetentionDescription = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRetentionDescription) content.GetValueForProperty("RetentionDescription",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).RetentionDescription, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.RetentionDescriptionTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("PartitionId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).PartitionId = (string[]) content.GetValueForProperty("PartitionId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).PartitionId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("CreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("UpdatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("MessageRetentionInDay")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).MessageRetentionInDay = (long?) content.GetValueForProperty("MessageRetentionInDay",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).MessageRetentionInDay, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("PartitionCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).PartitionCount = (long?) content.GetValueForProperty("PartitionCount",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).PartitionCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("Status")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus.CreateFrom); - } - if (content.Contains("CaptureDescriptionDestination")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).CaptureDescriptionDestination = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestination) content.GetValueForProperty("CaptureDescriptionDestination",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).CaptureDescriptionDestination, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.DestinationTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("CaptureEnabled")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).CaptureEnabled = (bool?) content.GetValueForProperty("CaptureEnabled",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).CaptureEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("Encoding")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).Encoding = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription?) content.GetValueForProperty("Encoding",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).Encoding, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription.CreateFrom); - } - if (content.Contains("IntervalInSeconds")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).IntervalInSeconds = (int?) content.GetValueForProperty("IntervalInSeconds",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).IntervalInSeconds, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("SizeLimitInBytes")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).SizeLimitInBytes = (int?) content.GetValueForProperty("SizeLimitInBytes",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).SizeLimitInBytes, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("SkipEmptyArchive")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).SkipEmptyArchive = (bool?) content.GetValueForProperty("SkipEmptyArchive",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).SkipEmptyArchive, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("DestinationProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).DestinationProperty = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationProperties) content.GetValueForProperty("DestinationProperty",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).DestinationProperty, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.DestinationPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("DestinationName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).DestinationName = (string) content.GetValueForProperty("DestinationName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).DestinationName, global::System.Convert.ToString); - } - if (content.Contains("CleanupPolicy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).CleanupPolicy = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CleanupPolicyRetentionDescription?) content.GetValueForProperty("CleanupPolicy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).CleanupPolicy, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CleanupPolicyRetentionDescription.CreateFrom); - } - if (content.Contains("RetentionTimeInHour")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).RetentionTimeInHour = (long?) content.GetValueForProperty("RetentionTimeInHour",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).RetentionTimeInHour, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("TombstoneRetentionTimeInHour")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).TombstoneRetentionTimeInHour = (int?) content.GetValueForProperty("TombstoneRetentionTimeInHour",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).TombstoneRetentionTimeInHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("DestinationIdentity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).DestinationIdentity = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureIdentity) content.GetValueForProperty("DestinationIdentity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).DestinationIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.CaptureIdentityTypeConverter.ConvertFrom); - } - if (content.Contains("BlobContainer")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).BlobContainer = (string) content.GetValueForProperty("BlobContainer",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).BlobContainer, global::System.Convert.ToString); - } - if (content.Contains("IdentityType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType?) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType.CreateFrom); - } - if (content.Contains("UserAssignedIdentityId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).UserAssignedIdentityId = (string) content.GetValueForProperty("UserAssignedIdentityId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).UserAssignedIdentityId, global::System.Convert.ToString); - } - if (content.Contains("StorageAccountResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).StorageAccountResourceId = (string) content.GetValueForProperty("StorageAccountResourceId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).StorageAccountResourceId, global::System.Convert.ToString); - } - if (content.Contains("ArchiveNameFormat")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).ArchiveNameFormat = (string) content.GetValueForProperty("ArchiveNameFormat",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).ArchiveNameFormat, global::System.Convert.ToString); - } - if (content.Contains("DataLakeSubscriptionId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).DataLakeSubscriptionId = (string) content.GetValueForProperty("DataLakeSubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).DataLakeSubscriptionId, global::System.Convert.ToString); - } - if (content.Contains("DataLakeAccountName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).DataLakeAccountName = (string) content.GetValueForProperty("DataLakeAccountName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).DataLakeAccountName, global::System.Convert.ToString); - } - if (content.Contains("DataLakeFolderPath")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).DataLakeFolderPath = (string) content.GetValueForProperty("DataLakeFolderPath",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).DataLakeFolderPath, global::System.Convert.ToString); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal Eventhub(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.EventhubPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("CaptureDescription")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).CaptureDescription = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescription) content.GetValueForProperty("CaptureDescription",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).CaptureDescription, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.CaptureDescriptionTypeConverter.ConvertFrom); - } - if (content.Contains("RetentionDescription")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).RetentionDescription = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRetentionDescription) content.GetValueForProperty("RetentionDescription",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).RetentionDescription, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.RetentionDescriptionTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("PartitionId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).PartitionId = (string[]) content.GetValueForProperty("PartitionId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).PartitionId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("CreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("UpdatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("MessageRetentionInDay")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).MessageRetentionInDay = (long?) content.GetValueForProperty("MessageRetentionInDay",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).MessageRetentionInDay, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("PartitionCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).PartitionCount = (long?) content.GetValueForProperty("PartitionCount",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).PartitionCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("Status")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus.CreateFrom); - } - if (content.Contains("CaptureDescriptionDestination")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).CaptureDescriptionDestination = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestination) content.GetValueForProperty("CaptureDescriptionDestination",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).CaptureDescriptionDestination, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.DestinationTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("CaptureEnabled")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).CaptureEnabled = (bool?) content.GetValueForProperty("CaptureEnabled",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).CaptureEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("Encoding")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).Encoding = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription?) content.GetValueForProperty("Encoding",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).Encoding, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription.CreateFrom); - } - if (content.Contains("IntervalInSeconds")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).IntervalInSeconds = (int?) content.GetValueForProperty("IntervalInSeconds",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).IntervalInSeconds, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("SizeLimitInBytes")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).SizeLimitInBytes = (int?) content.GetValueForProperty("SizeLimitInBytes",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).SizeLimitInBytes, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("SkipEmptyArchive")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).SkipEmptyArchive = (bool?) content.GetValueForProperty("SkipEmptyArchive",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).SkipEmptyArchive, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("DestinationProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).DestinationProperty = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationProperties) content.GetValueForProperty("DestinationProperty",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).DestinationProperty, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.DestinationPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("DestinationName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).DestinationName = (string) content.GetValueForProperty("DestinationName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).DestinationName, global::System.Convert.ToString); - } - if (content.Contains("CleanupPolicy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).CleanupPolicy = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CleanupPolicyRetentionDescription?) content.GetValueForProperty("CleanupPolicy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).CleanupPolicy, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CleanupPolicyRetentionDescription.CreateFrom); - } - if (content.Contains("RetentionTimeInHour")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).RetentionTimeInHour = (long?) content.GetValueForProperty("RetentionTimeInHour",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).RetentionTimeInHour, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("TombstoneRetentionTimeInHour")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).TombstoneRetentionTimeInHour = (int?) content.GetValueForProperty("TombstoneRetentionTimeInHour",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).TombstoneRetentionTimeInHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("DestinationIdentity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).DestinationIdentity = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureIdentity) content.GetValueForProperty("DestinationIdentity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).DestinationIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.CaptureIdentityTypeConverter.ConvertFrom); - } - if (content.Contains("BlobContainer")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).BlobContainer = (string) content.GetValueForProperty("BlobContainer",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).BlobContainer, global::System.Convert.ToString); - } - if (content.Contains("IdentityType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType?) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType.CreateFrom); - } - if (content.Contains("UserAssignedIdentityId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).UserAssignedIdentityId = (string) content.GetValueForProperty("UserAssignedIdentityId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).UserAssignedIdentityId, global::System.Convert.ToString); - } - if (content.Contains("StorageAccountResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).StorageAccountResourceId = (string) content.GetValueForProperty("StorageAccountResourceId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).StorageAccountResourceId, global::System.Convert.ToString); - } - if (content.Contains("ArchiveNameFormat")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).ArchiveNameFormat = (string) content.GetValueForProperty("ArchiveNameFormat",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).ArchiveNameFormat, global::System.Convert.ToString); - } - if (content.Contains("DataLakeSubscriptionId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).DataLakeSubscriptionId = (string) content.GetValueForProperty("DataLakeSubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).DataLakeSubscriptionId, global::System.Convert.ToString); - } - if (content.Contains("DataLakeAccountName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).DataLakeAccountName = (string) content.GetValueForProperty("DataLakeAccountName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).DataLakeAccountName, global::System.Convert.ToString); - } - if (content.Contains("DataLakeFolderPath")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).DataLakeFolderPath = (string) content.GetValueForProperty("DataLakeFolderPath",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal)this).DataLakeFolderPath, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// Single item in List or Get Event Hub operation - [System.ComponentModel.TypeConverter(typeof(EventhubTypeConverter))] - public partial interface IEventhub - - { - - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EventhubProperties.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EventhubProperties.PowerShell.cs deleted file mode 100644 index fed386475df2..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EventhubProperties.PowerShell.cs +++ /dev/null @@ -1,380 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; - - /// Properties supplied to the Create Or Update Event Hub operation. - [System.ComponentModel.TypeConverter(typeof(EventhubPropertiesTypeConverter))] - public partial class EventhubProperties - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new EventhubProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new EventhubProperties(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal EventhubProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("CaptureDescription")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).CaptureDescription = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescription) content.GetValueForProperty("CaptureDescription",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).CaptureDescription, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.CaptureDescriptionTypeConverter.ConvertFrom); - } - if (content.Contains("RetentionDescription")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).RetentionDescription = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRetentionDescription) content.GetValueForProperty("RetentionDescription",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).RetentionDescription, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.RetentionDescriptionTypeConverter.ConvertFrom); - } - if (content.Contains("PartitionId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).PartitionId = (string[]) content.GetValueForProperty("PartitionId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).PartitionId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("CreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("UpdatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("MessageRetentionInDay")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).MessageRetentionInDay = (long?) content.GetValueForProperty("MessageRetentionInDay",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).MessageRetentionInDay, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("PartitionCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).PartitionCount = (long?) content.GetValueForProperty("PartitionCount",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).PartitionCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("Status")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus.CreateFrom); - } - if (content.Contains("CaptureDescriptionDestination")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).CaptureDescriptionDestination = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestination) content.GetValueForProperty("CaptureDescriptionDestination",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).CaptureDescriptionDestination, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.DestinationTypeConverter.ConvertFrom); - } - if (content.Contains("CaptureDescriptionEnabled")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).CaptureDescriptionEnabled = (bool?) content.GetValueForProperty("CaptureDescriptionEnabled",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).CaptureDescriptionEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("CaptureDescriptionEncoding")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).CaptureDescriptionEncoding = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription?) content.GetValueForProperty("CaptureDescriptionEncoding",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).CaptureDescriptionEncoding, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription.CreateFrom); - } - if (content.Contains("CaptureDescriptionIntervalInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).CaptureDescriptionIntervalInSecond = (int?) content.GetValueForProperty("CaptureDescriptionIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).CaptureDescriptionIntervalInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("CaptureDescriptionSizeLimitInByte")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).CaptureDescriptionSizeLimitInByte = (int?) content.GetValueForProperty("CaptureDescriptionSizeLimitInByte",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).CaptureDescriptionSizeLimitInByte, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("CaptureDescriptionSkipEmptyArchive")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).CaptureDescriptionSkipEmptyArchive = (bool?) content.GetValueForProperty("CaptureDescriptionSkipEmptyArchive",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).CaptureDescriptionSkipEmptyArchive, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("DestinationProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).DestinationProperty = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationProperties) content.GetValueForProperty("DestinationProperty",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).DestinationProperty, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.DestinationPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("DestinationName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).DestinationName = (string) content.GetValueForProperty("DestinationName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).DestinationName, global::System.Convert.ToString); - } - if (content.Contains("RetentionDescriptionCleanupPolicy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).RetentionDescriptionCleanupPolicy = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CleanupPolicyRetentionDescription?) content.GetValueForProperty("RetentionDescriptionCleanupPolicy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).RetentionDescriptionCleanupPolicy, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CleanupPolicyRetentionDescription.CreateFrom); - } - if (content.Contains("RetentionDescriptionRetentionTimeInHour")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).RetentionDescriptionRetentionTimeInHour = (long?) content.GetValueForProperty("RetentionDescriptionRetentionTimeInHour",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).RetentionDescriptionRetentionTimeInHour, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("RetentionDescriptionTombstoneRetentionTimeInHour")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).RetentionDescriptionTombstoneRetentionTimeInHour = (int?) content.GetValueForProperty("RetentionDescriptionTombstoneRetentionTimeInHour",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).RetentionDescriptionTombstoneRetentionTimeInHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("DestinationIdentity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).DestinationIdentity = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureIdentity) content.GetValueForProperty("DestinationIdentity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).DestinationIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.CaptureIdentityTypeConverter.ConvertFrom); - } - if (content.Contains("BlobContainer")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).BlobContainer = (string) content.GetValueForProperty("BlobContainer",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).BlobContainer, global::System.Convert.ToString); - } - if (content.Contains("IdentityType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType?) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType.CreateFrom); - } - if (content.Contains("IdentityUserAssignedIdentity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).IdentityUserAssignedIdentity = (string) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).IdentityUserAssignedIdentity, global::System.Convert.ToString); - } - if (content.Contains("StorageAccountResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).StorageAccountResourceId = (string) content.GetValueForProperty("StorageAccountResourceId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).StorageAccountResourceId, global::System.Convert.ToString); - } - if (content.Contains("ArchiveNameFormat")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).ArchiveNameFormat = (string) content.GetValueForProperty("ArchiveNameFormat",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).ArchiveNameFormat, global::System.Convert.ToString); - } - if (content.Contains("DataLakeSubscriptionId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).DataLakeSubscriptionId = (string) content.GetValueForProperty("DataLakeSubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).DataLakeSubscriptionId, global::System.Convert.ToString); - } - if (content.Contains("DataLakeAccountName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).DataLakeAccountName = (string) content.GetValueForProperty("DataLakeAccountName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).DataLakeAccountName, global::System.Convert.ToString); - } - if (content.Contains("DataLakeFolderPath")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).DataLakeFolderPath = (string) content.GetValueForProperty("DataLakeFolderPath",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).DataLakeFolderPath, global::System.Convert.ToString); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal EventhubProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("CaptureDescription")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).CaptureDescription = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescription) content.GetValueForProperty("CaptureDescription",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).CaptureDescription, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.CaptureDescriptionTypeConverter.ConvertFrom); - } - if (content.Contains("RetentionDescription")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).RetentionDescription = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRetentionDescription) content.GetValueForProperty("RetentionDescription",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).RetentionDescription, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.RetentionDescriptionTypeConverter.ConvertFrom); - } - if (content.Contains("PartitionId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).PartitionId = (string[]) content.GetValueForProperty("PartitionId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).PartitionId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("CreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("UpdatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("MessageRetentionInDay")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).MessageRetentionInDay = (long?) content.GetValueForProperty("MessageRetentionInDay",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).MessageRetentionInDay, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("PartitionCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).PartitionCount = (long?) content.GetValueForProperty("PartitionCount",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).PartitionCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("Status")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus.CreateFrom); - } - if (content.Contains("CaptureDescriptionDestination")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).CaptureDescriptionDestination = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestination) content.GetValueForProperty("CaptureDescriptionDestination",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).CaptureDescriptionDestination, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.DestinationTypeConverter.ConvertFrom); - } - if (content.Contains("CaptureDescriptionEnabled")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).CaptureDescriptionEnabled = (bool?) content.GetValueForProperty("CaptureDescriptionEnabled",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).CaptureDescriptionEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("CaptureDescriptionEncoding")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).CaptureDescriptionEncoding = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription?) content.GetValueForProperty("CaptureDescriptionEncoding",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).CaptureDescriptionEncoding, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription.CreateFrom); - } - if (content.Contains("CaptureDescriptionIntervalInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).CaptureDescriptionIntervalInSecond = (int?) content.GetValueForProperty("CaptureDescriptionIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).CaptureDescriptionIntervalInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("CaptureDescriptionSizeLimitInByte")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).CaptureDescriptionSizeLimitInByte = (int?) content.GetValueForProperty("CaptureDescriptionSizeLimitInByte",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).CaptureDescriptionSizeLimitInByte, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("CaptureDescriptionSkipEmptyArchive")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).CaptureDescriptionSkipEmptyArchive = (bool?) content.GetValueForProperty("CaptureDescriptionSkipEmptyArchive",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).CaptureDescriptionSkipEmptyArchive, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("DestinationProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).DestinationProperty = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationProperties) content.GetValueForProperty("DestinationProperty",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).DestinationProperty, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.DestinationPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("DestinationName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).DestinationName = (string) content.GetValueForProperty("DestinationName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).DestinationName, global::System.Convert.ToString); - } - if (content.Contains("RetentionDescriptionCleanupPolicy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).RetentionDescriptionCleanupPolicy = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CleanupPolicyRetentionDescription?) content.GetValueForProperty("RetentionDescriptionCleanupPolicy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).RetentionDescriptionCleanupPolicy, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CleanupPolicyRetentionDescription.CreateFrom); - } - if (content.Contains("RetentionDescriptionRetentionTimeInHour")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).RetentionDescriptionRetentionTimeInHour = (long?) content.GetValueForProperty("RetentionDescriptionRetentionTimeInHour",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).RetentionDescriptionRetentionTimeInHour, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("RetentionDescriptionTombstoneRetentionTimeInHour")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).RetentionDescriptionTombstoneRetentionTimeInHour = (int?) content.GetValueForProperty("RetentionDescriptionTombstoneRetentionTimeInHour",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).RetentionDescriptionTombstoneRetentionTimeInHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("DestinationIdentity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).DestinationIdentity = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureIdentity) content.GetValueForProperty("DestinationIdentity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).DestinationIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.CaptureIdentityTypeConverter.ConvertFrom); - } - if (content.Contains("BlobContainer")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).BlobContainer = (string) content.GetValueForProperty("BlobContainer",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).BlobContainer, global::System.Convert.ToString); - } - if (content.Contains("IdentityType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType?) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType.CreateFrom); - } - if (content.Contains("IdentityUserAssignedIdentity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).IdentityUserAssignedIdentity = (string) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).IdentityUserAssignedIdentity, global::System.Convert.ToString); - } - if (content.Contains("StorageAccountResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).StorageAccountResourceId = (string) content.GetValueForProperty("StorageAccountResourceId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).StorageAccountResourceId, global::System.Convert.ToString); - } - if (content.Contains("ArchiveNameFormat")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).ArchiveNameFormat = (string) content.GetValueForProperty("ArchiveNameFormat",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).ArchiveNameFormat, global::System.Convert.ToString); - } - if (content.Contains("DataLakeSubscriptionId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).DataLakeSubscriptionId = (string) content.GetValueForProperty("DataLakeSubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).DataLakeSubscriptionId, global::System.Convert.ToString); - } - if (content.Contains("DataLakeAccountName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).DataLakeAccountName = (string) content.GetValueForProperty("DataLakeAccountName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).DataLakeAccountName, global::System.Convert.ToString); - } - if (content.Contains("DataLakeFolderPath")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).DataLakeFolderPath = (string) content.GetValueForProperty("DataLakeFolderPath",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)this).DataLakeFolderPath, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// Properties supplied to the Create Or Update Event Hub operation. - [System.ComponentModel.TypeConverter(typeof(EventhubPropertiesTypeConverter))] - public partial interface IEventhubProperties - - { - - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkRuleSet.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkRuleSet.PowerShell.cs deleted file mode 100644 index ac6eb67821e1..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkRuleSet.PowerShell.cs +++ /dev/null @@ -1,292 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; - - /// Description of topic resource. - [System.ComponentModel.TypeConverter(typeof(NetworkRuleSetTypeConverter))] - public partial class NetworkRuleSet - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new NetworkRuleSet(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new NetworkRuleSet(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal NetworkRuleSet(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NetworkRuleSetPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("DefaultAction")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetInternal)this).DefaultAction = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.DefaultAction?) content.GetValueForProperty("DefaultAction",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetInternal)this).DefaultAction, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.DefaultAction.CreateFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("TrustedServiceAccessEnabled")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetInternal)this).TrustedServiceAccessEnabled = (bool?) content.GetValueForProperty("TrustedServiceAccessEnabled",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetInternal)this).TrustedServiceAccessEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("VirtualNetworkRule")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetInternal)this).VirtualNetworkRule = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetVirtualNetworkRules[]) content.GetValueForProperty("VirtualNetworkRule",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetInternal)this).VirtualNetworkRule, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NwRuleSetVirtualNetworkRulesTypeConverter.ConvertFrom)); - } - if (content.Contains("IPRule")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetInternal)this).IPRule = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetIPRules[]) content.GetValueForProperty("IPRule",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetInternal)this).IPRule, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NwRuleSetIPRulesTypeConverter.ConvertFrom)); - } - if (content.Contains("PublicNetworkAccess")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetInternal)this).PublicNetworkAccess = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccessFlag?) content.GetValueForProperty("PublicNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetInternal)this).PublicNetworkAccess, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccessFlag.CreateFrom); - } - if (content.Contains("SystemDataCreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal NetworkRuleSet(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NetworkRuleSetPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("DefaultAction")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetInternal)this).DefaultAction = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.DefaultAction?) content.GetValueForProperty("DefaultAction",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetInternal)this).DefaultAction, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.DefaultAction.CreateFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("TrustedServiceAccessEnabled")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetInternal)this).TrustedServiceAccessEnabled = (bool?) content.GetValueForProperty("TrustedServiceAccessEnabled",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetInternal)this).TrustedServiceAccessEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("VirtualNetworkRule")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetInternal)this).VirtualNetworkRule = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetVirtualNetworkRules[]) content.GetValueForProperty("VirtualNetworkRule",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetInternal)this).VirtualNetworkRule, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NwRuleSetVirtualNetworkRulesTypeConverter.ConvertFrom)); - } - if (content.Contains("IPRule")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetInternal)this).IPRule = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetIPRules[]) content.GetValueForProperty("IPRule",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetInternal)this).IPRule, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NwRuleSetIPRulesTypeConverter.ConvertFrom)); - } - if (content.Contains("PublicNetworkAccess")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetInternal)this).PublicNetworkAccess = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccessFlag?) content.GetValueForProperty("PublicNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetInternal)this).PublicNetworkAccess, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccessFlag.CreateFrom); - } - if (content.Contains("SystemDataCreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// Description of topic resource. - [System.ComponentModel.TypeConverter(typeof(NetworkRuleSetTypeConverter))] - public partial interface INetworkRuleSet - - { - - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfiguration.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfiguration.PowerShell.cs deleted file mode 100644 index d872fe6badfd..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfiguration.PowerShell.cs +++ /dev/null @@ -1,337 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; - - /// Network Security Perimeter related configurations of a given namespace - [System.ComponentModel.TypeConverter(typeof(NetworkSecurityPerimeterConfigurationTypeConverter))] - public partial class NetworkSecurityPerimeterConfiguration - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfiguration DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new NetworkSecurityPerimeterConfiguration(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfiguration DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new NetworkSecurityPerimeterConfiguration(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json - /// string. - /// - /// a string containing a JSON serialized instance of this model. - /// - /// an instance of the model class. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfiguration FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal NetworkSecurityPerimeterConfiguration(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NetworkSecurityPerimeterConfigurationPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("NetworkSecurityPerimeter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).NetworkSecurityPerimeter = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeter) content.GetValueForProperty("NetworkSecurityPerimeter",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).NetworkSecurityPerimeter, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NetworkSecurityPerimeterTypeConverter.ConvertFrom); - } - if (content.Contains("ResourceAssociation")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).ResourceAssociation = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociation) content.GetValueForProperty("ResourceAssociation",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).ResourceAssociation, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NetworkSecurityPerimeterConfigurationPropertiesResourceAssociationTypeConverter.ConvertFrom); - } - if (content.Contains("Profile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).Profile = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesProfile) content.GetValueForProperty("Profile",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).Profile, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NetworkSecurityPerimeterConfigurationPropertiesProfileTypeConverter.ConvertFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkSecurityPerimeterConfigurationProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkSecurityPerimeterConfigurationProvisioningState.CreateFrom); - } - if (content.Contains("ProvisioningIssue")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).ProvisioningIssue = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssue[]) content.GetValueForProperty("ProvisioningIssue",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).ProvisioningIssue, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ProvisioningIssueTypeConverter.ConvertFrom)); - } - if (content.Contains("IsBackingResource")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).IsBackingResource = (bool?) content.GetValueForProperty("IsBackingResource",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).IsBackingResource, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("ApplicableFeature")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).ApplicableFeature = (string[]) content.GetValueForProperty("ApplicableFeature",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).ApplicableFeature, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("ParentAssociationName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).ParentAssociationName = (string) content.GetValueForProperty("ParentAssociationName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).ParentAssociationName, global::System.Convert.ToString); - } - if (content.Contains("SourceResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).SourceResourceId = (string) content.GetValueForProperty("SourceResourceId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).SourceResourceId, global::System.Convert.ToString); - } - if (content.Contains("NetworkSecurityPerimeterId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).NetworkSecurityPerimeterId = (string) content.GetValueForProperty("NetworkSecurityPerimeterId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).NetworkSecurityPerimeterId, global::System.Convert.ToString); - } - if (content.Contains("NetworkSecurityPerimeterLocation")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).NetworkSecurityPerimeterLocation = (string) content.GetValueForProperty("NetworkSecurityPerimeterLocation",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).NetworkSecurityPerimeterLocation, global::System.Convert.ToString); - } - if (content.Contains("ResourceAssociationAccessMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).ResourceAssociationAccessMode = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ResourceAssociationAccessMode?) content.GetValueForProperty("ResourceAssociationAccessMode",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).ResourceAssociationAccessMode, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ResourceAssociationAccessMode.CreateFrom); - } - if (content.Contains("NetworkSecurityPerimeterGuid")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).NetworkSecurityPerimeterGuid = (string) content.GetValueForProperty("NetworkSecurityPerimeterGuid",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).NetworkSecurityPerimeterGuid, global::System.Convert.ToString); - } - if (content.Contains("ResourceAssociationName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).ResourceAssociationName = (string) content.GetValueForProperty("ResourceAssociationName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).ResourceAssociationName, global::System.Convert.ToString); - } - if (content.Contains("ProfileName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).ProfileName = (string) content.GetValueForProperty("ProfileName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).ProfileName, global::System.Convert.ToString); - } - if (content.Contains("ProfileAccessRulesVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).ProfileAccessRulesVersion = (string) content.GetValueForProperty("ProfileAccessRulesVersion",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).ProfileAccessRulesVersion, global::System.Convert.ToString); - } - if (content.Contains("ProfileAccessRule")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).ProfileAccessRule = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRule[]) content.GetValueForProperty("ProfileAccessRule",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).ProfileAccessRule, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NspAccessRuleTypeConverter.ConvertFrom)); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal NetworkSecurityPerimeterConfiguration(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NetworkSecurityPerimeterConfigurationPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("NetworkSecurityPerimeter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).NetworkSecurityPerimeter = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeter) content.GetValueForProperty("NetworkSecurityPerimeter",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).NetworkSecurityPerimeter, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NetworkSecurityPerimeterTypeConverter.ConvertFrom); - } - if (content.Contains("ResourceAssociation")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).ResourceAssociation = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociation) content.GetValueForProperty("ResourceAssociation",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).ResourceAssociation, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NetworkSecurityPerimeterConfigurationPropertiesResourceAssociationTypeConverter.ConvertFrom); - } - if (content.Contains("Profile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).Profile = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesProfile) content.GetValueForProperty("Profile",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).Profile, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NetworkSecurityPerimeterConfigurationPropertiesProfileTypeConverter.ConvertFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkSecurityPerimeterConfigurationProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkSecurityPerimeterConfigurationProvisioningState.CreateFrom); - } - if (content.Contains("ProvisioningIssue")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).ProvisioningIssue = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssue[]) content.GetValueForProperty("ProvisioningIssue",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).ProvisioningIssue, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ProvisioningIssueTypeConverter.ConvertFrom)); - } - if (content.Contains("IsBackingResource")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).IsBackingResource = (bool?) content.GetValueForProperty("IsBackingResource",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).IsBackingResource, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("ApplicableFeature")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).ApplicableFeature = (string[]) content.GetValueForProperty("ApplicableFeature",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).ApplicableFeature, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("ParentAssociationName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).ParentAssociationName = (string) content.GetValueForProperty("ParentAssociationName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).ParentAssociationName, global::System.Convert.ToString); - } - if (content.Contains("SourceResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).SourceResourceId = (string) content.GetValueForProperty("SourceResourceId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).SourceResourceId, global::System.Convert.ToString); - } - if (content.Contains("NetworkSecurityPerimeterId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).NetworkSecurityPerimeterId = (string) content.GetValueForProperty("NetworkSecurityPerimeterId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).NetworkSecurityPerimeterId, global::System.Convert.ToString); - } - if (content.Contains("NetworkSecurityPerimeterLocation")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).NetworkSecurityPerimeterLocation = (string) content.GetValueForProperty("NetworkSecurityPerimeterLocation",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).NetworkSecurityPerimeterLocation, global::System.Convert.ToString); - } - if (content.Contains("ResourceAssociationAccessMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).ResourceAssociationAccessMode = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ResourceAssociationAccessMode?) content.GetValueForProperty("ResourceAssociationAccessMode",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).ResourceAssociationAccessMode, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ResourceAssociationAccessMode.CreateFrom); - } - if (content.Contains("NetworkSecurityPerimeterGuid")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).NetworkSecurityPerimeterGuid = (string) content.GetValueForProperty("NetworkSecurityPerimeterGuid",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).NetworkSecurityPerimeterGuid, global::System.Convert.ToString); - } - if (content.Contains("ResourceAssociationName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).ResourceAssociationName = (string) content.GetValueForProperty("ResourceAssociationName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).ResourceAssociationName, global::System.Convert.ToString); - } - if (content.Contains("ProfileName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).ProfileName = (string) content.GetValueForProperty("ProfileName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).ProfileName, global::System.Convert.ToString); - } - if (content.Contains("ProfileAccessRulesVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).ProfileAccessRulesVersion = (string) content.GetValueForProperty("ProfileAccessRulesVersion",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).ProfileAccessRulesVersion, global::System.Convert.ToString); - } - if (content.Contains("ProfileAccessRule")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).ProfileAccessRule = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRule[]) content.GetValueForProperty("ProfileAccessRule",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal)this).ProfileAccessRule, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NspAccessRuleTypeConverter.ConvertFrom)); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// Network Security Perimeter related configurations of a given namespace - [System.ComponentModel.TypeConverter(typeof(NetworkSecurityPerimeterConfigurationTypeConverter))] - public partial interface INetworkSecurityPerimeterConfiguration - - { - - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfigurationProperties.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfigurationProperties.PowerShell.cs deleted file mode 100644 index 23bb15cd6da0..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfigurationProperties.PowerShell.cs +++ /dev/null @@ -1,297 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; - - /// Properties of NetworkSecurityPerimeterConfiguration - [System.ComponentModel.TypeConverter(typeof(NetworkSecurityPerimeterConfigurationPropertiesTypeConverter))] - public partial class NetworkSecurityPerimeterConfigurationProperties - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new NetworkSecurityPerimeterConfigurationProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new NetworkSecurityPerimeterConfigurationProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from - /// a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// - /// an instance of the model class. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal NetworkSecurityPerimeterConfigurationProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("NetworkSecurityPerimeter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).NetworkSecurityPerimeter = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeter) content.GetValueForProperty("NetworkSecurityPerimeter",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).NetworkSecurityPerimeter, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NetworkSecurityPerimeterTypeConverter.ConvertFrom); - } - if (content.Contains("ResourceAssociation")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ResourceAssociation = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociation) content.GetValueForProperty("ResourceAssociation",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ResourceAssociation, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NetworkSecurityPerimeterConfigurationPropertiesResourceAssociationTypeConverter.ConvertFrom); - } - if (content.Contains("Profile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).Profile = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesProfile) content.GetValueForProperty("Profile",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).Profile, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NetworkSecurityPerimeterConfigurationPropertiesProfileTypeConverter.ConvertFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkSecurityPerimeterConfigurationProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkSecurityPerimeterConfigurationProvisioningState.CreateFrom); - } - if (content.Contains("ProvisioningIssue")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ProvisioningIssue = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssue[]) content.GetValueForProperty("ProvisioningIssue",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ProvisioningIssue, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ProvisioningIssueTypeConverter.ConvertFrom)); - } - if (content.Contains("IsBackingResource")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).IsBackingResource = (bool?) content.GetValueForProperty("IsBackingResource",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).IsBackingResource, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("ApplicableFeature")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ApplicableFeature = (string[]) content.GetValueForProperty("ApplicableFeature",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ApplicableFeature, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("ParentAssociationName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ParentAssociationName = (string) content.GetValueForProperty("ParentAssociationName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ParentAssociationName, global::System.Convert.ToString); - } - if (content.Contains("SourceResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).SourceResourceId = (string) content.GetValueForProperty("SourceResourceId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).SourceResourceId, global::System.Convert.ToString); - } - if (content.Contains("NetworkSecurityPerimeterId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).NetworkSecurityPerimeterId = (string) content.GetValueForProperty("NetworkSecurityPerimeterId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).NetworkSecurityPerimeterId, global::System.Convert.ToString); - } - if (content.Contains("NetworkSecurityPerimeterLocation")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).NetworkSecurityPerimeterLocation = (string) content.GetValueForProperty("NetworkSecurityPerimeterLocation",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).NetworkSecurityPerimeterLocation, global::System.Convert.ToString); - } - if (content.Contains("ResourceAssociationAccessMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ResourceAssociationAccessMode = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ResourceAssociationAccessMode?) content.GetValueForProperty("ResourceAssociationAccessMode",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ResourceAssociationAccessMode, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ResourceAssociationAccessMode.CreateFrom); - } - if (content.Contains("NetworkSecurityPerimeterGuid")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).NetworkSecurityPerimeterGuid = (string) content.GetValueForProperty("NetworkSecurityPerimeterGuid",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).NetworkSecurityPerimeterGuid, global::System.Convert.ToString); - } - if (content.Contains("ResourceAssociationName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ResourceAssociationName = (string) content.GetValueForProperty("ResourceAssociationName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ResourceAssociationName, global::System.Convert.ToString); - } - if (content.Contains("ProfileName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ProfileName = (string) content.GetValueForProperty("ProfileName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ProfileName, global::System.Convert.ToString); - } - if (content.Contains("ProfileAccessRulesVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ProfileAccessRulesVersion = (string) content.GetValueForProperty("ProfileAccessRulesVersion",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ProfileAccessRulesVersion, global::System.Convert.ToString); - } - if (content.Contains("ProfileAccessRule")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ProfileAccessRule = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRule[]) content.GetValueForProperty("ProfileAccessRule",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ProfileAccessRule, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NspAccessRuleTypeConverter.ConvertFrom)); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal NetworkSecurityPerimeterConfigurationProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("NetworkSecurityPerimeter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).NetworkSecurityPerimeter = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeter) content.GetValueForProperty("NetworkSecurityPerimeter",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).NetworkSecurityPerimeter, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NetworkSecurityPerimeterTypeConverter.ConvertFrom); - } - if (content.Contains("ResourceAssociation")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ResourceAssociation = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociation) content.GetValueForProperty("ResourceAssociation",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ResourceAssociation, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NetworkSecurityPerimeterConfigurationPropertiesResourceAssociationTypeConverter.ConvertFrom); - } - if (content.Contains("Profile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).Profile = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesProfile) content.GetValueForProperty("Profile",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).Profile, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NetworkSecurityPerimeterConfigurationPropertiesProfileTypeConverter.ConvertFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkSecurityPerimeterConfigurationProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkSecurityPerimeterConfigurationProvisioningState.CreateFrom); - } - if (content.Contains("ProvisioningIssue")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ProvisioningIssue = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssue[]) content.GetValueForProperty("ProvisioningIssue",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ProvisioningIssue, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ProvisioningIssueTypeConverter.ConvertFrom)); - } - if (content.Contains("IsBackingResource")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).IsBackingResource = (bool?) content.GetValueForProperty("IsBackingResource",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).IsBackingResource, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("ApplicableFeature")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ApplicableFeature = (string[]) content.GetValueForProperty("ApplicableFeature",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ApplicableFeature, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("ParentAssociationName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ParentAssociationName = (string) content.GetValueForProperty("ParentAssociationName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ParentAssociationName, global::System.Convert.ToString); - } - if (content.Contains("SourceResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).SourceResourceId = (string) content.GetValueForProperty("SourceResourceId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).SourceResourceId, global::System.Convert.ToString); - } - if (content.Contains("NetworkSecurityPerimeterId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).NetworkSecurityPerimeterId = (string) content.GetValueForProperty("NetworkSecurityPerimeterId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).NetworkSecurityPerimeterId, global::System.Convert.ToString); - } - if (content.Contains("NetworkSecurityPerimeterLocation")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).NetworkSecurityPerimeterLocation = (string) content.GetValueForProperty("NetworkSecurityPerimeterLocation",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).NetworkSecurityPerimeterLocation, global::System.Convert.ToString); - } - if (content.Contains("ResourceAssociationAccessMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ResourceAssociationAccessMode = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ResourceAssociationAccessMode?) content.GetValueForProperty("ResourceAssociationAccessMode",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ResourceAssociationAccessMode, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ResourceAssociationAccessMode.CreateFrom); - } - if (content.Contains("NetworkSecurityPerimeterGuid")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).NetworkSecurityPerimeterGuid = (string) content.GetValueForProperty("NetworkSecurityPerimeterGuid",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).NetworkSecurityPerimeterGuid, global::System.Convert.ToString); - } - if (content.Contains("ResourceAssociationName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ResourceAssociationName = (string) content.GetValueForProperty("ResourceAssociationName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ResourceAssociationName, global::System.Convert.ToString); - } - if (content.Contains("ProfileName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ProfileName = (string) content.GetValueForProperty("ProfileName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ProfileName, global::System.Convert.ToString); - } - if (content.Contains("ProfileAccessRulesVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ProfileAccessRulesVersion = (string) content.GetValueForProperty("ProfileAccessRulesVersion",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ProfileAccessRulesVersion, global::System.Convert.ToString); - } - if (content.Contains("ProfileAccessRule")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ProfileAccessRule = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRule[]) content.GetValueForProperty("ProfileAccessRule",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ProfileAccessRule, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NspAccessRuleTypeConverter.ConvertFrom)); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// Properties of NetworkSecurityPerimeterConfiguration - [System.ComponentModel.TypeConverter(typeof(NetworkSecurityPerimeterConfigurationPropertiesTypeConverter))] - public partial interface INetworkSecurityPerimeterConfigurationProperties - - { - - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateEndpointConnection.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateEndpointConnection.PowerShell.cs deleted file mode 100644 index 3bcc7aeb4424..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateEndpointConnection.PowerShell.cs +++ /dev/null @@ -1,302 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; - - /// Properties of the PrivateEndpointConnection. - [System.ComponentModel.TypeConverter(typeof(PrivateEndpointConnectionTypeConverter))] - public partial class PrivateEndpointConnection - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new PrivateEndpointConnection(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new PrivateEndpointConnection(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal PrivateEndpointConnection(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.PrivateEndpointConnectionPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("PrivateEndpoint")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).PrivateEndpoint = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpoint) content.GetValueForProperty("PrivateEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).PrivateEndpoint, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.PrivateEndpointTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("PrivateLinkServiceConnectionState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionState = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConnectionState) content.GetValueForProperty("PrivateLinkServiceConnectionState",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionState, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ConnectionStateTypeConverter.ConvertFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EndPointProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EndPointProvisioningState.CreateFrom); - } - if (content.Contains("PrivateEndpointId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).PrivateEndpointId = (string) content.GetValueForProperty("PrivateEndpointId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).PrivateEndpointId, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("ConnectionState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).ConnectionState = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PrivateLinkConnectionStatus?) content.GetValueForProperty("ConnectionState",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).ConnectionState, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PrivateLinkConnectionStatus.CreateFrom); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).Description, global::System.Convert.ToString); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal PrivateEndpointConnection(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.PrivateEndpointConnectionPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("PrivateEndpoint")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).PrivateEndpoint = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpoint) content.GetValueForProperty("PrivateEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).PrivateEndpoint, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.PrivateEndpointTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("PrivateLinkServiceConnectionState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionState = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConnectionState) content.GetValueForProperty("PrivateLinkServiceConnectionState",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionState, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ConnectionStateTypeConverter.ConvertFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EndPointProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EndPointProvisioningState.CreateFrom); - } - if (content.Contains("PrivateEndpointId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).PrivateEndpointId = (string) content.GetValueForProperty("PrivateEndpointId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).PrivateEndpointId, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("ConnectionState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).ConnectionState = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PrivateLinkConnectionStatus?) content.GetValueForProperty("ConnectionState",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).ConnectionState, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PrivateLinkConnectionStatus.CreateFrom); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal)this).Description, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// Properties of the PrivateEndpointConnection. - [System.ComponentModel.TypeConverter(typeof(PrivateEndpointConnectionTypeConverter))] - public partial interface IPrivateEndpointConnection - - { - - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/SchemaGroup.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/SchemaGroup.PowerShell.cs deleted file mode 100644 index 913d023fc61d..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/SchemaGroup.PowerShell.cs +++ /dev/null @@ -1,300 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; - - /// Single item in List or Get Schema Group operation - [System.ComponentModel.TypeConverter(typeof(SchemaGroupTypeConverter))] - public partial class SchemaGroup - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new SchemaGroup(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new SchemaGroup(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal SchemaGroup(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.SchemaGroupProperties1TypeConverter.ConvertFrom); - } - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("SchemaCompatibility")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).SchemaCompatibility = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaCompatibility?) content.GetValueForProperty("SchemaCompatibility",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).SchemaCompatibility, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaCompatibility.CreateFrom); - } - if (content.Contains("SchemaType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).SchemaType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaType?) content.GetValueForProperty("SchemaType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).SchemaType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaType.CreateFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("UpdatedAtUtc")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).UpdatedAtUtc = (global::System.DateTime?) content.GetValueForProperty("UpdatedAtUtc",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).UpdatedAtUtc, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("CreatedAtUtc")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).CreatedAtUtc = (global::System.DateTime?) content.GetValueForProperty("CreatedAtUtc",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).CreatedAtUtc, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("ETag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).ETag = (string) content.GetValueForProperty("ETag",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).ETag, global::System.Convert.ToString); - } - if (content.Contains("GroupProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).GroupProperty = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties) content.GetValueForProperty("GroupProperty",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).GroupProperty, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.SchemaGroupPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal SchemaGroup(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.SchemaGroupProperties1TypeConverter.ConvertFrom); - } - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("SchemaCompatibility")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).SchemaCompatibility = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaCompatibility?) content.GetValueForProperty("SchemaCompatibility",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).SchemaCompatibility, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaCompatibility.CreateFrom); - } - if (content.Contains("SchemaType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).SchemaType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaType?) content.GetValueForProperty("SchemaType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).SchemaType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaType.CreateFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("UpdatedAtUtc")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).UpdatedAtUtc = (global::System.DateTime?) content.GetValueForProperty("UpdatedAtUtc",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).UpdatedAtUtc, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("CreatedAtUtc")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).CreatedAtUtc = (global::System.DateTime?) content.GetValueForProperty("CreatedAtUtc",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).CreatedAtUtc, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("ETag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).ETag = (string) content.GetValueForProperty("ETag",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).ETag, global::System.Convert.ToString); - } - if (content.Contains("GroupProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).GroupProperty = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties) content.GetValueForProperty("GroupProperty",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).GroupProperty, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.SchemaGroupPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// Single item in List or Get Schema Group operation - [System.ComponentModel.TypeConverter(typeof(SchemaGroupTypeConverter))] - public partial interface ISchemaGroup - - { - - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ApplicationGroup.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ApplicationGroup.PowerShell.cs similarity index 51% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ApplicationGroup.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ApplicationGroup.PowerShell.cs index 5eaa323693c3..552156d0ef0b 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ApplicationGroup.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ApplicationGroup.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class ApplicationGroup partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,69 +78,69 @@ internal ApplicationGroup(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ApplicationGroupPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ApplicationGroupPropertiesTypeConverter.ConvertFrom); } if (content.Contains("SystemData")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.SystemDataTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SystemDataTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("IsEnabled")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupInternal)this).IsEnabled = (bool?) content.GetValueForProperty("IsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupInternal)this).IsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupInternal)this).IsEnabled = (bool?) content.GetValueForProperty("IsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupInternal)this).IsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("ClientAppGroupIdentifier")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupInternal)this).ClientAppGroupIdentifier = (string) content.GetValueForProperty("ClientAppGroupIdentifier",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupInternal)this).ClientAppGroupIdentifier, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupInternal)this).ClientAppGroupIdentifier = (string) content.GetValueForProperty("ClientAppGroupIdentifier",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupInternal)this).ClientAppGroupIdentifier, global::System.Convert.ToString); } if (content.Contains("Policy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupInternal)this).Policy = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicy[]) content.GetValueForProperty("Policy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupInternal)this).Policy, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ApplicationGroupPolicyTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupInternal)this).Policy = (System.Collections.Generic.List) content.GetValueForProperty("Policy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupInternal)this).Policy, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ApplicationGroupPolicyTypeConverter.ConvertFrom)); } if (content.Contains("SystemDataCreatedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -155,89 +155,89 @@ internal ApplicationGroup(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ApplicationGroupPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ApplicationGroupPropertiesTypeConverter.ConvertFrom); } if (content.Contains("SystemData")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.SystemDataTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SystemDataTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("IsEnabled")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupInternal)this).IsEnabled = (bool?) content.GetValueForProperty("IsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupInternal)this).IsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupInternal)this).IsEnabled = (bool?) content.GetValueForProperty("IsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupInternal)this).IsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("ClientAppGroupIdentifier")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupInternal)this).ClientAppGroupIdentifier = (string) content.GetValueForProperty("ClientAppGroupIdentifier",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupInternal)this).ClientAppGroupIdentifier, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupInternal)this).ClientAppGroupIdentifier = (string) content.GetValueForProperty("ClientAppGroupIdentifier",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupInternal)this).ClientAppGroupIdentifier, global::System.Convert.ToString); } if (content.Contains("Policy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupInternal)this).Policy = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicy[]) content.GetValueForProperty("Policy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupInternal)this).Policy, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ApplicationGroupPolicyTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupInternal)this).Policy = (System.Collections.Generic.List) content.GetValueForProperty("Policy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupInternal)this).Policy, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ApplicationGroupPolicyTypeConverter.ConvertFrom)); } if (content.Contains("SystemDataCreatedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ApplicationGroup(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ApplicationGroup(content); } @@ -247,7 +247,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ApplicationGroup.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ApplicationGroup.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ApplicationGroup.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ApplicationGroup.TypeConverter.cs index 59274bb6624c..89962e59161f 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ApplicationGroup.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ApplicationGroup.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ApplicationGroup.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ApplicationGroup.cs similarity index 64% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ApplicationGroup.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ApplicationGroup.cs index bd22e3d2f0e4..f9fc264d5c07 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ApplicationGroup.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ApplicationGroup.cs @@ -3,121 +3,120 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// The Application Group object [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class ApplicationGroup : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupInternal, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupInternal, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IValidates { /// - /// Backing field for Inherited model + /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ProxyResource(); + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ProxyResource(); /// /// The Unique identifier for application group.Supports SAS(SASKeyName=KeyName) or AAD(AADAppID=Guid) /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string ClientAppGroupIdentifier { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPropertiesInternal)Property).ClientAppGroupIdentifier; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPropertiesInternal)Property).ClientAppGroupIdentifier = value ?? null; } + public string ClientAppGroupIdentifier { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPropertiesInternal)Property).ClientAppGroupIdentifier; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPropertiesInternal)Property).ClientAppGroupIdentifier = value ?? null; } /// /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Id; } /// /// Determines if Application Group is allowed to create connection with namespace or not. Once the isEnabled is set to false, /// all the existing connections of application group gets dropped and no new connections will be allowed /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public bool? IsEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPropertiesInternal)Property).IsEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPropertiesInternal)Property).IsEnabled = value ?? default(bool); } + public bool? IsEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPropertiesInternal)Property).IsEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPropertiesInternal)Property).IsEnabled = value ?? default(bool); } /// The geo-location where the resource lives [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Location; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Location; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupProperties Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ApplicationGroupProperties()); set { {_property = value;} } } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SystemData()); set { {_systemData = value;} } } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Id = value; } /// Internal Acessors for Location - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal.Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Location = value; } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal.Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Location = value; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Name = value; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Type = value; } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupProperties Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ApplicationGroupProperties()); set { {_property = value;} } } - - /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.SystemData()); set { {_systemData = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Type = value; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Name; } /// /// List of group policies that define the behavior of application group. The policies can support resource governance scenarios /// such as limiting ingress or egress traffic. /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicy[] Policy { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPropertiesInternal)Property).Policy; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPropertiesInternal)Property).Policy = value ?? null /* arrayOf */; } + public System.Collections.Generic.List Policy { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPropertiesInternal)Property).Policy; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPropertiesInternal)Property).Policy = value ?? null /* arrayOf */; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupProperties _property; [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ApplicationGroupProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ApplicationGroupProperties()); set => this._property = value; } /// Gets the resource group name [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData _systemData; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData _systemData; /// The system meta data relating to this resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.SystemData()); } + internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SystemData()); } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType)""); } + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedByType = value ?? null; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType)""); } + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedByType = value ?? null; } /// /// The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs" /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Type; } /// Creates an new instance. public ApplicationGroup() @@ -140,7 +139,7 @@ public ApplicationGroup() /// The Application Group object public partial interface IApplicationGroup : Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResource + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResource { /// /// The Unique identifier for application group.Supports SAS(SASKeyName=KeyName) or AAD(AADAppID=Guid) @@ -148,6 +147,9 @@ public partial interface IApplicationGroup : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The Unique identifier for application group.Supports SAS(SASKeyName=KeyName) or AAD(AADAppID=Guid)", SerializedName = @"clientAppGroupIdentifier", PossibleTypes = new [] { typeof(string) })] @@ -159,6 +161,9 @@ public partial interface IApplicationGroup : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Determines if Application Group is allowed to create connection with namespace or not. Once the isEnabled is set to false, all the existing connections of application group gets dropped and no new connections will be allowed", SerializedName = @"isEnabled", PossibleTypes = new [] { typeof(bool) })] @@ -170,63 +175,86 @@ public partial interface IApplicationGroup : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"List of group policies that define the behavior of application group. The policies can support resource governance scenarios such as limiting ingress or egress traffic.", SerializedName = @"policies", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicy) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicy[] Policy { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicy) })] + System.Collections.Generic.List Policy { get; set; } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The timestamp of resource creation (UTC).", SerializedName = @"createdAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? SystemDataCreatedAt { get; set; } + global::System.DateTime? SystemDataCreatedAt { get; } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The identity that created the resource.", SerializedName = @"createdBy", PossibleTypes = new [] { typeof(string) })] - string SystemDataCreatedBy { get; set; } + string SystemDataCreatedBy { get; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that created the resource.", SerializedName = @"createdByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataCreatedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that last modified the resource.", SerializedName = @"lastModifiedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? SystemDataLastModifiedAt { get; set; } + global::System.DateTime? SystemDataLastModifiedAt { get; } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The identity that last modified the resource.", SerializedName = @"lastModifiedBy", PossibleTypes = new [] { typeof(string) })] - string SystemDataLastModifiedBy { get; set; } + string SystemDataLastModifiedBy { get; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that last modified the resource.", SerializedName = @"lastModifiedByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; } } /// The Application Group object internal partial interface IApplicationGroupInternal : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal { /// /// The Unique identifier for application group.Supports SAS(SASKeyName=KeyName) or AAD(AADAppID=Guid) @@ -241,23 +269,25 @@ internal partial interface IApplicationGroupInternal : /// List of group policies that define the behavior of application group. The policies can support resource governance scenarios /// such as limiting ingress or egress traffic. /// - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicy[] Policy { get; set; } + System.Collections.Generic.List Policy { get; set; } - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupProperties Property { get; set; } /// The system meta data relating to this resource. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData SystemData { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData SystemData { get; set; } /// The timestamp of resource creation (UTC). global::System.DateTime? SystemDataCreatedAt { get; set; } /// The identity that created the resource. string SystemDataCreatedBy { get; set; } /// The type of identity that created the resource. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataCreatedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; set; } /// The type of identity that last modified the resource. global::System.DateTime? SystemDataLastModifiedAt { get; set; } /// The identity that last modified the resource. string SystemDataLastModifiedBy { get; set; } /// The type of identity that last modified the resource. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; set; } } } \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ApplicationGroup.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ApplicationGroup.json.cs similarity index 91% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ApplicationGroup.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ApplicationGroup.json.cs index 1e0d9169d949..7aa3be94d74c 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ApplicationGroup.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ApplicationGroup.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -65,20 +65,20 @@ internal ApplicationGroup(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Js { return; } - __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ProxyResource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ApplicationGroupProperties.FromJson(__jsonProperties) : Property;} - {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.SystemData.FromJson(__jsonSystemData) : SystemData;} + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ApplicationGroupProperties.FromJson(__jsonProperties) : _property;} + {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SystemData.FromJson(__jsonSystemData) : _systemData;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new ApplicationGroup(json) : null; } @@ -104,7 +104,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode ToJson( } __proxyResource?.ToJson(container, serializationMode); AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add ); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ApplicationGroupListResult.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ApplicationGroupListResult.PowerShell.cs similarity index 75% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ApplicationGroupListResult.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ApplicationGroupListResult.PowerShell.cs index 856a2c60d211..c12413a75561 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ApplicationGroupListResult.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ApplicationGroupListResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class ApplicationGroupListResult partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,17 +78,17 @@ internal ApplicationGroupListResult(global::System.Collections.IDictionary conte // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ApplicationGroupTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ApplicationGroupTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -103,39 +103,37 @@ internal ApplicationGroupListResult(global::System.Management.Automation.PSObjec // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ApplicationGroupTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ApplicationGroupTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ApplicationGroupListResult(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ApplicationGroupListResult(content); } @@ -145,7 +143,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ApplicationGroupListResult.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ApplicationGroupListResult.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ApplicationGroupListResult.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ApplicationGroupListResult.TypeConverter.cs index f9cd0c3d677f..c6ece555edb6 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ApplicationGroupListResult.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ApplicationGroupListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ApplicationGroupListResult.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ApplicationGroupListResult.cs similarity index 74% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ApplicationGroupListResult.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ApplicationGroupListResult.cs index e482bf65f4ca..da7aeb04169a 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ApplicationGroupListResult.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ApplicationGroupListResult.cs @@ -3,19 +3,19 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// The response from the List Application Groups operation. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class ApplicationGroupListResult : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupListResult, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupListResult, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupListResultInternal { /// Internal Acessors for NextLink - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } /// Backing field for property. private string _nextLink; @@ -27,11 +27,11 @@ public partial class ApplicationGroupListResult : public string NextLink { get => this._nextLink; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup[] _value; + private System.Collections.Generic.List _value; /// Result of the List Application Groups operation. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup[] Value { get => this._value; set => this._value = value; } + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } /// Creates an new instance. public ApplicationGroupListResult() @@ -49,6 +49,9 @@ public partial interface IApplicationGroupListResult : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Link to the next set of results. Not empty if Value contains an incomplete list of Authorization Rules", SerializedName = @"nextLink", PossibleTypes = new [] { typeof(string) })] @@ -57,10 +60,13 @@ public partial interface IApplicationGroupListResult : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Result of the List Application Groups operation.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup) })] + System.Collections.Generic.List Value { get; set; } } /// The response from the List Application Groups operation. @@ -72,7 +78,7 @@ internal partial interface IApplicationGroupListResultInternal /// string NextLink { get; set; } /// Result of the List Application Groups operation. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup[] Value { get; set; } + System.Collections.Generic.List Value { get; set; } } } \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ApplicationGroupListResult.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ApplicationGroupListResult.json.cs similarity index 88% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ApplicationGroupListResult.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ApplicationGroupListResult.json.cs index ab1a98093dff..ed2a1bfe4220 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ApplicationGroupListResult.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ApplicationGroupListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -65,19 +65,19 @@ internal ApplicationGroupListResult(Microsoft.Azure.PowerShell.Cmdlets.EventHub. { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ApplicationGroup.FromJson(__u) )) ))() : null : Value;} - {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ApplicationGroup.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new ApplicationGroupListResult(json) : null; } @@ -110,7 +110,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode ToJson( } container.Add("value",__w); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ApplicationGroupPolicy.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ApplicationGroupPolicy.PowerShell.cs similarity index 80% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ApplicationGroupPolicy.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ApplicationGroupPolicy.PowerShell.cs index e87ce259ad2b..336ce069cb81 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ApplicationGroupPolicy.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ApplicationGroupPolicy.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class ApplicationGroupPolicy partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,17 +78,17 @@ internal ApplicationGroupPolicy(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicyInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicyInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicyInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicyInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicyInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicyInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicyInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicyInternal)this).Type, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -103,39 +103,37 @@ internal ApplicationGroupPolicy(global::System.Management.Automation.PSObject co // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicyInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicyInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicyInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicyInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicyInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicyInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicyInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicyInternal)this).Type, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicy DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicy DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ApplicationGroupPolicy(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicy DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicy DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ApplicationGroupPolicy(content); } @@ -145,7 +143,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicy FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicy FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ApplicationGroupPolicy.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ApplicationGroupPolicy.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ApplicationGroupPolicy.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ApplicationGroupPolicy.TypeConverter.cs index c3b91fbec2a0..93b2966e84e4 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ApplicationGroupPolicy.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ApplicationGroupPolicy.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicy ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicy ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicy).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicy).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ApplicationGroupPolicy.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ApplicationGroupPolicy.cs similarity index 85% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ApplicationGroupPolicy.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ApplicationGroupPolicy.cs index cad9914baf5c..0fb32575390b 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ApplicationGroupPolicy.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ApplicationGroupPolicy.cs @@ -3,19 +3,19 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// Properties of the Application Group policy [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class ApplicationGroupPolicy : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicy, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicyInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicy, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicyInternal { /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicyInternal.Type { get => this._type; set { {_type = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicyInternal.Type { get => this._type; set { {_type = value;} } } /// Backing field for property. private string _name; @@ -45,6 +45,9 @@ public partial interface IApplicationGroupPolicy : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = true, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The Name of this policy", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] @@ -53,6 +56,9 @@ public partial interface IApplicationGroupPolicy : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = true, ReadOnly = true, + Read = true, + Create = true, + Update = true, Description = @"Application Group Policy types", SerializedName = @"type", PossibleTypes = new [] { typeof(string) })] diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ApplicationGroupPolicy.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ApplicationGroupPolicy.json.cs similarity index 91% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ApplicationGroupPolicy.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ApplicationGroupPolicy.json.cs index d2748a471e7a..ea825956d971 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ApplicationGroupPolicy.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ApplicationGroupPolicy.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -65,21 +65,21 @@ internal ApplicationGroupPolicy(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runt { return; } - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicy. - /// Note: the Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicy interface is polymorphic, - /// and the precise model class that will get deserialized is determined at runtime based on the payload. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicy. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicy interface is polymorphic, and the + /// precise model class that will get deserialized is determined at runtime based on the payload. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicy. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicy. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicy FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicy FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { if (!(node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json)) { diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ApplicationGroupProperties.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ApplicationGroupProperties.PowerShell.cs similarity index 71% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ApplicationGroupProperties.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ApplicationGroupProperties.PowerShell.cs index 06eb41337d4a..17da4a521b2e 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ApplicationGroupProperties.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ApplicationGroupProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -62,7 +62,7 @@ public partial class ApplicationGroupProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -77,21 +77,21 @@ internal ApplicationGroupProperties(global::System.Collections.IDictionary conte // actually deserialize if (content.Contains("IsEnabled")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPropertiesInternal)this).IsEnabled = (bool?) content.GetValueForProperty("IsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPropertiesInternal)this).IsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPropertiesInternal)this).IsEnabled = (bool?) content.GetValueForProperty("IsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPropertiesInternal)this).IsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("ClientAppGroupIdentifier")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPropertiesInternal)this).ClientAppGroupIdentifier = (string) content.GetValueForProperty("ClientAppGroupIdentifier",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPropertiesInternal)this).ClientAppGroupIdentifier, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPropertiesInternal)this).ClientAppGroupIdentifier = (string) content.GetValueForProperty("ClientAppGroupIdentifier",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPropertiesInternal)this).ClientAppGroupIdentifier, global::System.Convert.ToString); } if (content.Contains("Policy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPropertiesInternal)this).Policy = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicy[]) content.GetValueForProperty("Policy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPropertiesInternal)this).Policy, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ApplicationGroupPolicyTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPropertiesInternal)this).Policy = (System.Collections.Generic.List) content.GetValueForProperty("Policy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPropertiesInternal)this).Policy, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ApplicationGroupPolicyTypeConverter.ConvertFrom)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -106,43 +106,41 @@ internal ApplicationGroupProperties(global::System.Management.Automation.PSObjec // actually deserialize if (content.Contains("IsEnabled")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPropertiesInternal)this).IsEnabled = (bool?) content.GetValueForProperty("IsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPropertiesInternal)this).IsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPropertiesInternal)this).IsEnabled = (bool?) content.GetValueForProperty("IsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPropertiesInternal)this).IsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("ClientAppGroupIdentifier")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPropertiesInternal)this).ClientAppGroupIdentifier = (string) content.GetValueForProperty("ClientAppGroupIdentifier",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPropertiesInternal)this).ClientAppGroupIdentifier, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPropertiesInternal)this).ClientAppGroupIdentifier = (string) content.GetValueForProperty("ClientAppGroupIdentifier",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPropertiesInternal)this).ClientAppGroupIdentifier, global::System.Convert.ToString); } if (content.Contains("Policy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPropertiesInternal)this).Policy = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicy[]) content.GetValueForProperty("Policy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPropertiesInternal)this).Policy, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ApplicationGroupPolicyTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPropertiesInternal)this).Policy = (System.Collections.Generic.List) content.GetValueForProperty("Policy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPropertiesInternal)this).Policy, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ApplicationGroupPolicyTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ApplicationGroupProperties(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ApplicationGroupProperties(content); } @@ -152,7 +150,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ApplicationGroupProperties.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ApplicationGroupProperties.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ApplicationGroupProperties.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ApplicationGroupProperties.TypeConverter.cs index 00ff22794cc2..c8a5c0e7793c 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ApplicationGroupProperties.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ApplicationGroupProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ApplicationGroupProperties.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ApplicationGroupProperties.cs similarity index 83% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ApplicationGroupProperties.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ApplicationGroupProperties.cs index 3aad8296bb40..a3e1f1536a69 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ApplicationGroupProperties.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ApplicationGroupProperties.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class ApplicationGroupProperties : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupProperties, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupProperties, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPropertiesInternal { /// Backing field for property. @@ -33,14 +33,14 @@ public partial class ApplicationGroupProperties : public bool? IsEnabled { get => this._isEnabled; set => this._isEnabled = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicy[] _policy; + private System.Collections.Generic.List _policy; /// /// List of group policies that define the behavior of application group. The policies can support resource governance scenarios /// such as limiting ingress or egress traffic. /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicy[] Policy { get => this._policy; set => this._policy = value; } + public System.Collections.Generic.List Policy { get => this._policy; set => this._policy = value; } /// Creates an new instance. public ApplicationGroupProperties() @@ -57,6 +57,9 @@ public partial interface IApplicationGroupProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = true, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The Unique identifier for application group.Supports SAS(SASKeyName=KeyName) or AAD(AADAppID=Guid)", SerializedName = @"clientAppGroupIdentifier", PossibleTypes = new [] { typeof(string) })] @@ -68,6 +71,9 @@ public partial interface IApplicationGroupProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Determines if Application Group is allowed to create connection with namespace or not. Once the isEnabled is set to false, all the existing connections of application group gets dropped and no new connections will be allowed", SerializedName = @"isEnabled", PossibleTypes = new [] { typeof(bool) })] @@ -79,10 +85,13 @@ public partial interface IApplicationGroupProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"List of group policies that define the behavior of application group. The policies can support resource governance scenarios such as limiting ingress or egress traffic.", SerializedName = @"policies", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicy) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicy[] Policy { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicy) })] + System.Collections.Generic.List Policy { get; set; } } internal partial interface IApplicationGroupPropertiesInternal @@ -101,7 +110,7 @@ internal partial interface IApplicationGroupPropertiesInternal /// List of group policies that define the behavior of application group. The policies can support resource governance scenarios /// such as limiting ingress or egress traffic. /// - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicy[] Policy { get; set; } + System.Collections.Generic.List Policy { get; set; } } } \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ApplicationGroupProperties.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ApplicationGroupProperties.json.cs similarity index 88% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ApplicationGroupProperties.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ApplicationGroupProperties.json.cs index e7833d4ccf0c..4e29764bb2dd 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ApplicationGroupProperties.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ApplicationGroupProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -64,20 +64,20 @@ internal ApplicationGroupProperties(Microsoft.Azure.PowerShell.Cmdlets.EventHub. { return; } - {_isEnabled = If( json?.PropertyT("isEnabled"), out var __jsonIsEnabled) ? (bool?)__jsonIsEnabled : IsEnabled;} - {_clientAppGroupIdentifier = If( json?.PropertyT("clientAppGroupIdentifier"), out var __jsonClientAppGroupIdentifier) ? (string)__jsonClientAppGroupIdentifier : (string)ClientAppGroupIdentifier;} - {_policy = If( json?.PropertyT("policies"), out var __jsonPolicies) ? If( __jsonPolicies as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicy) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ApplicationGroupPolicy.FromJson(__u) )) ))() : null : Policy;} + {_isEnabled = If( json?.PropertyT("isEnabled"), out var __jsonIsEnabled) ? (bool?)__jsonIsEnabled : _isEnabled;} + {_clientAppGroupIdentifier = If( json?.PropertyT("clientAppGroupIdentifier"), out var __jsonClientAppGroupIdentifier) ? (string)__jsonClientAppGroupIdentifier : (string)_clientAppGroupIdentifier;} + {_policy = If( json?.PropertyT("policies"), out var __jsonPolicies) ? If( __jsonPolicies as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicy) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ApplicationGroupPolicy.FromJson(__u) )) ))() : null : _policy;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new ApplicationGroupProperties(json) : null; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ArmDisasterRecovery.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ArmDisasterRecovery.PowerShell.cs similarity index 50% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ArmDisasterRecovery.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ArmDisasterRecovery.PowerShell.cs index a038a6a70fc6..980685b7d92c 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ArmDisasterRecovery.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ArmDisasterRecovery.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class ArmDisasterRecovery partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,77 +78,77 @@ internal ArmDisasterRecovery(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ArmDisasterRecoveryPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ArmDisasterRecoveryPropertiesTypeConverter.ConvertFrom); } if (content.Contains("SystemData")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.SystemDataTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SystemDataTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningStateDr?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningStateDr.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal)this).ProvisioningState, global::System.Convert.ToString); } if (content.Contains("PartnerNamespace")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal)this).PartnerNamespace = (string) content.GetValueForProperty("PartnerNamespace",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal)this).PartnerNamespace, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal)this).PartnerNamespace = (string) content.GetValueForProperty("PartnerNamespace",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal)this).PartnerNamespace, global::System.Convert.ToString); } if (content.Contains("AlternateName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal)this).AlternateName = (string) content.GetValueForProperty("AlternateName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal)this).AlternateName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal)this).AlternateName = (string) content.GetValueForProperty("AlternateName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal)this).AlternateName, global::System.Convert.ToString); } if (content.Contains("Role")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal)this).Role = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.RoleDisasterRecovery?) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal)this).Role, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.RoleDisasterRecovery.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal)this).Role = (string) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal)this).Role, global::System.Convert.ToString); } if (content.Contains("PendingReplicationOperationsCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal)this).PendingReplicationOperationsCount = (long?) content.GetValueForProperty("PendingReplicationOperationsCount",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal)this).PendingReplicationOperationsCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal)this).PendingReplicationOperationsCount = (long?) content.GetValueForProperty("PendingReplicationOperationsCount",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal)this).PendingReplicationOperationsCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("SystemDataCreatedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -163,97 +163,97 @@ internal ArmDisasterRecovery(global::System.Management.Automation.PSObject conte // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ArmDisasterRecoveryPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ArmDisasterRecoveryPropertiesTypeConverter.ConvertFrom); } if (content.Contains("SystemData")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.SystemDataTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SystemDataTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningStateDr?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningStateDr.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal)this).ProvisioningState, global::System.Convert.ToString); } if (content.Contains("PartnerNamespace")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal)this).PartnerNamespace = (string) content.GetValueForProperty("PartnerNamespace",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal)this).PartnerNamespace, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal)this).PartnerNamespace = (string) content.GetValueForProperty("PartnerNamespace",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal)this).PartnerNamespace, global::System.Convert.ToString); } if (content.Contains("AlternateName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal)this).AlternateName = (string) content.GetValueForProperty("AlternateName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal)this).AlternateName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal)this).AlternateName = (string) content.GetValueForProperty("AlternateName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal)this).AlternateName, global::System.Convert.ToString); } if (content.Contains("Role")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal)this).Role = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.RoleDisasterRecovery?) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal)this).Role, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.RoleDisasterRecovery.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal)this).Role = (string) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal)this).Role, global::System.Convert.ToString); } if (content.Contains("PendingReplicationOperationsCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal)this).PendingReplicationOperationsCount = (long?) content.GetValueForProperty("PendingReplicationOperationsCount",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal)this).PendingReplicationOperationsCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal)this).PendingReplicationOperationsCount = (long?) content.GetValueForProperty("PendingReplicationOperationsCount",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal)this).PendingReplicationOperationsCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("SystemDataCreatedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ArmDisasterRecovery(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ArmDisasterRecovery(content); } @@ -263,7 +263,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ArmDisasterRecovery.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ArmDisasterRecovery.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ArmDisasterRecovery.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ArmDisasterRecovery.TypeConverter.cs index fae71049a4ea..a2d04c82ca1e 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ArmDisasterRecovery.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ArmDisasterRecovery.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ArmDisasterRecovery.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ArmDisasterRecovery.cs similarity index 61% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ArmDisasterRecovery.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ArmDisasterRecovery.cs index 6259c4d7081c..30b0ba375667 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ArmDisasterRecovery.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ArmDisasterRecovery.cs @@ -3,92 +3,91 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// Single item in List or Get Alias(Disaster Recovery configuration) operation [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class ArmDisasterRecovery : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IValidates { /// - /// Backing field for Inherited model + /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ProxyResource(); + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ProxyResource(); /// Alternate name specified when alias and namespace names are same. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string AlternateName { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryPropertiesInternal)Property).AlternateName; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryPropertiesInternal)Property).AlternateName = value ?? null; } + public string AlternateName { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryPropertiesInternal)Property).AlternateName; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryPropertiesInternal)Property).AlternateName = value ?? null; } /// /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Id; } /// The geo-location where the resource lives [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Location; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Id = value; } - - /// Internal Acessors for Location - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal.Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Location = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Name = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Type = value; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Location; } /// Internal Acessors for PendingReplicationOperationsCount - long? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal.PendingReplicationOperationsCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryPropertiesInternal)Property).PendingReplicationOperationsCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryPropertiesInternal)Property).PendingReplicationOperationsCount = value; } + long? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal.PendingReplicationOperationsCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryPropertiesInternal)Property).PendingReplicationOperationsCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryPropertiesInternal)Property).PendingReplicationOperationsCount = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryProperties Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ArmDisasterRecoveryProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryProperties Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ArmDisasterRecoveryProperties()); set { {_property = value;} } } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningStateDr? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryPropertiesInternal)Property).ProvisioningState = value; } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryPropertiesInternal)Property).ProvisioningState = value; } /// Internal Acessors for Role - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.RoleDisasterRecovery? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal.Role { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryPropertiesInternal)Property).Role; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryPropertiesInternal)Property).Role = value; } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal.Role { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryPropertiesInternal)Property).Role; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryPropertiesInternal)Property).Role = value; } /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.SystemData()); set { {_systemData = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SystemData()); set { {_systemData = value;} } } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Id = value; } + + /// Internal Acessors for Location + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal.Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Location = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Type = value; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Name; } /// /// ARM Id of the Primary/Secondary eventhub namespace name, which is part of GEO DR pairing /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string PartnerNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryPropertiesInternal)Property).PartnerNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryPropertiesInternal)Property).PartnerNamespace = value ?? null; } + public string PartnerNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryPropertiesInternal)Property).PartnerNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryPropertiesInternal)Property).PartnerNamespace = value ?? null; } /// Number of entities pending to be replicated. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public long? PendingReplicationOperationsCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryPropertiesInternal)Property).PendingReplicationOperationsCount; } + public long? PendingReplicationOperationsCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryPropertiesInternal)Property).PendingReplicationOperationsCount; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryProperties _property; /// /// Properties required to the Create Or Update Alias(Disaster Recovery configurations) /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ArmDisasterRecoveryProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ArmDisasterRecoveryProperties()); set => this._property = value; } /// /// Provisioning state of the Alias(Disaster Recovery configuration) - possible values 'Accepted' or 'Succeeded' or 'Failed' /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningStateDr? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryPropertiesInternal)Property).ProvisioningState; } + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryPropertiesInternal)Property).ProvisioningState; } /// Gets the resource group name [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] @@ -98,44 +97,44 @@ public partial class ArmDisasterRecovery : /// role of namespace in GEO DR - possible values 'Primary' or 'PrimaryNotReplicating' or 'Secondary' /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.RoleDisasterRecovery? Role { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryPropertiesInternal)Property).Role; } + public string Role { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryPropertiesInternal)Property).Role; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData _systemData; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData _systemData; /// The system meta data relating to this resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.SystemData()); } + internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SystemData()); } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType)""); } + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedByType = value ?? null; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType)""); } + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedByType = value ?? null; } /// /// The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs" /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Type; } /// Creates an new instance. public ArmDisasterRecovery() @@ -158,12 +157,15 @@ public ArmDisasterRecovery() /// Single item in List or Get Alias(Disaster Recovery configuration) operation public partial interface IArmDisasterRecovery : Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResource + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResource { /// Alternate name specified when alias and namespace names are same. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Alternate name specified when alias and namespace names are same.", SerializedName = @"alternateName", PossibleTypes = new [] { typeof(string) })] @@ -174,6 +176,9 @@ public partial interface IArmDisasterRecovery : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"ARM Id of the Primary/Secondary eventhub namespace name, which is part of GEO DR pairing", SerializedName = @"partnerNamespace", PossibleTypes = new [] { typeof(string) })] @@ -182,6 +187,9 @@ public partial interface IArmDisasterRecovery : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Number of entities pending to be replicated.", SerializedName = @"pendingReplicationOperationsCount", PossibleTypes = new [] { typeof(long) })] @@ -192,73 +200,101 @@ public partial interface IArmDisasterRecovery : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Provisioning state of the Alias(Disaster Recovery configuration) - possible values 'Accepted' or 'Succeeded' or 'Failed'", SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningStateDr) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningStateDr? ProvisioningState { get; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Accepted", "Succeeded", "Failed")] + string ProvisioningState { get; } /// /// role of namespace in GEO DR - possible values 'Primary' or 'PrimaryNotReplicating' or 'Secondary' /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"role of namespace in GEO DR - possible values 'Primary' or 'PrimaryNotReplicating' or 'Secondary'", SerializedName = @"role", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.RoleDisasterRecovery) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.RoleDisasterRecovery? Role { get; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Primary", "PrimaryNotReplicating", "Secondary")] + string Role { get; } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The timestamp of resource creation (UTC).", SerializedName = @"createdAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? SystemDataCreatedAt { get; set; } + global::System.DateTime? SystemDataCreatedAt { get; } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The identity that created the resource.", SerializedName = @"createdBy", PossibleTypes = new [] { typeof(string) })] - string SystemDataCreatedBy { get; set; } + string SystemDataCreatedBy { get; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that created the resource.", SerializedName = @"createdByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataCreatedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that last modified the resource.", SerializedName = @"lastModifiedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? SystemDataLastModifiedAt { get; set; } + global::System.DateTime? SystemDataLastModifiedAt { get; } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The identity that last modified the resource.", SerializedName = @"lastModifiedBy", PossibleTypes = new [] { typeof(string) })] - string SystemDataLastModifiedBy { get; set; } + string SystemDataLastModifiedBy { get; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that last modified the resource.", SerializedName = @"lastModifiedByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; } } /// Single item in List or Get Alias(Disaster Recovery configuration) operation internal partial interface IArmDisasterRecoveryInternal : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal { /// Alternate name specified when alias and namespace names are same. string AlternateName { get; set; } @@ -271,29 +307,33 @@ internal partial interface IArmDisasterRecoveryInternal : /// /// Properties required to the Create Or Update Alias(Disaster Recovery configurations) /// - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryProperties Property { get; set; } /// /// Provisioning state of the Alias(Disaster Recovery configuration) - possible values 'Accepted' or 'Succeeded' or 'Failed' /// - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningStateDr? ProvisioningState { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Accepted", "Succeeded", "Failed")] + string ProvisioningState { get; set; } /// /// role of namespace in GEO DR - possible values 'Primary' or 'PrimaryNotReplicating' or 'Secondary' /// - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.RoleDisasterRecovery? Role { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Primary", "PrimaryNotReplicating", "Secondary")] + string Role { get; set; } /// The system meta data relating to this resource. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData SystemData { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData SystemData { get; set; } /// The timestamp of resource creation (UTC). global::System.DateTime? SystemDataCreatedAt { get; set; } /// The identity that created the resource. string SystemDataCreatedBy { get; set; } /// The type of identity that created the resource. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataCreatedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; set; } /// The type of identity that last modified the resource. global::System.DateTime? SystemDataLastModifiedAt { get; set; } /// The identity that last modified the resource. string SystemDataLastModifiedBy { get; set; } /// The type of identity that last modified the resource. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; set; } } } \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ArmDisasterRecovery.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ArmDisasterRecovery.json.cs similarity index 91% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ArmDisasterRecovery.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ArmDisasterRecovery.json.cs index 6ffd1ac3296a..ecce0b9138b1 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ArmDisasterRecovery.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ArmDisasterRecovery.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -65,20 +65,20 @@ internal ArmDisasterRecovery(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime { return; } - __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ProxyResource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ArmDisasterRecoveryProperties.FromJson(__jsonProperties) : Property;} - {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.SystemData.FromJson(__jsonSystemData) : SystemData;} + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ArmDisasterRecoveryProperties.FromJson(__jsonProperties) : _property;} + {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SystemData.FromJson(__jsonSystemData) : _systemData;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new ArmDisasterRecovery(json) : null; } @@ -104,7 +104,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode ToJson( } __proxyResource?.ToJson(container, serializationMode); AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add ); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ArmDisasterRecoveryListResult.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ArmDisasterRecoveryListResult.PowerShell.cs similarity index 74% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ArmDisasterRecoveryListResult.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ArmDisasterRecoveryListResult.PowerShell.cs index 84f6ceb20966..414113d5f82c 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ArmDisasterRecoveryListResult.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ArmDisasterRecoveryListResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class ArmDisasterRecoveryListResult partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,17 +78,17 @@ internal ArmDisasterRecoveryListResult(global::System.Collections.IDictionary co // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ArmDisasterRecoveryTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ArmDisasterRecoveryTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -103,39 +103,37 @@ internal ArmDisasterRecoveryListResult(global::System.Management.Automation.PSOb // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ArmDisasterRecoveryTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ArmDisasterRecoveryTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ArmDisasterRecoveryListResult(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ArmDisasterRecoveryListResult(content); } @@ -145,7 +143,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ArmDisasterRecoveryListResult.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ArmDisasterRecoveryListResult.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ArmDisasterRecoveryListResult.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ArmDisasterRecoveryListResult.TypeConverter.cs index bd45cd8f6775..0340a8674c62 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ArmDisasterRecoveryListResult.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ArmDisasterRecoveryListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ArmDisasterRecoveryListResult.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ArmDisasterRecoveryListResult.cs similarity index 74% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ArmDisasterRecoveryListResult.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ArmDisasterRecoveryListResult.cs index 3e8af99a938e..d7128f27fa51 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ArmDisasterRecoveryListResult.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ArmDisasterRecoveryListResult.cs @@ -3,19 +3,19 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// The result of the List Alias(Disaster Recovery configuration) operation. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class ArmDisasterRecoveryListResult : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryListResult, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryListResult, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryListResultInternal { /// Internal Acessors for NextLink - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } /// Backing field for property. private string _nextLink; @@ -27,11 +27,11 @@ public partial class ArmDisasterRecoveryListResult : public string NextLink { get => this._nextLink; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery[] _value; + private System.Collections.Generic.List _value; /// List of Alias(Disaster Recovery configurations) [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery[] Value { get => this._value; set => this._value = value; } + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } /// Creates an new instance. public ArmDisasterRecoveryListResult() @@ -49,6 +49,9 @@ public partial interface IArmDisasterRecoveryListResult : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Link to the next set of results. Not empty if Value contains incomplete list of Alias(Disaster Recovery configuration)", SerializedName = @"nextLink", PossibleTypes = new [] { typeof(string) })] @@ -57,10 +60,13 @@ public partial interface IArmDisasterRecoveryListResult : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"List of Alias(Disaster Recovery configurations)", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery) })] + System.Collections.Generic.List Value { get; set; } } /// The result of the List Alias(Disaster Recovery configuration) operation. @@ -72,7 +78,7 @@ internal partial interface IArmDisasterRecoveryListResultInternal /// string NextLink { get; set; } /// List of Alias(Disaster Recovery configurations) - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery[] Value { get; set; } + System.Collections.Generic.List Value { get; set; } } } \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ArmDisasterRecoveryListResult.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ArmDisasterRecoveryListResult.json.cs similarity index 88% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ArmDisasterRecoveryListResult.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ArmDisasterRecoveryListResult.json.cs index c95b669f4e9a..39c68ac55bab 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ArmDisasterRecoveryListResult.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ArmDisasterRecoveryListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -65,19 +65,19 @@ internal ArmDisasterRecoveryListResult(Microsoft.Azure.PowerShell.Cmdlets.EventH { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ArmDisasterRecovery.FromJson(__u) )) ))() : null : Value;} - {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ArmDisasterRecovery.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new ArmDisasterRecoveryListResult(json) : null; } @@ -110,7 +110,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode ToJson( } container.Add("value",__w); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ArmDisasterRecoveryProperties.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ArmDisasterRecoveryProperties.PowerShell.cs similarity index 66% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ArmDisasterRecoveryProperties.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ArmDisasterRecoveryProperties.PowerShell.cs index a82a8562913d..ddb2b1f8c428 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ArmDisasterRecoveryProperties.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ArmDisasterRecoveryProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -65,7 +65,7 @@ public partial class ArmDisasterRecoveryProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -80,29 +80,29 @@ internal ArmDisasterRecoveryProperties(global::System.Collections.IDictionary co // actually deserialize if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningStateDr?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningStateDr.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); } if (content.Contains("PartnerNamespace")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryPropertiesInternal)this).PartnerNamespace = (string) content.GetValueForProperty("PartnerNamespace",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryPropertiesInternal)this).PartnerNamespace, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryPropertiesInternal)this).PartnerNamespace = (string) content.GetValueForProperty("PartnerNamespace",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryPropertiesInternal)this).PartnerNamespace, global::System.Convert.ToString); } if (content.Contains("AlternateName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryPropertiesInternal)this).AlternateName = (string) content.GetValueForProperty("AlternateName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryPropertiesInternal)this).AlternateName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryPropertiesInternal)this).AlternateName = (string) content.GetValueForProperty("AlternateName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryPropertiesInternal)this).AlternateName, global::System.Convert.ToString); } if (content.Contains("Role")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryPropertiesInternal)this).Role = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.RoleDisasterRecovery?) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryPropertiesInternal)this).Role, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.RoleDisasterRecovery.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryPropertiesInternal)this).Role = (string) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryPropertiesInternal)this).Role, global::System.Convert.ToString); } if (content.Contains("PendingReplicationOperationsCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryPropertiesInternal)this).PendingReplicationOperationsCount = (long?) content.GetValueForProperty("PendingReplicationOperationsCount",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryPropertiesInternal)this).PendingReplicationOperationsCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryPropertiesInternal)this).PendingReplicationOperationsCount = (long?) content.GetValueForProperty("PendingReplicationOperationsCount",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryPropertiesInternal)this).PendingReplicationOperationsCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -117,51 +117,49 @@ internal ArmDisasterRecoveryProperties(global::System.Management.Automation.PSOb // actually deserialize if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningStateDr?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningStateDr.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); } if (content.Contains("PartnerNamespace")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryPropertiesInternal)this).PartnerNamespace = (string) content.GetValueForProperty("PartnerNamespace",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryPropertiesInternal)this).PartnerNamespace, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryPropertiesInternal)this).PartnerNamespace = (string) content.GetValueForProperty("PartnerNamespace",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryPropertiesInternal)this).PartnerNamespace, global::System.Convert.ToString); } if (content.Contains("AlternateName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryPropertiesInternal)this).AlternateName = (string) content.GetValueForProperty("AlternateName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryPropertiesInternal)this).AlternateName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryPropertiesInternal)this).AlternateName = (string) content.GetValueForProperty("AlternateName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryPropertiesInternal)this).AlternateName, global::System.Convert.ToString); } if (content.Contains("Role")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryPropertiesInternal)this).Role = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.RoleDisasterRecovery?) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryPropertiesInternal)this).Role, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.RoleDisasterRecovery.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryPropertiesInternal)this).Role = (string) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryPropertiesInternal)this).Role, global::System.Convert.ToString); } if (content.Contains("PendingReplicationOperationsCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryPropertiesInternal)this).PendingReplicationOperationsCount = (long?) content.GetValueForProperty("PendingReplicationOperationsCount",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryPropertiesInternal)this).PendingReplicationOperationsCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryPropertiesInternal)this).PendingReplicationOperationsCount = (long?) content.GetValueForProperty("PendingReplicationOperationsCount",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryPropertiesInternal)this).PendingReplicationOperationsCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ArmDisasterRecoveryProperties(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ArmDisasterRecoveryProperties(content); } @@ -171,7 +169,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ArmDisasterRecoveryProperties.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ArmDisasterRecoveryProperties.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ArmDisasterRecoveryProperties.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ArmDisasterRecoveryProperties.TypeConverter.cs index e7f08dbc6b7f..5188f06ea0ad 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ArmDisasterRecoveryProperties.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ArmDisasterRecoveryProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ArmDisasterRecoveryProperties.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ArmDisasterRecoveryProperties.cs similarity index 76% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ArmDisasterRecoveryProperties.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ArmDisasterRecoveryProperties.cs index 0a84194b598d..83825150de10 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ArmDisasterRecoveryProperties.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ArmDisasterRecoveryProperties.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -12,8 +12,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class ArmDisasterRecoveryProperties : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryProperties, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryProperties, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryPropertiesInternal { /// Backing field for property. @@ -24,13 +24,13 @@ public partial class ArmDisasterRecoveryProperties : public string AlternateName { get => this._alternateName; set => this._alternateName = value; } /// Internal Acessors for PendingReplicationOperationsCount - long? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryPropertiesInternal.PendingReplicationOperationsCount { get => this._pendingReplicationOperationsCount; set { {_pendingReplicationOperationsCount = value;} } } + long? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryPropertiesInternal.PendingReplicationOperationsCount { get => this._pendingReplicationOperationsCount; set { {_pendingReplicationOperationsCount = value;} } } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningStateDr? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } /// Internal Acessors for Role - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.RoleDisasterRecovery? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryPropertiesInternal.Role { get => this._role; set { {_role = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryPropertiesInternal.Role { get => this._role; set { {_role = value;} } } /// Backing field for property. private string _partnerNamespace; @@ -49,22 +49,22 @@ public partial class ArmDisasterRecoveryProperties : public long? PendingReplicationOperationsCount { get => this._pendingReplicationOperationsCount; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningStateDr? _provisioningState; + private string _provisioningState; /// /// Provisioning state of the Alias(Disaster Recovery configuration) - possible values 'Accepted' or 'Succeeded' or 'Failed' /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningStateDr? ProvisioningState { get => this._provisioningState; } + public string ProvisioningState { get => this._provisioningState; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.RoleDisasterRecovery? _role; + private string _role; /// /// role of namespace in GEO DR - possible values 'Primary' or 'PrimaryNotReplicating' or 'Secondary' /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.RoleDisasterRecovery? Role { get => this._role; } + public string Role { get => this._role; } /// Creates an new instance. public ArmDisasterRecoveryProperties() @@ -80,6 +80,9 @@ public partial interface IArmDisasterRecoveryProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Alternate name specified when alias and namespace names are same.", SerializedName = @"alternateName", PossibleTypes = new [] { typeof(string) })] @@ -90,6 +93,9 @@ public partial interface IArmDisasterRecoveryProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"ARM Id of the Primary/Secondary eventhub namespace name, which is part of GEO DR pairing", SerializedName = @"partnerNamespace", PossibleTypes = new [] { typeof(string) })] @@ -98,6 +104,9 @@ public partial interface IArmDisasterRecoveryProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Number of entities pending to be replicated.", SerializedName = @"pendingReplicationOperationsCount", PossibleTypes = new [] { typeof(long) })] @@ -108,20 +117,28 @@ public partial interface IArmDisasterRecoveryProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Provisioning state of the Alias(Disaster Recovery configuration) - possible values 'Accepted' or 'Succeeded' or 'Failed'", SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningStateDr) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningStateDr? ProvisioningState { get; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Accepted", "Succeeded", "Failed")] + string ProvisioningState { get; } /// /// role of namespace in GEO DR - possible values 'Primary' or 'PrimaryNotReplicating' or 'Secondary' /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"role of namespace in GEO DR - possible values 'Primary' or 'PrimaryNotReplicating' or 'Secondary'", SerializedName = @"role", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.RoleDisasterRecovery) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.RoleDisasterRecovery? Role { get; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Primary", "PrimaryNotReplicating", "Secondary")] + string Role { get; } } /// Properties required to the Create Or Update Alias(Disaster Recovery configurations) @@ -139,11 +156,13 @@ internal partial interface IArmDisasterRecoveryPropertiesInternal /// /// Provisioning state of the Alias(Disaster Recovery configuration) - possible values 'Accepted' or 'Succeeded' or 'Failed' /// - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningStateDr? ProvisioningState { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Accepted", "Succeeded", "Failed")] + string ProvisioningState { get; set; } /// /// role of namespace in GEO DR - possible values 'Primary' or 'PrimaryNotReplicating' or 'Secondary' /// - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.RoleDisasterRecovery? Role { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Primary", "PrimaryNotReplicating", "Secondary")] + string Role { get; set; } } } \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ArmDisasterRecoveryProperties.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ArmDisasterRecoveryProperties.json.cs similarity index 91% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ArmDisasterRecoveryProperties.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ArmDisasterRecoveryProperties.json.cs index 9381c09ef8c5..b50e72031c24 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ArmDisasterRecoveryProperties.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ArmDisasterRecoveryProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -67,22 +67,22 @@ internal ArmDisasterRecoveryProperties(Microsoft.Azure.PowerShell.Cmdlets.EventH { return; } - {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} - {_partnerNamespace = If( json?.PropertyT("partnerNamespace"), out var __jsonPartnerNamespace) ? (string)__jsonPartnerNamespace : (string)PartnerNamespace;} - {_alternateName = If( json?.PropertyT("alternateName"), out var __jsonAlternateName) ? (string)__jsonAlternateName : (string)AlternateName;} - {_role = If( json?.PropertyT("role"), out var __jsonRole) ? (string)__jsonRole : (string)Role;} - {_pendingReplicationOperationsCount = If( json?.PropertyT("pendingReplicationOperationsCount"), out var __jsonPendingReplicationOperationsCount) ? (long?)__jsonPendingReplicationOperationsCount : PendingReplicationOperationsCount;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} + {_partnerNamespace = If( json?.PropertyT("partnerNamespace"), out var __jsonPartnerNamespace) ? (string)__jsonPartnerNamespace : (string)_partnerNamespace;} + {_alternateName = If( json?.PropertyT("alternateName"), out var __jsonAlternateName) ? (string)__jsonAlternateName : (string)_alternateName;} + {_role = If( json?.PropertyT("role"), out var __jsonRole) ? (string)__jsonRole : (string)_role;} + {_pendingReplicationOperationsCount = If( json?.PropertyT("pendingReplicationOperationsCount"), out var __jsonPendingReplicationOperationsCount) ? (long?)__jsonPendingReplicationOperationsCount : _pendingReplicationOperationsCount;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new ArmDisasterRecoveryProperties(json) : null; } @@ -106,17 +106,17 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode ToJson( { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); } AddIf( null != (((object)this._partnerNamespace)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._partnerNamespace.ToString()) : null, "partnerNamespace" ,container.Add ); AddIf( null != (((object)this._alternateName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._alternateName.ToString()) : null, "alternateName" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._role)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._role.ToString()) : null, "role" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._pendingReplicationOperationsCount ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNumber((long)this._pendingReplicationOperationsCount) : null, "pendingReplicationOperationsCount" ,container.Add ); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AuthorizationRule.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/AuthorizationRule.PowerShell.cs similarity index 53% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AuthorizationRule.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/AuthorizationRule.PowerShell.cs index 9286d6321ec4..0e2f0c99264e 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AuthorizationRule.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/AuthorizationRule.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class AuthorizationRule partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,61 +78,61 @@ internal AuthorizationRule(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.AuthorizationRulePropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.AuthorizationRulePropertiesTypeConverter.ConvertFrom); } if (content.Contains("SystemData")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.SystemDataTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SystemDataTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("Rights")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleInternal)this).Rights = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights[]) content.GetValueForProperty("Rights",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleInternal)this).Rights, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights.CreateFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleInternal)this).Rights = (System.Collections.Generic.List) content.GetValueForProperty("Rights",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleInternal)this).Rights, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } if (content.Contains("SystemDataCreatedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -147,81 +147,81 @@ internal AuthorizationRule(global::System.Management.Automation.PSObject content // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.AuthorizationRulePropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.AuthorizationRulePropertiesTypeConverter.ConvertFrom); } if (content.Contains("SystemData")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.SystemDataTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SystemDataTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("Rights")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleInternal)this).Rights = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights[]) content.GetValueForProperty("Rights",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleInternal)this).Rights, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights.CreateFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleInternal)this).Rights = (System.Collections.Generic.List) content.GetValueForProperty("Rights",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleInternal)this).Rights, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } if (content.Contains("SystemDataCreatedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new AuthorizationRule(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new AuthorizationRule(content); } @@ -231,7 +231,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AuthorizationRule.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/AuthorizationRule.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AuthorizationRule.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/AuthorizationRule.TypeConverter.cs index a0c8e6390b7d..08c8c223f8f8 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AuthorizationRule.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/AuthorizationRule.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AuthorizationRule.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/AuthorizationRule.cs similarity index 60% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AuthorizationRule.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/AuthorizationRule.cs index 0f0ffe6da3a5..e9cd2d4e5b2c 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AuthorizationRule.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/AuthorizationRule.cs @@ -3,61 +3,60 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// Single item in a List or Get AuthorizationRule operation [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class AuthorizationRule : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleInternal, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleInternal, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IValidates { /// - /// Backing field for Inherited model + /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ProxyResource(); + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ProxyResource(); /// /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Id; } /// The geo-location where the resource lives [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Location; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Location; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleProperties Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.AuthorizationRuleProperties()); set { {_property = value;} } } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SystemData()); set { {_systemData = value;} } } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Id = value; } /// Internal Acessors for Location - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal.Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Location = value; } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal.Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Location = value; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Name = value; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Type = value; } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleProperties Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.AuthorizationRuleProperties()); set { {_property = value;} } } - - /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.SystemData()); set { {_systemData = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Type = value; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Name; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleProperties _property; /// Properties supplied to create or update AuthorizationRule [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.AuthorizationRuleProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.AuthorizationRuleProperties()); set => this._property = value; } /// Gets the resource group name [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] @@ -65,44 +64,44 @@ public partial class AuthorizationRule : /// The rights associated with the rule. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights[] Rights { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRulePropertiesInternal)Property).Rights; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRulePropertiesInternal)Property).Rights = value ?? null /* arrayOf */; } + public System.Collections.Generic.List Rights { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRulePropertiesInternal)Property).Rights; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRulePropertiesInternal)Property).Rights = value ?? null /* arrayOf */; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData _systemData; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData _systemData; /// The system meta data relating to this resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.SystemData()); } + internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SystemData()); } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType)""); } + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedByType = value ?? null; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType)""); } + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedByType = value ?? null; } /// /// The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs" /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Type; } /// Creates an new instance. public AuthorizationRule() @@ -125,88 +124,115 @@ public AuthorizationRule() /// Single item in a List or Get AuthorizationRule operation public partial interface IAuthorizationRule : Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResource + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResource { /// The rights associated with the rule. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The rights associated with the rule.", SerializedName = @"rights", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights[] Rights { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Manage", "Send", "Listen")] + System.Collections.Generic.List Rights { get; set; } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The timestamp of resource creation (UTC).", SerializedName = @"createdAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? SystemDataCreatedAt { get; set; } + global::System.DateTime? SystemDataCreatedAt { get; } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The identity that created the resource.", SerializedName = @"createdBy", PossibleTypes = new [] { typeof(string) })] - string SystemDataCreatedBy { get; set; } + string SystemDataCreatedBy { get; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that created the resource.", SerializedName = @"createdByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataCreatedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that last modified the resource.", SerializedName = @"lastModifiedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? SystemDataLastModifiedAt { get; set; } + global::System.DateTime? SystemDataLastModifiedAt { get; } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The identity that last modified the resource.", SerializedName = @"lastModifiedBy", PossibleTypes = new [] { typeof(string) })] - string SystemDataLastModifiedBy { get; set; } + string SystemDataLastModifiedBy { get; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that last modified the resource.", SerializedName = @"lastModifiedByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; } } /// Single item in a List or Get AuthorizationRule operation internal partial interface IAuthorizationRuleInternal : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal { /// Properties supplied to create or update AuthorizationRule - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleProperties Property { get; set; } /// The rights associated with the rule. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights[] Rights { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Manage", "Send", "Listen")] + System.Collections.Generic.List Rights { get; set; } /// The system meta data relating to this resource. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData SystemData { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData SystemData { get; set; } /// The timestamp of resource creation (UTC). global::System.DateTime? SystemDataCreatedAt { get; set; } /// The identity that created the resource. string SystemDataCreatedBy { get; set; } /// The type of identity that created the resource. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataCreatedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; set; } /// The type of identity that last modified the resource. global::System.DateTime? SystemDataLastModifiedAt { get; set; } /// The identity that last modified the resource. string SystemDataLastModifiedBy { get; set; } /// The type of identity that last modified the resource. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; set; } } } \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AuthorizationRule.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/AuthorizationRule.json.cs similarity index 91% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AuthorizationRule.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/AuthorizationRule.json.cs index b0cfe4999819..75b9d4d3a824 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AuthorizationRule.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/AuthorizationRule.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -65,20 +65,20 @@ internal AuthorizationRule(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.J { return; } - __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ProxyResource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.AuthorizationRuleProperties.FromJson(__jsonProperties) : Property;} - {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.SystemData.FromJson(__jsonSystemData) : SystemData;} + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.AuthorizationRuleProperties.FromJson(__jsonProperties) : _property;} + {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SystemData.FromJson(__jsonSystemData) : _systemData;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new AuthorizationRule(json) : null; } @@ -104,7 +104,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode ToJson( } __proxyResource?.ToJson(container, serializationMode); AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add ); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AuthorizationRuleListResult.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/AuthorizationRuleListResult.PowerShell.cs similarity index 74% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AuthorizationRuleListResult.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/AuthorizationRuleListResult.PowerShell.cs index 76cf0bf7ad8d..3b9221f2abb0 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AuthorizationRuleListResult.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/AuthorizationRuleListResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class AuthorizationRuleListResult partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,17 +78,17 @@ internal AuthorizationRuleListResult(global::System.Collections.IDictionary cont // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.AuthorizationRuleTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.AuthorizationRuleTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -103,39 +103,37 @@ internal AuthorizationRuleListResult(global::System.Management.Automation.PSObje // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.AuthorizationRuleTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.AuthorizationRuleTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new AuthorizationRuleListResult(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new AuthorizationRuleListResult(content); } @@ -145,7 +143,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AuthorizationRuleListResult.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/AuthorizationRuleListResult.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AuthorizationRuleListResult.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/AuthorizationRuleListResult.TypeConverter.cs index eee8be23cde6..2bc8fb24ccfa 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AuthorizationRuleListResult.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/AuthorizationRuleListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AuthorizationRuleListResult.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/AuthorizationRuleListResult.cs similarity index 75% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AuthorizationRuleListResult.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/AuthorizationRuleListResult.cs index 73bbc18b0993..b7d7c362c296 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AuthorizationRuleListResult.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/AuthorizationRuleListResult.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// The response from the List namespace operation. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class AuthorizationRuleListResult : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleListResult, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleListResult, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleListResultInternal { /// Backing field for property. @@ -24,11 +24,11 @@ public partial class AuthorizationRuleListResult : public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule[] _value; + private System.Collections.Generic.List _value; /// Result of the List Authorization Rules operation. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule[] Value { get => this._value; set => this._value = value; } + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } /// Creates an new instance. public AuthorizationRuleListResult() @@ -46,6 +46,9 @@ public partial interface IAuthorizationRuleListResult : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Link to the next set of results. Not empty if Value contains an incomplete list of Authorization Rules", SerializedName = @"nextLink", PossibleTypes = new [] { typeof(string) })] @@ -54,10 +57,13 @@ public partial interface IAuthorizationRuleListResult : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Result of the List Authorization Rules operation.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule) })] + System.Collections.Generic.List Value { get; set; } } /// The response from the List namespace operation. @@ -69,7 +75,7 @@ internal partial interface IAuthorizationRuleListResultInternal /// string NextLink { get; set; } /// Result of the List Authorization Rules operation. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule[] Value { get; set; } + System.Collections.Generic.List Value { get; set; } } } \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AuthorizationRuleListResult.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/AuthorizationRuleListResult.json.cs similarity index 89% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AuthorizationRuleListResult.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/AuthorizationRuleListResult.json.cs index a04dc67dccac..602ac3a564dd 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AuthorizationRuleListResult.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/AuthorizationRuleListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -65,19 +65,19 @@ internal AuthorizationRuleListResult(Microsoft.Azure.PowerShell.Cmdlets.EventHub { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.AuthorizationRule.FromJson(__u) )) ))() : null : Value;} - {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.AuthorizationRule.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new AuthorizationRuleListResult(json) : null; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AuthorizationRuleProperties.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/AuthorizationRuleProperties.PowerShell.cs similarity index 79% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AuthorizationRuleProperties.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/AuthorizationRuleProperties.PowerShell.cs index cbfb05ca628d..5e22d277fa4b 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AuthorizationRuleProperties.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/AuthorizationRuleProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class AuthorizationRuleProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,13 +78,13 @@ internal AuthorizationRuleProperties(global::System.Collections.IDictionary cont // actually deserialize if (content.Contains("Rights")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRulePropertiesInternal)this).Rights = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights[]) content.GetValueForProperty("Rights",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRulePropertiesInternal)this).Rights, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights.CreateFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRulePropertiesInternal)this).Rights = (System.Collections.Generic.List) content.GetValueForProperty("Rights",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRulePropertiesInternal)this).Rights, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -99,35 +99,33 @@ internal AuthorizationRuleProperties(global::System.Management.Automation.PSObje // actually deserialize if (content.Contains("Rights")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRulePropertiesInternal)this).Rights = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights[]) content.GetValueForProperty("Rights",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRulePropertiesInternal)this).Rights, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights.CreateFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRulePropertiesInternal)this).Rights = (System.Collections.Generic.List) content.GetValueForProperty("Rights",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRulePropertiesInternal)this).Rights, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new AuthorizationRuleProperties(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new AuthorizationRuleProperties(content); } @@ -137,7 +135,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AuthorizationRuleProperties.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/AuthorizationRuleProperties.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AuthorizationRuleProperties.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/AuthorizationRuleProperties.TypeConverter.cs index 9517a1e8e325..1586357bcb7a 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AuthorizationRuleProperties.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/AuthorizationRuleProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AuthorizationRuleProperties.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/AuthorizationRuleProperties.cs similarity index 65% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AuthorizationRuleProperties.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/AuthorizationRuleProperties.cs index e43205796cf3..d357a64c1d6d 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AuthorizationRuleProperties.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/AuthorizationRuleProperties.cs @@ -3,23 +3,23 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// Properties supplied to create or update AuthorizationRule [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class AuthorizationRuleProperties : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleProperties, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRulePropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleProperties, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRulePropertiesInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights[] _rights; + private System.Collections.Generic.List _rights; /// The rights associated with the rule. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights[] Rights { get => this._rights; set => this._rights = value; } + public System.Collections.Generic.List Rights { get => this._rights; set => this._rights = value; } /// Creates an new instance. public AuthorizationRuleProperties() @@ -35,10 +35,14 @@ public partial interface IAuthorizationRuleProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = true, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The rights associated with the rule.", SerializedName = @"rights", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights[] Rights { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Manage", "Send", "Listen")] + System.Collections.Generic.List Rights { get; set; } } /// Properties supplied to create or update AuthorizationRule @@ -46,7 +50,8 @@ internal partial interface IAuthorizationRulePropertiesInternal { /// The rights associated with the rule. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights[] Rights { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Manage", "Send", "Listen")] + System.Collections.Generic.List Rights { get; set; } } } \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AuthorizationRuleProperties.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/AuthorizationRuleProperties.json.cs similarity index 88% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AuthorizationRuleProperties.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/AuthorizationRuleProperties.json.cs index d116a94a582a..47f2e5af9842 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AuthorizationRuleProperties.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/AuthorizationRuleProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -65,18 +65,18 @@ internal AuthorizationRuleProperties(Microsoft.Azure.PowerShell.Cmdlets.EventHub { return; } - {_rights = If( json?.PropertyT("rights"), out var __jsonRights) ? If( __jsonRights as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights) (__u is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString __t ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights)(__t.ToString()) : ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights)""))) ))() : null : Rights;} + {_rights = If( json?.PropertyT("rights"), out var __jsonRights) ? If( __jsonRights as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : _rights;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new AuthorizationRuleProperties(json) : null; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AvailableCluster.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/AvailableCluster.PowerShell.cs similarity index 84% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AvailableCluster.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/AvailableCluster.PowerShell.cs index f77427654efc..7a76bd90c241 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AvailableCluster.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/AvailableCluster.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class AvailableCluster partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,13 +78,13 @@ internal AvailableCluster(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAvailableClusterInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAvailableClusterInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAvailableClusterInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAvailableClusterInternal)this).Location, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -99,33 +99,33 @@ internal AvailableCluster(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAvailableClusterInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAvailableClusterInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAvailableClusterInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAvailableClusterInternal)this).Location, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAvailableCluster DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAvailableCluster DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new AvailableCluster(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAvailableCluster DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAvailableCluster DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new AvailableCluster(content); } @@ -135,7 +135,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAvailableCluster FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAvailableCluster FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AvailableCluster.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/AvailableCluster.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AvailableCluster.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/AvailableCluster.TypeConverter.cs index 43cbbe91037a..af3d4b16c6ef 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AvailableCluster.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/AvailableCluster.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAvailableCluster ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAvailableCluster ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAvailableCluster).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAvailableCluster).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AvailableCluster.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/AvailableCluster.cs similarity index 87% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AvailableCluster.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/AvailableCluster.cs index 62787ff06f6b..222d33b22dd9 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AvailableCluster.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/AvailableCluster.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// Pre-provisioned and readily available Event Hubs Cluster count per region. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class AvailableCluster : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAvailableCluster, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAvailableClusterInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAvailableCluster, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAvailableClusterInternal { /// Backing field for property. @@ -35,6 +35,9 @@ public partial interface IAvailableCluster : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Location fo the Available Cluster", SerializedName = @"location", PossibleTypes = new [] { typeof(string) })] diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AvailableCluster.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/AvailableCluster.json.cs similarity index 94% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AvailableCluster.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/AvailableCluster.json.cs index a83d74325b95..79af13a1c816 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AvailableCluster.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/AvailableCluster.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -65,18 +65,18 @@ internal AvailableCluster(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Js { return; } - {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)Location;} + {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)_location;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAvailableCluster. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAvailableCluster. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAvailableCluster. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAvailableCluster. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAvailableCluster FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAvailableCluster FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new AvailableCluster(json) : null; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AvailableClustersList.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/AvailableClustersList.PowerShell.cs similarity index 78% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AvailableClustersList.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/AvailableClustersList.PowerShell.cs index 6cfe4101fee3..a7179723a3bb 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AvailableClustersList.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/AvailableClustersList.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class AvailableClustersList partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,13 +78,13 @@ internal AvailableClustersList(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAvailableClustersListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAvailableCluster[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAvailableClustersListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.AvailableClusterTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAvailableClustersListInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAvailableClustersListInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.AvailableClusterTypeConverter.ConvertFrom)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -99,35 +99,33 @@ internal AvailableClustersList(global::System.Management.Automation.PSObject con // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAvailableClustersListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAvailableCluster[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAvailableClustersListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.AvailableClusterTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAvailableClustersListInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAvailableClustersListInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.AvailableClusterTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAvailableClustersList DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAvailableClustersList DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new AvailableClustersList(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAvailableClustersList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAvailableClustersList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new AvailableClustersList(content); } @@ -137,7 +135,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAvailableClustersList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAvailableClustersList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AvailableClustersList.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/AvailableClustersList.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AvailableClustersList.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/AvailableClustersList.TypeConverter.cs index e80ebf301564..f4b122907b60 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AvailableClustersList.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/AvailableClustersList.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAvailableClustersList ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAvailableClustersList ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAvailableClustersList).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAvailableClustersList).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AvailableClustersList.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/AvailableClustersList.cs similarity index 69% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AvailableClustersList.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/AvailableClustersList.cs index 09ae92242dff..c22f0f7f9567 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AvailableClustersList.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/AvailableClustersList.cs @@ -3,25 +3,25 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// The response of the List Available Clusters operation. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class AvailableClustersList : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAvailableClustersList, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAvailableClustersListInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAvailableClustersList, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAvailableClustersListInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAvailableCluster[] _value; + private System.Collections.Generic.List _value; /// /// The count of readily available and pre-provisioned Event Hubs Clusters per region. /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAvailableCluster[] Value { get => this._value; set => this._value = value; } + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } /// Creates an new instance. public AvailableClustersList() @@ -39,10 +39,13 @@ public partial interface IAvailableClustersList : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The count of readily available and pre-provisioned Event Hubs Clusters per region.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAvailableCluster) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAvailableCluster[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAvailableCluster) })] + System.Collections.Generic.List Value { get; set; } } /// The response of the List Available Clusters operation. @@ -52,7 +55,7 @@ internal partial interface IAvailableClustersListInternal /// /// The count of readily available and pre-provisioned Event Hubs Clusters per region. /// - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAvailableCluster[] Value { get; set; } + System.Collections.Generic.List Value { get; set; } } } \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AvailableClustersList.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/AvailableClustersList.json.cs similarity index 89% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AvailableClustersList.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/AvailableClustersList.json.cs index 3f27473b83f1..670e4b745e2b 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/AvailableClustersList.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/AvailableClustersList.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -65,18 +65,18 @@ internal AvailableClustersList(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runti { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAvailableCluster) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.AvailableCluster.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAvailableCluster) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.AvailableCluster.FromJson(__u) )) ))() : null : _value;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAvailableClustersList. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAvailableClustersList. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAvailableClustersList. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAvailableClustersList. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAvailableClustersList FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAvailableClustersList FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new AvailableClustersList(json) : null; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/CaptureDescription.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/CaptureDescription.PowerShell.cs similarity index 50% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/CaptureDescription.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/CaptureDescription.PowerShell.cs index 77908ff551b2..23ba4c74fae0 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/CaptureDescription.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/CaptureDescription.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class CaptureDescription partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,77 +78,77 @@ internal CaptureDescription(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Destination")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).Destination = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestination) content.GetValueForProperty("Destination",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).Destination, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.DestinationTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).Destination = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestination) content.GetValueForProperty("Destination",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).Destination, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.DestinationTypeConverter.ConvertFrom); } if (content.Contains("Enabled")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("Encoding")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).Encoding = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription?) content.GetValueForProperty("Encoding",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).Encoding, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).Encoding = (string) content.GetValueForProperty("Encoding",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).Encoding, global::System.Convert.ToString); } if (content.Contains("IntervalInSecond")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).IntervalInSecond = (int?) content.GetValueForProperty("IntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).IntervalInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).IntervalInSecond = (int?) content.GetValueForProperty("IntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).IntervalInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("SizeLimitInByte")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).SizeLimitInByte = (int?) content.GetValueForProperty("SizeLimitInByte",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).SizeLimitInByte, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).SizeLimitInByte = (int?) content.GetValueForProperty("SizeLimitInByte",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).SizeLimitInByte, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("SkipEmptyArchive")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).SkipEmptyArchive = (bool?) content.GetValueForProperty("SkipEmptyArchive",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).SkipEmptyArchive, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).SkipEmptyArchive = (bool?) content.GetValueForProperty("SkipEmptyArchive",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).SkipEmptyArchive, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("DestinationProperty")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).DestinationProperty = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationProperties) content.GetValueForProperty("DestinationProperty",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).DestinationProperty, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.DestinationPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).DestinationProperty = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationProperties) content.GetValueForProperty("DestinationProperty",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).DestinationProperty, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.DestinationPropertiesTypeConverter.ConvertFrom); } if (content.Contains("DestinationName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).DestinationName = (string) content.GetValueForProperty("DestinationName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).DestinationName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).DestinationName = (string) content.GetValueForProperty("DestinationName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).DestinationName, global::System.Convert.ToString); } if (content.Contains("DestinationIdentity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).DestinationIdentity = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureIdentity) content.GetValueForProperty("DestinationIdentity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).DestinationIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.CaptureIdentityTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).DestinationIdentity = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureIdentity) content.GetValueForProperty("DestinationIdentity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).DestinationIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.CaptureIdentityTypeConverter.ConvertFrom); } if (content.Contains("BlobContainer")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).BlobContainer = (string) content.GetValueForProperty("BlobContainer",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).BlobContainer, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).BlobContainer = (string) content.GetValueForProperty("BlobContainer",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).BlobContainer, global::System.Convert.ToString); } if (content.Contains("IdentityType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType?) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).IdentityType = (string) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).IdentityType, global::System.Convert.ToString); } if (content.Contains("IdentityUserAssignedIdentity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).IdentityUserAssignedIdentity = (string) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).IdentityUserAssignedIdentity, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).IdentityUserAssignedIdentity = (string) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).IdentityUserAssignedIdentity, global::System.Convert.ToString); } if (content.Contains("StorageAccountResourceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).StorageAccountResourceId = (string) content.GetValueForProperty("StorageAccountResourceId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).StorageAccountResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).StorageAccountResourceId = (string) content.GetValueForProperty("StorageAccountResourceId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).StorageAccountResourceId, global::System.Convert.ToString); } if (content.Contains("ArchiveNameFormat")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).ArchiveNameFormat = (string) content.GetValueForProperty("ArchiveNameFormat",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).ArchiveNameFormat, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).ArchiveNameFormat = (string) content.GetValueForProperty("ArchiveNameFormat",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).ArchiveNameFormat, global::System.Convert.ToString); } if (content.Contains("DataLakeSubscriptionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).DataLakeSubscriptionId = (string) content.GetValueForProperty("DataLakeSubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).DataLakeSubscriptionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).DataLakeSubscriptionId = (string) content.GetValueForProperty("DataLakeSubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).DataLakeSubscriptionId, global::System.Convert.ToString); } if (content.Contains("DataLakeAccountName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).DataLakeAccountName = (string) content.GetValueForProperty("DataLakeAccountName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).DataLakeAccountName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).DataLakeAccountName = (string) content.GetValueForProperty("DataLakeAccountName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).DataLakeAccountName, global::System.Convert.ToString); } if (content.Contains("DataLakeFolderPath")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).DataLakeFolderPath = (string) content.GetValueForProperty("DataLakeFolderPath",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).DataLakeFolderPath, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).DataLakeFolderPath = (string) content.GetValueForProperty("DataLakeFolderPath",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).DataLakeFolderPath, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -163,97 +163,97 @@ internal CaptureDescription(global::System.Management.Automation.PSObject conten // actually deserialize if (content.Contains("Destination")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).Destination = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestination) content.GetValueForProperty("Destination",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).Destination, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.DestinationTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).Destination = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestination) content.GetValueForProperty("Destination",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).Destination, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.DestinationTypeConverter.ConvertFrom); } if (content.Contains("Enabled")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("Encoding")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).Encoding = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription?) content.GetValueForProperty("Encoding",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).Encoding, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).Encoding = (string) content.GetValueForProperty("Encoding",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).Encoding, global::System.Convert.ToString); } if (content.Contains("IntervalInSecond")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).IntervalInSecond = (int?) content.GetValueForProperty("IntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).IntervalInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).IntervalInSecond = (int?) content.GetValueForProperty("IntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).IntervalInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("SizeLimitInByte")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).SizeLimitInByte = (int?) content.GetValueForProperty("SizeLimitInByte",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).SizeLimitInByte, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).SizeLimitInByte = (int?) content.GetValueForProperty("SizeLimitInByte",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).SizeLimitInByte, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("SkipEmptyArchive")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).SkipEmptyArchive = (bool?) content.GetValueForProperty("SkipEmptyArchive",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).SkipEmptyArchive, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).SkipEmptyArchive = (bool?) content.GetValueForProperty("SkipEmptyArchive",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).SkipEmptyArchive, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("DestinationProperty")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).DestinationProperty = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationProperties) content.GetValueForProperty("DestinationProperty",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).DestinationProperty, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.DestinationPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).DestinationProperty = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationProperties) content.GetValueForProperty("DestinationProperty",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).DestinationProperty, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.DestinationPropertiesTypeConverter.ConvertFrom); } if (content.Contains("DestinationName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).DestinationName = (string) content.GetValueForProperty("DestinationName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).DestinationName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).DestinationName = (string) content.GetValueForProperty("DestinationName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).DestinationName, global::System.Convert.ToString); } if (content.Contains("DestinationIdentity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).DestinationIdentity = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureIdentity) content.GetValueForProperty("DestinationIdentity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).DestinationIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.CaptureIdentityTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).DestinationIdentity = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureIdentity) content.GetValueForProperty("DestinationIdentity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).DestinationIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.CaptureIdentityTypeConverter.ConvertFrom); } if (content.Contains("BlobContainer")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).BlobContainer = (string) content.GetValueForProperty("BlobContainer",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).BlobContainer, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).BlobContainer = (string) content.GetValueForProperty("BlobContainer",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).BlobContainer, global::System.Convert.ToString); } if (content.Contains("IdentityType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType?) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).IdentityType = (string) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).IdentityType, global::System.Convert.ToString); } if (content.Contains("IdentityUserAssignedIdentity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).IdentityUserAssignedIdentity = (string) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).IdentityUserAssignedIdentity, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).IdentityUserAssignedIdentity = (string) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).IdentityUserAssignedIdentity, global::System.Convert.ToString); } if (content.Contains("StorageAccountResourceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).StorageAccountResourceId = (string) content.GetValueForProperty("StorageAccountResourceId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).StorageAccountResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).StorageAccountResourceId = (string) content.GetValueForProperty("StorageAccountResourceId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).StorageAccountResourceId, global::System.Convert.ToString); } if (content.Contains("ArchiveNameFormat")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).ArchiveNameFormat = (string) content.GetValueForProperty("ArchiveNameFormat",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).ArchiveNameFormat, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).ArchiveNameFormat = (string) content.GetValueForProperty("ArchiveNameFormat",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).ArchiveNameFormat, global::System.Convert.ToString); } if (content.Contains("DataLakeSubscriptionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).DataLakeSubscriptionId = (string) content.GetValueForProperty("DataLakeSubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).DataLakeSubscriptionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).DataLakeSubscriptionId = (string) content.GetValueForProperty("DataLakeSubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).DataLakeSubscriptionId, global::System.Convert.ToString); } if (content.Contains("DataLakeAccountName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).DataLakeAccountName = (string) content.GetValueForProperty("DataLakeAccountName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).DataLakeAccountName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).DataLakeAccountName = (string) content.GetValueForProperty("DataLakeAccountName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).DataLakeAccountName, global::System.Convert.ToString); } if (content.Contains("DataLakeFolderPath")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).DataLakeFolderPath = (string) content.GetValueForProperty("DataLakeFolderPath",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)this).DataLakeFolderPath, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).DataLakeFolderPath = (string) content.GetValueForProperty("DataLakeFolderPath",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)this).DataLakeFolderPath, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescription DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescription DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new CaptureDescription(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescription DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescription DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new CaptureDescription(content); } @@ -263,7 +263,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescription FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescription FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/CaptureDescription.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/CaptureDescription.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/CaptureDescription.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/CaptureDescription.TypeConverter.cs index b582818ee9a7..c4f8aaaeb2dc 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/CaptureDescription.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/CaptureDescription.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescription ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescription ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescription).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescription).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/CaptureDescription.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/CaptureDescription.cs similarity index 74% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/CaptureDescription.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/CaptureDescription.cs index 49518e05179e..cd6c187775d1 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/CaptureDescription.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/CaptureDescription.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// Properties to configure capture description for eventhub [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class CaptureDescription : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescription, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescription, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal { /// @@ -19,36 +19,36 @@ public partial class CaptureDescription : /// Here all the parameters (Namespace,EventHub .. etc) are mandatory irrespective of order /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string ArchiveNameFormat { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)Destination).ArchiveNameFormat; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)Destination).ArchiveNameFormat = value ?? null; } + public string ArchiveNameFormat { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)Destination).ArchiveNameFormat; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)Destination).ArchiveNameFormat = value ?? null; } /// Blob container Name [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string BlobContainer { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)Destination).BlobContainer; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)Destination).BlobContainer = value ?? null; } + public string BlobContainer { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)Destination).BlobContainer; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)Destination).BlobContainer = value ?? null; } /// The Azure Data Lake Store name for the captured events [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string DataLakeAccountName { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)Destination).DataLakeAccountName; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)Destination).DataLakeAccountName = value ?? null; } + public string DataLakeAccountName { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)Destination).DataLakeAccountName; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)Destination).DataLakeAccountName = value ?? null; } /// The destination folder path for the captured events [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string DataLakeFolderPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)Destination).DataLakeFolderPath; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)Destination).DataLakeFolderPath = value ?? null; } + public string DataLakeFolderPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)Destination).DataLakeFolderPath; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)Destination).DataLakeFolderPath = value ?? null; } /// Subscription Id of Azure Data Lake Store [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string DataLakeSubscriptionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)Destination).DataLakeSubscriptionId; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)Destination).DataLakeSubscriptionId = value ?? null; } + public string DataLakeSubscriptionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)Destination).DataLakeSubscriptionId; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)Destination).DataLakeSubscriptionId = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestination _destination; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestination _destination; /// /// Properties of Destination where capture will be stored. (Storage Account, Blob Names) /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestination Destination { get => (this._destination = this._destination ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.Destination()); set => this._destination = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestination Destination { get => (this._destination = this._destination ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Destination()); set => this._destination = value; } /// Name for capture destination [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string DestinationName { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)Destination).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)Destination).Name = value ?? null; } + public string DestinationName { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)Destination).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)Destination).Name = value ?? null; } /// Backing field for property. private bool? _enabled; @@ -58,25 +58,25 @@ public partial class CaptureDescription : public bool? Enabled { get => this._enabled; set => this._enabled = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription? _encoding; + private string _encoding; /// /// Enumerates the possible values for the encoding format of capture description. Note: 'AvroDeflate' will be deprecated /// in New API Version /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription? Encoding { get => this._encoding; set => this._encoding = value; } + public string Encoding { get => this._encoding; set => this._encoding = value; } /// Type of Azure Active Directory Managed Identity. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType? IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)Destination).IdentityType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)Destination).IdentityType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType)""); } + public string IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)Destination).IdentityType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)Destination).IdentityType = value ?? null; } /// /// ARM ID of Managed User Identity. This property is required is the type is UserAssignedIdentity. If type is SystemAssigned, /// then the System Assigned Identity Associated with the namespace will be used. /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string IdentityUserAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)Destination).IdentityUserAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)Destination).IdentityUserAssignedIdentity = value ?? null; } + public string IdentityUserAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)Destination).IdentityUserAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)Destination).IdentityUserAssignedIdentity = value ?? null; } /// Backing field for property. private int? _intervalInSecond; @@ -89,13 +89,13 @@ public partial class CaptureDescription : public int? IntervalInSecond { get => this._intervalInSecond; set => this._intervalInSecond = value; } /// Internal Acessors for Destination - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestination Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal.Destination { get => (this._destination = this._destination ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.Destination()); set { {_destination = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestination Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal.Destination { get => (this._destination = this._destination ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Destination()); set { {_destination = value;} } } /// Internal Acessors for DestinationIdentity - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureIdentity Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal.DestinationIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)Destination).Identity; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)Destination).Identity = value; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureIdentity Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal.DestinationIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)Destination).Identity; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)Destination).Identity = value; } /// Internal Acessors for DestinationProperty - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationProperties Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal.DestinationProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)Destination).Property; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)Destination).Property = value; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationProperties Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal.DestinationProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)Destination).Property; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)Destination).Property = value; } /// Backing field for property. private int? _sizeLimitInByte; @@ -116,7 +116,7 @@ public partial class CaptureDescription : /// Resource id of the storage account to be used to create the blobs [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string StorageAccountResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)Destination).StorageAccountResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)Destination).StorageAccountResourceId = value ?? null; } + public string StorageAccountResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)Destination).StorageAccountResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)Destination).StorageAccountResourceId = value ?? null; } /// Creates an new instance. public CaptureDescription() @@ -135,6 +135,9 @@ public partial interface ICaptureDescription : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Blob naming convention for archive, e.g. {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}. Here all the parameters (Namespace,EventHub .. etc) are mandatory irrespective of order", SerializedName = @"archiveNameFormat", PossibleTypes = new [] { typeof(string) })] @@ -143,6 +146,9 @@ public partial interface ICaptureDescription : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Blob container Name", SerializedName = @"blobContainer", PossibleTypes = new [] { typeof(string) })] @@ -151,6 +157,9 @@ public partial interface ICaptureDescription : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The Azure Data Lake Store name for the captured events", SerializedName = @"dataLakeAccountName", PossibleTypes = new [] { typeof(string) })] @@ -159,6 +168,9 @@ public partial interface ICaptureDescription : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The destination folder path for the captured events", SerializedName = @"dataLakeFolderPath", PossibleTypes = new [] { typeof(string) })] @@ -167,6 +179,9 @@ public partial interface ICaptureDescription : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Subscription Id of Azure Data Lake Store", SerializedName = @"dataLakeSubscriptionId", PossibleTypes = new [] { typeof(string) })] @@ -175,6 +190,9 @@ public partial interface ICaptureDescription : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Name for capture destination", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] @@ -183,6 +201,9 @@ public partial interface ICaptureDescription : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"A value that indicates whether capture description is enabled. ", SerializedName = @"enabled", PossibleTypes = new [] { typeof(bool) })] @@ -194,18 +215,26 @@ public partial interface ICaptureDescription : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Enumerates the possible values for the encoding format of capture description. Note: 'AvroDeflate' will be deprecated in New API Version", SerializedName = @"encoding", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription? Encoding { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Avro", "AvroDeflate")] + string Encoding { get; set; } /// Type of Azure Active Directory Managed Identity. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Type of Azure Active Directory Managed Identity.", SerializedName = @"type", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType? IdentityType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("SystemAssigned", "UserAssigned")] + string IdentityType { get; set; } /// /// ARM ID of Managed User Identity. This property is required is the type is UserAssignedIdentity. If type is SystemAssigned, /// then the System Assigned Identity Associated with the namespace will be used. @@ -213,6 +242,9 @@ public partial interface ICaptureDescription : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"ARM ID of Managed User Identity. This property is required is the type is UserAssignedIdentity. If type is SystemAssigned, then the System Assigned Identity Associated with the namespace will be used.", SerializedName = @"userAssignedIdentity", PossibleTypes = new [] { typeof(string) })] @@ -224,6 +256,9 @@ public partial interface ICaptureDescription : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The time window allows you to set the frequency with which the capture to Azure Blobs will happen, value should between 60 to 900 seconds", SerializedName = @"intervalInSeconds", PossibleTypes = new [] { typeof(int) })] @@ -235,6 +270,9 @@ public partial interface ICaptureDescription : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The size window defines the amount of data built up in your Event Hub before an capture operation, value should be between 10485760 to 524288000 bytes", SerializedName = @"sizeLimitInBytes", PossibleTypes = new [] { typeof(int) })] @@ -243,6 +281,9 @@ public partial interface ICaptureDescription : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"A value that indicates whether to Skip Empty Archives", SerializedName = @"skipEmptyArchives", PossibleTypes = new [] { typeof(bool) })] @@ -251,6 +292,9 @@ public partial interface ICaptureDescription : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Resource id of the storage account to be used to create the blobs", SerializedName = @"storageAccountResourceId", PossibleTypes = new [] { typeof(string) })] @@ -277,24 +321,26 @@ internal partial interface ICaptureDescriptionInternal /// /// Properties of Destination where capture will be stored. (Storage Account, Blob Names) /// - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestination Destination { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestination Destination { get; set; } /// A value that indicates whether capture description is enabled. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureIdentity DestinationIdentity { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureIdentity DestinationIdentity { get; set; } /// Name for capture destination string DestinationName { get; set; } /// /// Properties describing the storage account, blob container and archive name format for capture destination /// - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationProperties DestinationProperty { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationProperties DestinationProperty { get; set; } /// A value that indicates whether capture description is enabled. bool? Enabled { get; set; } /// /// Enumerates the possible values for the encoding format of capture description. Note: 'AvroDeflate' will be deprecated /// in New API Version /// - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription? Encoding { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Avro", "AvroDeflate")] + string Encoding { get; set; } /// Type of Azure Active Directory Managed Identity. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType? IdentityType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("SystemAssigned", "UserAssigned")] + string IdentityType { get; set; } /// /// ARM ID of Managed User Identity. This property is required is the type is UserAssignedIdentity. If type is SystemAssigned, /// then the System Assigned Identity Associated with the namespace will be used. diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/CaptureDescription.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/CaptureDescription.json.cs similarity index 92% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/CaptureDescription.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/CaptureDescription.json.cs index a1945d12ce26..ad9c9e877146 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/CaptureDescription.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/CaptureDescription.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -65,23 +65,23 @@ internal CaptureDescription(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime. { return; } - {_destination = If( json?.PropertyT("destination"), out var __jsonDestination) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.Destination.FromJson(__jsonDestination) : Destination;} - {_enabled = If( json?.PropertyT("enabled"), out var __jsonEnabled) ? (bool?)__jsonEnabled : Enabled;} - {_encoding = If( json?.PropertyT("encoding"), out var __jsonEncoding) ? (string)__jsonEncoding : (string)Encoding;} - {_intervalInSecond = If( json?.PropertyT("intervalInSeconds"), out var __jsonIntervalInSeconds) ? (int?)__jsonIntervalInSeconds : IntervalInSecond;} - {_sizeLimitInByte = If( json?.PropertyT("sizeLimitInBytes"), out var __jsonSizeLimitInBytes) ? (int?)__jsonSizeLimitInBytes : SizeLimitInByte;} - {_skipEmptyArchive = If( json?.PropertyT("skipEmptyArchives"), out var __jsonSkipEmptyArchives) ? (bool?)__jsonSkipEmptyArchives : SkipEmptyArchive;} + {_destination = If( json?.PropertyT("destination"), out var __jsonDestination) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Destination.FromJson(__jsonDestination) : _destination;} + {_enabled = If( json?.PropertyT("enabled"), out var __jsonEnabled) ? (bool?)__jsonEnabled : _enabled;} + {_encoding = If( json?.PropertyT("encoding"), out var __jsonEncoding) ? (string)__jsonEncoding : (string)_encoding;} + {_intervalInSecond = If( json?.PropertyT("intervalInSeconds"), out var __jsonIntervalInSeconds) ? (int?)__jsonIntervalInSeconds : _intervalInSecond;} + {_sizeLimitInByte = If( json?.PropertyT("sizeLimitInBytes"), out var __jsonSizeLimitInBytes) ? (int?)__jsonSizeLimitInBytes : _sizeLimitInByte;} + {_skipEmptyArchive = If( json?.PropertyT("skipEmptyArchives"), out var __jsonSkipEmptyArchives) ? (bool?)__jsonSkipEmptyArchives : _skipEmptyArchive;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescription. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescription. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescription. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescription. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescription FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescription FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new CaptureDescription(json) : null; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/CaptureIdentity.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/CaptureIdentity.PowerShell.cs similarity index 78% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/CaptureIdentity.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/CaptureIdentity.PowerShell.cs index b77aa78c43da..aa2ab8e27347 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/CaptureIdentity.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/CaptureIdentity.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class CaptureIdentity partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,17 +78,17 @@ internal CaptureIdentity(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureIdentityInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureIdentityInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureIdentityInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureIdentityInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("UserAssignedIdentity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureIdentityInternal)this).UserAssignedIdentity = (string) content.GetValueForProperty("UserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureIdentityInternal)this).UserAssignedIdentity, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureIdentityInternal)this).UserAssignedIdentity = (string) content.GetValueForProperty("UserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureIdentityInternal)this).UserAssignedIdentity, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -103,37 +103,37 @@ internal CaptureIdentity(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureIdentityInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureIdentityInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureIdentityInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureIdentityInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("UserAssignedIdentity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureIdentityInternal)this).UserAssignedIdentity = (string) content.GetValueForProperty("UserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureIdentityInternal)this).UserAssignedIdentity, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureIdentityInternal)this).UserAssignedIdentity = (string) content.GetValueForProperty("UserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureIdentityInternal)this).UserAssignedIdentity, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new CaptureIdentity(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new CaptureIdentity(content); } @@ -143,7 +143,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/CaptureIdentity.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/CaptureIdentity.TypeConverter.cs similarity index 97% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/CaptureIdentity.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/CaptureIdentity.TypeConverter.cs index 4bf582d30299..981418223866 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/CaptureIdentity.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/CaptureIdentity.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureIdentity ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureIdentity ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureIdentity).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureIdentity).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/CaptureIdentity.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/CaptureIdentity.cs similarity index 80% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/CaptureIdentity.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/CaptureIdentity.cs index 52a29645168a..faa6743a592b 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/CaptureIdentity.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/CaptureIdentity.cs @@ -3,23 +3,23 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// A value that indicates whether capture description is enabled. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class CaptureIdentity : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureIdentity, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureIdentityInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureIdentity, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureIdentityInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType? _type; + private string _type; /// Type of Azure Active Directory Managed Identity. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType? Type { get => this._type; set => this._type = value; } + public string Type { get => this._type; set => this._type = value; } /// Backing field for property. private string _userAssignedIdentity; @@ -45,10 +45,14 @@ public partial interface ICaptureIdentity : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Type of Azure Active Directory Managed Identity.", SerializedName = @"type", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType? Type { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("SystemAssigned", "UserAssigned")] + string Type { get; set; } /// /// ARM ID of Managed User Identity. This property is required is the type is UserAssignedIdentity. If type is SystemAssigned, /// then the System Assigned Identity Associated with the namespace will be used. @@ -56,6 +60,9 @@ public partial interface ICaptureIdentity : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"ARM ID of Managed User Identity. This property is required is the type is UserAssignedIdentity. If type is SystemAssigned, then the System Assigned Identity Associated with the namespace will be used.", SerializedName = @"userAssignedIdentity", PossibleTypes = new [] { typeof(string) })] @@ -67,7 +74,8 @@ internal partial interface ICaptureIdentityInternal { /// Type of Azure Active Directory Managed Identity. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType? Type { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("SystemAssigned", "UserAssigned")] + string Type { get; set; } /// /// ARM ID of Managed User Identity. This property is required is the type is UserAssignedIdentity. If type is SystemAssigned, /// then the System Assigned Identity Associated with the namespace will be used. diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/CaptureIdentity.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/CaptureIdentity.json.cs similarity index 93% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/CaptureIdentity.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/CaptureIdentity.json.cs index fc738259102e..cd8cddab5422 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/CaptureIdentity.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/CaptureIdentity.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -65,19 +65,19 @@ internal CaptureIdentity(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Jso { return; } - {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} - {_userAssignedIdentity = If( json?.PropertyT("userAssignedIdentity"), out var __jsonUserAssignedIdentity) ? (string)__jsonUserAssignedIdentity : (string)UserAssignedIdentity;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} + {_userAssignedIdentity = If( json?.PropertyT("userAssignedIdentity"), out var __jsonUserAssignedIdentity) ? (string)__jsonUserAssignedIdentity : (string)_userAssignedIdentity;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureIdentity. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureIdentity. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureIdentity. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureIdentity. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new CaptureIdentity(json) : null; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/CheckNameAvailabilityParameter.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/CheckNameAvailabilityParameter.PowerShell.cs similarity index 83% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/CheckNameAvailabilityParameter.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/CheckNameAvailabilityParameter.PowerShell.cs index b720ece65376..fb837a1fe4d9 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/CheckNameAvailabilityParameter.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/CheckNameAvailabilityParameter.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class CheckNameAvailabilityParameter partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,13 +78,13 @@ internal CheckNameAvailabilityParameter(global::System.Collections.IDictionary c // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityParameterInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityParameterInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityParameterInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityParameterInternal)this).Name, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -99,35 +99,33 @@ internal CheckNameAvailabilityParameter(global::System.Management.Automation.PSO // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityParameterInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityParameterInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityParameterInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityParameterInternal)this).Name, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityParameter DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityParameter DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new CheckNameAvailabilityParameter(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityParameter DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityParameter DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new CheckNameAvailabilityParameter(content); } @@ -137,7 +135,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityParameter FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityParameter FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/CheckNameAvailabilityParameter.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/CheckNameAvailabilityParameter.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/CheckNameAvailabilityParameter.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/CheckNameAvailabilityParameter.TypeConverter.cs index 53c5b3a61ed3..c590da7ce9c5 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/CheckNameAvailabilityParameter.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/CheckNameAvailabilityParameter.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityParameter ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityParameter ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityParameter).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityParameter).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/CheckNameAvailabilityParameter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/CheckNameAvailabilityParameter.cs similarity index 86% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/CheckNameAvailabilityParameter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/CheckNameAvailabilityParameter.cs index e21904b98aae..e0d35d4d7823 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/CheckNameAvailabilityParameter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/CheckNameAvailabilityParameter.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// Parameter supplied to check Namespace name availability operation [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class CheckNameAvailabilityParameter : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityParameter, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityParameterInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityParameter, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityParameterInternal { /// Backing field for property. @@ -35,6 +35,9 @@ public partial interface ICheckNameAvailabilityParameter : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = true, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Name to check the namespace name availability", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/CheckNameAvailabilityParameter.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/CheckNameAvailabilityParameter.json.cs similarity index 93% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/CheckNameAvailabilityParameter.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/CheckNameAvailabilityParameter.json.cs index f966d80f2391..0695f6605958 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/CheckNameAvailabilityParameter.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/CheckNameAvailabilityParameter.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -65,18 +65,18 @@ internal CheckNameAvailabilityParameter(Microsoft.Azure.PowerShell.Cmdlets.Event { return; } - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityParameter. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityParameter. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityParameter. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityParameter. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityParameter FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityParameter FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new CheckNameAvailabilityParameter(json) : null; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/CheckNameAvailabilityResult.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/CheckNameAvailabilityResult.PowerShell.cs similarity index 73% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/CheckNameAvailabilityResult.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/CheckNameAvailabilityResult.PowerShell.cs index bf306e54690b..e6408e8db208 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/CheckNameAvailabilityResult.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/CheckNameAvailabilityResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class CheckNameAvailabilityResult partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,21 +78,21 @@ internal CheckNameAvailabilityResult(global::System.Collections.IDictionary cont // actually deserialize if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResultInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResultInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResultInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResultInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("NameAvailable")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResultInternal)this).NameAvailable = (bool?) content.GetValueForProperty("NameAvailable",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResultInternal)this).NameAvailable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResultInternal)this).NameAvailable = (bool?) content.GetValueForProperty("NameAvailable",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResultInternal)this).NameAvailable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("Reason")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResultInternal)this).Reason = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.UnavailableReason?) content.GetValueForProperty("Reason",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResultInternal)this).Reason, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.UnavailableReason.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResultInternal)this).Reason = (string) content.GetValueForProperty("Reason",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResultInternal)this).Reason, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -107,43 +107,41 @@ internal CheckNameAvailabilityResult(global::System.Management.Automation.PSObje // actually deserialize if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResultInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResultInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResultInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResultInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("NameAvailable")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResultInternal)this).NameAvailable = (bool?) content.GetValueForProperty("NameAvailable",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResultInternal)this).NameAvailable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResultInternal)this).NameAvailable = (bool?) content.GetValueForProperty("NameAvailable",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResultInternal)this).NameAvailable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("Reason")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResultInternal)this).Reason = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.UnavailableReason?) content.GetValueForProperty("Reason",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResultInternal)this).Reason, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.UnavailableReason.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResultInternal)this).Reason = (string) content.GetValueForProperty("Reason",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResultInternal)this).Reason, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new CheckNameAvailabilityResult(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new CheckNameAvailabilityResult(content); } @@ -153,7 +151,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/CheckNameAvailabilityResult.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/CheckNameAvailabilityResult.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/CheckNameAvailabilityResult.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/CheckNameAvailabilityResult.TypeConverter.cs index e13d81d6eba0..10b0d69375e5 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/CheckNameAvailabilityResult.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/CheckNameAvailabilityResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/CheckNameAvailabilityResult.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/CheckNameAvailabilityResult.cs similarity index 77% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/CheckNameAvailabilityResult.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/CheckNameAvailabilityResult.cs index ae5526e4daec..ebe40c50ff53 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/CheckNameAvailabilityResult.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/CheckNameAvailabilityResult.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// The Result of the CheckNameAvailability operation [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class CheckNameAvailabilityResult : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResultInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResultInternal { /// Backing field for property. @@ -22,7 +22,7 @@ public partial class CheckNameAvailabilityResult : public string Message { get => this._message; } /// Internal Acessors for Message - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResultInternal.Message { get => this._message; set { {_message = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResultInternal.Message { get => this._message; set { {_message = value;} } } /// Backing field for property. private bool? _nameAvailable; @@ -34,11 +34,11 @@ public partial class CheckNameAvailabilityResult : public bool? NameAvailable { get => this._nameAvailable; set => this._nameAvailable = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.UnavailableReason? _reason; + private string _reason; /// The reason for unavailability of a Namespace. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.UnavailableReason? Reason { get => this._reason; set => this._reason = value; } + public string Reason { get => this._reason; set => this._reason = value; } /// Creates an new instance. public CheckNameAvailabilityResult() @@ -54,6 +54,9 @@ public partial interface ICheckNameAvailabilityResult : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The detailed info regarding the reason associated with the Namespace.", SerializedName = @"message", PossibleTypes = new [] { typeof(string) })] @@ -64,6 +67,9 @@ public partial interface ICheckNameAvailabilityResult : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Value indicating Namespace is availability, true if the Namespace is available; otherwise, false.", SerializedName = @"nameAvailable", PossibleTypes = new [] { typeof(bool) })] @@ -72,10 +78,14 @@ public partial interface ICheckNameAvailabilityResult : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The reason for unavailability of a Namespace.", SerializedName = @"reason", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.UnavailableReason) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.UnavailableReason? Reason { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("None", "InvalidName", "SubscriptionIsDisabled", "NameInUse", "NameInLockdown", "TooManyNamespaceInCurrentSubscription")] + string Reason { get; set; } } /// The Result of the CheckNameAvailability operation @@ -89,7 +99,8 @@ internal partial interface ICheckNameAvailabilityResultInternal /// bool? NameAvailable { get; set; } /// The reason for unavailability of a Namespace. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.UnavailableReason? Reason { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("None", "InvalidName", "SubscriptionIsDisabled", "NameInUse", "NameInLockdown", "TooManyNamespaceInCurrentSubscription")] + string Reason { get; set; } } } \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/CheckNameAvailabilityResult.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/CheckNameAvailabilityResult.json.cs similarity index 92% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/CheckNameAvailabilityResult.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/CheckNameAvailabilityResult.json.cs index 3ffc66a155bf..123ef487540f 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/CheckNameAvailabilityResult.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/CheckNameAvailabilityResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -65,20 +65,20 @@ internal CheckNameAvailabilityResult(Microsoft.Azure.PowerShell.Cmdlets.EventHub { return; } - {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;} - {_nameAvailable = If( json?.PropertyT("nameAvailable"), out var __jsonNameAvailable) ? (bool?)__jsonNameAvailable : NameAvailable;} - {_reason = If( json?.PropertyT("reason"), out var __jsonReason) ? (string)__jsonReason : (string)Reason;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)_message;} + {_nameAvailable = If( json?.PropertyT("nameAvailable"), out var __jsonNameAvailable) ? (bool?)__jsonNameAvailable : _nameAvailable;} + {_reason = If( json?.PropertyT("reason"), out var __jsonReason) ? (string)__jsonReason : (string)_reason;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new CheckNameAvailabilityResult(json) : null; } @@ -102,7 +102,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode ToJson( { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Cluster.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/Cluster.PowerShell.cs new file mode 100644 index 000000000000..5cc2b6d3ec20 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/Cluster.PowerShell.cs @@ -0,0 +1,332 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + + /// Single Event Hubs Cluster resource in List or Get operations. + [System.ComponentModel.TypeConverter(typeof(ClusterTypeConverter))] + public partial class Cluster + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Cluster(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Sku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterSku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ClusterSkuTypeConverter.ConvertFrom); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ClusterPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("SkuName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).SkuName = (string) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).SkuName, global::System.Convert.ToString); + } + if (content.Contains("Capacity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).Capacity = (int?) content.GetValueForProperty("Capacity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).Capacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("CreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).CreatedAt = (string) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).CreatedAt, global::System.Convert.ToString); + } + if (content.Contains("UpdatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).UpdatedAt = (string) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).UpdatedAt, global::System.Convert.ToString); + } + if (content.Contains("MetricId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).MetricId = (string) content.GetValueForProperty("MetricId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).MetricId, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("SupportsScaling")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).SupportsScaling = (bool?) content.GetValueForProperty("SupportsScaling",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).SupportsScaling, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Cluster(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Sku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterSku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ClusterSkuTypeConverter.ConvertFrom); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ClusterPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("SkuName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).SkuName = (string) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).SkuName, global::System.Convert.ToString); + } + if (content.Contains("Capacity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).Capacity = (int?) content.GetValueForProperty("Capacity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).Capacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("CreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).CreatedAt = (string) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).CreatedAt, global::System.Convert.ToString); + } + if (content.Contains("UpdatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).UpdatedAt = (string) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).UpdatedAt, global::System.Convert.ToString); + } + if (content.Contains("MetricId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).MetricId = (string) content.GetValueForProperty("MetricId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).MetricId, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("SupportsScaling")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).SupportsScaling = (bool?) content.GetValueForProperty("SupportsScaling",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal)this).SupportsScaling, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Cluster(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Cluster(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Single Event Hubs Cluster resource in List or Get operations. + [System.ComponentModel.TypeConverter(typeof(ClusterTypeConverter))] + public partial interface ICluster + + { + + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Cluster.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/Cluster.TypeConverter.cs similarity index 97% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Cluster.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/Cluster.TypeConverter.cs index ef2552bcbc06..d221468b4ac6 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Cluster.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/Cluster.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Cluster.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/Cluster.cs similarity index 62% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Cluster.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/Cluster.cs index b004856b44de..e07ce530f0c6 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Cluster.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/Cluster.cs @@ -3,165 +3,164 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// Single Event Hubs Cluster resource in List or Get operations. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class Cluster : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IValidates { /// - /// Backing field for Inherited model + /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResource __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.TrackedResource(); + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResource __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.TrackedResource(); /// The quantity of Event Hubs Cluster Capacity Units contained in this cluster. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public int? Capacity { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterSkuInternal)Sku).Capacity; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterSkuInternal)Sku).Capacity = value ?? default(int); } + public int? Capacity { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterSkuInternal)Sku).Capacity; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterSkuInternal)Sku).Capacity = value ?? default(int); } /// The UTC time when the Event Hubs Cluster was created. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string CreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterPropertiesInternal)Property).CreatedAt; } + public string CreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterPropertiesInternal)Property).CreatedAt; } /// /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)__trackedResource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)__trackedResource).Id; } /// Resource location. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceInternal)__trackedResource).Location = value ?? null; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceInternal)__trackedResource).Location = value ?? null; } /// /// The metric ID of the cluster resource. Provided by the service and not modifiable by the user. /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string MetricId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterPropertiesInternal)Property).MetricId; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)__trackedResource).Id = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)__trackedResource).Name = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)__trackedResource).Type = value; } + public string MetricId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterPropertiesInternal)Property).MetricId; } /// Internal Acessors for CreatedAt - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal.CreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterPropertiesInternal)Property).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterPropertiesInternal)Property).CreatedAt = value; } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal.CreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterPropertiesInternal)Property).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterPropertiesInternal)Property).CreatedAt = value; } /// Internal Acessors for MetricId - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal.MetricId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterPropertiesInternal)Property).MetricId; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterPropertiesInternal)Property).MetricId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal.MetricId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterPropertiesInternal)Property).MetricId; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterPropertiesInternal)Property).MetricId = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterProperties Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ClusterProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterProperties Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ClusterProperties()); set { {_property = value;} } } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterPropertiesInternal)Property).ProvisioningState = value; } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterPropertiesInternal)Property).ProvisioningState = value; } /// Internal Acessors for Sku - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterSku Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal.Sku { get => (this._sku = this._sku ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ClusterSku()); set { {_sku = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterSku Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal.Sku { get => (this._sku = this._sku ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ClusterSku()); set { {_sku = value;} } } /// Internal Acessors for SkuName - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal.SkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterSkuInternal)Sku).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterSkuInternal)Sku).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal.SkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterSkuInternal)Sku).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterSkuInternal)Sku).Name = value; } /// Internal Acessors for Status - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal.Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterPropertiesInternal)Property).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterPropertiesInternal)Property).Status = value; } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal.Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterPropertiesInternal)Property).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterPropertiesInternal)Property).Status = value; } /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.SystemData()); set { {_systemData = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SystemData()); set { {_systemData = value;} } } /// Internal Acessors for UpdatedAt - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterInternal.UpdatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterPropertiesInternal)Property).UpdatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterPropertiesInternal)Property).UpdatedAt = value; } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterInternal.UpdatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterPropertiesInternal)Property).UpdatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterPropertiesInternal)Property).UpdatedAt = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)__trackedResource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)__trackedResource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)__trackedResource).Type = value; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)__trackedResource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)__trackedResource).Name; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterProperties _property; /// Event Hubs Cluster properties supplied in responses in List or Get operations. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ClusterProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ClusterProperties()); set => this._property = value; } /// Provisioning state of the Cluster. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterPropertiesInternal)Property).ProvisioningState; } + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterPropertiesInternal)Property).ProvisioningState; } /// Gets the resource group name [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterSku _sku; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterSku _sku; /// Properties of the cluster SKU. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterSku Sku { get => (this._sku = this._sku ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ClusterSku()); set => this._sku = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterSku Sku { get => (this._sku = this._sku ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ClusterSku()); set => this._sku = value; } /// Name of this SKU. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string SkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterSkuInternal)Sku).Name; } + public string SkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterSkuInternal)Sku).Name; } /// Status of the Cluster resource [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterPropertiesInternal)Property).Status; } + public string Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterPropertiesInternal)Property).Status; } /// A value that indicates whether Scaling is Supported. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public bool? SupportsScaling { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterPropertiesInternal)Property).SupportsScaling; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterPropertiesInternal)Property).SupportsScaling = value ?? default(bool); } + public bool? SupportsScaling { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterPropertiesInternal)Property).SupportsScaling; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterPropertiesInternal)Property).SupportsScaling = value ?? default(bool); } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData _systemData; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData _systemData; /// The system meta data relating to this resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.SystemData()); } + internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SystemData()); } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType)""); } + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedByType = value ?? null; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType)""); } + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedByType = value ?? null; } /// Resource tags. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } /// /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)__trackedResource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)__trackedResource).Type; } /// The UTC time when the Event Hubs Cluster was last updated. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string UpdatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterPropertiesInternal)Property).UpdatedAt; } + public string UpdatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterPropertiesInternal)Property).UpdatedAt; } /// Creates an new instance. public Cluster() @@ -184,12 +183,15 @@ public Cluster() /// Single Event Hubs Cluster resource in List or Get operations. public partial interface ICluster : Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResource + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResource { /// The quantity of Event Hubs Cluster Capacity Units contained in this cluster. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The quantity of Event Hubs Cluster Capacity Units contained in this cluster.", SerializedName = @"capacity", PossibleTypes = new [] { typeof(int) })] @@ -198,6 +200,9 @@ public partial interface ICluster : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The UTC time when the Event Hubs Cluster was created.", SerializedName = @"createdAt", PossibleTypes = new [] { typeof(string) })] @@ -208,6 +213,9 @@ public partial interface ICluster : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The metric ID of the cluster resource. Provided by the service and not modifiable by the user.", SerializedName = @"metricId", PossibleTypes = new [] { typeof(string) })] @@ -216,14 +224,21 @@ public partial interface ICluster : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Provisioning state of the Cluster.", SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningState? ProvisioningState { get; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Unknown", "Creating", "Deleting", "Scaling", "Active", "Failed", "Succeeded", "Canceled")] + string ProvisioningState { get; } /// Name of this SKU. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = true, + Update = true, Description = @"Name of this SKU.", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] @@ -232,6 +247,9 @@ public partial interface ICluster : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Status of the Cluster resource", SerializedName = @"status", PossibleTypes = new [] { typeof(string) })] @@ -240,6 +258,9 @@ public partial interface ICluster : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"A value that indicates whether Scaling is Supported.", SerializedName = @"supportsScaling", PossibleTypes = new [] { typeof(bool) })] @@ -247,55 +268,78 @@ public partial interface ICluster : /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The timestamp of resource creation (UTC).", SerializedName = @"createdAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? SystemDataCreatedAt { get; set; } + global::System.DateTime? SystemDataCreatedAt { get; } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The identity that created the resource.", SerializedName = @"createdBy", PossibleTypes = new [] { typeof(string) })] - string SystemDataCreatedBy { get; set; } + string SystemDataCreatedBy { get; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that created the resource.", SerializedName = @"createdByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataCreatedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that last modified the resource.", SerializedName = @"lastModifiedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? SystemDataLastModifiedAt { get; set; } + global::System.DateTime? SystemDataLastModifiedAt { get; } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The identity that last modified the resource.", SerializedName = @"lastModifiedBy", PossibleTypes = new [] { typeof(string) })] - string SystemDataLastModifiedBy { get; set; } + string SystemDataLastModifiedBy { get; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that last modified the resource.", SerializedName = @"lastModifiedByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; } /// The UTC time when the Event Hubs Cluster was last updated. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The UTC time when the Event Hubs Cluster was last updated.", SerializedName = @"updatedAt", PossibleTypes = new [] { typeof(string) })] @@ -304,7 +348,7 @@ public partial interface ICluster : } /// Single Event Hubs Cluster resource in List or Get operations. internal partial interface IClusterInternal : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceInternal { /// The quantity of Event Hubs Cluster Capacity Units contained in this cluster. int? Capacity { get; set; } @@ -315,11 +359,12 @@ internal partial interface IClusterInternal : /// string MetricId { get; set; } /// Event Hubs Cluster properties supplied in responses in List or Get operations. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterProperties Property { get; set; } /// Provisioning state of the Cluster. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningState? ProvisioningState { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Unknown", "Creating", "Deleting", "Scaling", "Active", "Failed", "Succeeded", "Canceled")] + string ProvisioningState { get; set; } /// Properties of the cluster SKU. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterSku Sku { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterSku Sku { get; set; } /// Name of this SKU. string SkuName { get; set; } /// Status of the Cluster resource @@ -327,19 +372,21 @@ internal partial interface IClusterInternal : /// A value that indicates whether Scaling is Supported. bool? SupportsScaling { get; set; } /// The system meta data relating to this resource. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData SystemData { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData SystemData { get; set; } /// The timestamp of resource creation (UTC). global::System.DateTime? SystemDataCreatedAt { get; set; } /// The identity that created the resource. string SystemDataCreatedBy { get; set; } /// The type of identity that created the resource. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataCreatedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; set; } /// The type of identity that last modified the resource. global::System.DateTime? SystemDataLastModifiedAt { get; set; } /// The identity that last modified the resource. string SystemDataLastModifiedBy { get; set; } /// The type of identity that last modified the resource. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; set; } /// The UTC time when the Event Hubs Cluster was last updated. string UpdatedAt { get; set; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Cluster.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/Cluster.json.cs similarity index 89% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Cluster.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/Cluster.json.cs index 0a517c8e6d65..b77c769f8fd7 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Cluster.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/Cluster.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -65,21 +65,19 @@ internal Cluster(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonOb { return; } - __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.TrackedResource(json); - {_sku = If( json?.PropertyT("sku"), out var __jsonSku) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ClusterSku.FromJson(__jsonSku) : Sku;} - {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.SystemData.FromJson(__jsonSystemData) : SystemData;} - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ClusterProperties.FromJson(__jsonProperties) : Property;} + __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.TrackedResource(json); + {_sku = If( json?.PropertyT("sku"), out var __jsonSku) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ClusterSku.FromJson(__jsonSku) : _sku;} + {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SystemData.FromJson(__jsonSystemData) : _systemData;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ClusterProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster. /// /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster. + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new Cluster(json) : null; } @@ -105,7 +103,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode ToJson( } __trackedResource?.ToJson(container, serializationMode); AddIf( null != this._sku ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) this._sku.ToJson(null,serializationMode) : null, "sku" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add ); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ClusterListResult.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ClusterListResult.PowerShell.cs similarity index 76% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ClusterListResult.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ClusterListResult.PowerShell.cs index 6de8d1a7829a..8ea4ebdddb1f 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ClusterListResult.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ClusterListResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class ClusterListResult partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,17 +78,17 @@ internal ClusterListResult(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ClusterTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ClusterTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -103,37 +103,37 @@ internal ClusterListResult(global::System.Management.Automation.PSObject content // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ClusterTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ClusterTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ClusterListResult(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ClusterListResult(content); } @@ -143,7 +143,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ClusterListResult.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ClusterListResult.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ClusterListResult.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ClusterListResult.TypeConverter.cs index 7cfa05b10e97..ffbe2e357a82 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ClusterListResult.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ClusterListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ClusterListResult.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ClusterListResult.cs similarity index 77% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ClusterListResult.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ClusterListResult.cs index 0b45cb77d3d1..a9a4071d8434 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ClusterListResult.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ClusterListResult.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// The response of the List Event Hubs Clusters operation. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class ClusterListResult : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterListResult, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterListResult, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterListResultInternal { /// Backing field for property. @@ -24,11 +24,11 @@ public partial class ClusterListResult : public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster[] _value; + private System.Collections.Generic.List _value; /// The Event Hubs Clusters present in the List Event Hubs operation results. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster[] Value { get => this._value; set => this._value = value; } + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } /// Creates an new instance. public ClusterListResult() @@ -46,6 +46,9 @@ public partial interface IClusterListResult : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Link to the next set of results. Empty unless the value parameter contains an incomplete list of Event Hubs Clusters.", SerializedName = @"nextLink", PossibleTypes = new [] { typeof(string) })] @@ -54,10 +57,13 @@ public partial interface IClusterListResult : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The Event Hubs Clusters present in the List Event Hubs operation results.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster) })] + System.Collections.Generic.List Value { get; set; } } /// The response of the List Event Hubs Clusters operation. @@ -69,7 +75,7 @@ internal partial interface IClusterListResultInternal /// string NextLink { get; set; } /// The Event Hubs Clusters present in the List Event Hubs operation results. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster[] Value { get; set; } + System.Collections.Generic.List Value { get; set; } } } \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ClusterListResult.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ClusterListResult.json.cs similarity index 90% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ClusterListResult.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ClusterListResult.json.cs index 0fe4b72911ac..b2aa154330ed 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ClusterListResult.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ClusterListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -65,19 +65,19 @@ internal ClusterListResult(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.J { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.Cluster.FromJson(__u) )) ))() : null : Value;} - {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Cluster.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new ClusterListResult(json) : null; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ClusterProperties.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ClusterProperties.PowerShell.cs similarity index 67% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ClusterProperties.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ClusterProperties.PowerShell.cs index bfb3cd3b944b..58c40a9a355f 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ClusterProperties.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ClusterProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class ClusterProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,33 +78,33 @@ internal ClusterProperties(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("CreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterPropertiesInternal)this).CreatedAt = (string) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterPropertiesInternal)this).CreatedAt, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterPropertiesInternal)this).CreatedAt = (string) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterPropertiesInternal)this).CreatedAt, global::System.Convert.ToString); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); } if (content.Contains("UpdatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterPropertiesInternal)this).UpdatedAt = (string) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterPropertiesInternal)this).UpdatedAt, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterPropertiesInternal)this).UpdatedAt = (string) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterPropertiesInternal)this).UpdatedAt, global::System.Convert.ToString); } if (content.Contains("MetricId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterPropertiesInternal)this).MetricId = (string) content.GetValueForProperty("MetricId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterPropertiesInternal)this).MetricId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterPropertiesInternal)this).MetricId = (string) content.GetValueForProperty("MetricId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterPropertiesInternal)this).MetricId, global::System.Convert.ToString); } if (content.Contains("Status")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterPropertiesInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterPropertiesInternal)this).Status, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterPropertiesInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterPropertiesInternal)this).Status, global::System.Convert.ToString); } if (content.Contains("SupportsScaling")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterPropertiesInternal)this).SupportsScaling = (bool?) content.GetValueForProperty("SupportsScaling",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterPropertiesInternal)this).SupportsScaling, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterPropertiesInternal)this).SupportsScaling = (bool?) content.GetValueForProperty("SupportsScaling",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterPropertiesInternal)this).SupportsScaling, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -119,53 +119,53 @@ internal ClusterProperties(global::System.Management.Automation.PSObject content // actually deserialize if (content.Contains("CreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterPropertiesInternal)this).CreatedAt = (string) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterPropertiesInternal)this).CreatedAt, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterPropertiesInternal)this).CreatedAt = (string) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterPropertiesInternal)this).CreatedAt, global::System.Convert.ToString); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); } if (content.Contains("UpdatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterPropertiesInternal)this).UpdatedAt = (string) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterPropertiesInternal)this).UpdatedAt, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterPropertiesInternal)this).UpdatedAt = (string) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterPropertiesInternal)this).UpdatedAt, global::System.Convert.ToString); } if (content.Contains("MetricId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterPropertiesInternal)this).MetricId = (string) content.GetValueForProperty("MetricId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterPropertiesInternal)this).MetricId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterPropertiesInternal)this).MetricId = (string) content.GetValueForProperty("MetricId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterPropertiesInternal)this).MetricId, global::System.Convert.ToString); } if (content.Contains("Status")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterPropertiesInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterPropertiesInternal)this).Status, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterPropertiesInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterPropertiesInternal)this).Status, global::System.Convert.ToString); } if (content.Contains("SupportsScaling")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterPropertiesInternal)this).SupportsScaling = (bool?) content.GetValueForProperty("SupportsScaling",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterPropertiesInternal)this).SupportsScaling, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterPropertiesInternal)this).SupportsScaling = (bool?) content.GetValueForProperty("SupportsScaling",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterPropertiesInternal)this).SupportsScaling, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ClusterProperties(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ClusterProperties(content); } @@ -175,7 +175,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ClusterProperties.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ClusterProperties.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ClusterProperties.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ClusterProperties.TypeConverter.cs index 4343d1e191c4..53796a89f738 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ClusterProperties.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ClusterProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ClusterProperties.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ClusterProperties.cs similarity index 79% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ClusterProperties.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ClusterProperties.cs index 55d40095e272..318533c3b3cd 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ClusterProperties.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ClusterProperties.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// Event Hubs Cluster properties supplied in responses in List or Get operations. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class ClusterProperties : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterProperties, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterProperties, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterPropertiesInternal { /// Backing field for property. @@ -31,26 +31,26 @@ public partial class ClusterProperties : public string MetricId { get => this._metricId; } /// Internal Acessors for CreatedAt - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterPropertiesInternal.CreatedAt { get => this._createdAt; set { {_createdAt = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterPropertiesInternal.CreatedAt { get => this._createdAt; set { {_createdAt = value;} } } /// Internal Acessors for MetricId - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterPropertiesInternal.MetricId { get => this._metricId; set { {_metricId = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterPropertiesInternal.MetricId { get => this._metricId; set { {_metricId = value;} } } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } /// Internal Acessors for Status - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterPropertiesInternal.Status { get => this._status; set { {_status = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterPropertiesInternal.Status { get => this._status; set { {_status = value;} } } /// Internal Acessors for UpdatedAt - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterPropertiesInternal.UpdatedAt { get => this._updatedAt; set { {_updatedAt = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterPropertiesInternal.UpdatedAt { get => this._updatedAt; set { {_updatedAt = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningState? _provisioningState; + private string _provisioningState; /// Provisioning state of the Cluster. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningState? ProvisioningState { get => this._provisioningState; } + public string ProvisioningState { get => this._provisioningState; } /// Backing field for property. private string _status; @@ -87,6 +87,9 @@ public partial interface IClusterProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The UTC time when the Event Hubs Cluster was created.", SerializedName = @"createdAt", PossibleTypes = new [] { typeof(string) })] @@ -97,6 +100,9 @@ public partial interface IClusterProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The metric ID of the cluster resource. Provided by the service and not modifiable by the user.", SerializedName = @"metricId", PossibleTypes = new [] { typeof(string) })] @@ -105,14 +111,21 @@ public partial interface IClusterProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Provisioning state of the Cluster.", SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningState? ProvisioningState { get; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Unknown", "Creating", "Deleting", "Scaling", "Active", "Failed", "Succeeded", "Canceled")] + string ProvisioningState { get; } /// Status of the Cluster resource [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Status of the Cluster resource", SerializedName = @"status", PossibleTypes = new [] { typeof(string) })] @@ -121,6 +134,9 @@ public partial interface IClusterProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"A value that indicates whether Scaling is Supported.", SerializedName = @"supportsScaling", PossibleTypes = new [] { typeof(bool) })] @@ -129,6 +145,9 @@ public partial interface IClusterProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The UTC time when the Event Hubs Cluster was last updated.", SerializedName = @"updatedAt", PossibleTypes = new [] { typeof(string) })] @@ -146,7 +165,8 @@ internal partial interface IClusterPropertiesInternal /// string MetricId { get; set; } /// Provisioning state of the Cluster. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningState? ProvisioningState { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Unknown", "Creating", "Deleting", "Scaling", "Active", "Failed", "Succeeded", "Canceled")] + string ProvisioningState { get; set; } /// Status of the Cluster resource string Status { get; set; } /// A value that indicates whether Scaling is Supported. diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ClusterProperties.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ClusterProperties.json.cs similarity index 89% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ClusterProperties.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ClusterProperties.json.cs index 93c0a748cc36..d29e47e8ece7 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ClusterProperties.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ClusterProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -65,23 +65,23 @@ internal ClusterProperties(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.J { return; } - {_createdAt = If( json?.PropertyT("createdAt"), out var __jsonCreatedAt) ? (string)__jsonCreatedAt : (string)CreatedAt;} - {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} - {_updatedAt = If( json?.PropertyT("updatedAt"), out var __jsonUpdatedAt) ? (string)__jsonUpdatedAt : (string)UpdatedAt;} - {_metricId = If( json?.PropertyT("metricId"), out var __jsonMetricId) ? (string)__jsonMetricId : (string)MetricId;} - {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} - {_supportsScaling = If( json?.PropertyT("supportsScaling"), out var __jsonSupportsScaling) ? (bool?)__jsonSupportsScaling : SupportsScaling;} + {_createdAt = If( json?.PropertyT("createdAt"), out var __jsonCreatedAt) ? (string)__jsonCreatedAt : (string)_createdAt;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} + {_updatedAt = If( json?.PropertyT("updatedAt"), out var __jsonUpdatedAt) ? (string)__jsonUpdatedAt : (string)_updatedAt;} + {_metricId = If( json?.PropertyT("metricId"), out var __jsonMetricId) ? (string)__jsonMetricId : (string)_metricId;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)_status;} + {_supportsScaling = If( json?.PropertyT("supportsScaling"), out var __jsonSupportsScaling) ? (bool?)__jsonSupportsScaling : _supportsScaling;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new ClusterProperties(json) : null; } @@ -105,23 +105,23 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode ToJson( { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._createdAt)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._createdAt.ToString()) : null, "createdAt" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._updatedAt)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._updatedAt.ToString()) : null, "updatedAt" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._metricId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._metricId.ToString()) : null, "metricId" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ClusterSku.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ClusterSku.PowerShell.cs similarity index 80% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ClusterSku.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ClusterSku.PowerShell.cs index f650c91daca7..68154ff325e6 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ClusterSku.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ClusterSku.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class ClusterSku partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,17 +78,17 @@ internal ClusterSku(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterSkuInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterSkuInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterSkuInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterSkuInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Capacity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterSkuInternal)this).Capacity = (int?) content.GetValueForProperty("Capacity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterSkuInternal)this).Capacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterSkuInternal)this).Capacity = (int?) content.GetValueForProperty("Capacity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterSkuInternal)this).Capacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -103,37 +103,37 @@ internal ClusterSku(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterSkuInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterSkuInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterSkuInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterSkuInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Capacity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterSkuInternal)this).Capacity = (int?) content.GetValueForProperty("Capacity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterSkuInternal)this).Capacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterSkuInternal)this).Capacity = (int?) content.GetValueForProperty("Capacity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterSkuInternal)this).Capacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterSku DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterSku DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ClusterSku(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterSku DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterSku DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ClusterSku(content); } @@ -143,7 +143,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterSku FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterSku FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ClusterSku.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ClusterSku.TypeConverter.cs similarity index 97% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ClusterSku.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ClusterSku.TypeConverter.cs index 071b2fb98717..03d9e034c9cc 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ClusterSku.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ClusterSku.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterSku ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterSku ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterSku).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterSku).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ClusterSku.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ClusterSku.cs similarity index 87% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ClusterSku.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ClusterSku.cs index 0ff4a692155d..b7d826eedaa0 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ClusterSku.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ClusterSku.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// SKU parameters particular to a cluster instance. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class ClusterSku : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterSku, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterSkuInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterSku, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterSkuInternal { /// Backing field for property. @@ -22,7 +22,7 @@ public partial class ClusterSku : public int? Capacity { get => this._capacity; set => this._capacity = value; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterSkuInternal.Name { get => this._name; set { {_name = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterSkuInternal.Name { get => this._name; set { {_name = value;} } } /// Backing field for property. private string _name= @"Dedicated"; @@ -45,6 +45,9 @@ public partial interface IClusterSku : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The quantity of Event Hubs Cluster Capacity Units contained in this cluster.", SerializedName = @"capacity", PossibleTypes = new [] { typeof(int) })] @@ -53,6 +56,9 @@ public partial interface IClusterSku : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = true, ReadOnly = true, + Read = true, + Create = true, + Update = true, Description = @"Name of this SKU.", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ClusterSku.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ClusterSku.json.cs similarity index 92% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ClusterSku.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ClusterSku.json.cs index 16675c25fa98..5db57f7f2550 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ClusterSku.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ClusterSku.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -65,19 +65,17 @@ internal ClusterSku(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.Jso { return; } - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_capacity = If( json?.PropertyT("capacity"), out var __jsonCapacity) ? (int?)__jsonCapacity : Capacity;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_capacity = If( json?.PropertyT("capacity"), out var __jsonCapacity) ? (int?)__jsonCapacity : _capacity;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterSku. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterSku. /// /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterSku. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterSku FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterSku. + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterSku FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new ClusterSku(json) : null; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ConnectionState.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ConnectionState.PowerShell.cs similarity index 78% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ConnectionState.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ConnectionState.PowerShell.cs index a3ca26c90f46..7ad9b932426e 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ConnectionState.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ConnectionState.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class ConnectionState partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,17 +78,17 @@ internal ConnectionState(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Status")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConnectionStateInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PrivateLinkConnectionStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConnectionStateInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PrivateLinkConnectionStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConnectionStateInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConnectionStateInternal)this).Status, global::System.Convert.ToString); } if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConnectionStateInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConnectionStateInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConnectionStateInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConnectionStateInternal)this).Description, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -103,37 +103,37 @@ internal ConnectionState(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Status")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConnectionStateInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PrivateLinkConnectionStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConnectionStateInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PrivateLinkConnectionStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConnectionStateInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConnectionStateInternal)this).Status, global::System.Convert.ToString); } if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConnectionStateInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConnectionStateInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConnectionStateInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConnectionStateInternal)this).Description, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConnectionState DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConnectionState DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ConnectionState(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConnectionState DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConnectionState DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ConnectionState(content); } @@ -143,7 +143,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConnectionState FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConnectionState FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ConnectionState.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ConnectionState.TypeConverter.cs similarity index 97% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ConnectionState.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ConnectionState.TypeConverter.cs index 6f03530afce1..5314365dd3e8 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ConnectionState.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ConnectionState.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConnectionState ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConnectionState ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConnectionState).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConnectionState).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ConnectionState.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ConnectionState.cs similarity index 73% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ConnectionState.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ConnectionState.cs index e7bc850520ca..3779203b6c92 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ConnectionState.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ConnectionState.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// ConnectionState information. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class ConnectionState : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConnectionState, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConnectionStateInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConnectionState, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConnectionStateInternal { /// Backing field for property. @@ -22,11 +22,11 @@ public partial class ConnectionState : public string Description { get => this._description; set => this._description = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PrivateLinkConnectionStatus? _status; + private string _status; /// Status of the connection. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PrivateLinkConnectionStatus? Status { get => this._status; set => this._status = value; } + public string Status { get => this._status; set => this._status = value; } /// Creates an new instance. public ConnectionState() @@ -42,6 +42,9 @@ public partial interface IConnectionState : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Description of the connection state.", SerializedName = @"description", PossibleTypes = new [] { typeof(string) })] @@ -50,10 +53,14 @@ public partial interface IConnectionState : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Status of the connection.", SerializedName = @"status", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PrivateLinkConnectionStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PrivateLinkConnectionStatus? Status { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Pending", "Approved", "Rejected", "Disconnected")] + string Status { get; set; } } /// ConnectionState information. @@ -63,7 +70,8 @@ internal partial interface IConnectionStateInternal /// Description of the connection state. string Description { get; set; } /// Status of the connection. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PrivateLinkConnectionStatus? Status { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Pending", "Approved", "Rejected", "Disconnected")] + string Status { get; set; } } } \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ConnectionState.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ConnectionState.json.cs similarity index 94% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ConnectionState.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ConnectionState.json.cs index 3f5dd7c47e44..2cffe0840884 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ConnectionState.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ConnectionState.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -65,19 +65,19 @@ internal ConnectionState(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Jso { return; } - {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} - {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)_status;} + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)_description;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConnectionState. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConnectionState. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConnectionState. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConnectionState. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConnectionState FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConnectionState FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new ConnectionState(json) : null; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ConsumerGroup.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ConsumerGroup.PowerShell.cs similarity index 53% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ConsumerGroup.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ConsumerGroup.PowerShell.cs index e117e00a07bc..26c89a87875a 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ConsumerGroup.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ConsumerGroup.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class ConsumerGroup partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,69 +78,69 @@ internal ConsumerGroup(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ConsumerGroupPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ConsumerGroupPropertiesTypeConverter.ConvertFrom); } if (content.Contains("SystemData")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.SystemDataTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SystemDataTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("CreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("UpdatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("UserMetadata")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupInternal)this).UserMetadata = (string) content.GetValueForProperty("UserMetadata",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupInternal)this).UserMetadata, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupInternal)this).UserMetadata = (string) content.GetValueForProperty("UserMetadata",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupInternal)this).UserMetadata, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -155,89 +155,89 @@ internal ConsumerGroup(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ConsumerGroupPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ConsumerGroupPropertiesTypeConverter.ConvertFrom); } if (content.Contains("SystemData")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.SystemDataTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SystemDataTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("CreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("UpdatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("UserMetadata")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupInternal)this).UserMetadata = (string) content.GetValueForProperty("UserMetadata",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupInternal)this).UserMetadata, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupInternal)this).UserMetadata = (string) content.GetValueForProperty("UserMetadata",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupInternal)this).UserMetadata, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ConsumerGroup(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ConsumerGroup(content); } @@ -247,7 +247,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ConsumerGroup.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ConsumerGroup.TypeConverter.cs similarity index 97% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ConsumerGroup.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ConsumerGroup.TypeConverter.cs index 4aba03cef0f8..91e1ab49ae78 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ConsumerGroup.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ConsumerGroup.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ConsumerGroup.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ConsumerGroup.cs similarity index 64% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ConsumerGroup.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ConsumerGroup.cs index 65b98cfbf5e7..989762c687ab 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ConsumerGroup.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ConsumerGroup.cs @@ -3,116 +3,115 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// Single item in List or Get Consumer group operation [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class ConsumerGroup : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupInternal, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupInternal, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IValidates { /// - /// Backing field for Inherited model + /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ProxyResource(); + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ProxyResource(); /// Exact time the message was created. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public global::System.DateTime? CreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupPropertiesInternal)Property).CreatedAt; } + public global::System.DateTime? CreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupPropertiesInternal)Property).CreatedAt; } /// /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Id; } /// The geo-location where the resource lives [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Location; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Id = value; } - - /// Internal Acessors for Location - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal.Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Location = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Name = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Type = value; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Location; } /// Internal Acessors for CreatedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupInternal.CreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupPropertiesInternal)Property).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupPropertiesInternal)Property).CreatedAt = value; } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupInternal.CreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupPropertiesInternal)Property).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupPropertiesInternal)Property).CreatedAt = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupProperties Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ConsumerGroupProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupProperties Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ConsumerGroupProperties()); set { {_property = value;} } } /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.SystemData()); set { {_systemData = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SystemData()); set { {_systemData = value;} } } /// Internal Acessors for UpdatedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupInternal.UpdatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupPropertiesInternal)Property).UpdatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupPropertiesInternal)Property).UpdatedAt = value; } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupInternal.UpdatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupPropertiesInternal)Property).UpdatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupPropertiesInternal)Property).UpdatedAt = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Id = value; } + + /// Internal Acessors for Location + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal.Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Location = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Type = value; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Name; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupProperties _property; /// Single item in List or Get Consumer group operation [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ConsumerGroupProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ConsumerGroupProperties()); set => this._property = value; } /// Gets the resource group name [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData _systemData; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData _systemData; /// The system meta data relating to this resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.SystemData()); } + internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SystemData()); } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType)""); } + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedByType = value ?? null; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType)""); } + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedByType = value ?? null; } /// /// The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs" /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Type; } /// The exact time the message was updated. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public global::System.DateTime? UpdatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupPropertiesInternal)Property).UpdatedAt; } + public global::System.DateTime? UpdatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupPropertiesInternal)Property).UpdatedAt; } /// /// User Metadata is a placeholder to store user-defined string data with maximum length 1024. e.g. it can be used to store @@ -120,7 +119,7 @@ public partial class ConsumerGroup : /// stored. /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string UserMetadata { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupPropertiesInternal)Property).UserMetadata; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupPropertiesInternal)Property).UserMetadata = value ?? null; } + public string UserMetadata { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupPropertiesInternal)Property).UserMetadata; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupPropertiesInternal)Property).UserMetadata = value ?? null; } /// Creates an new instance. public ConsumerGroup() @@ -143,12 +142,15 @@ public ConsumerGroup() /// Single item in List or Get Consumer group operation public partial interface IConsumerGroup : Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResource + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResource { /// Exact time the message was created. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Exact time the message was created.", SerializedName = @"createdAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -156,55 +158,78 @@ public partial interface IConsumerGroup : /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The timestamp of resource creation (UTC).", SerializedName = @"createdAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? SystemDataCreatedAt { get; set; } + global::System.DateTime? SystemDataCreatedAt { get; } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The identity that created the resource.", SerializedName = @"createdBy", PossibleTypes = new [] { typeof(string) })] - string SystemDataCreatedBy { get; set; } + string SystemDataCreatedBy { get; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that created the resource.", SerializedName = @"createdByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataCreatedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that last modified the resource.", SerializedName = @"lastModifiedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? SystemDataLastModifiedAt { get; set; } + global::System.DateTime? SystemDataLastModifiedAt { get; } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The identity that last modified the resource.", SerializedName = @"lastModifiedBy", PossibleTypes = new [] { typeof(string) })] - string SystemDataLastModifiedBy { get; set; } + string SystemDataLastModifiedBy { get; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that last modified the resource.", SerializedName = @"lastModifiedByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; } /// The exact time the message was updated. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The exact time the message was updated.", SerializedName = @"updatedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -217,6 +242,9 @@ public partial interface IConsumerGroup : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"User Metadata is a placeholder to store user-defined string data with maximum length 1024. e.g. it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored.", SerializedName = @"userMetadata", PossibleTypes = new [] { typeof(string) })] @@ -225,26 +253,28 @@ public partial interface IConsumerGroup : } /// Single item in List or Get Consumer group operation internal partial interface IConsumerGroupInternal : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal { /// Exact time the message was created. global::System.DateTime? CreatedAt { get; set; } /// Single item in List or Get Consumer group operation - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupProperties Property { get; set; } /// The system meta data relating to this resource. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData SystemData { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData SystemData { get; set; } /// The timestamp of resource creation (UTC). global::System.DateTime? SystemDataCreatedAt { get; set; } /// The identity that created the resource. string SystemDataCreatedBy { get; set; } /// The type of identity that created the resource. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataCreatedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; set; } /// The type of identity that last modified the resource. global::System.DateTime? SystemDataLastModifiedAt { get; set; } /// The identity that last modified the resource. string SystemDataLastModifiedBy { get; set; } /// The type of identity that last modified the resource. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; set; } /// The exact time the message was updated. global::System.DateTime? UpdatedAt { get; set; } /// diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ConsumerGroup.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ConsumerGroup.json.cs similarity index 92% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ConsumerGroup.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ConsumerGroup.json.cs index e33a966c536e..94b3076eff84 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ConsumerGroup.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ConsumerGroup.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -65,20 +65,20 @@ internal ConsumerGroup(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json. { return; } - __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ProxyResource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ConsumerGroupProperties.FromJson(__jsonProperties) : Property;} - {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.SystemData.FromJson(__jsonSystemData) : SystemData;} + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ConsumerGroupProperties.FromJson(__jsonProperties) : _property;} + {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SystemData.FromJson(__jsonSystemData) : _systemData;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new ConsumerGroup(json) : null; } @@ -104,7 +104,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode ToJson( } __proxyResource?.ToJson(container, serializationMode); AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add ); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ConsumerGroupListResult.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ConsumerGroupListResult.PowerShell.cs similarity index 75% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ConsumerGroupListResult.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ConsumerGroupListResult.PowerShell.cs index 68734818c6fb..c6ababe5c102 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ConsumerGroupListResult.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ConsumerGroupListResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class ConsumerGroupListResult partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,17 +78,17 @@ internal ConsumerGroupListResult(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ConsumerGroupTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ConsumerGroupTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -103,39 +103,37 @@ internal ConsumerGroupListResult(global::System.Management.Automation.PSObject c // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ConsumerGroupTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ConsumerGroupTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ConsumerGroupListResult(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ConsumerGroupListResult(content); } @@ -145,7 +143,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ConsumerGroupListResult.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ConsumerGroupListResult.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ConsumerGroupListResult.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ConsumerGroupListResult.TypeConverter.cs index 597d5e3ff4d9..8ef01e99e402 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ConsumerGroupListResult.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ConsumerGroupListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ConsumerGroupListResult.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ConsumerGroupListResult.cs similarity index 75% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ConsumerGroupListResult.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ConsumerGroupListResult.cs index f77eadb1039b..cfdc9865794f 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ConsumerGroupListResult.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ConsumerGroupListResult.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// The result to the List Consumer Group operation. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class ConsumerGroupListResult : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupListResult, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupListResult, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupListResultInternal { /// Backing field for property. @@ -24,11 +24,11 @@ public partial class ConsumerGroupListResult : public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup[] _value; + private System.Collections.Generic.List _value; /// Result of the List Consumer Group operation. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup[] Value { get => this._value; set => this._value = value; } + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } /// Creates an new instance. public ConsumerGroupListResult() @@ -46,6 +46,9 @@ public partial interface IConsumerGroupListResult : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Link to the next set of results. Not empty if Value contains incomplete list of Consumer Group", SerializedName = @"nextLink", PossibleTypes = new [] { typeof(string) })] @@ -54,10 +57,13 @@ public partial interface IConsumerGroupListResult : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Result of the List Consumer Group operation.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup) })] + System.Collections.Generic.List Value { get; set; } } /// The result to the List Consumer Group operation. @@ -69,7 +75,7 @@ internal partial interface IConsumerGroupListResultInternal /// string NextLink { get; set; } /// Result of the List Consumer Group operation. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup[] Value { get; set; } + System.Collections.Generic.List Value { get; set; } } } \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ConsumerGroupListResult.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ConsumerGroupListResult.json.cs similarity index 89% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ConsumerGroupListResult.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ConsumerGroupListResult.json.cs index 71b6f4172592..aab354312891 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ConsumerGroupListResult.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ConsumerGroupListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -65,19 +65,19 @@ internal ConsumerGroupListResult(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Run { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ConsumerGroup.FromJson(__u) )) ))() : null : Value;} - {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ConsumerGroup.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new ConsumerGroupListResult(json) : null; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ConsumerGroupProperties.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ConsumerGroupProperties.PowerShell.cs similarity index 72% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ConsumerGroupProperties.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ConsumerGroupProperties.PowerShell.cs index f19afb747e40..99b58239d057 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ConsumerGroupProperties.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ConsumerGroupProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class ConsumerGroupProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,21 +78,21 @@ internal ConsumerGroupProperties(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("CreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupPropertiesInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupPropertiesInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupPropertiesInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupPropertiesInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("UpdatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupPropertiesInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupPropertiesInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupPropertiesInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupPropertiesInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("UserMetadata")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupPropertiesInternal)this).UserMetadata = (string) content.GetValueForProperty("UserMetadata",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupPropertiesInternal)this).UserMetadata, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupPropertiesInternal)this).UserMetadata = (string) content.GetValueForProperty("UserMetadata",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupPropertiesInternal)this).UserMetadata, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -107,43 +107,41 @@ internal ConsumerGroupProperties(global::System.Management.Automation.PSObject c // actually deserialize if (content.Contains("CreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupPropertiesInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupPropertiesInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupPropertiesInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupPropertiesInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("UpdatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupPropertiesInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupPropertiesInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupPropertiesInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupPropertiesInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("UserMetadata")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupPropertiesInternal)this).UserMetadata = (string) content.GetValueForProperty("UserMetadata",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupPropertiesInternal)this).UserMetadata, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupPropertiesInternal)this).UserMetadata = (string) content.GetValueForProperty("UserMetadata",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupPropertiesInternal)this).UserMetadata, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ConsumerGroupProperties(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ConsumerGroupProperties(content); } @@ -153,7 +151,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ConsumerGroupProperties.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ConsumerGroupProperties.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ConsumerGroupProperties.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ConsumerGroupProperties.TypeConverter.cs index 623f94e590f7..2e5601cfea97 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ConsumerGroupProperties.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ConsumerGroupProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ConsumerGroupProperties.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ConsumerGroupProperties.cs similarity index 88% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ConsumerGroupProperties.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ConsumerGroupProperties.cs index c8c6c53b1e0c..c6043881c71e 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ConsumerGroupProperties.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ConsumerGroupProperties.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// Single item in List or Get Consumer group operation [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class ConsumerGroupProperties : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupProperties, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupProperties, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupPropertiesInternal { /// Backing field for property. @@ -22,10 +22,10 @@ public partial class ConsumerGroupProperties : public global::System.DateTime? CreatedAt { get => this._createdAt; } /// Internal Acessors for CreatedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupPropertiesInternal.CreatedAt { get => this._createdAt; set { {_createdAt = value;} } } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupPropertiesInternal.CreatedAt { get => this._createdAt; set { {_createdAt = value;} } } /// Internal Acessors for UpdatedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupPropertiesInternal.UpdatedAt { get => this._updatedAt; set { {_updatedAt = value;} } } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupPropertiesInternal.UpdatedAt { get => this._updatedAt; set { {_updatedAt = value;} } } /// Backing field for property. private global::System.DateTime? _updatedAt; @@ -59,6 +59,9 @@ public partial interface IConsumerGroupProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Exact time the message was created.", SerializedName = @"createdAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -67,6 +70,9 @@ public partial interface IConsumerGroupProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The exact time the message was updated.", SerializedName = @"updatedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -79,6 +85,9 @@ public partial interface IConsumerGroupProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"User Metadata is a placeholder to store user-defined string data with maximum length 1024. e.g. it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored.", SerializedName = @"userMetadata", PossibleTypes = new [] { typeof(string) })] diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ConsumerGroupProperties.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ConsumerGroupProperties.json.cs similarity index 93% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ConsumerGroupProperties.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ConsumerGroupProperties.json.cs index 026129635c77..673479154690 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ConsumerGroupProperties.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ConsumerGroupProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -65,20 +65,20 @@ internal ConsumerGroupProperties(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Run { return; } - {_createdAt = If( json?.PropertyT("createdAt"), out var __jsonCreatedAt) ? global::System.DateTime.TryParse((string)__jsonCreatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedAtValue) ? __jsonCreatedAtValue : CreatedAt : CreatedAt;} - {_updatedAt = If( json?.PropertyT("updatedAt"), out var __jsonUpdatedAt) ? global::System.DateTime.TryParse((string)__jsonUpdatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonUpdatedAtValue) ? __jsonUpdatedAtValue : UpdatedAt : UpdatedAt;} - {_userMetadata = If( json?.PropertyT("userMetadata"), out var __jsonUserMetadata) ? (string)__jsonUserMetadata : (string)UserMetadata;} + {_createdAt = If( json?.PropertyT("createdAt"), out var __jsonCreatedAt) ? global::System.DateTime.TryParse((string)__jsonCreatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedAtValue) ? __jsonCreatedAtValue : _createdAt : _createdAt;} + {_updatedAt = If( json?.PropertyT("updatedAt"), out var __jsonUpdatedAt) ? global::System.DateTime.TryParse((string)__jsonUpdatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonUpdatedAtValue) ? __jsonUpdatedAtValue : _updatedAt : _updatedAt;} + {_userMetadata = If( json?.PropertyT("userMetadata"), out var __jsonUserMetadata) ? (string)__jsonUserMetadata : (string)_userMetadata;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new ConsumerGroupProperties(json) : null; } @@ -102,11 +102,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode ToJson( { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._createdAt ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._createdAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "createdAt" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._updatedAt ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._updatedAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "updatedAt" ,container.Add ); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Destination.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/Destination.PowerShell.cs similarity index 58% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Destination.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/Destination.PowerShell.cs index 88e83739396b..bc32216cf335 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Destination.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/Destination.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,33 +63,33 @@ public partial class Destination partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestination DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestination DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new Destination(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestination DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestination DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new Destination(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -104,53 +104,53 @@ internal Destination(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Identity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.CaptureIdentityTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.CaptureIdentityTypeConverter.ConvertFrom); } if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.DestinationPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.DestinationPropertiesTypeConverter.ConvertFrom); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("IdentityType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType?) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)this).IdentityType = (string) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)this).IdentityType, global::System.Convert.ToString); } if (content.Contains("IdentityUserAssignedIdentity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)this).IdentityUserAssignedIdentity = (string) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)this).IdentityUserAssignedIdentity, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)this).IdentityUserAssignedIdentity = (string) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)this).IdentityUserAssignedIdentity, global::System.Convert.ToString); } if (content.Contains("StorageAccountResourceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)this).StorageAccountResourceId = (string) content.GetValueForProperty("StorageAccountResourceId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)this).StorageAccountResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)this).StorageAccountResourceId = (string) content.GetValueForProperty("StorageAccountResourceId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)this).StorageAccountResourceId, global::System.Convert.ToString); } if (content.Contains("BlobContainer")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)this).BlobContainer = (string) content.GetValueForProperty("BlobContainer",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)this).BlobContainer, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)this).BlobContainer = (string) content.GetValueForProperty("BlobContainer",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)this).BlobContainer, global::System.Convert.ToString); } if (content.Contains("ArchiveNameFormat")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)this).ArchiveNameFormat = (string) content.GetValueForProperty("ArchiveNameFormat",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)this).ArchiveNameFormat, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)this).ArchiveNameFormat = (string) content.GetValueForProperty("ArchiveNameFormat",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)this).ArchiveNameFormat, global::System.Convert.ToString); } if (content.Contains("DataLakeSubscriptionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)this).DataLakeSubscriptionId = (string) content.GetValueForProperty("DataLakeSubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)this).DataLakeSubscriptionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)this).DataLakeSubscriptionId = (string) content.GetValueForProperty("DataLakeSubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)this).DataLakeSubscriptionId, global::System.Convert.ToString); } if (content.Contains("DataLakeAccountName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)this).DataLakeAccountName = (string) content.GetValueForProperty("DataLakeAccountName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)this).DataLakeAccountName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)this).DataLakeAccountName = (string) content.GetValueForProperty("DataLakeAccountName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)this).DataLakeAccountName, global::System.Convert.ToString); } if (content.Contains("DataLakeFolderPath")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)this).DataLakeFolderPath = (string) content.GetValueForProperty("DataLakeFolderPath",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)this).DataLakeFolderPath, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)this).DataLakeFolderPath = (string) content.GetValueForProperty("DataLakeFolderPath",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)this).DataLakeFolderPath, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -165,47 +165,47 @@ internal Destination(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Identity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.CaptureIdentityTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.CaptureIdentityTypeConverter.ConvertFrom); } if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.DestinationPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.DestinationPropertiesTypeConverter.ConvertFrom); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("IdentityType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType?) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)this).IdentityType = (string) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)this).IdentityType, global::System.Convert.ToString); } if (content.Contains("IdentityUserAssignedIdentity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)this).IdentityUserAssignedIdentity = (string) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)this).IdentityUserAssignedIdentity, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)this).IdentityUserAssignedIdentity = (string) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)this).IdentityUserAssignedIdentity, global::System.Convert.ToString); } if (content.Contains("StorageAccountResourceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)this).StorageAccountResourceId = (string) content.GetValueForProperty("StorageAccountResourceId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)this).StorageAccountResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)this).StorageAccountResourceId = (string) content.GetValueForProperty("StorageAccountResourceId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)this).StorageAccountResourceId, global::System.Convert.ToString); } if (content.Contains("BlobContainer")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)this).BlobContainer = (string) content.GetValueForProperty("BlobContainer",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)this).BlobContainer, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)this).BlobContainer = (string) content.GetValueForProperty("BlobContainer",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)this).BlobContainer, global::System.Convert.ToString); } if (content.Contains("ArchiveNameFormat")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)this).ArchiveNameFormat = (string) content.GetValueForProperty("ArchiveNameFormat",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)this).ArchiveNameFormat, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)this).ArchiveNameFormat = (string) content.GetValueForProperty("ArchiveNameFormat",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)this).ArchiveNameFormat, global::System.Convert.ToString); } if (content.Contains("DataLakeSubscriptionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)this).DataLakeSubscriptionId = (string) content.GetValueForProperty("DataLakeSubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)this).DataLakeSubscriptionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)this).DataLakeSubscriptionId = (string) content.GetValueForProperty("DataLakeSubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)this).DataLakeSubscriptionId, global::System.Convert.ToString); } if (content.Contains("DataLakeAccountName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)this).DataLakeAccountName = (string) content.GetValueForProperty("DataLakeAccountName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)this).DataLakeAccountName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)this).DataLakeAccountName = (string) content.GetValueForProperty("DataLakeAccountName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)this).DataLakeAccountName, global::System.Convert.ToString); } if (content.Contains("DataLakeFolderPath")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)this).DataLakeFolderPath = (string) content.GetValueForProperty("DataLakeFolderPath",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal)this).DataLakeFolderPath, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)this).DataLakeFolderPath = (string) content.GetValueForProperty("DataLakeFolderPath",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal)this).DataLakeFolderPath, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -215,7 +215,7 @@ internal Destination(global::System.Management.Automation.PSObject content) /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestination FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestination FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Destination.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/Destination.TypeConverter.cs similarity index 97% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Destination.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/Destination.TypeConverter.cs index 8c27081a1926..45f30a053c85 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Destination.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/Destination.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestination ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestination ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestination).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestination).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Destination.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/Destination.cs similarity index 71% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Destination.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/Destination.cs index 2daa0fcdca68..8933b3d60d14 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Destination.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/Destination.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// Capture storage details for capture description [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class Destination : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestination, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestination, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal { /// @@ -19,47 +19,47 @@ public partial class Destination : /// Here all the parameters (Namespace,EventHub .. etc) are mandatory irrespective of order /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string ArchiveNameFormat { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationPropertiesInternal)Property).ArchiveNameFormat; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationPropertiesInternal)Property).ArchiveNameFormat = value ?? null; } + public string ArchiveNameFormat { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationPropertiesInternal)Property).ArchiveNameFormat; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationPropertiesInternal)Property).ArchiveNameFormat = value ?? null; } /// Blob container Name [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string BlobContainer { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationPropertiesInternal)Property).BlobContainer; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationPropertiesInternal)Property).BlobContainer = value ?? null; } + public string BlobContainer { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationPropertiesInternal)Property).BlobContainer; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationPropertiesInternal)Property).BlobContainer = value ?? null; } /// The Azure Data Lake Store name for the captured events [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string DataLakeAccountName { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationPropertiesInternal)Property).DataLakeAccountName; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationPropertiesInternal)Property).DataLakeAccountName = value ?? null; } + public string DataLakeAccountName { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationPropertiesInternal)Property).DataLakeAccountName; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationPropertiesInternal)Property).DataLakeAccountName = value ?? null; } /// The destination folder path for the captured events [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string DataLakeFolderPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationPropertiesInternal)Property).DataLakeFolderPath; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationPropertiesInternal)Property).DataLakeFolderPath = value ?? null; } + public string DataLakeFolderPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationPropertiesInternal)Property).DataLakeFolderPath; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationPropertiesInternal)Property).DataLakeFolderPath = value ?? null; } /// Subscription Id of Azure Data Lake Store [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string DataLakeSubscriptionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationPropertiesInternal)Property).DataLakeSubscriptionId; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationPropertiesInternal)Property).DataLakeSubscriptionId = value ?? null; } + public string DataLakeSubscriptionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationPropertiesInternal)Property).DataLakeSubscriptionId; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationPropertiesInternal)Property).DataLakeSubscriptionId = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureIdentity _identity; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureIdentity _identity; /// A value that indicates whether capture description is enabled. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureIdentity Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.CaptureIdentity()); set => this._identity = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureIdentity Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.CaptureIdentity()); set => this._identity = value; } /// Type of Azure Active Directory Managed Identity. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType? IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureIdentityInternal)Identity).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureIdentityInternal)Identity).Type = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType)""); } + public string IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureIdentityInternal)Identity).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureIdentityInternal)Identity).Type = value ?? null; } /// /// ARM ID of Managed User Identity. This property is required is the type is UserAssignedIdentity. If type is SystemAssigned, /// then the System Assigned Identity Associated with the namespace will be used. /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string IdentityUserAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureIdentityInternal)Identity).UserAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureIdentityInternal)Identity).UserAssignedIdentity = value ?? null; } + public string IdentityUserAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureIdentityInternal)Identity).UserAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureIdentityInternal)Identity).UserAssignedIdentity = value ?? null; } /// Internal Acessors for Identity - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureIdentity Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.CaptureIdentity()); set { {_identity = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureIdentity Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.CaptureIdentity()); set { {_identity = value;} } } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationProperties Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.DestinationProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationProperties Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.DestinationProperties()); set { {_property = value;} } } /// Backing field for property. private string _name; @@ -69,17 +69,17 @@ public partial class Destination : public string Name { get => this._name; set => this._name = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationProperties _property; /// /// Properties describing the storage account, blob container and archive name format for capture destination /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.DestinationProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.DestinationProperties()); set => this._property = value; } /// Resource id of the storage account to be used to create the blobs [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string StorageAccountResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationPropertiesInternal)Property).StorageAccountResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationPropertiesInternal)Property).StorageAccountResourceId = value ?? null; } + public string StorageAccountResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationPropertiesInternal)Property).StorageAccountResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationPropertiesInternal)Property).StorageAccountResourceId = value ?? null; } /// Creates an new instance. public Destination() @@ -98,6 +98,9 @@ public partial interface IDestination : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Blob naming convention for archive, e.g. {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}. Here all the parameters (Namespace,EventHub .. etc) are mandatory irrespective of order", SerializedName = @"archiveNameFormat", PossibleTypes = new [] { typeof(string) })] @@ -106,6 +109,9 @@ public partial interface IDestination : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Blob container Name", SerializedName = @"blobContainer", PossibleTypes = new [] { typeof(string) })] @@ -114,6 +120,9 @@ public partial interface IDestination : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The Azure Data Lake Store name for the captured events", SerializedName = @"dataLakeAccountName", PossibleTypes = new [] { typeof(string) })] @@ -122,6 +131,9 @@ public partial interface IDestination : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The destination folder path for the captured events", SerializedName = @"dataLakeFolderPath", PossibleTypes = new [] { typeof(string) })] @@ -130,6 +142,9 @@ public partial interface IDestination : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Subscription Id of Azure Data Lake Store", SerializedName = @"dataLakeSubscriptionId", PossibleTypes = new [] { typeof(string) })] @@ -138,10 +153,14 @@ public partial interface IDestination : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Type of Azure Active Directory Managed Identity.", SerializedName = @"type", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType? IdentityType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("SystemAssigned", "UserAssigned")] + string IdentityType { get; set; } /// /// ARM ID of Managed User Identity. This property is required is the type is UserAssignedIdentity. If type is SystemAssigned, /// then the System Assigned Identity Associated with the namespace will be used. @@ -149,6 +168,9 @@ public partial interface IDestination : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"ARM ID of Managed User Identity. This property is required is the type is UserAssignedIdentity. If type is SystemAssigned, then the System Assigned Identity Associated with the namespace will be used.", SerializedName = @"userAssignedIdentity", PossibleTypes = new [] { typeof(string) })] @@ -157,6 +179,9 @@ public partial interface IDestination : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Name for capture destination", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] @@ -165,6 +190,9 @@ public partial interface IDestination : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Resource id of the storage account to be used to create the blobs", SerializedName = @"storageAccountResourceId", PossibleTypes = new [] { typeof(string) })] @@ -189,9 +217,10 @@ internal partial interface IDestinationInternal /// Subscription Id of Azure Data Lake Store string DataLakeSubscriptionId { get; set; } /// A value that indicates whether capture description is enabled. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureIdentity Identity { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureIdentity Identity { get; set; } /// Type of Azure Active Directory Managed Identity. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType? IdentityType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("SystemAssigned", "UserAssigned")] + string IdentityType { get; set; } /// /// ARM ID of Managed User Identity. This property is required is the type is UserAssignedIdentity. If type is SystemAssigned, /// then the System Assigned Identity Associated with the namespace will be used. @@ -202,7 +231,7 @@ internal partial interface IDestinationInternal /// /// Properties describing the storage account, blob container and archive name format for capture destination /// - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationProperties Property { get; set; } /// Resource id of the storage account to be used to create the blobs string StorageAccountResourceId { get; set; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Destination.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/Destination.json.cs similarity index 91% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Destination.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/Destination.json.cs index 9f6ca6dafae4..63118a032801 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Destination.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/Destination.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -65,20 +65,18 @@ internal Destination(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.Js { return; } - {_identity = If( json?.PropertyT("identity"), out var __jsonIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.CaptureIdentity.FromJson(__jsonIdentity) : Identity;} - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.DestinationProperties.FromJson(__jsonProperties) : Property;} - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_identity = If( json?.PropertyT("identity"), out var __jsonIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.CaptureIdentity.FromJson(__jsonIdentity) : _identity;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.DestinationProperties.FromJson(__jsonProperties) : _property;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestination. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestination. /// /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestination. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestination FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestination. + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestination FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new Destination(json) : null; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/DestinationProperties.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/DestinationProperties.PowerShell.cs similarity index 67% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/DestinationProperties.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/DestinationProperties.PowerShell.cs index fee540752153..29f2523ca4ef 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/DestinationProperties.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/DestinationProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -65,35 +65,33 @@ public partial class DestinationProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new DestinationProperties(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new DestinationProperties(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -108,33 +106,33 @@ internal DestinationProperties(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("StorageAccountResourceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationPropertiesInternal)this).StorageAccountResourceId = (string) content.GetValueForProperty("StorageAccountResourceId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationPropertiesInternal)this).StorageAccountResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationPropertiesInternal)this).StorageAccountResourceId = (string) content.GetValueForProperty("StorageAccountResourceId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationPropertiesInternal)this).StorageAccountResourceId, global::System.Convert.ToString); } if (content.Contains("BlobContainer")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationPropertiesInternal)this).BlobContainer = (string) content.GetValueForProperty("BlobContainer",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationPropertiesInternal)this).BlobContainer, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationPropertiesInternal)this).BlobContainer = (string) content.GetValueForProperty("BlobContainer",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationPropertiesInternal)this).BlobContainer, global::System.Convert.ToString); } if (content.Contains("ArchiveNameFormat")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationPropertiesInternal)this).ArchiveNameFormat = (string) content.GetValueForProperty("ArchiveNameFormat",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationPropertiesInternal)this).ArchiveNameFormat, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationPropertiesInternal)this).ArchiveNameFormat = (string) content.GetValueForProperty("ArchiveNameFormat",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationPropertiesInternal)this).ArchiveNameFormat, global::System.Convert.ToString); } if (content.Contains("DataLakeSubscriptionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationPropertiesInternal)this).DataLakeSubscriptionId = (string) content.GetValueForProperty("DataLakeSubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationPropertiesInternal)this).DataLakeSubscriptionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationPropertiesInternal)this).DataLakeSubscriptionId = (string) content.GetValueForProperty("DataLakeSubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationPropertiesInternal)this).DataLakeSubscriptionId, global::System.Convert.ToString); } if (content.Contains("DataLakeAccountName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationPropertiesInternal)this).DataLakeAccountName = (string) content.GetValueForProperty("DataLakeAccountName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationPropertiesInternal)this).DataLakeAccountName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationPropertiesInternal)this).DataLakeAccountName = (string) content.GetValueForProperty("DataLakeAccountName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationPropertiesInternal)this).DataLakeAccountName, global::System.Convert.ToString); } if (content.Contains("DataLakeFolderPath")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationPropertiesInternal)this).DataLakeFolderPath = (string) content.GetValueForProperty("DataLakeFolderPath",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationPropertiesInternal)this).DataLakeFolderPath, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationPropertiesInternal)this).DataLakeFolderPath = (string) content.GetValueForProperty("DataLakeFolderPath",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationPropertiesInternal)this).DataLakeFolderPath, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -149,27 +147,27 @@ internal DestinationProperties(global::System.Management.Automation.PSObject con // actually deserialize if (content.Contains("StorageAccountResourceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationPropertiesInternal)this).StorageAccountResourceId = (string) content.GetValueForProperty("StorageAccountResourceId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationPropertiesInternal)this).StorageAccountResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationPropertiesInternal)this).StorageAccountResourceId = (string) content.GetValueForProperty("StorageAccountResourceId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationPropertiesInternal)this).StorageAccountResourceId, global::System.Convert.ToString); } if (content.Contains("BlobContainer")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationPropertiesInternal)this).BlobContainer = (string) content.GetValueForProperty("BlobContainer",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationPropertiesInternal)this).BlobContainer, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationPropertiesInternal)this).BlobContainer = (string) content.GetValueForProperty("BlobContainer",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationPropertiesInternal)this).BlobContainer, global::System.Convert.ToString); } if (content.Contains("ArchiveNameFormat")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationPropertiesInternal)this).ArchiveNameFormat = (string) content.GetValueForProperty("ArchiveNameFormat",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationPropertiesInternal)this).ArchiveNameFormat, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationPropertiesInternal)this).ArchiveNameFormat = (string) content.GetValueForProperty("ArchiveNameFormat",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationPropertiesInternal)this).ArchiveNameFormat, global::System.Convert.ToString); } if (content.Contains("DataLakeSubscriptionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationPropertiesInternal)this).DataLakeSubscriptionId = (string) content.GetValueForProperty("DataLakeSubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationPropertiesInternal)this).DataLakeSubscriptionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationPropertiesInternal)this).DataLakeSubscriptionId = (string) content.GetValueForProperty("DataLakeSubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationPropertiesInternal)this).DataLakeSubscriptionId, global::System.Convert.ToString); } if (content.Contains("DataLakeAccountName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationPropertiesInternal)this).DataLakeAccountName = (string) content.GetValueForProperty("DataLakeAccountName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationPropertiesInternal)this).DataLakeAccountName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationPropertiesInternal)this).DataLakeAccountName = (string) content.GetValueForProperty("DataLakeAccountName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationPropertiesInternal)this).DataLakeAccountName, global::System.Convert.ToString); } if (content.Contains("DataLakeFolderPath")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationPropertiesInternal)this).DataLakeFolderPath = (string) content.GetValueForProperty("DataLakeFolderPath",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationPropertiesInternal)this).DataLakeFolderPath, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationPropertiesInternal)this).DataLakeFolderPath = (string) content.GetValueForProperty("DataLakeFolderPath",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationPropertiesInternal)this).DataLakeFolderPath, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -179,7 +177,7 @@ internal DestinationProperties(global::System.Management.Automation.PSObject con /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/DestinationProperties.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/DestinationProperties.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/DestinationProperties.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/DestinationProperties.TypeConverter.cs index 2e81d035fa52..7aa28b26e9f7 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/DestinationProperties.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/DestinationProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/DestinationProperties.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/DestinationProperties.cs similarity index 92% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/DestinationProperties.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/DestinationProperties.cs index 2abe58138019..e8c0c5015de3 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/DestinationProperties.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/DestinationProperties.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -12,8 +12,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class DestinationProperties : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationProperties, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationProperties, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationPropertiesInternal { /// Backing field for property. @@ -78,6 +78,9 @@ public partial interface IDestinationProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Blob naming convention for archive, e.g. {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}. Here all the parameters (Namespace,EventHub .. etc) are mandatory irrespective of order", SerializedName = @"archiveNameFormat", PossibleTypes = new [] { typeof(string) })] @@ -86,6 +89,9 @@ public partial interface IDestinationProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Blob container Name", SerializedName = @"blobContainer", PossibleTypes = new [] { typeof(string) })] @@ -94,6 +100,9 @@ public partial interface IDestinationProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The Azure Data Lake Store name for the captured events", SerializedName = @"dataLakeAccountName", PossibleTypes = new [] { typeof(string) })] @@ -102,6 +111,9 @@ public partial interface IDestinationProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The destination folder path for the captured events", SerializedName = @"dataLakeFolderPath", PossibleTypes = new [] { typeof(string) })] @@ -110,6 +122,9 @@ public partial interface IDestinationProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Subscription Id of Azure Data Lake Store", SerializedName = @"dataLakeSubscriptionId", PossibleTypes = new [] { typeof(string) })] @@ -118,6 +133,9 @@ public partial interface IDestinationProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Resource id of the storage account to be used to create the blobs", SerializedName = @"storageAccountResourceId", PossibleTypes = new [] { typeof(string) })] diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/DestinationProperties.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/DestinationProperties.json.cs similarity index 92% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/DestinationProperties.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/DestinationProperties.json.cs index a1b816e893c1..94009aeb5210 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/DestinationProperties.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/DestinationProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -67,23 +67,23 @@ internal DestinationProperties(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runti { return; } - {_storageAccountResourceId = If( json?.PropertyT("storageAccountResourceId"), out var __jsonStorageAccountResourceId) ? (string)__jsonStorageAccountResourceId : (string)StorageAccountResourceId;} - {_blobContainer = If( json?.PropertyT("blobContainer"), out var __jsonBlobContainer) ? (string)__jsonBlobContainer : (string)BlobContainer;} - {_archiveNameFormat = If( json?.PropertyT("archiveNameFormat"), out var __jsonArchiveNameFormat) ? (string)__jsonArchiveNameFormat : (string)ArchiveNameFormat;} - {_dataLakeSubscriptionId = If( json?.PropertyT("dataLakeSubscriptionId"), out var __jsonDataLakeSubscriptionId) ? (string)__jsonDataLakeSubscriptionId : (string)DataLakeSubscriptionId;} - {_dataLakeAccountName = If( json?.PropertyT("dataLakeAccountName"), out var __jsonDataLakeAccountName) ? (string)__jsonDataLakeAccountName : (string)DataLakeAccountName;} - {_dataLakeFolderPath = If( json?.PropertyT("dataLakeFolderPath"), out var __jsonDataLakeFolderPath) ? (string)__jsonDataLakeFolderPath : (string)DataLakeFolderPath;} + {_storageAccountResourceId = If( json?.PropertyT("storageAccountResourceId"), out var __jsonStorageAccountResourceId) ? (string)__jsonStorageAccountResourceId : (string)_storageAccountResourceId;} + {_blobContainer = If( json?.PropertyT("blobContainer"), out var __jsonBlobContainer) ? (string)__jsonBlobContainer : (string)_blobContainer;} + {_archiveNameFormat = If( json?.PropertyT("archiveNameFormat"), out var __jsonArchiveNameFormat) ? (string)__jsonArchiveNameFormat : (string)_archiveNameFormat;} + {_dataLakeSubscriptionId = If( json?.PropertyT("dataLakeSubscriptionId"), out var __jsonDataLakeSubscriptionId) ? (string)__jsonDataLakeSubscriptionId : (string)_dataLakeSubscriptionId;} + {_dataLakeAccountName = If( json?.PropertyT("dataLakeAccountName"), out var __jsonDataLakeAccountName) ? (string)__jsonDataLakeAccountName : (string)_dataLakeAccountName;} + {_dataLakeFolderPath = If( json?.PropertyT("dataLakeFolderPath"), out var __jsonDataLakeFolderPath) ? (string)__jsonDataLakeFolderPath : (string)_dataLakeFolderPath;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new DestinationProperties(json) : null; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespace.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespace.PowerShell.cs new file mode 100644 index 000000000000..89cf10eb0404 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespace.PowerShell.cs @@ -0,0 +1,516 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + + /// Single Namespace item in List or Get Operation + [System.ComponentModel.TypeConverter(typeof(EhNamespaceTypeConverter))] + public partial class EhNamespace + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new EhNamespace(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new EhNamespace(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal EhNamespace(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Sku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SkuTypeConverter.ConvertFrom); + } + if (content.Contains("Identity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IdentityTypeConverter.ConvertFrom); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.EhNamespacePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("SkuName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).SkuName = (string) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).SkuName, global::System.Convert.ToString); + } + if (content.Contains("SkuTier")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).SkuTier = (string) content.GetValueForProperty("SkuTier",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).SkuTier, global::System.Convert.ToString); + } + if (content.Contains("SkuCapacity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).SkuCapacity = (int?) content.GetValueForProperty("SkuCapacity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).SkuCapacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("PrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).PrincipalId, global::System.Convert.ToString); + } + if (content.Contains("TenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).TenantId, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Encryption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).Encryption = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEncryption) content.GetValueForProperty("Encryption",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).Encryption, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.EncryptionTypeConverter.ConvertFrom); + } + if (content.Contains("IdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).IdentityType = (string) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).IdentityType, global::System.Convert.ToString); + } + if (content.Contains("UserAssignedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).UserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityUserAssignedIdentities) content.GetValueForProperty("UserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).UserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IdentityUserAssignedIdentitiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("GeoDataReplication")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).GeoDataReplication = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IGeoDataReplicationProperties) content.GetValueForProperty("GeoDataReplication",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).GeoDataReplication, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.GeoDataReplicationPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("MinimumTlsVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).MinimumTlsVersion = (string) content.GetValueForProperty("MinimumTlsVersion",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).MinimumTlsVersion, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("CreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("UpdatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ServiceBusEndpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).ServiceBusEndpoint = (string) content.GetValueForProperty("ServiceBusEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).ServiceBusEndpoint, global::System.Convert.ToString); + } + if (content.Contains("ClusterArmId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).ClusterArmId = (string) content.GetValueForProperty("ClusterArmId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).ClusterArmId, global::System.Convert.ToString); + } + if (content.Contains("MetricId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).MetricId = (string) content.GetValueForProperty("MetricId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).MetricId, global::System.Convert.ToString); + } + if (content.Contains("EnableAutoInflate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).EnableAutoInflate = (bool?) content.GetValueForProperty("EnableAutoInflate",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).EnableAutoInflate, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PublicNetworkAccess")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).PublicNetworkAccess = (string) content.GetValueForProperty("PublicNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).PublicNetworkAccess, global::System.Convert.ToString); + } + if (content.Contains("MaximumThroughputUnit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).MaximumThroughputUnit = (int?) content.GetValueForProperty("MaximumThroughputUnit",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).MaximumThroughputUnit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("KafkaEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).KafkaEnabled = (bool?) content.GetValueForProperty("KafkaEnabled",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).KafkaEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ZoneRedundant")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).ZoneRedundant = (bool?) content.GetValueForProperty("ZoneRedundant",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).ZoneRedundant, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PrivateEndpointConnection")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).PrivateEndpointConnection = (System.Collections.Generic.List) content.GetValueForProperty("PrivateEndpointConnection",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).PrivateEndpointConnection, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.PrivateEndpointConnectionTypeConverter.ConvertFrom)); + } + if (content.Contains("DisableLocalAuth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).DisableLocalAuth = (bool?) content.GetValueForProperty("DisableLocalAuth",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).DisableLocalAuth, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AlternateName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).AlternateName = (string) content.GetValueForProperty("AlternateName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).AlternateName, global::System.Convert.ToString); + } + if (content.Contains("KeySource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).KeySource = (string) content.GetValueForProperty("KeySource",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).KeySource, global::System.Convert.ToString); + } + if (content.Contains("KeyVaultProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).KeyVaultProperty = (System.Collections.Generic.List) content.GetValueForProperty("KeyVaultProperty",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).KeyVaultProperty, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.KeyVaultPropertiesTypeConverter.ConvertFrom)); + } + if (content.Contains("RequireInfrastructureEncryption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).RequireInfrastructureEncryption = (bool?) content.GetValueForProperty("RequireInfrastructureEncryption",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).RequireInfrastructureEncryption, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("GeoDataReplicationMaxReplicationLagDurationInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).GeoDataReplicationMaxReplicationLagDurationInSecond = (int?) content.GetValueForProperty("GeoDataReplicationMaxReplicationLagDurationInSecond",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).GeoDataReplicationMaxReplicationLagDurationInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("GeoDataReplicationLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).GeoDataReplicationLocation = (System.Collections.Generic.List) content.GetValueForProperty("GeoDataReplicationLocation",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).GeoDataReplicationLocation, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NamespaceReplicaLocationTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal EhNamespace(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Sku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SkuTypeConverter.ConvertFrom); + } + if (content.Contains("Identity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IdentityTypeConverter.ConvertFrom); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.EhNamespacePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("SkuName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).SkuName = (string) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).SkuName, global::System.Convert.ToString); + } + if (content.Contains("SkuTier")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).SkuTier = (string) content.GetValueForProperty("SkuTier",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).SkuTier, global::System.Convert.ToString); + } + if (content.Contains("SkuCapacity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).SkuCapacity = (int?) content.GetValueForProperty("SkuCapacity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).SkuCapacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("PrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).PrincipalId, global::System.Convert.ToString); + } + if (content.Contains("TenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).TenantId, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Encryption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).Encryption = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEncryption) content.GetValueForProperty("Encryption",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).Encryption, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.EncryptionTypeConverter.ConvertFrom); + } + if (content.Contains("IdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).IdentityType = (string) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).IdentityType, global::System.Convert.ToString); + } + if (content.Contains("UserAssignedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).UserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityUserAssignedIdentities) content.GetValueForProperty("UserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).UserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IdentityUserAssignedIdentitiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("GeoDataReplication")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).GeoDataReplication = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IGeoDataReplicationProperties) content.GetValueForProperty("GeoDataReplication",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).GeoDataReplication, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.GeoDataReplicationPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("MinimumTlsVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).MinimumTlsVersion = (string) content.GetValueForProperty("MinimumTlsVersion",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).MinimumTlsVersion, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("CreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("UpdatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ServiceBusEndpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).ServiceBusEndpoint = (string) content.GetValueForProperty("ServiceBusEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).ServiceBusEndpoint, global::System.Convert.ToString); + } + if (content.Contains("ClusterArmId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).ClusterArmId = (string) content.GetValueForProperty("ClusterArmId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).ClusterArmId, global::System.Convert.ToString); + } + if (content.Contains("MetricId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).MetricId = (string) content.GetValueForProperty("MetricId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).MetricId, global::System.Convert.ToString); + } + if (content.Contains("EnableAutoInflate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).EnableAutoInflate = (bool?) content.GetValueForProperty("EnableAutoInflate",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).EnableAutoInflate, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PublicNetworkAccess")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).PublicNetworkAccess = (string) content.GetValueForProperty("PublicNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).PublicNetworkAccess, global::System.Convert.ToString); + } + if (content.Contains("MaximumThroughputUnit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).MaximumThroughputUnit = (int?) content.GetValueForProperty("MaximumThroughputUnit",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).MaximumThroughputUnit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("KafkaEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).KafkaEnabled = (bool?) content.GetValueForProperty("KafkaEnabled",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).KafkaEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ZoneRedundant")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).ZoneRedundant = (bool?) content.GetValueForProperty("ZoneRedundant",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).ZoneRedundant, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PrivateEndpointConnection")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).PrivateEndpointConnection = (System.Collections.Generic.List) content.GetValueForProperty("PrivateEndpointConnection",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).PrivateEndpointConnection, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.PrivateEndpointConnectionTypeConverter.ConvertFrom)); + } + if (content.Contains("DisableLocalAuth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).DisableLocalAuth = (bool?) content.GetValueForProperty("DisableLocalAuth",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).DisableLocalAuth, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AlternateName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).AlternateName = (string) content.GetValueForProperty("AlternateName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).AlternateName, global::System.Convert.ToString); + } + if (content.Contains("KeySource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).KeySource = (string) content.GetValueForProperty("KeySource",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).KeySource, global::System.Convert.ToString); + } + if (content.Contains("KeyVaultProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).KeyVaultProperty = (System.Collections.Generic.List) content.GetValueForProperty("KeyVaultProperty",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).KeyVaultProperty, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.KeyVaultPropertiesTypeConverter.ConvertFrom)); + } + if (content.Contains("RequireInfrastructureEncryption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).RequireInfrastructureEncryption = (bool?) content.GetValueForProperty("RequireInfrastructureEncryption",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).RequireInfrastructureEncryption, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("GeoDataReplicationMaxReplicationLagDurationInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).GeoDataReplicationMaxReplicationLagDurationInSecond = (int?) content.GetValueForProperty("GeoDataReplicationMaxReplicationLagDurationInSecond",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).GeoDataReplicationMaxReplicationLagDurationInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("GeoDataReplicationLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).GeoDataReplicationLocation = (System.Collections.Generic.List) content.GetValueForProperty("GeoDataReplicationLocation",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal)this).GeoDataReplicationLocation, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NamespaceReplicaLocationTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Single Namespace item in List or Get Operation + [System.ComponentModel.TypeConverter(typeof(EhNamespaceTypeConverter))] + public partial interface IEhNamespace + + { + + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespace.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespace.TypeConverter.cs similarity index 97% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespace.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespace.TypeConverter.cs index e57855e866b8..e671fc8e0885 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespace.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespace.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespace.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespace.cs similarity index 61% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespace.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespace.cs index 30c2e8c15c4d..7d8010e8be03 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespace.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespace.cs @@ -3,46 +3,45 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// Single Namespace item in List or Get Operation [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class EhNamespace : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IValidates { /// - /// Backing field for Inherited model + /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResource __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.TrackedResource(); + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResource __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.TrackedResource(); /// Alternate name specified when alias and namespace names are same. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string AlternateName { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)Property).AlternateName; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)Property).AlternateName = value ?? null; } + public string AlternateName { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)Property).AlternateName; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)Property).AlternateName = value ?? null; } /// Cluster ARM ID of the Namespace. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string ClusterArmId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)Property).ClusterArmId; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)Property).ClusterArmId = value ?? null; } + public string ClusterArmId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)Property).ClusterArmId; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)Property).ClusterArmId = value ?? null; } /// The time the Namespace was created. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public global::System.DateTime? CreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)Property).CreatedAt; } + public global::System.DateTime? CreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)Property).CreatedAt; } /// This property disables SAS authentication for the Event Hubs namespace. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public bool? DisableLocalAuth { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)Property).DisableLocalAuth; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)Property).DisableLocalAuth = value ?? default(bool); } + public bool? DisableLocalAuth { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)Property).DisableLocalAuth; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)Property).DisableLocalAuth = value ?? default(bool); } /// Value that indicates whether AutoInflate is enabled for eventhub namespace. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public bool? EnableAutoInflate { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)Property).IsAutoInflateEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)Property).IsAutoInflateEnabled = value ?? default(bool); } + public bool? EnableAutoInflate { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)Property).IsAutoInflateEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)Property).IsAutoInflateEnabled = value ?? default(bool); } /// A list of regions where replicas of the namespace are maintained. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INamespaceReplicaLocation[] GeoDataReplicationLocation { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)Property).GeoDataReplicationLocation; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)Property).GeoDataReplicationLocation = value ?? null /* arrayOf */; } + public System.Collections.Generic.List GeoDataReplicationLocation { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)Property).GeoDataReplicationLocation; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)Property).GeoDataReplicationLocation = value ?? null /* arrayOf */; } /// /// The maximum acceptable lag for data replication operations from the primary replica to a quorum of secondary replicas. @@ -50,139 +49,139 @@ public partial class EhNamespace : /// and 5 minutes to 1 day. /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public int? GeoDataReplicationMaxReplicationLagDurationInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)Property).GeoDataReplicationMaxReplicationLagDurationInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)Property).GeoDataReplicationMaxReplicationLagDurationInSecond = value ?? default(int); } + public int? GeoDataReplicationMaxReplicationLagDurationInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)Property).GeoDataReplicationMaxReplicationLagDurationInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)Property).GeoDataReplicationMaxReplicationLagDurationInSecond = value ?? default(int); } /// /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)__trackedResource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)__trackedResource).Id; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentity _identity; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentity _identity; /// Properties of BYOK Identity description [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentity Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.Identity()); set => this._identity = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentity Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Identity()); set => this._identity = value; } /// Type of managed service identity. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType? IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityInternal)Identity).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityInternal)Identity).Type = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType)""); } + public string IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityInternal)Identity).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityInternal)Identity).Type = value ?? null; } /// Value that indicates whether Kafka is enabled for eventhub namespace. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public bool? KafkaEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)Property).KafkaEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)Property).KafkaEnabled = value ?? default(bool); } + public bool? KafkaEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)Property).KafkaEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)Property).KafkaEnabled = value ?? default(bool); } /// Enumerates the possible value of keySource for Encryption [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeySource? KeySource { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)Property).EncryptionKeySource; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)Property).EncryptionKeySource = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeySource)""); } + public string KeySource { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)Property).EncryptionKeySource; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)Property).EncryptionKeySource = value ?? null; } /// Properties of KeyVault [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultProperties[] KeyVaultProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)Property).EncryptionKeyVaultProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)Property).EncryptionKeyVaultProperty = value ?? null /* arrayOf */; } + public System.Collections.Generic.List KeyVaultProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)Property).EncryptionKeyVaultProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)Property).EncryptionKeyVaultProperty = value ?? null /* arrayOf */; } /// Resource location. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceInternal)__trackedResource).Location = value ?? null; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceInternal)__trackedResource).Location = value ?? null; } /// /// Upper limit of throughput units when AutoInflate is enabled, value should be within 0 to 20 throughput units. ( '0' if /// AutoInflateEnabled = true) /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public int? MaximumThroughputUnit { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)Property).MaximumThroughputUnit; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)Property).MaximumThroughputUnit = value ?? default(int); } + public int? MaximumThroughputUnit { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)Property).MaximumThroughputUnit; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)Property).MaximumThroughputUnit = value ?? default(int); } /// Identifier for Azure Insights metrics. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string MetricId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)Property).MetricId; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)__trackedResource).Id = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)__trackedResource).Name = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)__trackedResource).Type = value; } + public string MetricId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)Property).MetricId; } /// Internal Acessors for CreatedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal.CreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)Property).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)Property).CreatedAt = value; } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal.CreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)Property).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)Property).CreatedAt = value; } /// Internal Acessors for Encryption - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEncryption Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal.Encryption { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)Property).Encryption; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)Property).Encryption = value; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEncryption Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal.Encryption { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)Property).Encryption; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)Property).Encryption = value; } /// Internal Acessors for GeoDataReplication - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IGeoDataReplicationProperties Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal.GeoDataReplication { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)Property).GeoDataReplication; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)Property).GeoDataReplication = value; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IGeoDataReplicationProperties Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal.GeoDataReplication { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)Property).GeoDataReplication; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)Property).GeoDataReplication = value; } /// Internal Acessors for Identity - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentity Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.Identity()); set { {_identity = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentity Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Identity()); set { {_identity = value;} } } /// Internal Acessors for MetricId - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal.MetricId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)Property).MetricId; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)Property).MetricId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal.MetricId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)Property).MetricId; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)Property).MetricId = value; } /// Internal Acessors for PrincipalId - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal.PrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityInternal)Identity).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityInternal)Identity).PrincipalId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal.PrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityInternal)Identity).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityInternal)Identity).PrincipalId = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceProperties Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.EhNamespaceProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceProperties Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.EhNamespaceProperties()); set { {_property = value;} } } /// Internal Acessors for ProvisioningState - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)Property).ProvisioningState = value; } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)Property).ProvisioningState = value; } /// Internal Acessors for ServiceBusEndpoint - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal.ServiceBusEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)Property).ServiceBusEndpoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)Property).ServiceBusEndpoint = value; } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal.ServiceBusEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)Property).ServiceBusEndpoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)Property).ServiceBusEndpoint = value; } /// Internal Acessors for Sku - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISku Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal.Sku { get => (this._sku = this._sku ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.Sku()); set { {_sku = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISku Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal.Sku { get => (this._sku = this._sku ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Sku()); set { {_sku = value;} } } /// Internal Acessors for Status - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal.Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)Property).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)Property).Status = value; } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal.Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)Property).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)Property).Status = value; } /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.SystemData()); set { {_systemData = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SystemData()); set { {_systemData = value;} } } /// Internal Acessors for TenantId - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal.TenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityInternal)Identity).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityInternal)Identity).TenantId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal.TenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityInternal)Identity).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityInternal)Identity).TenantId = value; } /// Internal Acessors for UpdatedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceInternal.UpdatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)Property).UpdatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)Property).UpdatedAt = value; } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceInternal.UpdatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)Property).UpdatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)Property).UpdatedAt = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)__trackedResource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)__trackedResource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)__trackedResource).Type = value; } /// The minimum TLS version for the cluster to support, e.g. '1.2' [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.TlsVersion? MinimumTlsVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)Property).MinimumTlsVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)Property).MinimumTlsVersion = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.TlsVersion)""); } + public string MinimumTlsVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)Property).MinimumTlsVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)Property).MinimumTlsVersion = value ?? null; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)__trackedResource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)__trackedResource).Name; } /// ObjectId from the KeyVault [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string PrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityInternal)Identity).PrincipalId; } + public string PrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityInternal)Identity).PrincipalId; } /// List of private endpoint connections. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection[] PrivateEndpointConnection { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)Property).PrivateEndpointConnection; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)Property).PrivateEndpointConnection = value ?? null /* arrayOf */; } + public System.Collections.Generic.List PrivateEndpointConnection { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)Property).PrivateEndpointConnection; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)Property).PrivateEndpointConnection = value ?? null /* arrayOf */; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceProperties _property; /// Namespace properties supplied for create namespace operation. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.EhNamespaceProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.EhNamespaceProperties()); set => this._property = value; } /// Provisioning state of the Namespace. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)Property).ProvisioningState; } + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)Property).ProvisioningState; } /// /// This determines if traffic is allowed over public network. By default it is enabled. /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess? PublicNetworkAccess { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)Property).PublicNetworkAccess; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)Property).PublicNetworkAccess = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess)""); } + public string PublicNetworkAccess { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)Property).PublicNetworkAccess; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)Property).PublicNetworkAccess = value ?? null; } /// Enable Infrastructure Encryption (Double Encryption) [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public bool? RequireInfrastructureEncryption { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)Property).EncryptionRequireInfrastructureEncryption; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)Property).EncryptionRequireInfrastructureEncryption = value ?? default(bool); } + public bool? RequireInfrastructureEncryption { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)Property).EncryptionRequireInfrastructureEncryption; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)Property).EncryptionRequireInfrastructureEncryption = value ?? default(bool); } /// Gets the resource group name [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] @@ -190,92 +189,92 @@ public partial class EhNamespace : /// Endpoint you can use to perform Service Bus operations. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string ServiceBusEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)Property).ServiceBusEndpoint; } + public string ServiceBusEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)Property).ServiceBusEndpoint; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISku _sku; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISku _sku; /// Properties of sku resource [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISku Sku { get => (this._sku = this._sku ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.Sku()); set => this._sku = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISku Sku { get => (this._sku = this._sku ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Sku()); set => this._sku = value; } /// /// The Event Hubs throughput units for Basic or Standard tiers, where value should be 0 to 20 throughput units. The Event /// Hubs premium units for Premium tier, where value should be 0 to 10 premium units. /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public int? SkuCapacity { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISkuInternal)Sku).Capacity; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISkuInternal)Sku).Capacity = value ?? default(int); } + public int? SkuCapacity { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISkuInternal)Sku).Capacity; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISkuInternal)Sku).Capacity = value ?? default(int); } /// Name of this SKU. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuName? SkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISkuInternal)Sku).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISkuInternal)Sku).Name = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuName)""); } + public string SkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISkuInternal)Sku).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISkuInternal)Sku).Name = value ?? null; } /// The billing tier of this particular SKU. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuTier? SkuTier { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISkuInternal)Sku).Tier; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISkuInternal)Sku).Tier = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuTier)""); } + public string SkuTier { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISkuInternal)Sku).Tier; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISkuInternal)Sku).Tier = value ?? null; } /// Status of the Namespace. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)Property).Status; } + public string Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)Property).Status; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData _systemData; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData _systemData; /// The system meta data relating to this resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.SystemData()); } + internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SystemData()); } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType)""); } + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedByType = value ?? null; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType)""); } + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedByType = value ?? null; } /// Resource tags. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } /// TenantId from the KeyVault [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string TenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityInternal)Identity).TenantId; } + public string TenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityInternal)Identity).TenantId; } /// /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)__trackedResource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)__trackedResource).Type; } /// The time the Namespace was updated. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public global::System.DateTime? UpdatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)Property).UpdatedAt; } + public global::System.DateTime? UpdatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)Property).UpdatedAt; } /// Properties for User Assigned Identities [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityUserAssignedIdentities UserAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityInternal)Identity).UserAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityInternal)Identity).UserAssignedIdentity = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityUserAssignedIdentities UserAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityInternal)Identity).UserAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityInternal)Identity).UserAssignedIdentity = value ?? null /* model class */; } /// /// Enabling this property creates a Standard Event Hubs Namespace in regions supported availability zones. /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public bool? ZoneRedundant { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)Property).ZoneRedundant; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal)Property).ZoneRedundant = value ?? default(bool); } + public bool? ZoneRedundant { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)Property).ZoneRedundant; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)Property).ZoneRedundant = value ?? default(bool); } /// Creates an new instance. public EhNamespace() @@ -298,12 +297,15 @@ public EhNamespace() /// Single Namespace item in List or Get Operation public partial interface IEhNamespace : Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResource + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResource { /// Alternate name specified when alias and namespace names are same. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Alternate name specified when alias and namespace names are same.", SerializedName = @"alternateName", PossibleTypes = new [] { typeof(string) })] @@ -312,6 +314,9 @@ public partial interface IEhNamespace : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Cluster ARM ID of the Namespace.", SerializedName = @"clusterArmId", PossibleTypes = new [] { typeof(string) })] @@ -320,6 +325,9 @@ public partial interface IEhNamespace : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The time the Namespace was created.", SerializedName = @"createdAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -328,6 +336,9 @@ public partial interface IEhNamespace : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"This property disables SAS authentication for the Event Hubs namespace.", SerializedName = @"disableLocalAuth", PossibleTypes = new [] { typeof(bool) })] @@ -336,6 +347,9 @@ public partial interface IEhNamespace : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Value that indicates whether AutoInflate is enabled for eventhub namespace.", SerializedName = @"isAutoInflateEnabled", PossibleTypes = new [] { typeof(bool) })] @@ -344,10 +358,13 @@ public partial interface IEhNamespace : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"A list of regions where replicas of the namespace are maintained.", SerializedName = @"locations", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INamespaceReplicaLocation) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INamespaceReplicaLocation[] GeoDataReplicationLocation { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INamespaceReplicaLocation) })] + System.Collections.Generic.List GeoDataReplicationLocation { get; set; } /// /// The maximum acceptable lag for data replication operations from the primary replica to a quorum of secondary replicas. /// When the lag exceeds the configured amount, operations on the primary replica will be failed. The allowed values are 0 @@ -356,6 +373,9 @@ public partial interface IEhNamespace : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The maximum acceptable lag for data replication operations from the primary replica to a quorum of secondary replicas. When the lag exceeds the configured amount, operations on the primary replica will be failed. The allowed values are 0 and 5 minutes to 1 day.", SerializedName = @"maxReplicationLagDurationInSeconds", PossibleTypes = new [] { typeof(int) })] @@ -364,14 +384,21 @@ public partial interface IEhNamespace : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Type of managed service identity.", SerializedName = @"type", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType? IdentityType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned", "None")] + string IdentityType { get; set; } /// Value that indicates whether Kafka is enabled for eventhub namespace. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Value that indicates whether Kafka is enabled for eventhub namespace.", SerializedName = @"kafkaEnabled", PossibleTypes = new [] { typeof(bool) })] @@ -380,18 +407,25 @@ public partial interface IEhNamespace : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Enumerates the possible value of keySource for Encryption", SerializedName = @"keySource", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeySource) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeySource? KeySource { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Microsoft.KeyVault")] + string KeySource { get; set; } /// Properties of KeyVault [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Properties of KeyVault", SerializedName = @"keyVaultProperties", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultProperties) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultProperties[] KeyVaultProperty { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultProperties) })] + System.Collections.Generic.List KeyVaultProperty { get; set; } /// /// Upper limit of throughput units when AutoInflate is enabled, value should be within 0 to 20 throughput units. ( '0' if /// AutoInflateEnabled = true) @@ -399,6 +433,9 @@ public partial interface IEhNamespace : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Upper limit of throughput units when AutoInflate is enabled, value should be within 0 to 20 throughput units. ( '0' if AutoInflateEnabled = true)", SerializedName = @"maximumThroughputUnits", PossibleTypes = new [] { typeof(int) })] @@ -407,6 +444,9 @@ public partial interface IEhNamespace : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Identifier for Azure Insights metrics.", SerializedName = @"metricId", PossibleTypes = new [] { typeof(string) })] @@ -415,14 +455,21 @@ public partial interface IEhNamespace : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The minimum TLS version for the cluster to support, e.g. '1.2'", SerializedName = @"minimumTlsVersion", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.TlsVersion) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.TlsVersion? MinimumTlsVersion { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("1.0", "1.1", "1.2")] + string MinimumTlsVersion { get; set; } /// ObjectId from the KeyVault [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"ObjectId from the KeyVault", SerializedName = @"principalId", PossibleTypes = new [] { typeof(string) })] @@ -431,14 +478,20 @@ public partial interface IEhNamespace : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"List of private endpoint connections.", SerializedName = @"privateEndpointConnections", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection[] PrivateEndpointConnection { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection) })] + System.Collections.Generic.List PrivateEndpointConnection { get; set; } /// Provisioning state of the Namespace. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Provisioning state of the Namespace.", SerializedName = @"provisioningState", PossibleTypes = new [] { typeof(string) })] @@ -449,14 +502,21 @@ public partial interface IEhNamespace : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"This determines if traffic is allowed over public network. By default it is enabled.", SerializedName = @"publicNetworkAccess", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess? PublicNetworkAccess { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Enabled", "Disabled", "SecuredByPerimeter")] + string PublicNetworkAccess { get; set; } /// Enable Infrastructure Encryption (Double Encryption) [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Enable Infrastructure Encryption (Double Encryption)", SerializedName = @"requireInfrastructureEncryption", PossibleTypes = new [] { typeof(bool) })] @@ -465,6 +525,9 @@ public partial interface IEhNamespace : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Endpoint you can use to perform Service Bus operations.", SerializedName = @"serviceBusEndpoint", PossibleTypes = new [] { typeof(string) })] @@ -476,6 +539,9 @@ public partial interface IEhNamespace : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The Event Hubs throughput units for Basic or Standard tiers, where value should be 0 to 20 throughput units. The Event Hubs premium units for Premium tier, where value should be 0 to 10 premium units.", SerializedName = @"capacity", PossibleTypes = new [] { typeof(int) })] @@ -484,22 +550,33 @@ public partial interface IEhNamespace : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Name of this SKU.", SerializedName = @"name", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuName) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuName? SkuName { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Basic", "Standard", "Premium")] + string SkuName { get; set; } /// The billing tier of this particular SKU. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The billing tier of this particular SKU.", SerializedName = @"tier", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuTier) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuTier? SkuTier { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Basic", "Standard", "Premium")] + string SkuTier { get; set; } /// Status of the Namespace. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Status of the Namespace.", SerializedName = @"status", PossibleTypes = new [] { typeof(string) })] @@ -507,55 +584,78 @@ public partial interface IEhNamespace : /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The timestamp of resource creation (UTC).", SerializedName = @"createdAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? SystemDataCreatedAt { get; set; } + global::System.DateTime? SystemDataCreatedAt { get; } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The identity that created the resource.", SerializedName = @"createdBy", PossibleTypes = new [] { typeof(string) })] - string SystemDataCreatedBy { get; set; } + string SystemDataCreatedBy { get; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that created the resource.", SerializedName = @"createdByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataCreatedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that last modified the resource.", SerializedName = @"lastModifiedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? SystemDataLastModifiedAt { get; set; } + global::System.DateTime? SystemDataLastModifiedAt { get; } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The identity that last modified the resource.", SerializedName = @"lastModifiedBy", PossibleTypes = new [] { typeof(string) })] - string SystemDataLastModifiedBy { get; set; } + string SystemDataLastModifiedBy { get; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that last modified the resource.", SerializedName = @"lastModifiedByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; } /// TenantId from the KeyVault [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"TenantId from the KeyVault", SerializedName = @"tenantId", PossibleTypes = new [] { typeof(string) })] @@ -564,6 +664,9 @@ public partial interface IEhNamespace : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The time the Namespace was updated.", SerializedName = @"updatedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -572,16 +675,22 @@ public partial interface IEhNamespace : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Properties for User Assigned Identities", SerializedName = @"userAssignedIdentities", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityUserAssignedIdentities) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityUserAssignedIdentities UserAssignedIdentity { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityUserAssignedIdentities) })] + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityUserAssignedIdentities UserAssignedIdentity { get; set; } /// /// Enabling this property creates a Standard Event Hubs Namespace in regions supported availability zones. /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Enabling this property creates a Standard Event Hubs Namespace in regions supported availability zones.", SerializedName = @"zoneRedundant", PossibleTypes = new [] { typeof(bool) })] @@ -590,7 +699,7 @@ public partial interface IEhNamespace : } /// Single Namespace item in List or Get Operation internal partial interface IEhNamespaceInternal : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceInternal { /// Alternate name specified when alias and namespace names are same. string AlternateName { get; set; } @@ -603,11 +712,11 @@ internal partial interface IEhNamespaceInternal : /// Value that indicates whether AutoInflate is enabled for eventhub namespace. bool? EnableAutoInflate { get; set; } /// Properties of BYOK Encryption description - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEncryption Encryption { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEncryption Encryption { get; set; } /// Geo Data Replication settings for the namespace - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IGeoDataReplicationProperties GeoDataReplication { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IGeoDataReplicationProperties GeoDataReplication { get; set; } /// A list of regions where replicas of the namespace are maintained. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INamespaceReplicaLocation[] GeoDataReplicationLocation { get; set; } + System.Collections.Generic.List GeoDataReplicationLocation { get; set; } /// /// The maximum acceptable lag for data replication operations from the primary replica to a quorum of secondary replicas. /// When the lag exceeds the configured amount, operations on the primary replica will be failed. The allowed values are 0 @@ -615,15 +724,17 @@ internal partial interface IEhNamespaceInternal : /// int? GeoDataReplicationMaxReplicationLagDurationInSecond { get; set; } /// Properties of BYOK Identity description - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentity Identity { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentity Identity { get; set; } /// Type of managed service identity. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType? IdentityType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned", "None")] + string IdentityType { get; set; } /// Value that indicates whether Kafka is enabled for eventhub namespace. bool? KafkaEnabled { get; set; } /// Enumerates the possible value of keySource for Encryption - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeySource? KeySource { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Microsoft.KeyVault")] + string KeySource { get; set; } /// Properties of KeyVault - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultProperties[] KeyVaultProperty { get; set; } + System.Collections.Generic.List KeyVaultProperty { get; set; } /// /// Upper limit of throughput units when AutoInflate is enabled, value should be within 0 to 20 throughput units. ( '0' if /// AutoInflateEnabled = true) @@ -632,56 +743,62 @@ internal partial interface IEhNamespaceInternal : /// Identifier for Azure Insights metrics. string MetricId { get; set; } /// The minimum TLS version for the cluster to support, e.g. '1.2' - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.TlsVersion? MinimumTlsVersion { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("1.0", "1.1", "1.2")] + string MinimumTlsVersion { get; set; } /// ObjectId from the KeyVault string PrincipalId { get; set; } /// List of private endpoint connections. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection[] PrivateEndpointConnection { get; set; } + System.Collections.Generic.List PrivateEndpointConnection { get; set; } /// Namespace properties supplied for create namespace operation. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceProperties Property { get; set; } /// Provisioning state of the Namespace. string ProvisioningState { get; set; } /// /// This determines if traffic is allowed over public network. By default it is enabled. /// - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess? PublicNetworkAccess { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Enabled", "Disabled", "SecuredByPerimeter")] + string PublicNetworkAccess { get; set; } /// Enable Infrastructure Encryption (Double Encryption) bool? RequireInfrastructureEncryption { get; set; } /// Endpoint you can use to perform Service Bus operations. string ServiceBusEndpoint { get; set; } /// Properties of sku resource - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISku Sku { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISku Sku { get; set; } /// /// The Event Hubs throughput units for Basic or Standard tiers, where value should be 0 to 20 throughput units. The Event /// Hubs premium units for Premium tier, where value should be 0 to 10 premium units. /// int? SkuCapacity { get; set; } /// Name of this SKU. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuName? SkuName { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Basic", "Standard", "Premium")] + string SkuName { get; set; } /// The billing tier of this particular SKU. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuTier? SkuTier { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Basic", "Standard", "Premium")] + string SkuTier { get; set; } /// Status of the Namespace. string Status { get; set; } /// The system meta data relating to this resource. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData SystemData { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData SystemData { get; set; } /// The timestamp of resource creation (UTC). global::System.DateTime? SystemDataCreatedAt { get; set; } /// The identity that created the resource. string SystemDataCreatedBy { get; set; } /// The type of identity that created the resource. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataCreatedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; set; } /// The type of identity that last modified the resource. global::System.DateTime? SystemDataLastModifiedAt { get; set; } /// The identity that last modified the resource. string SystemDataLastModifiedBy { get; set; } /// The type of identity that last modified the resource. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; set; } /// TenantId from the KeyVault string TenantId { get; set; } /// The time the Namespace was updated. global::System.DateTime? UpdatedAt { get; set; } /// Properties for User Assigned Identities - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityUserAssignedIdentities UserAssignedIdentity { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityUserAssignedIdentities UserAssignedIdentity { get; set; } /// /// Enabling this property creates a Standard Event Hubs Namespace in regions supported availability zones. /// diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespace.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespace.json.cs similarity index 89% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespace.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespace.json.cs index aa644bd6da00..f17b900ce9e6 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespace.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespace.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -65,22 +65,20 @@ internal EhNamespace(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.Js { return; } - __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.TrackedResource(json); - {_sku = If( json?.PropertyT("sku"), out var __jsonSku) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.Sku.FromJson(__jsonSku) : Sku;} - {_identity = If( json?.PropertyT("identity"), out var __jsonIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.Identity.FromJson(__jsonIdentity) : Identity;} - {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.SystemData.FromJson(__jsonSystemData) : SystemData;} - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.EhNamespaceProperties.FromJson(__jsonProperties) : Property;} + __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.TrackedResource(json); + {_sku = If( json?.PropertyT("sku"), out var __jsonSku) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Sku.FromJson(__jsonSku) : _sku;} + {_identity = If( json?.PropertyT("identity"), out var __jsonIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Identity.FromJson(__jsonIdentity) : _identity;} + {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SystemData.FromJson(__jsonSystemData) : _systemData;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.EhNamespaceProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace. /// /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace. + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new EhNamespace(json) : null; } @@ -107,7 +105,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode ToJson( __trackedResource?.ToJson(container, serializationMode); AddIf( null != this._sku ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) this._sku.ToJson(null,serializationMode) : null, "sku" ,container.Add ); AddIf( null != this._identity ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) this._identity.ToJson(null,serializationMode) : null, "identity" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add ); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespaceIdContainer.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespaceIdContainer.PowerShell.cs similarity index 83% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespaceIdContainer.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespaceIdContainer.PowerShell.cs index af4a0ca9b8a9..eae34bc5dd24 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespaceIdContainer.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespaceIdContainer.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,35 +63,33 @@ public partial class EhNamespaceIdContainer partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceIdContainer DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceIdContainer DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new EhNamespaceIdContainer(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceIdContainer DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceIdContainer DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new EhNamespaceIdContainer(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -106,13 +104,13 @@ internal EhNamespaceIdContainer(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceIdContainerInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceIdContainerInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceIdContainerInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceIdContainerInternal)this).Id, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -127,7 +125,7 @@ internal EhNamespaceIdContainer(global::System.Management.Automation.PSObject co // actually deserialize if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceIdContainerInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceIdContainerInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceIdContainerInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceIdContainerInternal)this).Id, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -137,7 +135,7 @@ internal EhNamespaceIdContainer(global::System.Management.Automation.PSObject co /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceIdContainer FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceIdContainer FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespaceIdContainer.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespaceIdContainer.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespaceIdContainer.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespaceIdContainer.TypeConverter.cs index 877228f03811..9bd26904ac95 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespaceIdContainer.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespaceIdContainer.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceIdContainer ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceIdContainer ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceIdContainer).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceIdContainer).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespaceIdContainer.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespaceIdContainer.cs similarity index 85% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespaceIdContainer.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespaceIdContainer.cs index f09ef85dfae4..0d26b3bbf14f 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespaceIdContainer.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespaceIdContainer.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// The full ARM ID of an Event Hubs Namespace [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class EhNamespaceIdContainer : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceIdContainer, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceIdContainerInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceIdContainer, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceIdContainerInternal { /// Backing field for property. @@ -35,6 +35,9 @@ public partial interface IEhNamespaceIdContainer : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"id parameter", SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespaceIdContainer.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespaceIdContainer.json.cs similarity index 94% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespaceIdContainer.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespaceIdContainer.json.cs index 2ca897991b5a..080ca8c9b3ad 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespaceIdContainer.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespaceIdContainer.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -65,18 +65,18 @@ internal EhNamespaceIdContainer(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runt { return; } - {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceIdContainer. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceIdContainer. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceIdContainer. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceIdContainer. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceIdContainer FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceIdContainer FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new EhNamespaceIdContainer(json) : null; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespaceIdListResult.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespaceIdListResult.PowerShell.cs similarity index 78% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespaceIdListResult.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespaceIdListResult.PowerShell.cs index 16646ed0901f..dbc08e950d4c 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespaceIdListResult.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespaceIdListResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,35 +63,33 @@ public partial class EhNamespaceIdListResult partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceIdListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceIdListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new EhNamespaceIdListResult(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceIdListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceIdListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new EhNamespaceIdListResult(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -106,13 +104,13 @@ internal EhNamespaceIdListResult(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceIdListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceIdContainer[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceIdListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.EhNamespaceIdContainerTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceIdListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceIdListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.EhNamespaceIdContainerTypeConverter.ConvertFrom)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -127,7 +125,7 @@ internal EhNamespaceIdListResult(global::System.Management.Automation.PSObject c // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceIdListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceIdContainer[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceIdListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.EhNamespaceIdContainerTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceIdListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceIdListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.EhNamespaceIdContainerTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } @@ -137,7 +135,7 @@ internal EhNamespaceIdListResult(global::System.Management.Automation.PSObject c /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceIdListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceIdListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespaceIdListResult.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespaceIdListResult.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespaceIdListResult.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespaceIdListResult.TypeConverter.cs index 44dfe030d662..0809f9bc67df 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespaceIdListResult.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespaceIdListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceIdListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceIdListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceIdListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceIdListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespaceIdListResult.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespaceIdListResult.cs similarity index 65% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespaceIdListResult.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespaceIdListResult.cs index d482286e5e82..a5d1392e0251 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespaceIdListResult.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespaceIdListResult.cs @@ -3,23 +3,23 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// The response of the List Namespace IDs operation [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class EhNamespaceIdListResult : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceIdListResult, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceIdListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceIdListResult, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceIdListResultInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceIdContainer[] _value; + private System.Collections.Generic.List _value; /// Result of the List Namespace IDs operation [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceIdContainer[] Value { get => this._value; set => this._value = value; } + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } /// Creates an new instance. public EhNamespaceIdListResult() @@ -35,10 +35,13 @@ public partial interface IEhNamespaceIdListResult : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Result of the List Namespace IDs operation", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceIdContainer) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceIdContainer[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceIdContainer) })] + System.Collections.Generic.List Value { get; set; } } /// The response of the List Namespace IDs operation @@ -46,7 +49,7 @@ internal partial interface IEhNamespaceIdListResultInternal { /// Result of the List Namespace IDs operation - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceIdContainer[] Value { get; set; } + System.Collections.Generic.List Value { get; set; } } } \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespaceIdListResult.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespaceIdListResult.json.cs similarity index 89% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespaceIdListResult.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespaceIdListResult.json.cs index a195d1a566ba..27470b847d78 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespaceIdListResult.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespaceIdListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -65,18 +65,18 @@ internal EhNamespaceIdListResult(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Run { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceIdContainer) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.EhNamespaceIdContainer.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceIdContainer) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.EhNamespaceIdContainer.FromJson(__u) )) ))() : null : _value;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceIdListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceIdListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceIdListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceIdListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceIdListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceIdListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new EhNamespaceIdListResult(json) : null; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespaceListResult.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespaceListResult.PowerShell.cs similarity index 75% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespaceListResult.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespaceListResult.PowerShell.cs index a47f7d910b75..fd3e19504e35 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespaceListResult.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespaceListResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,35 +63,33 @@ public partial class EhNamespaceListResult partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new EhNamespaceListResult(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new EhNamespaceListResult(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -106,17 +104,17 @@ internal EhNamespaceListResult(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.EhNamespaceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.EhNamespaceTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -131,11 +129,11 @@ internal EhNamespaceListResult(global::System.Management.Automation.PSObject con // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.EhNamespaceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.EhNamespaceTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -145,7 +143,7 @@ internal EhNamespaceListResult(global::System.Management.Automation.PSObject con /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespaceListResult.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespaceListResult.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespaceListResult.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespaceListResult.TypeConverter.cs index c5bb467eb12c..ea854f5ee9c6 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespaceListResult.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespaceListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespaceListResult.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespaceListResult.cs similarity index 75% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespaceListResult.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespaceListResult.cs index 777ceb6e31db..e54cd91915a7 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespaceListResult.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespaceListResult.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// The response of the List Namespace operation [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class EhNamespaceListResult : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceListResult, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceListResult, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceListResultInternal { /// Backing field for property. @@ -24,11 +24,11 @@ public partial class EhNamespaceListResult : public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace[] _value; + private System.Collections.Generic.List _value; /// Result of the List Namespace operation [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace[] Value { get => this._value; set => this._value = value; } + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } /// Creates an new instance. public EhNamespaceListResult() @@ -46,6 +46,9 @@ public partial interface IEhNamespaceListResult : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Link to the next set of results. Not empty if Value contains incomplete list of namespaces.", SerializedName = @"nextLink", PossibleTypes = new [] { typeof(string) })] @@ -54,10 +57,13 @@ public partial interface IEhNamespaceListResult : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Result of the List Namespace operation", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace) })] + System.Collections.Generic.List Value { get; set; } } /// The response of the List Namespace operation @@ -69,7 +75,7 @@ internal partial interface IEhNamespaceListResultInternal /// string NextLink { get; set; } /// Result of the List Namespace operation - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace[] Value { get; set; } + System.Collections.Generic.List Value { get; set; } } } \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespaceListResult.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespaceListResult.json.cs similarity index 89% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespaceListResult.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespaceListResult.json.cs index 696e75c53f08..d62c230701ee 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespaceListResult.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespaceListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -65,19 +65,19 @@ internal EhNamespaceListResult(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runti { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.EhNamespace.FromJson(__u) )) ))() : null : Value;} - {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.EhNamespace.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new EhNamespaceListResult(json) : null; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespaceProperties.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespaceProperties.PowerShell.cs new file mode 100644 index 000000000000..73a091759bbc --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespaceProperties.PowerShell.cs @@ -0,0 +1,340 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + + /// Namespace properties supplied for create namespace operation. + [System.ComponentModel.TypeConverter(typeof(EhNamespacePropertiesTypeConverter))] + public partial class EhNamespaceProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new EhNamespaceProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new EhNamespaceProperties(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal EhNamespaceProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Encryption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).Encryption = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEncryption) content.GetValueForProperty("Encryption",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).Encryption, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.EncryptionTypeConverter.ConvertFrom); + } + if (content.Contains("GeoDataReplication")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).GeoDataReplication = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IGeoDataReplicationProperties) content.GetValueForProperty("GeoDataReplication",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).GeoDataReplication, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.GeoDataReplicationPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("MinimumTlsVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).MinimumTlsVersion = (string) content.GetValueForProperty("MinimumTlsVersion",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).MinimumTlsVersion, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("CreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("UpdatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ServiceBusEndpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).ServiceBusEndpoint = (string) content.GetValueForProperty("ServiceBusEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).ServiceBusEndpoint, global::System.Convert.ToString); + } + if (content.Contains("ClusterArmId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).ClusterArmId = (string) content.GetValueForProperty("ClusterArmId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).ClusterArmId, global::System.Convert.ToString); + } + if (content.Contains("MetricId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).MetricId = (string) content.GetValueForProperty("MetricId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).MetricId, global::System.Convert.ToString); + } + if (content.Contains("IsAutoInflateEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).IsAutoInflateEnabled = (bool?) content.GetValueForProperty("IsAutoInflateEnabled",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).IsAutoInflateEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PublicNetworkAccess")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).PublicNetworkAccess = (string) content.GetValueForProperty("PublicNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).PublicNetworkAccess, global::System.Convert.ToString); + } + if (content.Contains("MaximumThroughputUnit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).MaximumThroughputUnit = (int?) content.GetValueForProperty("MaximumThroughputUnit",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).MaximumThroughputUnit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("KafkaEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).KafkaEnabled = (bool?) content.GetValueForProperty("KafkaEnabled",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).KafkaEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ZoneRedundant")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).ZoneRedundant = (bool?) content.GetValueForProperty("ZoneRedundant",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).ZoneRedundant, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PrivateEndpointConnection")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).PrivateEndpointConnection = (System.Collections.Generic.List) content.GetValueForProperty("PrivateEndpointConnection",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).PrivateEndpointConnection, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.PrivateEndpointConnectionTypeConverter.ConvertFrom)); + } + if (content.Contains("DisableLocalAuth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).DisableLocalAuth = (bool?) content.GetValueForProperty("DisableLocalAuth",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).DisableLocalAuth, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AlternateName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).AlternateName = (string) content.GetValueForProperty("AlternateName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).AlternateName, global::System.Convert.ToString); + } + if (content.Contains("EncryptionKeySource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).EncryptionKeySource = (string) content.GetValueForProperty("EncryptionKeySource",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).EncryptionKeySource, global::System.Convert.ToString); + } + if (content.Contains("EncryptionKeyVaultProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).EncryptionKeyVaultProperty = (System.Collections.Generic.List) content.GetValueForProperty("EncryptionKeyVaultProperty",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).EncryptionKeyVaultProperty, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.KeyVaultPropertiesTypeConverter.ConvertFrom)); + } + if (content.Contains("EncryptionRequireInfrastructureEncryption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).EncryptionRequireInfrastructureEncryption = (bool?) content.GetValueForProperty("EncryptionRequireInfrastructureEncryption",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).EncryptionRequireInfrastructureEncryption, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("GeoDataReplicationMaxReplicationLagDurationInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).GeoDataReplicationMaxReplicationLagDurationInSecond = (int?) content.GetValueForProperty("GeoDataReplicationMaxReplicationLagDurationInSecond",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).GeoDataReplicationMaxReplicationLagDurationInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("GeoDataReplicationLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).GeoDataReplicationLocation = (System.Collections.Generic.List) content.GetValueForProperty("GeoDataReplicationLocation",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).GeoDataReplicationLocation, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NamespaceReplicaLocationTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal EhNamespaceProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Encryption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).Encryption = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEncryption) content.GetValueForProperty("Encryption",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).Encryption, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.EncryptionTypeConverter.ConvertFrom); + } + if (content.Contains("GeoDataReplication")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).GeoDataReplication = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IGeoDataReplicationProperties) content.GetValueForProperty("GeoDataReplication",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).GeoDataReplication, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.GeoDataReplicationPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("MinimumTlsVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).MinimumTlsVersion = (string) content.GetValueForProperty("MinimumTlsVersion",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).MinimumTlsVersion, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("CreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("UpdatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ServiceBusEndpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).ServiceBusEndpoint = (string) content.GetValueForProperty("ServiceBusEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).ServiceBusEndpoint, global::System.Convert.ToString); + } + if (content.Contains("ClusterArmId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).ClusterArmId = (string) content.GetValueForProperty("ClusterArmId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).ClusterArmId, global::System.Convert.ToString); + } + if (content.Contains("MetricId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).MetricId = (string) content.GetValueForProperty("MetricId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).MetricId, global::System.Convert.ToString); + } + if (content.Contains("IsAutoInflateEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).IsAutoInflateEnabled = (bool?) content.GetValueForProperty("IsAutoInflateEnabled",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).IsAutoInflateEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PublicNetworkAccess")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).PublicNetworkAccess = (string) content.GetValueForProperty("PublicNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).PublicNetworkAccess, global::System.Convert.ToString); + } + if (content.Contains("MaximumThroughputUnit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).MaximumThroughputUnit = (int?) content.GetValueForProperty("MaximumThroughputUnit",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).MaximumThroughputUnit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("KafkaEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).KafkaEnabled = (bool?) content.GetValueForProperty("KafkaEnabled",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).KafkaEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ZoneRedundant")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).ZoneRedundant = (bool?) content.GetValueForProperty("ZoneRedundant",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).ZoneRedundant, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PrivateEndpointConnection")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).PrivateEndpointConnection = (System.Collections.Generic.List) content.GetValueForProperty("PrivateEndpointConnection",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).PrivateEndpointConnection, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.PrivateEndpointConnectionTypeConverter.ConvertFrom)); + } + if (content.Contains("DisableLocalAuth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).DisableLocalAuth = (bool?) content.GetValueForProperty("DisableLocalAuth",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).DisableLocalAuth, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AlternateName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).AlternateName = (string) content.GetValueForProperty("AlternateName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).AlternateName, global::System.Convert.ToString); + } + if (content.Contains("EncryptionKeySource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).EncryptionKeySource = (string) content.GetValueForProperty("EncryptionKeySource",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).EncryptionKeySource, global::System.Convert.ToString); + } + if (content.Contains("EncryptionKeyVaultProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).EncryptionKeyVaultProperty = (System.Collections.Generic.List) content.GetValueForProperty("EncryptionKeyVaultProperty",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).EncryptionKeyVaultProperty, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.KeyVaultPropertiesTypeConverter.ConvertFrom)); + } + if (content.Contains("EncryptionRequireInfrastructureEncryption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).EncryptionRequireInfrastructureEncryption = (bool?) content.GetValueForProperty("EncryptionRequireInfrastructureEncryption",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).EncryptionRequireInfrastructureEncryption, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("GeoDataReplicationMaxReplicationLagDurationInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).GeoDataReplicationMaxReplicationLagDurationInSecond = (int?) content.GetValueForProperty("GeoDataReplicationMaxReplicationLagDurationInSecond",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).GeoDataReplicationMaxReplicationLagDurationInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("GeoDataReplicationLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).GeoDataReplicationLocation = (System.Collections.Generic.List) content.GetValueForProperty("GeoDataReplicationLocation",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal)this).GeoDataReplicationLocation, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NamespaceReplicaLocationTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Namespace properties supplied for create namespace operation. + [System.ComponentModel.TypeConverter(typeof(EhNamespacePropertiesTypeConverter))] + public partial interface IEhNamespaceProperties + + { + + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespaceProperties.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespaceProperties.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespaceProperties.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespaceProperties.TypeConverter.cs index a7f1c3046819..a4739e381dfa 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespaceProperties.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespaceProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespaceProperties.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespaceProperties.cs similarity index 73% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespaceProperties.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespaceProperties.cs index de1d1fc4f104..d02e4c930b91 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespaceProperties.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespaceProperties.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// Namespace properties supplied for create namespace operation. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class EhNamespaceProperties : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceProperties, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceProperties, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal { /// Backing field for property. @@ -43,34 +43,34 @@ public partial class EhNamespaceProperties : public bool? DisableLocalAuth { get => this._disableLocalAuth; set => this._disableLocalAuth = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEncryption _encryption; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEncryption _encryption; /// Properties of BYOK Encryption description [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEncryption Encryption { get => (this._encryption = this._encryption ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.Encryption()); set => this._encryption = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEncryption Encryption { get => (this._encryption = this._encryption ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Encryption()); set => this._encryption = value; } /// Enumerates the possible value of keySource for Encryption [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeySource? EncryptionKeySource { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEncryptionInternal)Encryption).KeySource; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEncryptionInternal)Encryption).KeySource = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeySource)""); } + public string EncryptionKeySource { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEncryptionInternal)Encryption).KeySource; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEncryptionInternal)Encryption).KeySource = value ?? null; } /// Properties of KeyVault [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultProperties[] EncryptionKeyVaultProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEncryptionInternal)Encryption).KeyVaultProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEncryptionInternal)Encryption).KeyVaultProperty = value ?? null /* arrayOf */; } + public System.Collections.Generic.List EncryptionKeyVaultProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEncryptionInternal)Encryption).KeyVaultProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEncryptionInternal)Encryption).KeyVaultProperty = value ?? null /* arrayOf */; } /// Enable Infrastructure Encryption (Double Encryption) [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public bool? EncryptionRequireInfrastructureEncryption { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEncryptionInternal)Encryption).RequireInfrastructureEncryption; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEncryptionInternal)Encryption).RequireInfrastructureEncryption = value ?? default(bool); } + public bool? EncryptionRequireInfrastructureEncryption { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEncryptionInternal)Encryption).RequireInfrastructureEncryption; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEncryptionInternal)Encryption).RequireInfrastructureEncryption = value ?? default(bool); } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IGeoDataReplicationProperties _geoDataReplication; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IGeoDataReplicationProperties _geoDataReplication; /// Geo Data Replication settings for the namespace [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IGeoDataReplicationProperties GeoDataReplication { get => (this._geoDataReplication = this._geoDataReplication ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.GeoDataReplicationProperties()); set => this._geoDataReplication = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IGeoDataReplicationProperties GeoDataReplication { get => (this._geoDataReplication = this._geoDataReplication ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.GeoDataReplicationProperties()); set => this._geoDataReplication = value; } /// A list of regions where replicas of the namespace are maintained. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INamespaceReplicaLocation[] GeoDataReplicationLocation { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IGeoDataReplicationPropertiesInternal)GeoDataReplication).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IGeoDataReplicationPropertiesInternal)GeoDataReplication).Location = value ?? null /* arrayOf */; } + public System.Collections.Generic.List GeoDataReplicationLocation { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IGeoDataReplicationPropertiesInternal)GeoDataReplication).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IGeoDataReplicationPropertiesInternal)GeoDataReplication).Location = value ?? null /* arrayOf */; } /// /// The maximum acceptable lag for data replication operations from the primary replica to a quorum of secondary replicas. @@ -78,7 +78,7 @@ public partial class EhNamespaceProperties : /// and 5 minutes to 1 day. /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public int? GeoDataReplicationMaxReplicationLagDurationInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IGeoDataReplicationPropertiesInternal)GeoDataReplication).MaxReplicationLagDurationInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IGeoDataReplicationPropertiesInternal)GeoDataReplication).MaxReplicationLagDurationInSecond = value ?? default(int); } + public int? GeoDataReplicationMaxReplicationLagDurationInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IGeoDataReplicationPropertiesInternal)GeoDataReplication).MaxReplicationLagDurationInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IGeoDataReplicationPropertiesInternal)GeoDataReplication).MaxReplicationLagDurationInSecond = value ?? default(int); } /// Backing field for property. private bool? _isAutoInflateEnabled; @@ -112,42 +112,42 @@ public partial class EhNamespaceProperties : public string MetricId { get => this._metricId; } /// Internal Acessors for CreatedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal.CreatedAt { get => this._createdAt; set { {_createdAt = value;} } } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal.CreatedAt { get => this._createdAt; set { {_createdAt = value;} } } /// Internal Acessors for Encryption - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEncryption Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal.Encryption { get => (this._encryption = this._encryption ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.Encryption()); set { {_encryption = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEncryption Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal.Encryption { get => (this._encryption = this._encryption ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Encryption()); set { {_encryption = value;} } } /// Internal Acessors for GeoDataReplication - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IGeoDataReplicationProperties Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal.GeoDataReplication { get => (this._geoDataReplication = this._geoDataReplication ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.GeoDataReplicationProperties()); set { {_geoDataReplication = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IGeoDataReplicationProperties Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal.GeoDataReplication { get => (this._geoDataReplication = this._geoDataReplication ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.GeoDataReplicationProperties()); set { {_geoDataReplication = value;} } } /// Internal Acessors for MetricId - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal.MetricId { get => this._metricId; set { {_metricId = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal.MetricId { get => this._metricId; set { {_metricId = value;} } } /// Internal Acessors for ProvisioningState - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } /// Internal Acessors for ServiceBusEndpoint - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal.ServiceBusEndpoint { get => this._serviceBusEndpoint; set { {_serviceBusEndpoint = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal.ServiceBusEndpoint { get => this._serviceBusEndpoint; set { {_serviceBusEndpoint = value;} } } /// Internal Acessors for Status - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal.Status { get => this._status; set { {_status = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal.Status { get => this._status; set { {_status = value;} } } /// Internal Acessors for UpdatedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespacePropertiesInternal.UpdatedAt { get => this._updatedAt; set { {_updatedAt = value;} } } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespacePropertiesInternal.UpdatedAt { get => this._updatedAt; set { {_updatedAt = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.TlsVersion? _minimumTlsVersion; + private string _minimumTlsVersion; /// The minimum TLS version for the cluster to support, e.g. '1.2' [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.TlsVersion? MinimumTlsVersion { get => this._minimumTlsVersion; set => this._minimumTlsVersion = value; } + public string MinimumTlsVersion { get => this._minimumTlsVersion; set => this._minimumTlsVersion = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection[] _privateEndpointConnection; + private System.Collections.Generic.List _privateEndpointConnection; /// List of private endpoint connections. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection[] PrivateEndpointConnection { get => this._privateEndpointConnection; set => this._privateEndpointConnection = value; } + public System.Collections.Generic.List PrivateEndpointConnection { get => this._privateEndpointConnection; set => this._privateEndpointConnection = value; } /// Backing field for property. private string _provisioningState; @@ -157,13 +157,13 @@ public partial class EhNamespaceProperties : public string ProvisioningState { get => this._provisioningState; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess? _publicNetworkAccess; + private string _publicNetworkAccess; /// /// This determines if traffic is allowed over public network. By default it is enabled. /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess? PublicNetworkAccess { get => this._publicNetworkAccess; set => this._publicNetworkAccess = value; } + public string PublicNetworkAccess { get => this._publicNetworkAccess; set => this._publicNetworkAccess = value; } /// Backing field for property. private string _serviceBusEndpoint; @@ -209,6 +209,9 @@ public partial interface IEhNamespaceProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Alternate name specified when alias and namespace names are same.", SerializedName = @"alternateName", PossibleTypes = new [] { typeof(string) })] @@ -217,6 +220,9 @@ public partial interface IEhNamespaceProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Cluster ARM ID of the Namespace.", SerializedName = @"clusterArmId", PossibleTypes = new [] { typeof(string) })] @@ -225,6 +231,9 @@ public partial interface IEhNamespaceProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The time the Namespace was created.", SerializedName = @"createdAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -233,6 +242,9 @@ public partial interface IEhNamespaceProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"This property disables SAS authentication for the Event Hubs namespace.", SerializedName = @"disableLocalAuth", PossibleTypes = new [] { typeof(bool) })] @@ -241,22 +253,32 @@ public partial interface IEhNamespaceProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Enumerates the possible value of keySource for Encryption", SerializedName = @"keySource", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeySource) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeySource? EncryptionKeySource { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Microsoft.KeyVault")] + string EncryptionKeySource { get; set; } /// Properties of KeyVault [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Properties of KeyVault", SerializedName = @"keyVaultProperties", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultProperties) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultProperties[] EncryptionKeyVaultProperty { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultProperties) })] + System.Collections.Generic.List EncryptionKeyVaultProperty { get; set; } /// Enable Infrastructure Encryption (Double Encryption) [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Enable Infrastructure Encryption (Double Encryption)", SerializedName = @"requireInfrastructureEncryption", PossibleTypes = new [] { typeof(bool) })] @@ -265,10 +287,13 @@ public partial interface IEhNamespaceProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"A list of regions where replicas of the namespace are maintained.", SerializedName = @"locations", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INamespaceReplicaLocation) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INamespaceReplicaLocation[] GeoDataReplicationLocation { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INamespaceReplicaLocation) })] + System.Collections.Generic.List GeoDataReplicationLocation { get; set; } /// /// The maximum acceptable lag for data replication operations from the primary replica to a quorum of secondary replicas. /// When the lag exceeds the configured amount, operations on the primary replica will be failed. The allowed values are 0 @@ -277,6 +302,9 @@ public partial interface IEhNamespaceProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The maximum acceptable lag for data replication operations from the primary replica to a quorum of secondary replicas. When the lag exceeds the configured amount, operations on the primary replica will be failed. The allowed values are 0 and 5 minutes to 1 day.", SerializedName = @"maxReplicationLagDurationInSeconds", PossibleTypes = new [] { typeof(int) })] @@ -285,6 +313,9 @@ public partial interface IEhNamespaceProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Value that indicates whether AutoInflate is enabled for eventhub namespace.", SerializedName = @"isAutoInflateEnabled", PossibleTypes = new [] { typeof(bool) })] @@ -293,6 +324,9 @@ public partial interface IEhNamespaceProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Value that indicates whether Kafka is enabled for eventhub namespace.", SerializedName = @"kafkaEnabled", PossibleTypes = new [] { typeof(bool) })] @@ -304,6 +338,9 @@ public partial interface IEhNamespaceProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Upper limit of throughput units when AutoInflate is enabled, value should be within 0 to 20 throughput units. ( '0' if AutoInflateEnabled = true)", SerializedName = @"maximumThroughputUnits", PossibleTypes = new [] { typeof(int) })] @@ -312,6 +349,9 @@ public partial interface IEhNamespaceProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Identifier for Azure Insights metrics.", SerializedName = @"metricId", PossibleTypes = new [] { typeof(string) })] @@ -320,22 +360,32 @@ public partial interface IEhNamespaceProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The minimum TLS version for the cluster to support, e.g. '1.2'", SerializedName = @"minimumTlsVersion", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.TlsVersion) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.TlsVersion? MinimumTlsVersion { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("1.0", "1.1", "1.2")] + string MinimumTlsVersion { get; set; } /// List of private endpoint connections. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"List of private endpoint connections.", SerializedName = @"privateEndpointConnections", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection[] PrivateEndpointConnection { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection) })] + System.Collections.Generic.List PrivateEndpointConnection { get; set; } /// Provisioning state of the Namespace. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Provisioning state of the Namespace.", SerializedName = @"provisioningState", PossibleTypes = new [] { typeof(string) })] @@ -346,14 +396,21 @@ public partial interface IEhNamespaceProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"This determines if traffic is allowed over public network. By default it is enabled.", SerializedName = @"publicNetworkAccess", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess? PublicNetworkAccess { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Enabled", "Disabled", "SecuredByPerimeter")] + string PublicNetworkAccess { get; set; } /// Endpoint you can use to perform Service Bus operations. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Endpoint you can use to perform Service Bus operations.", SerializedName = @"serviceBusEndpoint", PossibleTypes = new [] { typeof(string) })] @@ -362,6 +419,9 @@ public partial interface IEhNamespaceProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Status of the Namespace.", SerializedName = @"status", PossibleTypes = new [] { typeof(string) })] @@ -370,6 +430,9 @@ public partial interface IEhNamespaceProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The time the Namespace was updated.", SerializedName = @"updatedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -380,6 +443,9 @@ public partial interface IEhNamespaceProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Enabling this property creates a Standard Event Hubs Namespace in regions supported availability zones.", SerializedName = @"zoneRedundant", PossibleTypes = new [] { typeof(bool) })] @@ -399,17 +465,18 @@ internal partial interface IEhNamespacePropertiesInternal /// This property disables SAS authentication for the Event Hubs namespace. bool? DisableLocalAuth { get; set; } /// Properties of BYOK Encryption description - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEncryption Encryption { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEncryption Encryption { get; set; } /// Enumerates the possible value of keySource for Encryption - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeySource? EncryptionKeySource { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Microsoft.KeyVault")] + string EncryptionKeySource { get; set; } /// Properties of KeyVault - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultProperties[] EncryptionKeyVaultProperty { get; set; } + System.Collections.Generic.List EncryptionKeyVaultProperty { get; set; } /// Enable Infrastructure Encryption (Double Encryption) bool? EncryptionRequireInfrastructureEncryption { get; set; } /// Geo Data Replication settings for the namespace - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IGeoDataReplicationProperties GeoDataReplication { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IGeoDataReplicationProperties GeoDataReplication { get; set; } /// A list of regions where replicas of the namespace are maintained. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INamespaceReplicaLocation[] GeoDataReplicationLocation { get; set; } + System.Collections.Generic.List GeoDataReplicationLocation { get; set; } /// /// The maximum acceptable lag for data replication operations from the primary replica to a quorum of secondary replicas. /// When the lag exceeds the configured amount, operations on the primary replica will be failed. The allowed values are 0 @@ -428,15 +495,17 @@ internal partial interface IEhNamespacePropertiesInternal /// Identifier for Azure Insights metrics. string MetricId { get; set; } /// The minimum TLS version for the cluster to support, e.g. '1.2' - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.TlsVersion? MinimumTlsVersion { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("1.0", "1.1", "1.2")] + string MinimumTlsVersion { get; set; } /// List of private endpoint connections. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection[] PrivateEndpointConnection { get; set; } + System.Collections.Generic.List PrivateEndpointConnection { get; set; } /// Provisioning state of the Namespace. string ProvisioningState { get; set; } /// /// This determines if traffic is allowed over public network. By default it is enabled. /// - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess? PublicNetworkAccess { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Enabled", "Disabled", "SecuredByPerimeter")] + string PublicNetworkAccess { get; set; } /// Endpoint you can use to perform Service Bus operations. string ServiceBusEndpoint { get; set; } /// Status of the Namespace. diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespaceProperties.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespaceProperties.json.cs similarity index 88% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespaceProperties.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespaceProperties.json.cs index 3516c9ef6433..88e8bee19a50 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EhNamespaceProperties.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/EhNamespaceProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -65,35 +65,35 @@ internal EhNamespaceProperties(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runti { return; } - {_encryption = If( json?.PropertyT("encryption"), out var __jsonEncryption) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.Encryption.FromJson(__jsonEncryption) : Encryption;} - {_geoDataReplication = If( json?.PropertyT("geoDataReplication"), out var __jsonGeoDataReplication) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.GeoDataReplicationProperties.FromJson(__jsonGeoDataReplication) : GeoDataReplication;} - {_minimumTlsVersion = If( json?.PropertyT("minimumTlsVersion"), out var __jsonMinimumTlsVersion) ? (string)__jsonMinimumTlsVersion : (string)MinimumTlsVersion;} - {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} - {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} - {_createdAt = If( json?.PropertyT("createdAt"), out var __jsonCreatedAt) ? global::System.DateTime.TryParse((string)__jsonCreatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedAtValue) ? __jsonCreatedAtValue : CreatedAt : CreatedAt;} - {_updatedAt = If( json?.PropertyT("updatedAt"), out var __jsonUpdatedAt) ? global::System.DateTime.TryParse((string)__jsonUpdatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonUpdatedAtValue) ? __jsonUpdatedAtValue : UpdatedAt : UpdatedAt;} - {_serviceBusEndpoint = If( json?.PropertyT("serviceBusEndpoint"), out var __jsonServiceBusEndpoint) ? (string)__jsonServiceBusEndpoint : (string)ServiceBusEndpoint;} - {_clusterArmId = If( json?.PropertyT("clusterArmId"), out var __jsonClusterArmId) ? (string)__jsonClusterArmId : (string)ClusterArmId;} - {_metricId = If( json?.PropertyT("metricId"), out var __jsonMetricId) ? (string)__jsonMetricId : (string)MetricId;} - {_isAutoInflateEnabled = If( json?.PropertyT("isAutoInflateEnabled"), out var __jsonIsAutoInflateEnabled) ? (bool?)__jsonIsAutoInflateEnabled : IsAutoInflateEnabled;} - {_publicNetworkAccess = If( json?.PropertyT("publicNetworkAccess"), out var __jsonPublicNetworkAccess) ? (string)__jsonPublicNetworkAccess : (string)PublicNetworkAccess;} - {_maximumThroughputUnit = If( json?.PropertyT("maximumThroughputUnits"), out var __jsonMaximumThroughputUnits) ? (int?)__jsonMaximumThroughputUnits : MaximumThroughputUnit;} - {_kafkaEnabled = If( json?.PropertyT("kafkaEnabled"), out var __jsonKafkaEnabled) ? (bool?)__jsonKafkaEnabled : KafkaEnabled;} - {_zoneRedundant = If( json?.PropertyT("zoneRedundant"), out var __jsonZoneRedundant) ? (bool?)__jsonZoneRedundant : ZoneRedundant;} - {_privateEndpointConnection = If( json?.PropertyT("privateEndpointConnections"), out var __jsonPrivateEndpointConnections) ? If( __jsonPrivateEndpointConnections as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.PrivateEndpointConnection.FromJson(__u) )) ))() : null : PrivateEndpointConnection;} - {_disableLocalAuth = If( json?.PropertyT("disableLocalAuth"), out var __jsonDisableLocalAuth) ? (bool?)__jsonDisableLocalAuth : DisableLocalAuth;} - {_alternateName = If( json?.PropertyT("alternateName"), out var __jsonAlternateName) ? (string)__jsonAlternateName : (string)AlternateName;} + {_encryption = If( json?.PropertyT("encryption"), out var __jsonEncryption) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Encryption.FromJson(__jsonEncryption) : _encryption;} + {_geoDataReplication = If( json?.PropertyT("geoDataReplication"), out var __jsonGeoDataReplication) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.GeoDataReplicationProperties.FromJson(__jsonGeoDataReplication) : _geoDataReplication;} + {_minimumTlsVersion = If( json?.PropertyT("minimumTlsVersion"), out var __jsonMinimumTlsVersion) ? (string)__jsonMinimumTlsVersion : (string)_minimumTlsVersion;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)_status;} + {_createdAt = If( json?.PropertyT("createdAt"), out var __jsonCreatedAt) ? global::System.DateTime.TryParse((string)__jsonCreatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedAtValue) ? __jsonCreatedAtValue : _createdAt : _createdAt;} + {_updatedAt = If( json?.PropertyT("updatedAt"), out var __jsonUpdatedAt) ? global::System.DateTime.TryParse((string)__jsonUpdatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonUpdatedAtValue) ? __jsonUpdatedAtValue : _updatedAt : _updatedAt;} + {_serviceBusEndpoint = If( json?.PropertyT("serviceBusEndpoint"), out var __jsonServiceBusEndpoint) ? (string)__jsonServiceBusEndpoint : (string)_serviceBusEndpoint;} + {_clusterArmId = If( json?.PropertyT("clusterArmId"), out var __jsonClusterArmId) ? (string)__jsonClusterArmId : (string)_clusterArmId;} + {_metricId = If( json?.PropertyT("metricId"), out var __jsonMetricId) ? (string)__jsonMetricId : (string)_metricId;} + {_isAutoInflateEnabled = If( json?.PropertyT("isAutoInflateEnabled"), out var __jsonIsAutoInflateEnabled) ? (bool?)__jsonIsAutoInflateEnabled : _isAutoInflateEnabled;} + {_publicNetworkAccess = If( json?.PropertyT("publicNetworkAccess"), out var __jsonPublicNetworkAccess) ? (string)__jsonPublicNetworkAccess : (string)_publicNetworkAccess;} + {_maximumThroughputUnit = If( json?.PropertyT("maximumThroughputUnits"), out var __jsonMaximumThroughputUnits) ? (int?)__jsonMaximumThroughputUnits : _maximumThroughputUnit;} + {_kafkaEnabled = If( json?.PropertyT("kafkaEnabled"), out var __jsonKafkaEnabled) ? (bool?)__jsonKafkaEnabled : _kafkaEnabled;} + {_zoneRedundant = If( json?.PropertyT("zoneRedundant"), out var __jsonZoneRedundant) ? (bool?)__jsonZoneRedundant : _zoneRedundant;} + {_privateEndpointConnection = If( json?.PropertyT("privateEndpointConnections"), out var __jsonPrivateEndpointConnections) ? If( __jsonPrivateEndpointConnections as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.PrivateEndpointConnection.FromJson(__u) )) ))() : null : _privateEndpointConnection;} + {_disableLocalAuth = If( json?.PropertyT("disableLocalAuth"), out var __jsonDisableLocalAuth) ? (bool?)__jsonDisableLocalAuth : _disableLocalAuth;} + {_alternateName = If( json?.PropertyT("alternateName"), out var __jsonAlternateName) ? (string)__jsonAlternateName : (string)_alternateName;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new EhNamespaceProperties(json) : null; } @@ -120,28 +120,28 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode ToJson( AddIf( null != this._encryption ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) this._encryption.ToJson(null,serializationMode) : null, "encryption" ,container.Add ); AddIf( null != this._geoDataReplication ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) this._geoDataReplication.ToJson(null,serializationMode) : null, "geoDataReplication" ,container.Add ); AddIf( null != (((object)this._minimumTlsVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._minimumTlsVersion.ToString()) : null, "minimumTlsVersion" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._createdAt ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._createdAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "createdAt" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._updatedAt ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._updatedAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "updatedAt" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._serviceBusEndpoint)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._serviceBusEndpoint.ToString()) : null, "serviceBusEndpoint" ,container.Add ); } AddIf( null != (((object)this._clusterArmId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._clusterArmId.ToString()) : null, "clusterArmId" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._metricId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._metricId.ToString()) : null, "metricId" ,container.Add ); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Encryption.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/Encryption.PowerShell.cs similarity index 71% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Encryption.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/Encryption.PowerShell.cs index 1b5cd608d808..d521244315ca 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Encryption.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/Encryption.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,33 +63,33 @@ public partial class Encryption partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEncryption DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEncryption DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new Encryption(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEncryption DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEncryption DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new Encryption(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -104,21 +104,21 @@ internal Encryption(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("KeyVaultProperty")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEncryptionInternal)this).KeyVaultProperty = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultProperties[]) content.GetValueForProperty("KeyVaultProperty",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEncryptionInternal)this).KeyVaultProperty, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.KeyVaultPropertiesTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEncryptionInternal)this).KeyVaultProperty = (System.Collections.Generic.List) content.GetValueForProperty("KeyVaultProperty",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEncryptionInternal)this).KeyVaultProperty, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.KeyVaultPropertiesTypeConverter.ConvertFrom)); } if (content.Contains("KeySource")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEncryptionInternal)this).KeySource = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeySource?) content.GetValueForProperty("KeySource",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEncryptionInternal)this).KeySource, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeySource.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEncryptionInternal)this).KeySource = (string) content.GetValueForProperty("KeySource",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEncryptionInternal)this).KeySource, global::System.Convert.ToString); } if (content.Contains("RequireInfrastructureEncryption")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEncryptionInternal)this).RequireInfrastructureEncryption = (bool?) content.GetValueForProperty("RequireInfrastructureEncryption",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEncryptionInternal)this).RequireInfrastructureEncryption, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEncryptionInternal)this).RequireInfrastructureEncryption = (bool?) content.GetValueForProperty("RequireInfrastructureEncryption",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEncryptionInternal)this).RequireInfrastructureEncryption, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -133,15 +133,15 @@ internal Encryption(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("KeyVaultProperty")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEncryptionInternal)this).KeyVaultProperty = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultProperties[]) content.GetValueForProperty("KeyVaultProperty",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEncryptionInternal)this).KeyVaultProperty, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.KeyVaultPropertiesTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEncryptionInternal)this).KeyVaultProperty = (System.Collections.Generic.List) content.GetValueForProperty("KeyVaultProperty",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEncryptionInternal)this).KeyVaultProperty, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.KeyVaultPropertiesTypeConverter.ConvertFrom)); } if (content.Contains("KeySource")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEncryptionInternal)this).KeySource = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeySource?) content.GetValueForProperty("KeySource",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEncryptionInternal)this).KeySource, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeySource.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEncryptionInternal)this).KeySource = (string) content.GetValueForProperty("KeySource",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEncryptionInternal)this).KeySource, global::System.Convert.ToString); } if (content.Contains("RequireInfrastructureEncryption")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEncryptionInternal)this).RequireInfrastructureEncryption = (bool?) content.GetValueForProperty("RequireInfrastructureEncryption",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEncryptionInternal)this).RequireInfrastructureEncryption, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEncryptionInternal)this).RequireInfrastructureEncryption = (bool?) content.GetValueForProperty("RequireInfrastructureEncryption",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEncryptionInternal)this).RequireInfrastructureEncryption, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } AfterDeserializePSObject(content); } @@ -151,7 +151,7 @@ internal Encryption(global::System.Management.Automation.PSObject content) /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEncryption FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEncryption FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Encryption.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/Encryption.TypeConverter.cs similarity index 97% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Encryption.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/Encryption.TypeConverter.cs index 610a1574e674..d75228ee3590 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Encryption.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/Encryption.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEncryption ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEncryption ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEncryption).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEncryption).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Encryption.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/Encryption.cs similarity index 68% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Encryption.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/Encryption.cs index ffff21bc8659..c05a3ec27ca9 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Encryption.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/Encryption.cs @@ -3,30 +3,30 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// Properties to configure Encryption [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class Encryption : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEncryption, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEncryptionInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEncryption, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEncryptionInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeySource? _keySource; + private string _keySource; /// Enumerates the possible value of keySource for Encryption [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeySource? KeySource { get => this._keySource; set => this._keySource = value; } + public string KeySource { get => this._keySource; set => this._keySource = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultProperties[] _keyVaultProperty; + private System.Collections.Generic.List _keyVaultProperty; /// Properties of KeyVault [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultProperties[] KeyVaultProperty { get => this._keyVaultProperty; set => this._keyVaultProperty = value; } + public System.Collections.Generic.List KeyVaultProperty { get => this._keyVaultProperty; set => this._keyVaultProperty = value; } /// Backing field for property. private bool? _requireInfrastructureEncryption; @@ -49,22 +49,32 @@ public partial interface IEncryption : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Enumerates the possible value of keySource for Encryption", SerializedName = @"keySource", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeySource) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeySource? KeySource { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Microsoft.KeyVault")] + string KeySource { get; set; } /// Properties of KeyVault [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Properties of KeyVault", SerializedName = @"keyVaultProperties", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultProperties) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultProperties[] KeyVaultProperty { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultProperties) })] + System.Collections.Generic.List KeyVaultProperty { get; set; } /// Enable Infrastructure Encryption (Double Encryption) [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Enable Infrastructure Encryption (Double Encryption)", SerializedName = @"requireInfrastructureEncryption", PossibleTypes = new [] { typeof(bool) })] @@ -76,9 +86,10 @@ internal partial interface IEncryptionInternal { /// Enumerates the possible value of keySource for Encryption - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeySource? KeySource { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Microsoft.KeyVault")] + string KeySource { get; set; } /// Properties of KeyVault - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultProperties[] KeyVaultProperty { get; set; } + System.Collections.Generic.List KeyVaultProperty { get; set; } /// Enable Infrastructure Encryption (Double Encryption) bool? RequireInfrastructureEncryption { get; set; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Encryption.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/Encryption.json.cs similarity index 88% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Encryption.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/Encryption.json.cs index 9a669f7fa636..ad64e105e76c 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Encryption.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/Encryption.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -65,20 +65,18 @@ internal Encryption(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.Jso { return; } - {_keyVaultProperty = If( json?.PropertyT("keyVaultProperties"), out var __jsonKeyVaultProperties) ? If( __jsonKeyVaultProperties as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultProperties) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.KeyVaultProperties.FromJson(__u) )) ))() : null : KeyVaultProperty;} - {_keySource = If( json?.PropertyT("keySource"), out var __jsonKeySource) ? (string)__jsonKeySource : (string)KeySource;} - {_requireInfrastructureEncryption = If( json?.PropertyT("requireInfrastructureEncryption"), out var __jsonRequireInfrastructureEncryption) ? (bool?)__jsonRequireInfrastructureEncryption : RequireInfrastructureEncryption;} + {_keyVaultProperty = If( json?.PropertyT("keyVaultProperties"), out var __jsonKeyVaultProperties) ? If( __jsonKeyVaultProperties as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultProperties) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.KeyVaultProperties.FromJson(__u) )) ))() : null : _keyVaultProperty;} + {_keySource = If( json?.PropertyT("keySource"), out var __jsonKeySource) ? (string)__jsonKeySource : (string)_keySource;} + {_requireInfrastructureEncryption = If( json?.PropertyT("requireInfrastructureEncryption"), out var __jsonRequireInfrastructureEncryption) ? (bool?)__jsonRequireInfrastructureEncryption : _requireInfrastructureEncryption;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEncryption. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEncryption. /// /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEncryption. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEncryption FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEncryption. + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEncryption FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new Encryption(json) : null; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorAdditionalInfo.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ErrorAdditionalInfo.PowerShell.cs similarity index 80% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorAdditionalInfo.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ErrorAdditionalInfo.PowerShell.cs index 28bd6ff9caf3..dcb14d0b4a8c 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorAdditionalInfo.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ErrorAdditionalInfo.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,33 +63,33 @@ public partial class ErrorAdditionalInfo partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorAdditionalInfo DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorAdditionalInfo DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ErrorAdditionalInfo(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorAdditionalInfo DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorAdditionalInfo DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ErrorAdditionalInfo(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -104,17 +104,17 @@ internal ErrorAdditionalInfo(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorAdditionalInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorAdditionalInfoInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorAdditionalInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorAdditionalInfoInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Info")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorAdditionalInfoInternal)this).Info = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAny) content.GetValueForProperty("Info",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorAdditionalInfoInternal)this).Info, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.AnyTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorAdditionalInfoInternal)this).Info = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAny) content.GetValueForProperty("Info",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorAdditionalInfoInternal)this).Info, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.AnyTypeConverter.ConvertFrom); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -129,11 +129,11 @@ internal ErrorAdditionalInfo(global::System.Management.Automation.PSObject conte // actually deserialize if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorAdditionalInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorAdditionalInfoInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorAdditionalInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorAdditionalInfoInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Info")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorAdditionalInfoInternal)this).Info = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAny) content.GetValueForProperty("Info",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorAdditionalInfoInternal)this).Info, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.AnyTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorAdditionalInfoInternal)this).Info = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAny) content.GetValueForProperty("Info",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorAdditionalInfoInternal)this).Info, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.AnyTypeConverter.ConvertFrom); } AfterDeserializePSObject(content); } @@ -143,7 +143,7 @@ internal ErrorAdditionalInfo(global::System.Management.Automation.PSObject conte /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorAdditionalInfo FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorAdditionalInfo FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorAdditionalInfo.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ErrorAdditionalInfo.TypeConverter.cs similarity index 97% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorAdditionalInfo.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ErrorAdditionalInfo.TypeConverter.cs index 71766282a37a..ef2ef3dc55f1 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorAdditionalInfo.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ErrorAdditionalInfo.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorAdditionalInfo ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorAdditionalInfo ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorAdditionalInfo).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorAdditionalInfo).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorAdditionalInfo.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ErrorAdditionalInfo.cs similarity index 82% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorAdditionalInfo.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ErrorAdditionalInfo.cs index 67099be0c25f..f2c178cf0013 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorAdditionalInfo.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ErrorAdditionalInfo.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// The resource management error additional info. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class ErrorAdditionalInfo : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorAdditionalInfo, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorAdditionalInfoInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorAdditionalInfo, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorAdditionalInfoInternal { /// Backing field for property. @@ -22,10 +22,10 @@ public partial class ErrorAdditionalInfo : public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAny Info { get => (this._info = this._info ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Any()); } /// Internal Acessors for Info - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAny Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorAdditionalInfoInternal.Info { get => (this._info = this._info ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Any()); set { {_info = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAny Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorAdditionalInfoInternal.Info { get => (this._info = this._info ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Any()); set { {_info = value;} } } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorAdditionalInfoInternal.Type { get => this._type; set { {_type = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorAdditionalInfoInternal.Type { get => this._type; set { {_type = value;} } } /// Backing field for property. private string _type; @@ -48,6 +48,9 @@ public partial interface IErrorAdditionalInfo : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The additional info.", SerializedName = @"info", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAny) })] @@ -56,6 +59,9 @@ public partial interface IErrorAdditionalInfo : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The additional info type.", SerializedName = @"type", PossibleTypes = new [] { typeof(string) })] diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorAdditionalInfo.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ErrorAdditionalInfo.json.cs similarity index 93% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorAdditionalInfo.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ErrorAdditionalInfo.json.cs index b9ae619a31a8..e355efe40666 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorAdditionalInfo.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ErrorAdditionalInfo.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -65,19 +65,19 @@ internal ErrorAdditionalInfo(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime { return; } - {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} - {_info = If( json?.PropertyT("info"), out var __jsonInfo) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Any.FromJson(__jsonInfo) : Info;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} + {_info = If( json?.PropertyT("info"), out var __jsonInfo) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Any.FromJson(__jsonInfo) : _info;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorAdditionalInfo. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorAdditionalInfo. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorAdditionalInfo. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorAdditionalInfo. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorAdditionalInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorAdditionalInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new ErrorAdditionalInfo(json) : null; } @@ -101,11 +101,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode ToJson( { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._info ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) this._info.ToJson(null,serializationMode) : null, "info" ,container.Add ); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorDetail.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ErrorDetail.PowerShell.cs similarity index 68% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorDetail.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ErrorDetail.PowerShell.cs index b9ebe27d2e6e..cf1970c972d1 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorDetail.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ErrorDetail.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,33 +63,33 @@ public partial class ErrorDetail partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetail DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetail DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ErrorDetail(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetail DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetail DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ErrorDetail(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -104,29 +104,29 @@ internal ErrorDetail(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorDetailTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorDetailTypeConverter.ConvertFrom)); } if (content.Contains("AdditionalInfo")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailInternal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -141,23 +141,23 @@ internal ErrorDetail(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorDetailTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorDetailTypeConverter.ConvertFrom)); } if (content.Contains("AdditionalInfo")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailInternal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } @@ -167,7 +167,7 @@ internal ErrorDetail(global::System.Management.Automation.PSObject content) /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetail FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetail FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorDetail.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ErrorDetail.TypeConverter.cs similarity index 97% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorDetail.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ErrorDetail.TypeConverter.cs index 0fd4271fddf1..7e73df4e3126 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorDetail.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ErrorDetail.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetail ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetail ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetail).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetail).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorDetail.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ErrorDetail.cs similarity index 66% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorDetail.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ErrorDetail.cs index 15385aa9f92c..006a002e5b1d 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorDetail.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ErrorDetail.cs @@ -3,23 +3,23 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// The error detail. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class ErrorDetail : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetail, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetail, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorAdditionalInfo[] _additionalInfo; + private System.Collections.Generic.List _additionalInfo; /// The error additional info. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorAdditionalInfo[] AdditionalInfo { get => this._additionalInfo; } + public System.Collections.Generic.List AdditionalInfo { get => this._additionalInfo; } /// Backing field for property. private string _code; @@ -29,11 +29,11 @@ public partial class ErrorDetail : public string Code { get => this._code; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetail[] _detail; + private System.Collections.Generic.List _detail; /// The error details. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetail[] Detail { get => this._detail; } + public System.Collections.Generic.List Detail { get => this._detail; } /// Backing field for property. private string _message; @@ -43,19 +43,19 @@ public partial class ErrorDetail : public string Message { get => this._message; } /// Internal Acessors for AdditionalInfo - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailInternal.AdditionalInfo { get => this._additionalInfo; set { {_additionalInfo = value;} } } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailInternal.AdditionalInfo { get => this._additionalInfo; set { {_additionalInfo = value;} } } /// Internal Acessors for Code - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailInternal.Code { get => this._code; set { {_code = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailInternal.Code { get => this._code; set { {_code = value;} } } /// Internal Acessors for Detail - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetail[] Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailInternal.Detail { get => this._detail; set { {_detail = value;} } } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailInternal.Detail { get => this._detail; set { {_detail = value;} } } /// Internal Acessors for Message - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailInternal.Message { get => this._message; set { {_message = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailInternal.Message { get => this._message; set { {_message = value;} } } /// Internal Acessors for Target - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailInternal.Target { get => this._target; set { {_target = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailInternal.Target { get => this._target; set { {_target = value;} } } /// Backing field for property. private string _target; @@ -78,14 +78,20 @@ public partial interface IErrorDetail : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error additional info.", SerializedName = @"additionalInfo", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorAdditionalInfo) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorAdditionalInfo[] AdditionalInfo { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorAdditionalInfo) })] + System.Collections.Generic.List AdditionalInfo { get; } /// The error code. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error code.", SerializedName = @"code", PossibleTypes = new [] { typeof(string) })] @@ -94,14 +100,20 @@ public partial interface IErrorDetail : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error details.", SerializedName = @"details", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetail) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetail[] Detail { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetail) })] + System.Collections.Generic.List Detail { get; } /// The error message. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error message.", SerializedName = @"message", PossibleTypes = new [] { typeof(string) })] @@ -110,6 +122,9 @@ public partial interface IErrorDetail : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error target.", SerializedName = @"target", PossibleTypes = new [] { typeof(string) })] @@ -121,11 +136,11 @@ internal partial interface IErrorDetailInternal { /// The error additional info. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorAdditionalInfo[] AdditionalInfo { get; set; } + System.Collections.Generic.List AdditionalInfo { get; set; } /// The error code. string Code { get; set; } /// The error details. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetail[] Detail { get; set; } + System.Collections.Generic.List Detail { get; set; } /// The error message. string Message { get; set; } /// The error target. diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorDetail.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ErrorDetail.json.cs similarity index 84% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorDetail.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ErrorDetail.json.cs index 8c1ba98fd635..fc41941b32ba 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorDetail.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ErrorDetail.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -65,22 +65,20 @@ internal ErrorDetail(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.Js { return; } - {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)Code;} - {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;} - {_target = If( json?.PropertyT("target"), out var __jsonTarget) ? (string)__jsonTarget : (string)Target;} - {_detail = If( json?.PropertyT("details"), out var __jsonDetails) ? If( __jsonDetails as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetail) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorDetail.FromJson(__u) )) ))() : null : Detail;} - {_additionalInfo = If( json?.PropertyT("additionalInfo"), out var __jsonAdditionalInfo) ? If( __jsonAdditionalInfo as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorAdditionalInfo) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorAdditionalInfo.FromJson(__p) )) ))() : null : AdditionalInfo;} + {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)_code;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)_message;} + {_target = If( json?.PropertyT("target"), out var __jsonTarget) ? (string)__jsonTarget : (string)_target;} + {_detail = If( json?.PropertyT("details"), out var __jsonDetails) ? If( __jsonDetails as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetail) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorDetail.FromJson(__u) )) ))() : null : _detail;} + {_additionalInfo = If( json?.PropertyT("additionalInfo"), out var __jsonAdditionalInfo) ? If( __jsonAdditionalInfo as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __q) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorAdditionalInfo) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorAdditionalInfo.FromJson(__p) )) ))() : null : _additionalInfo;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetail. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetail. /// /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetail. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetail FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetail. + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetail FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new ErrorDetail(json) : null; } @@ -104,19 +102,19 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode ToJson( { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._code.ToString()) : null, "code" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._target)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._target.ToString()) : null, "target" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { if (null != this._detail) { @@ -128,7 +126,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode ToJson( container.Add("details",__w); } } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { if (null != this._additionalInfo) { diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorDetailAutoGenerated.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ErrorDetailAutoGenerated.PowerShell.cs similarity index 67% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorDetailAutoGenerated.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ErrorDetailAutoGenerated.PowerShell.cs index f963ac753437..641898f1a007 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorDetailAutoGenerated.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ErrorDetailAutoGenerated.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,33 +63,33 @@ public partial class ErrorDetailAutoGenerated partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGenerated DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGenerated DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ErrorDetailAutoGenerated(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGenerated DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGenerated DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ErrorDetailAutoGenerated(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -104,29 +104,29 @@ internal ErrorDetailAutoGenerated(global::System.Collections.IDictionary content // actually deserialize if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGeneratedInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGeneratedInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGeneratedInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGeneratedInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGeneratedInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGeneratedInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGeneratedInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGeneratedInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGeneratedInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGeneratedInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGeneratedInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGeneratedInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGeneratedInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGenerated[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGeneratedInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorDetailAutoGeneratedTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGeneratedInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGeneratedInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorDetailAutoGeneratedTypeConverter.ConvertFrom)); } if (content.Contains("AdditionalInfo")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGeneratedInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGeneratedInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGeneratedInternal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGeneratedInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -141,23 +141,23 @@ internal ErrorDetailAutoGenerated(global::System.Management.Automation.PSObject // actually deserialize if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGeneratedInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGeneratedInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGeneratedInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGeneratedInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGeneratedInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGeneratedInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGeneratedInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGeneratedInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGeneratedInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGeneratedInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGeneratedInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGeneratedInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGeneratedInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGenerated[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGeneratedInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorDetailAutoGeneratedTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGeneratedInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGeneratedInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorDetailAutoGeneratedTypeConverter.ConvertFrom)); } if (content.Contains("AdditionalInfo")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGeneratedInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGeneratedInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGeneratedInternal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGeneratedInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } @@ -167,7 +167,7 @@ internal ErrorDetailAutoGenerated(global::System.Management.Automation.PSObject /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGenerated FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGenerated FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorDetailAutoGenerated.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ErrorDetailAutoGenerated.TypeConverter.cs similarity index 97% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorDetailAutoGenerated.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ErrorDetailAutoGenerated.TypeConverter.cs index ebff1daba18b..389c881c492f 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorDetailAutoGenerated.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ErrorDetailAutoGenerated.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGenerated ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGenerated ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGenerated).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGenerated).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorDetailAutoGenerated.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ErrorDetailAutoGenerated.cs similarity index 65% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorDetailAutoGenerated.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ErrorDetailAutoGenerated.cs index 14da26bf8706..713b5ee670e8 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorDetailAutoGenerated.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ErrorDetailAutoGenerated.cs @@ -3,23 +3,23 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// The error detail. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class ErrorDetailAutoGenerated : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGenerated, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGeneratedInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGenerated, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGeneratedInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorAdditionalInfo[] _additionalInfo; + private System.Collections.Generic.List _additionalInfo; /// The error additional info. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorAdditionalInfo[] AdditionalInfo { get => this._additionalInfo; } + public System.Collections.Generic.List AdditionalInfo { get => this._additionalInfo; } /// Backing field for property. private string _code; @@ -29,11 +29,11 @@ public partial class ErrorDetailAutoGenerated : public string Code { get => this._code; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGenerated[] _detail; + private System.Collections.Generic.List _detail; /// The error details. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGenerated[] Detail { get => this._detail; } + public System.Collections.Generic.List Detail { get => this._detail; } /// Backing field for property. private string _message; @@ -43,19 +43,19 @@ public partial class ErrorDetailAutoGenerated : public string Message { get => this._message; } /// Internal Acessors for AdditionalInfo - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGeneratedInternal.AdditionalInfo { get => this._additionalInfo; set { {_additionalInfo = value;} } } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGeneratedInternal.AdditionalInfo { get => this._additionalInfo; set { {_additionalInfo = value;} } } /// Internal Acessors for Code - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGeneratedInternal.Code { get => this._code; set { {_code = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGeneratedInternal.Code { get => this._code; set { {_code = value;} } } /// Internal Acessors for Detail - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGenerated[] Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGeneratedInternal.Detail { get => this._detail; set { {_detail = value;} } } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGeneratedInternal.Detail { get => this._detail; set { {_detail = value;} } } /// Internal Acessors for Message - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGeneratedInternal.Message { get => this._message; set { {_message = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGeneratedInternal.Message { get => this._message; set { {_message = value;} } } /// Internal Acessors for Target - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGeneratedInternal.Target { get => this._target; set { {_target = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGeneratedInternal.Target { get => this._target; set { {_target = value;} } } /// Backing field for property. private string _target; @@ -78,14 +78,20 @@ public partial interface IErrorDetailAutoGenerated : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error additional info.", SerializedName = @"additionalInfo", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorAdditionalInfo) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorAdditionalInfo[] AdditionalInfo { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorAdditionalInfo) })] + System.Collections.Generic.List AdditionalInfo { get; } /// The error code. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error code.", SerializedName = @"code", PossibleTypes = new [] { typeof(string) })] @@ -94,14 +100,20 @@ public partial interface IErrorDetailAutoGenerated : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error details.", SerializedName = @"details", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGenerated) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGenerated[] Detail { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGenerated) })] + System.Collections.Generic.List Detail { get; } /// The error message. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error message.", SerializedName = @"message", PossibleTypes = new [] { typeof(string) })] @@ -110,6 +122,9 @@ public partial interface IErrorDetailAutoGenerated : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error target.", SerializedName = @"target", PossibleTypes = new [] { typeof(string) })] @@ -121,11 +136,11 @@ internal partial interface IErrorDetailAutoGeneratedInternal { /// The error additional info. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorAdditionalInfo[] AdditionalInfo { get; set; } + System.Collections.Generic.List AdditionalInfo { get; set; } /// The error code. string Code { get; set; } /// The error details. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGenerated[] Detail { get; set; } + System.Collections.Generic.List Detail { get; set; } /// The error message. string Message { get; set; } /// The error target. diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorDetailAutoGenerated.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ErrorDetailAutoGenerated.json.cs similarity index 84% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorDetailAutoGenerated.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ErrorDetailAutoGenerated.json.cs index 47f86953b1c5..0d4bb425789e 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorDetailAutoGenerated.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ErrorDetailAutoGenerated.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -65,22 +65,22 @@ internal ErrorDetailAutoGenerated(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Ru { return; } - {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)Code;} - {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;} - {_target = If( json?.PropertyT("target"), out var __jsonTarget) ? (string)__jsonTarget : (string)Target;} - {_detail = If( json?.PropertyT("details"), out var __jsonDetails) ? If( __jsonDetails as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGenerated) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorDetailAutoGenerated.FromJson(__u) )) ))() : null : Detail;} - {_additionalInfo = If( json?.PropertyT("additionalInfo"), out var __jsonAdditionalInfo) ? If( __jsonAdditionalInfo as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorAdditionalInfo) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorAdditionalInfo.FromJson(__p) )) ))() : null : AdditionalInfo;} + {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)_code;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)_message;} + {_target = If( json?.PropertyT("target"), out var __jsonTarget) ? (string)__jsonTarget : (string)_target;} + {_detail = If( json?.PropertyT("details"), out var __jsonDetails) ? If( __jsonDetails as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGenerated) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorDetailAutoGenerated.FromJson(__u) )) ))() : null : _detail;} + {_additionalInfo = If( json?.PropertyT("additionalInfo"), out var __jsonAdditionalInfo) ? If( __jsonAdditionalInfo as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __q) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorAdditionalInfo) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorAdditionalInfo.FromJson(__p) )) ))() : null : _additionalInfo;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGenerated. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGenerated. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGenerated. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGenerated. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGenerated FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGenerated FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new ErrorDetailAutoGenerated(json) : null; } @@ -104,19 +104,19 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode ToJson( { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._code.ToString()) : null, "code" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._target)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._target.ToString()) : null, "target" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { if (null != this._detail) { @@ -128,7 +128,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode ToJson( container.Add("details",__w); } } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { if (null != this._additionalInfo) { diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorResponse.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ErrorResponse.PowerShell.cs similarity index 66% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorResponse.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ErrorResponse.PowerShell.cs index 15a6e6f8f20e..c5c37a9ab563 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorResponse.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ErrorResponse.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -66,33 +66,33 @@ public partial class ErrorResponse partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ErrorResponse(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ErrorResponse(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -107,33 +107,33 @@ internal ErrorResponse(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Error")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorDetailTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorDetailTypeConverter.ConvertFrom); } if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorDetailTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorDetailTypeConverter.ConvertFrom)); } if (content.Contains("AdditionalInfo")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseInternal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -148,27 +148,27 @@ internal ErrorResponse(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Error")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorDetailTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorDetailTypeConverter.ConvertFrom); } if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorDetailTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorDetailTypeConverter.ConvertFrom)); } if (content.Contains("AdditionalInfo")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseInternal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } @@ -178,7 +178,7 @@ internal ErrorResponse(global::System.Management.Automation.PSObject content) /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorResponse.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ErrorResponse.TypeConverter.cs similarity index 97% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorResponse.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ErrorResponse.TypeConverter.cs index 006882cddc6c..6aeccb2c5f00 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorResponse.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ErrorResponse.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorResponse.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ErrorResponse.cs similarity index 58% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorResponse.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ErrorResponse.cs index afe51b3dfbcf..fc3ad2bdd6fa 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorResponse.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ErrorResponse.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -13,54 +13,54 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20 /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class ErrorResponse : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseInternal { /// The error additional info. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorAdditionalInfo[] AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailInternal)Error).AdditionalInfo; } + public System.Collections.Generic.List AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailInternal)Error).AdditionalInfo; } /// The error code. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailInternal)Error).Code; } + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailInternal)Error).Code; } /// The error details. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetail[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailInternal)Error).Detail; } + public System.Collections.Generic.List Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailInternal)Error).Detail; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetail _error; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetail _error; /// The error object. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetail Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorDetail()); set => this._error = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetail Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorDetail()); set => this._error = value; } /// The error message. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailInternal)Error).Message; } + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailInternal)Error).Message; } /// Internal Acessors for AdditionalInfo - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseInternal.AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailInternal)Error).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailInternal)Error).AdditionalInfo = value; } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseInternal.AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailInternal)Error).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailInternal)Error).AdditionalInfo = value; } /// Internal Acessors for Code - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailInternal)Error).Code = value; } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailInternal)Error).Code = value; } /// Internal Acessors for Detail - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetail[] Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailInternal)Error).Detail = value; } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailInternal)Error).Detail = value; } /// Internal Acessors for Error - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorDetail()); set { {_error = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorDetail()); set { {_error = value;} } } /// Internal Acessors for Message - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailInternal)Error).Message = value; } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailInternal)Error).Message = value; } /// Internal Acessors for Target - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailInternal)Error).Target = value; } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailInternal)Error).Target = value; } /// The error target. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailInternal)Error).Target; } + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailInternal)Error).Target; } /// Creates an new instance. public ErrorResponse() @@ -77,14 +77,20 @@ public partial interface IErrorResponse : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error additional info.", SerializedName = @"additionalInfo", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorAdditionalInfo) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorAdditionalInfo[] AdditionalInfo { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorAdditionalInfo) })] + System.Collections.Generic.List AdditionalInfo { get; } /// The error code. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error code.", SerializedName = @"code", PossibleTypes = new [] { typeof(string) })] @@ -93,14 +99,20 @@ public partial interface IErrorResponse : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error details.", SerializedName = @"details", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetail) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetail[] Detail { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetail) })] + System.Collections.Generic.List Detail { get; } /// The error message. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error message.", SerializedName = @"message", PossibleTypes = new [] { typeof(string) })] @@ -109,6 +121,9 @@ public partial interface IErrorResponse : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error target.", SerializedName = @"target", PossibleTypes = new [] { typeof(string) })] @@ -121,13 +136,13 @@ internal partial interface IErrorResponseInternal { /// The error additional info. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorAdditionalInfo[] AdditionalInfo { get; set; } + System.Collections.Generic.List AdditionalInfo { get; set; } /// The error code. string Code { get; set; } /// The error details. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetail[] Detail { get; set; } + System.Collections.Generic.List Detail { get; set; } /// The error object. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetail Error { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetail Error { get; set; } /// The error message. string Message { get; set; } /// The error target. diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorResponse.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ErrorResponse.json.cs similarity index 95% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorResponse.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ErrorResponse.json.cs index cba07089a7ec..90de7fcc81b7 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorResponse.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ErrorResponse.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -68,18 +68,18 @@ internal ErrorResponse(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json. { return; } - {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorDetail.FromJson(__jsonError) : Error;} + {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorDetail.FromJson(__jsonError) : _error;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new ErrorResponse(json) : null; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorResponseAutoGenerated.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ErrorResponseAutoGenerated.PowerShell.cs similarity index 64% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorResponseAutoGenerated.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ErrorResponseAutoGenerated.PowerShell.cs index 6cea0b610224..e883ac7298bc 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorResponseAutoGenerated.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ErrorResponseAutoGenerated.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -66,33 +66,33 @@ public partial class ErrorResponseAutoGenerated partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseAutoGenerated DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseAutoGenerated DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ErrorResponseAutoGenerated(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseAutoGenerated DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseAutoGenerated DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ErrorResponseAutoGenerated(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -107,33 +107,33 @@ internal ErrorResponseAutoGenerated(global::System.Collections.IDictionary conte // actually deserialize if (content.Contains("Error")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseAutoGeneratedInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGenerated) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseAutoGeneratedInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorDetailAutoGeneratedTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseAutoGeneratedInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGenerated) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseAutoGeneratedInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorDetailAutoGeneratedTypeConverter.ConvertFrom); } if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseAutoGeneratedInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseAutoGeneratedInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseAutoGeneratedInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseAutoGeneratedInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseAutoGeneratedInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseAutoGeneratedInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseAutoGeneratedInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseAutoGeneratedInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseAutoGeneratedInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseAutoGeneratedInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseAutoGeneratedInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseAutoGeneratedInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseAutoGeneratedInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGenerated[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseAutoGeneratedInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorDetailAutoGeneratedTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseAutoGeneratedInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseAutoGeneratedInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorDetailAutoGeneratedTypeConverter.ConvertFrom)); } if (content.Contains("AdditionalInfo")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseAutoGeneratedInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseAutoGeneratedInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseAutoGeneratedInternal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseAutoGeneratedInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -148,27 +148,27 @@ internal ErrorResponseAutoGenerated(global::System.Management.Automation.PSObjec // actually deserialize if (content.Contains("Error")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseAutoGeneratedInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGenerated) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseAutoGeneratedInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorDetailAutoGeneratedTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseAutoGeneratedInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGenerated) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseAutoGeneratedInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorDetailAutoGeneratedTypeConverter.ConvertFrom); } if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseAutoGeneratedInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseAutoGeneratedInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseAutoGeneratedInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseAutoGeneratedInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseAutoGeneratedInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseAutoGeneratedInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseAutoGeneratedInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseAutoGeneratedInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseAutoGeneratedInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseAutoGeneratedInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseAutoGeneratedInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseAutoGeneratedInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseAutoGeneratedInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGenerated[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseAutoGeneratedInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorDetailAutoGeneratedTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseAutoGeneratedInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseAutoGeneratedInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorDetailAutoGeneratedTypeConverter.ConvertFrom)); } if (content.Contains("AdditionalInfo")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseAutoGeneratedInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseAutoGeneratedInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseAutoGeneratedInternal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseAutoGeneratedInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } @@ -178,7 +178,7 @@ internal ErrorResponseAutoGenerated(global::System.Management.Automation.PSObjec /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseAutoGenerated FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseAutoGenerated FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorResponseAutoGenerated.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ErrorResponseAutoGenerated.TypeConverter.cs similarity index 97% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorResponseAutoGenerated.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ErrorResponseAutoGenerated.TypeConverter.cs index 2383dff068b7..407ccc227742 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorResponseAutoGenerated.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ErrorResponseAutoGenerated.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseAutoGenerated ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseAutoGenerated ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseAutoGenerated).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseAutoGenerated).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorResponseAutoGenerated.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ErrorResponseAutoGenerated.cs similarity index 56% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorResponseAutoGenerated.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ErrorResponseAutoGenerated.cs index 324e5ea6ed1a..d3e4d5deed85 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorResponseAutoGenerated.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ErrorResponseAutoGenerated.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -13,54 +13,54 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20 /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class ErrorResponseAutoGenerated : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseAutoGenerated, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseAutoGeneratedInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseAutoGenerated, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseAutoGeneratedInternal { /// The error additional info. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorAdditionalInfo[] AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGeneratedInternal)Error).AdditionalInfo; } + public System.Collections.Generic.List AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGeneratedInternal)Error).AdditionalInfo; } /// The error code. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGeneratedInternal)Error).Code; } + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGeneratedInternal)Error).Code; } /// The error details. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGenerated[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGeneratedInternal)Error).Detail; } + public System.Collections.Generic.List Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGeneratedInternal)Error).Detail; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGenerated _error; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGenerated _error; /// The error object. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGenerated Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorDetailAutoGenerated()); set => this._error = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGenerated Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorDetailAutoGenerated()); set => this._error = value; } /// The error message. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGeneratedInternal)Error).Message; } + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGeneratedInternal)Error).Message; } /// Internal Acessors for AdditionalInfo - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseAutoGeneratedInternal.AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGeneratedInternal)Error).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGeneratedInternal)Error).AdditionalInfo = value; } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseAutoGeneratedInternal.AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGeneratedInternal)Error).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGeneratedInternal)Error).AdditionalInfo = value; } /// Internal Acessors for Code - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseAutoGeneratedInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGeneratedInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGeneratedInternal)Error).Code = value; } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseAutoGeneratedInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGeneratedInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGeneratedInternal)Error).Code = value; } /// Internal Acessors for Detail - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGenerated[] Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseAutoGeneratedInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGeneratedInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGeneratedInternal)Error).Detail = value; } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseAutoGeneratedInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGeneratedInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGeneratedInternal)Error).Detail = value; } /// Internal Acessors for Error - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGenerated Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseAutoGeneratedInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorDetailAutoGenerated()); set { {_error = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGenerated Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseAutoGeneratedInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorDetailAutoGenerated()); set { {_error = value;} } } /// Internal Acessors for Message - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseAutoGeneratedInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGeneratedInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGeneratedInternal)Error).Message = value; } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseAutoGeneratedInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGeneratedInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGeneratedInternal)Error).Message = value; } /// Internal Acessors for Target - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseAutoGeneratedInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGeneratedInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGeneratedInternal)Error).Target = value; } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseAutoGeneratedInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGeneratedInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGeneratedInternal)Error).Target = value; } /// The error target. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGeneratedInternal)Error).Target; } + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGeneratedInternal)Error).Target; } /// Creates an new instance. public ErrorResponseAutoGenerated() @@ -77,14 +77,20 @@ public partial interface IErrorResponseAutoGenerated : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error additional info.", SerializedName = @"additionalInfo", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorAdditionalInfo) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorAdditionalInfo[] AdditionalInfo { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorAdditionalInfo) })] + System.Collections.Generic.List AdditionalInfo { get; } /// The error code. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error code.", SerializedName = @"code", PossibleTypes = new [] { typeof(string) })] @@ -93,14 +99,20 @@ public partial interface IErrorResponseAutoGenerated : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error details.", SerializedName = @"details", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGenerated) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGenerated[] Detail { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGenerated) })] + System.Collections.Generic.List Detail { get; } /// The error message. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error message.", SerializedName = @"message", PossibleTypes = new [] { typeof(string) })] @@ -109,6 +121,9 @@ public partial interface IErrorResponseAutoGenerated : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error target.", SerializedName = @"target", PossibleTypes = new [] { typeof(string) })] @@ -121,13 +136,13 @@ internal partial interface IErrorResponseAutoGeneratedInternal { /// The error additional info. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorAdditionalInfo[] AdditionalInfo { get; set; } + System.Collections.Generic.List AdditionalInfo { get; set; } /// The error code. string Code { get; set; } /// The error details. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGenerated[] Detail { get; set; } + System.Collections.Generic.List Detail { get; set; } /// The error object. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorDetailAutoGenerated Error { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorDetailAutoGenerated Error { get; set; } /// The error message. string Message { get; set; } /// The error target. diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorResponseAutoGenerated.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ErrorResponseAutoGenerated.json.cs similarity index 94% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorResponseAutoGenerated.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ErrorResponseAutoGenerated.json.cs index 7e86615b69dc..3fd48fe33a55 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ErrorResponseAutoGenerated.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ErrorResponseAutoGenerated.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -68,18 +68,18 @@ internal ErrorResponseAutoGenerated(Microsoft.Azure.PowerShell.Cmdlets.EventHub. { return; } - {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ErrorDetailAutoGenerated.FromJson(__jsonError) : Error;} + {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ErrorDetailAutoGenerated.FromJson(__jsonError) : _error;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseAutoGenerated. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseAutoGenerated. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseAutoGenerated. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseAutoGenerated. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponseAutoGenerated FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponseAutoGenerated FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new ErrorResponseAutoGenerated(json) : null; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/EventHubIdentity.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/EventHubIdentity.cs index e68dac5ee9d5..f1be510fbd70 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/EventHubIdentity.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/EventHubIdentity.cs @@ -120,6 +120,9 @@ public partial interface IEventHubIdentity : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The Disaster Recovery configuration name", SerializedName = @"alias", PossibleTypes = new [] { typeof(string) })] @@ -128,6 +131,9 @@ public partial interface IEventHubIdentity : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The Application Group name ", SerializedName = @"applicationGroupName", PossibleTypes = new [] { typeof(string) })] @@ -136,6 +142,9 @@ public partial interface IEventHubIdentity : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The authorization rule name.", SerializedName = @"authorizationRuleName", PossibleTypes = new [] { typeof(string) })] @@ -144,6 +153,9 @@ public partial interface IEventHubIdentity : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of the Event Hubs Cluster.", SerializedName = @"clusterName", PossibleTypes = new [] { typeof(string) })] @@ -152,6 +164,9 @@ public partial interface IEventHubIdentity : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The consumer group name", SerializedName = @"consumerGroupName", PossibleTypes = new [] { typeof(string) })] @@ -160,6 +175,9 @@ public partial interface IEventHubIdentity : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The Event Hub name", SerializedName = @"eventHubName", PossibleTypes = new [] { typeof(string) })] @@ -168,6 +186,9 @@ public partial interface IEventHubIdentity : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Resource identity path", SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] @@ -176,6 +197,9 @@ public partial interface IEventHubIdentity : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The Namespace name", SerializedName = @"namespaceName", PossibleTypes = new [] { typeof(string) })] @@ -184,6 +208,9 @@ public partial interface IEventHubIdentity : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The PrivateEndpointConnection name", SerializedName = @"privateEndpointConnectionName", PossibleTypes = new [] { typeof(string) })] @@ -192,6 +219,9 @@ public partial interface IEventHubIdentity : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The ResourceAssociation Name", SerializedName = @"resourceAssociationName", PossibleTypes = new [] { typeof(string) })] @@ -200,6 +230,9 @@ public partial interface IEventHubIdentity : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Name of the resource group within the azure subscription.", SerializedName = @"resourceGroupName", PossibleTypes = new [] { typeof(string) })] @@ -208,6 +241,9 @@ public partial interface IEventHubIdentity : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The Schema Group name ", SerializedName = @"schemaGroupName", PossibleTypes = new [] { typeof(string) })] @@ -219,6 +255,9 @@ public partial interface IEventHubIdentity : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", SerializedName = @"subscriptionId", PossibleTypes = new [] { typeof(string) })] diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/EventHubIdentity.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/EventHubIdentity.json.cs index 4f5fa2803aef..2bed7ff9e6cb 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/EventHubIdentity.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/EventHubIdentity.json.cs @@ -64,19 +64,19 @@ internal EventHubIdentity(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Js { return; } - {_subscriptionId = If( json?.PropertyT("subscriptionId"), out var __jsonSubscriptionId) ? (string)__jsonSubscriptionId : (string)SubscriptionId;} - {_resourceGroupName = If( json?.PropertyT("resourceGroupName"), out var __jsonResourceGroupName) ? (string)__jsonResourceGroupName : (string)ResourceGroupName;} - {_clusterName = If( json?.PropertyT("clusterName"), out var __jsonClusterName) ? (string)__jsonClusterName : (string)ClusterName;} - {_namespaceName = If( json?.PropertyT("namespaceName"), out var __jsonNamespaceName) ? (string)__jsonNamespaceName : (string)NamespaceName;} - {_authorizationRuleName = If( json?.PropertyT("authorizationRuleName"), out var __jsonAuthorizationRuleName) ? (string)__jsonAuthorizationRuleName : (string)AuthorizationRuleName;} - {_privateEndpointConnectionName = If( json?.PropertyT("privateEndpointConnectionName"), out var __jsonPrivateEndpointConnectionName) ? (string)__jsonPrivateEndpointConnectionName : (string)PrivateEndpointConnectionName;} - {_resourceAssociationName = If( json?.PropertyT("resourceAssociationName"), out var __jsonResourceAssociationName) ? (string)__jsonResourceAssociationName : (string)ResourceAssociationName;} - {_alias = If( json?.PropertyT("alias"), out var __jsonAlias) ? (string)__jsonAlias : (string)Alias;} - {_eventHubName = If( json?.PropertyT("eventHubName"), out var __jsonEventHubName) ? (string)__jsonEventHubName : (string)EventHubName;} - {_consumerGroupName = If( json?.PropertyT("consumerGroupName"), out var __jsonConsumerGroupName) ? (string)__jsonConsumerGroupName : (string)ConsumerGroupName;} - {_schemaGroupName = If( json?.PropertyT("schemaGroupName"), out var __jsonSchemaGroupName) ? (string)__jsonSchemaGroupName : (string)SchemaGroupName;} - {_applicationGroupName = If( json?.PropertyT("applicationGroupName"), out var __jsonApplicationGroupName) ? (string)__jsonApplicationGroupName : (string)ApplicationGroupName;} - {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} + {_subscriptionId = If( json?.PropertyT("subscriptionId"), out var __jsonSubscriptionId) ? (string)__jsonSubscriptionId : (string)_subscriptionId;} + {_resourceGroupName = If( json?.PropertyT("resourceGroupName"), out var __jsonResourceGroupName) ? (string)__jsonResourceGroupName : (string)_resourceGroupName;} + {_clusterName = If( json?.PropertyT("clusterName"), out var __jsonClusterName) ? (string)__jsonClusterName : (string)_clusterName;} + {_namespaceName = If( json?.PropertyT("namespaceName"), out var __jsonNamespaceName) ? (string)__jsonNamespaceName : (string)_namespaceName;} + {_authorizationRuleName = If( json?.PropertyT("authorizationRuleName"), out var __jsonAuthorizationRuleName) ? (string)__jsonAuthorizationRuleName : (string)_authorizationRuleName;} + {_privateEndpointConnectionName = If( json?.PropertyT("privateEndpointConnectionName"), out var __jsonPrivateEndpointConnectionName) ? (string)__jsonPrivateEndpointConnectionName : (string)_privateEndpointConnectionName;} + {_resourceAssociationName = If( json?.PropertyT("resourceAssociationName"), out var __jsonResourceAssociationName) ? (string)__jsonResourceAssociationName : (string)_resourceAssociationName;} + {_alias = If( json?.PropertyT("alias"), out var __jsonAlias) ? (string)__jsonAlias : (string)_alias;} + {_eventHubName = If( json?.PropertyT("eventHubName"), out var __jsonEventHubName) ? (string)__jsonEventHubName : (string)_eventHubName;} + {_consumerGroupName = If( json?.PropertyT("consumerGroupName"), out var __jsonConsumerGroupName) ? (string)__jsonConsumerGroupName : (string)_consumerGroupName;} + {_schemaGroupName = If( json?.PropertyT("schemaGroupName"), out var __jsonSchemaGroupName) ? (string)__jsonSchemaGroupName : (string)_schemaGroupName;} + {_applicationGroupName = If( json?.PropertyT("applicationGroupName"), out var __jsonApplicationGroupName) ? (string)__jsonApplicationGroupName : (string)_applicationGroupName;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;} AfterFromJson(json); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EventHubListResult.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/EventHubListResult.PowerShell.cs similarity index 76% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EventHubListResult.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/EventHubListResult.PowerShell.cs index f5fa05d91d46..c193c8f78362 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EventHubListResult.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/EventHubListResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,33 +63,33 @@ public partial class EventHubListResult partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventHubListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new EventHubListResult(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventHubListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new EventHubListResult(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -104,17 +104,17 @@ internal EventHubListResult(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventHubListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventHubListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.EventhubTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.EventhubTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventHubListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventHubListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -129,11 +129,11 @@ internal EventHubListResult(global::System.Management.Automation.PSObject conten // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventHubListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventHubListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.EventhubTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.EventhubTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventHubListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventHubListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -143,7 +143,7 @@ internal EventHubListResult(global::System.Management.Automation.PSObject conten /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventHubListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EventHubListResult.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/EventHubListResult.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EventHubListResult.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/EventHubListResult.TypeConverter.cs index b0c1774d40d8..ea67984e6f6e 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EventHubListResult.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/EventHubListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventHubListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventHubListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EventHubListResult.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/EventHubListResult.cs similarity index 75% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EventHubListResult.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/EventHubListResult.cs index 7153592bb517..5cdd971d258a 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EventHubListResult.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/EventHubListResult.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// The result of the List EventHubs operation. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class EventHubListResult : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventHubListResult, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventHubListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubListResult, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubListResultInternal { /// Backing field for property. @@ -24,11 +24,11 @@ public partial class EventHubListResult : public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub[] _value; + private System.Collections.Generic.List _value; /// Result of the List EventHubs operation. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub[] Value { get => this._value; set => this._value = value; } + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } /// Creates an new instance. public EventHubListResult() @@ -46,6 +46,9 @@ public partial interface IEventHubListResult : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Link to the next set of results. Not empty if Value contains incomplete list of EventHubs.", SerializedName = @"nextLink", PossibleTypes = new [] { typeof(string) })] @@ -54,10 +57,13 @@ public partial interface IEventHubListResult : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Result of the List EventHubs operation.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub) })] + System.Collections.Generic.List Value { get; set; } } /// The result of the List EventHubs operation. @@ -69,7 +75,7 @@ internal partial interface IEventHubListResultInternal /// string NextLink { get; set; } /// Result of the List EventHubs operation. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub[] Value { get; set; } + System.Collections.Generic.List Value { get; set; } } } \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EventHubListResult.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/EventHubListResult.json.cs similarity index 89% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EventHubListResult.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/EventHubListResult.json.cs index 35ad62b0d89e..af9df344f4ac 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EventHubListResult.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/EventHubListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -65,19 +65,19 @@ internal EventHubListResult(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime. { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.Eventhub.FromJson(__u) )) ))() : null : Value;} - {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Eventhub.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventHubListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventHubListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventHubListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new EventHubListResult(json) : null; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Eventhub.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/Eventhub.PowerShell.cs new file mode 100644 index 000000000000..b778b99fe227 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/Eventhub.PowerShell.cs @@ -0,0 +1,476 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + + /// Single item in List or Get Event Hub operation + [System.ComponentModel.TypeConverter(typeof(EventhubTypeConverter))] + public partial class Eventhub + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Eventhub(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Eventhub(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Eventhub(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.EventhubPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("CaptureDescription")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).CaptureDescription = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescription) content.GetValueForProperty("CaptureDescription",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).CaptureDescription, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.CaptureDescriptionTypeConverter.ConvertFrom); + } + if (content.Contains("RetentionDescription")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).RetentionDescription = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRetentionDescription) content.GetValueForProperty("RetentionDescription",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).RetentionDescription, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.RetentionDescriptionTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("PartitionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).PartitionId = (System.Collections.Generic.List) content.GetValueForProperty("PartitionId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).PartitionId, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("CreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("UpdatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("MessageRetentionInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).MessageRetentionInDay = (long?) content.GetValueForProperty("MessageRetentionInDay",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).MessageRetentionInDay, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("PartitionCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).PartitionCount = (long?) content.GetValueForProperty("PartitionCount",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).PartitionCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("CaptureDescriptionDestination")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).CaptureDescriptionDestination = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestination) content.GetValueForProperty("CaptureDescriptionDestination",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).CaptureDescriptionDestination, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.DestinationTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("CaptureEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).CaptureEnabled = (bool?) content.GetValueForProperty("CaptureEnabled",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).CaptureEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Encoding")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).Encoding = (string) content.GetValueForProperty("Encoding",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).Encoding, global::System.Convert.ToString); + } + if (content.Contains("IntervalInSeconds")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).IntervalInSeconds = (int?) content.GetValueForProperty("IntervalInSeconds",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).IntervalInSeconds, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SizeLimitInBytes")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).SizeLimitInBytes = (int?) content.GetValueForProperty("SizeLimitInBytes",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).SizeLimitInBytes, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SkipEmptyArchive")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).SkipEmptyArchive = (bool?) content.GetValueForProperty("SkipEmptyArchive",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).SkipEmptyArchive, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DestinationProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).DestinationProperty = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationProperties) content.GetValueForProperty("DestinationProperty",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).DestinationProperty, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.DestinationPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("DestinationName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).DestinationName = (string) content.GetValueForProperty("DestinationName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).DestinationName, global::System.Convert.ToString); + } + if (content.Contains("CleanupPolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).CleanupPolicy = (string) content.GetValueForProperty("CleanupPolicy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).CleanupPolicy, global::System.Convert.ToString); + } + if (content.Contains("RetentionTimeInHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).RetentionTimeInHour = (long?) content.GetValueForProperty("RetentionTimeInHour",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).RetentionTimeInHour, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("TombstoneRetentionTimeInHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).TombstoneRetentionTimeInHour = (int?) content.GetValueForProperty("TombstoneRetentionTimeInHour",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).TombstoneRetentionTimeInHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DestinationIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).DestinationIdentity = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureIdentity) content.GetValueForProperty("DestinationIdentity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).DestinationIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.CaptureIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("BlobContainer")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).BlobContainer = (string) content.GetValueForProperty("BlobContainer",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).BlobContainer, global::System.Convert.ToString); + } + if (content.Contains("IdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).IdentityType = (string) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).IdentityType, global::System.Convert.ToString); + } + if (content.Contains("UserAssignedIdentityId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).UserAssignedIdentityId = (string) content.GetValueForProperty("UserAssignedIdentityId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).UserAssignedIdentityId, global::System.Convert.ToString); + } + if (content.Contains("StorageAccountResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).StorageAccountResourceId = (string) content.GetValueForProperty("StorageAccountResourceId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).StorageAccountResourceId, global::System.Convert.ToString); + } + if (content.Contains("ArchiveNameFormat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).ArchiveNameFormat = (string) content.GetValueForProperty("ArchiveNameFormat",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).ArchiveNameFormat, global::System.Convert.ToString); + } + if (content.Contains("DataLakeSubscriptionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).DataLakeSubscriptionId = (string) content.GetValueForProperty("DataLakeSubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).DataLakeSubscriptionId, global::System.Convert.ToString); + } + if (content.Contains("DataLakeAccountName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).DataLakeAccountName = (string) content.GetValueForProperty("DataLakeAccountName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).DataLakeAccountName, global::System.Convert.ToString); + } + if (content.Contains("DataLakeFolderPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).DataLakeFolderPath = (string) content.GetValueForProperty("DataLakeFolderPath",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).DataLakeFolderPath, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Eventhub(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.EventhubPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("CaptureDescription")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).CaptureDescription = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescription) content.GetValueForProperty("CaptureDescription",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).CaptureDescription, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.CaptureDescriptionTypeConverter.ConvertFrom); + } + if (content.Contains("RetentionDescription")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).RetentionDescription = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRetentionDescription) content.GetValueForProperty("RetentionDescription",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).RetentionDescription, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.RetentionDescriptionTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("PartitionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).PartitionId = (System.Collections.Generic.List) content.GetValueForProperty("PartitionId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).PartitionId, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("CreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("UpdatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("MessageRetentionInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).MessageRetentionInDay = (long?) content.GetValueForProperty("MessageRetentionInDay",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).MessageRetentionInDay, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("PartitionCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).PartitionCount = (long?) content.GetValueForProperty("PartitionCount",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).PartitionCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("CaptureDescriptionDestination")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).CaptureDescriptionDestination = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestination) content.GetValueForProperty("CaptureDescriptionDestination",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).CaptureDescriptionDestination, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.DestinationTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("CaptureEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).CaptureEnabled = (bool?) content.GetValueForProperty("CaptureEnabled",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).CaptureEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Encoding")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).Encoding = (string) content.GetValueForProperty("Encoding",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).Encoding, global::System.Convert.ToString); + } + if (content.Contains("IntervalInSeconds")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).IntervalInSeconds = (int?) content.GetValueForProperty("IntervalInSeconds",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).IntervalInSeconds, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SizeLimitInBytes")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).SizeLimitInBytes = (int?) content.GetValueForProperty("SizeLimitInBytes",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).SizeLimitInBytes, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SkipEmptyArchive")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).SkipEmptyArchive = (bool?) content.GetValueForProperty("SkipEmptyArchive",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).SkipEmptyArchive, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DestinationProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).DestinationProperty = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationProperties) content.GetValueForProperty("DestinationProperty",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).DestinationProperty, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.DestinationPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("DestinationName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).DestinationName = (string) content.GetValueForProperty("DestinationName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).DestinationName, global::System.Convert.ToString); + } + if (content.Contains("CleanupPolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).CleanupPolicy = (string) content.GetValueForProperty("CleanupPolicy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).CleanupPolicy, global::System.Convert.ToString); + } + if (content.Contains("RetentionTimeInHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).RetentionTimeInHour = (long?) content.GetValueForProperty("RetentionTimeInHour",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).RetentionTimeInHour, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("TombstoneRetentionTimeInHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).TombstoneRetentionTimeInHour = (int?) content.GetValueForProperty("TombstoneRetentionTimeInHour",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).TombstoneRetentionTimeInHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DestinationIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).DestinationIdentity = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureIdentity) content.GetValueForProperty("DestinationIdentity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).DestinationIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.CaptureIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("BlobContainer")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).BlobContainer = (string) content.GetValueForProperty("BlobContainer",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).BlobContainer, global::System.Convert.ToString); + } + if (content.Contains("IdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).IdentityType = (string) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).IdentityType, global::System.Convert.ToString); + } + if (content.Contains("UserAssignedIdentityId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).UserAssignedIdentityId = (string) content.GetValueForProperty("UserAssignedIdentityId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).UserAssignedIdentityId, global::System.Convert.ToString); + } + if (content.Contains("StorageAccountResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).StorageAccountResourceId = (string) content.GetValueForProperty("StorageAccountResourceId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).StorageAccountResourceId, global::System.Convert.ToString); + } + if (content.Contains("ArchiveNameFormat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).ArchiveNameFormat = (string) content.GetValueForProperty("ArchiveNameFormat",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).ArchiveNameFormat, global::System.Convert.ToString); + } + if (content.Contains("DataLakeSubscriptionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).DataLakeSubscriptionId = (string) content.GetValueForProperty("DataLakeSubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).DataLakeSubscriptionId, global::System.Convert.ToString); + } + if (content.Contains("DataLakeAccountName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).DataLakeAccountName = (string) content.GetValueForProperty("DataLakeAccountName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).DataLakeAccountName, global::System.Convert.ToString); + } + if (content.Contains("DataLakeFolderPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).DataLakeFolderPath = (string) content.GetValueForProperty("DataLakeFolderPath",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal)this).DataLakeFolderPath, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Single item in List or Get Event Hub operation + [System.ComponentModel.TypeConverter(typeof(EventhubTypeConverter))] + public partial interface IEventhub + + { + + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Eventhub.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/Eventhub.TypeConverter.cs similarity index 97% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Eventhub.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/Eventhub.TypeConverter.cs index 0ddf7867f3ad..3c5f94469419 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Eventhub.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/Eventhub.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Eventhub.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/Eventhub.cs similarity index 65% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Eventhub.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/Eventhub.cs index 75be4c66cd4d..879cca0d716b 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Eventhub.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/Eventhub.cs @@ -3,158 +3,157 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// Single item in List or Get Event Hub operation [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class Eventhub : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IValidates { /// - /// Backing field for Inherited model + /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ProxyResource(); + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ProxyResource(); /// /// Blob naming convention for archive, e.g. {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}. /// Here all the parameters (Namespace,EventHub .. etc) are mandatory irrespective of order /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string ArchiveNameFormat { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).ArchiveNameFormat; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).ArchiveNameFormat = value ?? null; } + public string ArchiveNameFormat { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).ArchiveNameFormat; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).ArchiveNameFormat = value ?? null; } /// Blob container Name [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string BlobContainer { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).BlobContainer; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).BlobContainer = value ?? null; } + public string BlobContainer { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).BlobContainer; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).BlobContainer = value ?? null; } /// A value that indicates whether capture description is enabled. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public bool? CaptureEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).CaptureDescriptionEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).CaptureDescriptionEnabled = value ?? default(bool); } + public bool? CaptureEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).CaptureDescriptionEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).CaptureDescriptionEnabled = value ?? default(bool); } /// Enumerates the possible values for cleanup policy [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CleanupPolicyRetentionDescription? CleanupPolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).RetentionDescriptionCleanupPolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).RetentionDescriptionCleanupPolicy = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CleanupPolicyRetentionDescription)""); } + public string CleanupPolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).RetentionDescriptionCleanupPolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).RetentionDescriptionCleanupPolicy = value ?? null; } /// Exact time the Event Hub was created. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public global::System.DateTime? CreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).CreatedAt; } + public global::System.DateTime? CreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).CreatedAt; } /// The Azure Data Lake Store name for the captured events [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string DataLakeAccountName { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).DataLakeAccountName; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).DataLakeAccountName = value ?? null; } + public string DataLakeAccountName { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).DataLakeAccountName; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).DataLakeAccountName = value ?? null; } /// The destination folder path for the captured events [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string DataLakeFolderPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).DataLakeFolderPath; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).DataLakeFolderPath = value ?? null; } + public string DataLakeFolderPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).DataLakeFolderPath; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).DataLakeFolderPath = value ?? null; } /// Subscription Id of Azure Data Lake Store [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string DataLakeSubscriptionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).DataLakeSubscriptionId; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).DataLakeSubscriptionId = value ?? null; } + public string DataLakeSubscriptionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).DataLakeSubscriptionId; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).DataLakeSubscriptionId = value ?? null; } /// Name for capture destination [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string DestinationName { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).DestinationName; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).DestinationName = value ?? null; } + public string DestinationName { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).DestinationName; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).DestinationName = value ?? null; } /// /// Enumerates the possible values for the encoding format of capture description. Note: 'AvroDeflate' will be deprecated /// in New API Version /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription? Encoding { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).CaptureDescriptionEncoding; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).CaptureDescriptionEncoding = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription)""); } + public string Encoding { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).CaptureDescriptionEncoding; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).CaptureDescriptionEncoding = value ?? null; } /// /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Id; } /// Type of Azure Active Directory Managed Identity. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType? IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).IdentityType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).IdentityType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType)""); } + public string IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).IdentityType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).IdentityType = value ?? null; } /// /// The time window allows you to set the frequency with which the capture to Azure Blobs will happen, value should between /// 60 to 900 seconds /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public int? IntervalInSeconds { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).CaptureDescriptionIntervalInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).CaptureDescriptionIntervalInSecond = value ?? default(int); } + public int? IntervalInSeconds { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).CaptureDescriptionIntervalInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).CaptureDescriptionIntervalInSecond = value ?? default(int); } /// The geo-location where the resource lives [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Location; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Location; } /// /// Number of days to retain the events for this Event Hub, value should be 1 to 7 days /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public long? MessageRetentionInDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).MessageRetentionInDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).MessageRetentionInDay = value ?? default(long); } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Id = value; } - - /// Internal Acessors for Location - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal.Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Location = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Name = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Type = value; } + public long? MessageRetentionInDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).MessageRetentionInDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).MessageRetentionInDay = value ?? default(long); } /// Internal Acessors for CaptureDescription - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescription Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal.CaptureDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).CaptureDescription; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).CaptureDescription = value; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescription Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal.CaptureDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).CaptureDescription; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).CaptureDescription = value; } /// Internal Acessors for CaptureDescriptionDestination - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestination Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal.CaptureDescriptionDestination { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).CaptureDescriptionDestination; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).CaptureDescriptionDestination = value; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestination Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal.CaptureDescriptionDestination { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).CaptureDescriptionDestination; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).CaptureDescriptionDestination = value; } /// Internal Acessors for CreatedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal.CreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).CreatedAt = value; } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal.CreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).CreatedAt = value; } /// Internal Acessors for DestinationIdentity - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureIdentity Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal.DestinationIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).DestinationIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).DestinationIdentity = value; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureIdentity Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal.DestinationIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).DestinationIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).DestinationIdentity = value; } /// Internal Acessors for DestinationProperty - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationProperties Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal.DestinationProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).DestinationProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).DestinationProperty = value; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationProperties Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal.DestinationProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).DestinationProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).DestinationProperty = value; } /// Internal Acessors for PartitionId - string[] Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal.PartitionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).PartitionId; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).PartitionId = value; } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal.PartitionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).PartitionId; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).PartitionId = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubProperties Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.EventhubProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubProperties Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.EventhubProperties()); set { {_property = value;} } } /// Internal Acessors for RetentionDescription - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRetentionDescription Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal.RetentionDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).RetentionDescription; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).RetentionDescription = value; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRetentionDescription Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal.RetentionDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).RetentionDescription; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).RetentionDescription = value; } /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.SystemData()); set { {_systemData = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SystemData()); set { {_systemData = value;} } } /// Internal Acessors for UpdatedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubInternal.UpdatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).UpdatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).UpdatedAt = value; } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubInternal.UpdatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).UpdatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).UpdatedAt = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Id = value; } + + /// Internal Acessors for Location + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal.Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Location = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Type = value; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Name; } /// /// Number of partitions created for the Event Hub, allowed values are from 1 to 32 partitions. /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public long? PartitionCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).PartitionCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).PartitionCount = value ?? default(long); } + public long? PartitionCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).PartitionCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).PartitionCount = value ?? default(long); } /// Current number of shards on the Event Hub. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string[] PartitionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).PartitionId; } + public System.Collections.Generic.List PartitionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).PartitionId; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubProperties _property; /// Properties supplied to the Create Or Update Event Hub operation. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.EventhubProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.EventhubProperties()); set => this._property = value; } /// Gets the resource group name [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] @@ -165,57 +164,57 @@ public partial class Eventhub : /// is Compact the returned value of this property is Long.MaxValue /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public long? RetentionTimeInHour { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).RetentionDescriptionRetentionTimeInHour; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).RetentionDescriptionRetentionTimeInHour = value ?? default(long); } + public long? RetentionTimeInHour { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).RetentionDescriptionRetentionTimeInHour; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).RetentionDescriptionRetentionTimeInHour = value ?? default(long); } /// /// The size window defines the amount of data built up in your Event Hub before an capture operation, value should be between /// 10485760 to 524288000 bytes /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public int? SizeLimitInBytes { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).CaptureDescriptionSizeLimitInByte; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).CaptureDescriptionSizeLimitInByte = value ?? default(int); } + public int? SizeLimitInBytes { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).CaptureDescriptionSizeLimitInByte; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).CaptureDescriptionSizeLimitInByte = value ?? default(int); } /// A value that indicates whether to Skip Empty Archives [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public bool? SkipEmptyArchive { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).CaptureDescriptionSkipEmptyArchive; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).CaptureDescriptionSkipEmptyArchive = value ?? default(bool); } + public bool? SkipEmptyArchive { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).CaptureDescriptionSkipEmptyArchive; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).CaptureDescriptionSkipEmptyArchive = value ?? default(bool); } /// Enumerates the possible values for the status of the Event Hub. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus? Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).Status = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus)""); } + public string Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).Status = value ?? null; } /// Resource id of the storage account to be used to create the blobs [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string StorageAccountResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).StorageAccountResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).StorageAccountResourceId = value ?? null; } + public string StorageAccountResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).StorageAccountResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).StorageAccountResourceId = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData _systemData; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData _systemData; /// The system meta data relating to this resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.SystemData()); } + internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SystemData()); } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType)""); } + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedByType = value ?? null; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType)""); } + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedByType = value ?? null; } /// /// Number of hours to retain the tombstone markers of a compacted Event Hub. This value is only used when cleanupPolicy is @@ -224,24 +223,24 @@ public partial class Eventhub : /// compacted Event Hub /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public int? TombstoneRetentionTimeInHour { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).RetentionDescriptionTombstoneRetentionTimeInHour; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).RetentionDescriptionTombstoneRetentionTimeInHour = value ?? default(int); } + public int? TombstoneRetentionTimeInHour { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).RetentionDescriptionTombstoneRetentionTimeInHour; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).RetentionDescriptionTombstoneRetentionTimeInHour = value ?? default(int); } /// /// The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs" /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Type; } /// The exact time the message was updated. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public global::System.DateTime? UpdatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).UpdatedAt; } + public global::System.DateTime? UpdatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).UpdatedAt; } /// /// ARM ID of Managed User Identity. This property is required is the type is UserAssignedIdentity. If type is SystemAssigned, /// then the System Assigned Identity Associated with the namespace will be used. /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string UserAssignedIdentityId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).IdentityUserAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal)Property).IdentityUserAssignedIdentity = value ?? null; } + public string UserAssignedIdentityId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).IdentityUserAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)Property).IdentityUserAssignedIdentity = value ?? null; } /// Creates an new instance. public Eventhub() @@ -264,7 +263,7 @@ public Eventhub() /// Single item in List or Get Event Hub operation public partial interface IEventhub : Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResource + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResource { /// /// Blob naming convention for archive, e.g. {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}. @@ -273,6 +272,9 @@ public partial interface IEventhub : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Blob naming convention for archive, e.g. {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}. Here all the parameters (Namespace,EventHub .. etc) are mandatory irrespective of order", SerializedName = @"archiveNameFormat", PossibleTypes = new [] { typeof(string) })] @@ -281,6 +283,9 @@ public partial interface IEventhub : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Blob container Name", SerializedName = @"blobContainer", PossibleTypes = new [] { typeof(string) })] @@ -289,6 +294,9 @@ public partial interface IEventhub : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"A value that indicates whether capture description is enabled. ", SerializedName = @"enabled", PossibleTypes = new [] { typeof(bool) })] @@ -297,14 +305,21 @@ public partial interface IEventhub : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Enumerates the possible values for cleanup policy", SerializedName = @"cleanupPolicy", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CleanupPolicyRetentionDescription) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CleanupPolicyRetentionDescription? CleanupPolicy { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Delete", "Compact")] + string CleanupPolicy { get; set; } /// Exact time the Event Hub was created. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Exact time the Event Hub was created.", SerializedName = @"createdAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -313,6 +328,9 @@ public partial interface IEventhub : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The Azure Data Lake Store name for the captured events", SerializedName = @"dataLakeAccountName", PossibleTypes = new [] { typeof(string) })] @@ -321,6 +339,9 @@ public partial interface IEventhub : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The destination folder path for the captured events", SerializedName = @"dataLakeFolderPath", PossibleTypes = new [] { typeof(string) })] @@ -329,6 +350,9 @@ public partial interface IEventhub : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Subscription Id of Azure Data Lake Store", SerializedName = @"dataLakeSubscriptionId", PossibleTypes = new [] { typeof(string) })] @@ -337,6 +361,9 @@ public partial interface IEventhub : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Name for capture destination", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] @@ -348,18 +375,26 @@ public partial interface IEventhub : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Enumerates the possible values for the encoding format of capture description. Note: 'AvroDeflate' will be deprecated in New API Version", SerializedName = @"encoding", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription? Encoding { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Avro", "AvroDeflate")] + string Encoding { get; set; } /// Type of Azure Active Directory Managed Identity. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Type of Azure Active Directory Managed Identity.", SerializedName = @"type", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType? IdentityType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("SystemAssigned", "UserAssigned")] + string IdentityType { get; set; } /// /// The time window allows you to set the frequency with which the capture to Azure Blobs will happen, value should between /// 60 to 900 seconds @@ -367,6 +402,9 @@ public partial interface IEventhub : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The time window allows you to set the frequency with which the capture to Azure Blobs will happen, value should between 60 to 900 seconds", SerializedName = @"intervalInSeconds", PossibleTypes = new [] { typeof(int) })] @@ -377,6 +415,9 @@ public partial interface IEventhub : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Number of days to retain the events for this Event Hub, value should be 1 to 7 days", SerializedName = @"messageRetentionInDays", PossibleTypes = new [] { typeof(long) })] @@ -387,6 +428,9 @@ public partial interface IEventhub : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Number of partitions created for the Event Hub, allowed values are from 1 to 32 partitions.", SerializedName = @"partitionCount", PossibleTypes = new [] { typeof(long) })] @@ -395,10 +439,13 @@ public partial interface IEventhub : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Current number of shards on the Event Hub.", SerializedName = @"partitionIds", PossibleTypes = new [] { typeof(string) })] - string[] PartitionId { get; } + System.Collections.Generic.List PartitionId { get; } /// /// Number of hours to retain the events for this Event Hub. This value is only used when cleanupPolicy is Delete. If cleanupPolicy /// is Compact the returned value of this property is Long.MaxValue @@ -406,6 +453,9 @@ public partial interface IEventhub : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Number of hours to retain the events for this Event Hub. This value is only used when cleanupPolicy is Delete. If cleanupPolicy is Compact the returned value of this property is Long.MaxValue ", SerializedName = @"retentionTimeInHours", PossibleTypes = new [] { typeof(long) })] @@ -417,6 +467,9 @@ public partial interface IEventhub : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The size window defines the amount of data built up in your Event Hub before an capture operation, value should be between 10485760 to 524288000 bytes", SerializedName = @"sizeLimitInBytes", PossibleTypes = new [] { typeof(int) })] @@ -425,6 +478,9 @@ public partial interface IEventhub : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"A value that indicates whether to Skip Empty Archives", SerializedName = @"skipEmptyArchives", PossibleTypes = new [] { typeof(bool) })] @@ -433,14 +489,21 @@ public partial interface IEventhub : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Enumerates the possible values for the status of the Event Hub.", SerializedName = @"status", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus? Status { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Active", "Disabled", "Restoring", "SendDisabled", "ReceiveDisabled", "Creating", "Deleting", "Renaming", "Unknown")] + string Status { get; set; } /// Resource id of the storage account to be used to create the blobs [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Resource id of the storage account to be used to create the blobs", SerializedName = @"storageAccountResourceId", PossibleTypes = new [] { typeof(string) })] @@ -448,51 +511,71 @@ public partial interface IEventhub : /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The timestamp of resource creation (UTC).", SerializedName = @"createdAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? SystemDataCreatedAt { get; set; } + global::System.DateTime? SystemDataCreatedAt { get; } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The identity that created the resource.", SerializedName = @"createdBy", PossibleTypes = new [] { typeof(string) })] - string SystemDataCreatedBy { get; set; } + string SystemDataCreatedBy { get; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that created the resource.", SerializedName = @"createdByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataCreatedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that last modified the resource.", SerializedName = @"lastModifiedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? SystemDataLastModifiedAt { get; set; } + global::System.DateTime? SystemDataLastModifiedAt { get; } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The identity that last modified the resource.", SerializedName = @"lastModifiedBy", PossibleTypes = new [] { typeof(string) })] - string SystemDataLastModifiedBy { get; set; } + string SystemDataLastModifiedBy { get; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that last modified the resource.", SerializedName = @"lastModifiedByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; } /// /// Number of hours to retain the tombstone markers of a compacted Event Hub. This value is only used when cleanupPolicy is /// Compact. Consumer must complete reading the tombstone marker within this specified amount of time if consumer begins from @@ -502,6 +585,9 @@ public partial interface IEventhub : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Number of hours to retain the tombstone markers of a compacted Event Hub. This value is only used when cleanupPolicy is Compact. Consumer must complete reading the tombstone marker within this specified amount of time if consumer begins from starting offset to ensure they get a valid snapshot for the specific key described by the tombstone marker within the compacted Event Hub", SerializedName = @"tombstoneRetentionTimeInHours", PossibleTypes = new [] { typeof(int) })] @@ -510,6 +596,9 @@ public partial interface IEventhub : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The exact time the message was updated.", SerializedName = @"updatedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -521,6 +610,9 @@ public partial interface IEventhub : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"ARM ID of Managed User Identity. This property is required is the type is UserAssignedIdentity. If type is SystemAssigned, then the System Assigned Identity Associated with the namespace will be used.", SerializedName = @"userAssignedIdentity", PossibleTypes = new [] { typeof(string) })] @@ -529,7 +621,7 @@ public partial interface IEventhub : } /// Single item in List or Get Event Hub operation internal partial interface IEventhubInternal : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal { /// /// Blob naming convention for archive, e.g. {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}. @@ -539,15 +631,16 @@ internal partial interface IEventhubInternal : /// Blob container Name string BlobContainer { get; set; } /// Properties of capture description - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescription CaptureDescription { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescription CaptureDescription { get; set; } /// /// Properties of Destination where capture will be stored. (Storage Account, Blob Names) /// - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestination CaptureDescriptionDestination { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestination CaptureDescriptionDestination { get; set; } /// A value that indicates whether capture description is enabled. bool? CaptureEnabled { get; set; } /// Enumerates the possible values for cleanup policy - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CleanupPolicyRetentionDescription? CleanupPolicy { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Delete", "Compact")] + string CleanupPolicy { get; set; } /// Exact time the Event Hub was created. global::System.DateTime? CreatedAt { get; set; } /// The Azure Data Lake Store name for the captured events @@ -557,20 +650,22 @@ internal partial interface IEventhubInternal : /// Subscription Id of Azure Data Lake Store string DataLakeSubscriptionId { get; set; } /// A value that indicates whether capture description is enabled. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureIdentity DestinationIdentity { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureIdentity DestinationIdentity { get; set; } /// Name for capture destination string DestinationName { get; set; } /// /// Properties describing the storage account, blob container and archive name format for capture destination /// - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationProperties DestinationProperty { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationProperties DestinationProperty { get; set; } /// /// Enumerates the possible values for the encoding format of capture description. Note: 'AvroDeflate' will be deprecated /// in New API Version /// - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription? Encoding { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Avro", "AvroDeflate")] + string Encoding { get; set; } /// Type of Azure Active Directory Managed Identity. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType? IdentityType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("SystemAssigned", "UserAssigned")] + string IdentityType { get; set; } /// /// The time window allows you to set the frequency with which the capture to Azure Blobs will happen, value should between /// 60 to 900 seconds @@ -585,11 +680,11 @@ internal partial interface IEventhubInternal : /// long? PartitionCount { get; set; } /// Current number of shards on the Event Hub. - string[] PartitionId { get; set; } + System.Collections.Generic.List PartitionId { get; set; } /// Properties supplied to the Create Or Update Event Hub operation. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubProperties Property { get; set; } /// Event Hub retention settings - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRetentionDescription RetentionDescription { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRetentionDescription RetentionDescription { get; set; } /// /// Number of hours to retain the events for this Event Hub. This value is only used when cleanupPolicy is Delete. If cleanupPolicy /// is Compact the returned value of this property is Long.MaxValue @@ -603,23 +698,26 @@ internal partial interface IEventhubInternal : /// A value that indicates whether to Skip Empty Archives bool? SkipEmptyArchive { get; set; } /// Enumerates the possible values for the status of the Event Hub. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus? Status { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Active", "Disabled", "Restoring", "SendDisabled", "ReceiveDisabled", "Creating", "Deleting", "Renaming", "Unknown")] + string Status { get; set; } /// Resource id of the storage account to be used to create the blobs string StorageAccountResourceId { get; set; } /// The system meta data relating to this resource. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData SystemData { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData SystemData { get; set; } /// The timestamp of resource creation (UTC). global::System.DateTime? SystemDataCreatedAt { get; set; } /// The identity that created the resource. string SystemDataCreatedBy { get; set; } /// The type of identity that created the resource. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataCreatedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; set; } /// The type of identity that last modified the resource. global::System.DateTime? SystemDataLastModifiedAt { get; set; } /// The identity that last modified the resource. string SystemDataLastModifiedBy { get; set; } /// The type of identity that last modified the resource. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; set; } /// /// Number of hours to retain the tombstone markers of a compacted Event Hub. This value is only used when cleanupPolicy is /// Compact. Consumer must complete reading the tombstone marker within this specified amount of time if consumer begins from diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Eventhub.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/Eventhub.json.cs similarity index 90% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Eventhub.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/Eventhub.json.cs index 1078e241e568..2a04a7ed27ba 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Eventhub.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/Eventhub.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -65,20 +65,18 @@ internal Eventhub(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonO { return; } - __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ProxyResource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.EventhubProperties.FromJson(__jsonProperties) : Property;} - {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.SystemData.FromJson(__jsonSystemData) : SystemData;} + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.EventhubProperties.FromJson(__jsonProperties) : _property;} + {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SystemData.FromJson(__jsonSystemData) : _systemData;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub. /// /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub. + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new Eventhub(json) : null; } @@ -104,7 +102,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode ToJson( } __proxyResource?.ToJson(container, serializationMode); AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add ); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/EventhubProperties.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/EventhubProperties.PowerShell.cs new file mode 100644 index 000000000000..82cb755a9739 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/EventhubProperties.PowerShell.cs @@ -0,0 +1,380 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + + /// Properties supplied to the Create Or Update Event Hub operation. + [System.ComponentModel.TypeConverter(typeof(EventhubPropertiesTypeConverter))] + public partial class EventhubProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new EventhubProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new EventhubProperties(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal EventhubProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CaptureDescription")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).CaptureDescription = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescription) content.GetValueForProperty("CaptureDescription",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).CaptureDescription, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.CaptureDescriptionTypeConverter.ConvertFrom); + } + if (content.Contains("RetentionDescription")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).RetentionDescription = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRetentionDescription) content.GetValueForProperty("RetentionDescription",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).RetentionDescription, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.RetentionDescriptionTypeConverter.ConvertFrom); + } + if (content.Contains("PartitionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).PartitionId = (System.Collections.Generic.List) content.GetValueForProperty("PartitionId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).PartitionId, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("CreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("UpdatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("MessageRetentionInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).MessageRetentionInDay = (long?) content.GetValueForProperty("MessageRetentionInDay",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).MessageRetentionInDay, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("PartitionCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).PartitionCount = (long?) content.GetValueForProperty("PartitionCount",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).PartitionCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("CaptureDescriptionDestination")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).CaptureDescriptionDestination = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestination) content.GetValueForProperty("CaptureDescriptionDestination",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).CaptureDescriptionDestination, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.DestinationTypeConverter.ConvertFrom); + } + if (content.Contains("CaptureDescriptionEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).CaptureDescriptionEnabled = (bool?) content.GetValueForProperty("CaptureDescriptionEnabled",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).CaptureDescriptionEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("CaptureDescriptionEncoding")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).CaptureDescriptionEncoding = (string) content.GetValueForProperty("CaptureDescriptionEncoding",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).CaptureDescriptionEncoding, global::System.Convert.ToString); + } + if (content.Contains("CaptureDescriptionIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).CaptureDescriptionIntervalInSecond = (int?) content.GetValueForProperty("CaptureDescriptionIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).CaptureDescriptionIntervalInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CaptureDescriptionSizeLimitInByte")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).CaptureDescriptionSizeLimitInByte = (int?) content.GetValueForProperty("CaptureDescriptionSizeLimitInByte",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).CaptureDescriptionSizeLimitInByte, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CaptureDescriptionSkipEmptyArchive")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).CaptureDescriptionSkipEmptyArchive = (bool?) content.GetValueForProperty("CaptureDescriptionSkipEmptyArchive",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).CaptureDescriptionSkipEmptyArchive, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DestinationProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).DestinationProperty = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationProperties) content.GetValueForProperty("DestinationProperty",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).DestinationProperty, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.DestinationPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("DestinationName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).DestinationName = (string) content.GetValueForProperty("DestinationName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).DestinationName, global::System.Convert.ToString); + } + if (content.Contains("RetentionDescriptionCleanupPolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).RetentionDescriptionCleanupPolicy = (string) content.GetValueForProperty("RetentionDescriptionCleanupPolicy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).RetentionDescriptionCleanupPolicy, global::System.Convert.ToString); + } + if (content.Contains("RetentionDescriptionRetentionTimeInHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).RetentionDescriptionRetentionTimeInHour = (long?) content.GetValueForProperty("RetentionDescriptionRetentionTimeInHour",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).RetentionDescriptionRetentionTimeInHour, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("RetentionDescriptionTombstoneRetentionTimeInHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).RetentionDescriptionTombstoneRetentionTimeInHour = (int?) content.GetValueForProperty("RetentionDescriptionTombstoneRetentionTimeInHour",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).RetentionDescriptionTombstoneRetentionTimeInHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DestinationIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).DestinationIdentity = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureIdentity) content.GetValueForProperty("DestinationIdentity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).DestinationIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.CaptureIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("BlobContainer")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).BlobContainer = (string) content.GetValueForProperty("BlobContainer",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).BlobContainer, global::System.Convert.ToString); + } + if (content.Contains("IdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).IdentityType = (string) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).IdentityType, global::System.Convert.ToString); + } + if (content.Contains("IdentityUserAssignedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).IdentityUserAssignedIdentity = (string) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).IdentityUserAssignedIdentity, global::System.Convert.ToString); + } + if (content.Contains("StorageAccountResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).StorageAccountResourceId = (string) content.GetValueForProperty("StorageAccountResourceId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).StorageAccountResourceId, global::System.Convert.ToString); + } + if (content.Contains("ArchiveNameFormat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).ArchiveNameFormat = (string) content.GetValueForProperty("ArchiveNameFormat",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).ArchiveNameFormat, global::System.Convert.ToString); + } + if (content.Contains("DataLakeSubscriptionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).DataLakeSubscriptionId = (string) content.GetValueForProperty("DataLakeSubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).DataLakeSubscriptionId, global::System.Convert.ToString); + } + if (content.Contains("DataLakeAccountName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).DataLakeAccountName = (string) content.GetValueForProperty("DataLakeAccountName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).DataLakeAccountName, global::System.Convert.ToString); + } + if (content.Contains("DataLakeFolderPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).DataLakeFolderPath = (string) content.GetValueForProperty("DataLakeFolderPath",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).DataLakeFolderPath, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal EventhubProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CaptureDescription")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).CaptureDescription = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescription) content.GetValueForProperty("CaptureDescription",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).CaptureDescription, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.CaptureDescriptionTypeConverter.ConvertFrom); + } + if (content.Contains("RetentionDescription")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).RetentionDescription = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRetentionDescription) content.GetValueForProperty("RetentionDescription",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).RetentionDescription, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.RetentionDescriptionTypeConverter.ConvertFrom); + } + if (content.Contains("PartitionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).PartitionId = (System.Collections.Generic.List) content.GetValueForProperty("PartitionId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).PartitionId, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("CreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("UpdatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).UpdatedAt = (global::System.DateTime?) content.GetValueForProperty("UpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).UpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("MessageRetentionInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).MessageRetentionInDay = (long?) content.GetValueForProperty("MessageRetentionInDay",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).MessageRetentionInDay, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("PartitionCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).PartitionCount = (long?) content.GetValueForProperty("PartitionCount",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).PartitionCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("CaptureDescriptionDestination")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).CaptureDescriptionDestination = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestination) content.GetValueForProperty("CaptureDescriptionDestination",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).CaptureDescriptionDestination, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.DestinationTypeConverter.ConvertFrom); + } + if (content.Contains("CaptureDescriptionEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).CaptureDescriptionEnabled = (bool?) content.GetValueForProperty("CaptureDescriptionEnabled",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).CaptureDescriptionEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("CaptureDescriptionEncoding")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).CaptureDescriptionEncoding = (string) content.GetValueForProperty("CaptureDescriptionEncoding",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).CaptureDescriptionEncoding, global::System.Convert.ToString); + } + if (content.Contains("CaptureDescriptionIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).CaptureDescriptionIntervalInSecond = (int?) content.GetValueForProperty("CaptureDescriptionIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).CaptureDescriptionIntervalInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CaptureDescriptionSizeLimitInByte")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).CaptureDescriptionSizeLimitInByte = (int?) content.GetValueForProperty("CaptureDescriptionSizeLimitInByte",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).CaptureDescriptionSizeLimitInByte, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CaptureDescriptionSkipEmptyArchive")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).CaptureDescriptionSkipEmptyArchive = (bool?) content.GetValueForProperty("CaptureDescriptionSkipEmptyArchive",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).CaptureDescriptionSkipEmptyArchive, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DestinationProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).DestinationProperty = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationProperties) content.GetValueForProperty("DestinationProperty",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).DestinationProperty, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.DestinationPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("DestinationName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).DestinationName = (string) content.GetValueForProperty("DestinationName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).DestinationName, global::System.Convert.ToString); + } + if (content.Contains("RetentionDescriptionCleanupPolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).RetentionDescriptionCleanupPolicy = (string) content.GetValueForProperty("RetentionDescriptionCleanupPolicy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).RetentionDescriptionCleanupPolicy, global::System.Convert.ToString); + } + if (content.Contains("RetentionDescriptionRetentionTimeInHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).RetentionDescriptionRetentionTimeInHour = (long?) content.GetValueForProperty("RetentionDescriptionRetentionTimeInHour",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).RetentionDescriptionRetentionTimeInHour, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("RetentionDescriptionTombstoneRetentionTimeInHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).RetentionDescriptionTombstoneRetentionTimeInHour = (int?) content.GetValueForProperty("RetentionDescriptionTombstoneRetentionTimeInHour",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).RetentionDescriptionTombstoneRetentionTimeInHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DestinationIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).DestinationIdentity = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureIdentity) content.GetValueForProperty("DestinationIdentity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).DestinationIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.CaptureIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("BlobContainer")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).BlobContainer = (string) content.GetValueForProperty("BlobContainer",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).BlobContainer, global::System.Convert.ToString); + } + if (content.Contains("IdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).IdentityType = (string) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).IdentityType, global::System.Convert.ToString); + } + if (content.Contains("IdentityUserAssignedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).IdentityUserAssignedIdentity = (string) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).IdentityUserAssignedIdentity, global::System.Convert.ToString); + } + if (content.Contains("StorageAccountResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).StorageAccountResourceId = (string) content.GetValueForProperty("StorageAccountResourceId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).StorageAccountResourceId, global::System.Convert.ToString); + } + if (content.Contains("ArchiveNameFormat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).ArchiveNameFormat = (string) content.GetValueForProperty("ArchiveNameFormat",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).ArchiveNameFormat, global::System.Convert.ToString); + } + if (content.Contains("DataLakeSubscriptionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).DataLakeSubscriptionId = (string) content.GetValueForProperty("DataLakeSubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).DataLakeSubscriptionId, global::System.Convert.ToString); + } + if (content.Contains("DataLakeAccountName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).DataLakeAccountName = (string) content.GetValueForProperty("DataLakeAccountName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).DataLakeAccountName, global::System.Convert.ToString); + } + if (content.Contains("DataLakeFolderPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).DataLakeFolderPath = (string) content.GetValueForProperty("DataLakeFolderPath",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal)this).DataLakeFolderPath, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Properties supplied to the Create Or Update Event Hub operation. + [System.ComponentModel.TypeConverter(typeof(EventhubPropertiesTypeConverter))] + public partial interface IEventhubProperties + + { + + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EventhubProperties.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/EventhubProperties.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EventhubProperties.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/EventhubProperties.TypeConverter.cs index f08a23cdd55e..8ee1c885f344 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EventhubProperties.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/EventhubProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EventhubProperties.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/EventhubProperties.cs similarity index 69% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EventhubProperties.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/EventhubProperties.cs index d6e9aec0e635..8f0544624fd3 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EventhubProperties.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/EventhubProperties.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// Properties supplied to the Create Or Update Event Hub operation. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class EventhubProperties : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubProperties, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubProperties, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal { /// @@ -19,47 +19,47 @@ public partial class EventhubProperties : /// Here all the parameters (Namespace,EventHub .. etc) are mandatory irrespective of order /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string ArchiveNameFormat { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)CaptureDescription).ArchiveNameFormat; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)CaptureDescription).ArchiveNameFormat = value ?? null; } + public string ArchiveNameFormat { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)CaptureDescription).ArchiveNameFormat; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)CaptureDescription).ArchiveNameFormat = value ?? null; } /// Blob container Name [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string BlobContainer { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)CaptureDescription).BlobContainer; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)CaptureDescription).BlobContainer = value ?? null; } + public string BlobContainer { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)CaptureDescription).BlobContainer; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)CaptureDescription).BlobContainer = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescription _captureDescription; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescription _captureDescription; /// Properties of capture description [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescription CaptureDescription { get => (this._captureDescription = this._captureDescription ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.CaptureDescription()); set => this._captureDescription = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescription CaptureDescription { get => (this._captureDescription = this._captureDescription ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.CaptureDescription()); set => this._captureDescription = value; } /// A value that indicates whether capture description is enabled. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public bool? CaptureDescriptionEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)CaptureDescription).Enabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)CaptureDescription).Enabled = value ?? default(bool); } + public bool? CaptureDescriptionEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)CaptureDescription).Enabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)CaptureDescription).Enabled = value ?? default(bool); } /// /// Enumerates the possible values for the encoding format of capture description. Note: 'AvroDeflate' will be deprecated /// in New API Version /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription? CaptureDescriptionEncoding { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)CaptureDescription).Encoding; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)CaptureDescription).Encoding = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription)""); } + public string CaptureDescriptionEncoding { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)CaptureDescription).Encoding; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)CaptureDescription).Encoding = value ?? null; } /// /// The time window allows you to set the frequency with which the capture to Azure Blobs will happen, value should between /// 60 to 900 seconds /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public int? CaptureDescriptionIntervalInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)CaptureDescription).IntervalInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)CaptureDescription).IntervalInSecond = value ?? default(int); } + public int? CaptureDescriptionIntervalInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)CaptureDescription).IntervalInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)CaptureDescription).IntervalInSecond = value ?? default(int); } /// /// The size window defines the amount of data built up in your Event Hub before an capture operation, value should be between /// 10485760 to 524288000 bytes /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public int? CaptureDescriptionSizeLimitInByte { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)CaptureDescription).SizeLimitInByte; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)CaptureDescription).SizeLimitInByte = value ?? default(int); } + public int? CaptureDescriptionSizeLimitInByte { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)CaptureDescription).SizeLimitInByte; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)CaptureDescription).SizeLimitInByte = value ?? default(int); } /// A value that indicates whether to Skip Empty Archives [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public bool? CaptureDescriptionSkipEmptyArchive { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)CaptureDescription).SkipEmptyArchive; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)CaptureDescription).SkipEmptyArchive = value ?? default(bool); } + public bool? CaptureDescriptionSkipEmptyArchive { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)CaptureDescription).SkipEmptyArchive; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)CaptureDescription).SkipEmptyArchive = value ?? default(bool); } /// Backing field for property. private global::System.DateTime? _createdAt; @@ -70,30 +70,30 @@ public partial class EventhubProperties : /// The Azure Data Lake Store name for the captured events [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string DataLakeAccountName { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)CaptureDescription).DataLakeAccountName; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)CaptureDescription).DataLakeAccountName = value ?? null; } + public string DataLakeAccountName { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)CaptureDescription).DataLakeAccountName; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)CaptureDescription).DataLakeAccountName = value ?? null; } /// The destination folder path for the captured events [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string DataLakeFolderPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)CaptureDescription).DataLakeFolderPath; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)CaptureDescription).DataLakeFolderPath = value ?? null; } + public string DataLakeFolderPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)CaptureDescription).DataLakeFolderPath; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)CaptureDescription).DataLakeFolderPath = value ?? null; } /// Subscription Id of Azure Data Lake Store [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string DataLakeSubscriptionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)CaptureDescription).DataLakeSubscriptionId; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)CaptureDescription).DataLakeSubscriptionId = value ?? null; } + public string DataLakeSubscriptionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)CaptureDescription).DataLakeSubscriptionId; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)CaptureDescription).DataLakeSubscriptionId = value ?? null; } /// Name for capture destination [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string DestinationName { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)CaptureDescription).DestinationName; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)CaptureDescription).DestinationName = value ?? null; } + public string DestinationName { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)CaptureDescription).DestinationName; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)CaptureDescription).DestinationName = value ?? null; } /// Type of Azure Active Directory Managed Identity. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType? IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)CaptureDescription).IdentityType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)CaptureDescription).IdentityType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType)""); } + public string IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)CaptureDescription).IdentityType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)CaptureDescription).IdentityType = value ?? null; } /// /// ARM ID of Managed User Identity. This property is required is the type is UserAssignedIdentity. If type is SystemAssigned, /// then the System Assigned Identity Associated with the namespace will be used. /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string IdentityUserAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)CaptureDescription).IdentityUserAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)CaptureDescription).IdentityUserAssignedIdentity = value ?? null; } + public string IdentityUserAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)CaptureDescription).IdentityUserAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)CaptureDescription).IdentityUserAssignedIdentity = value ?? null; } /// Backing field for property. private long? _messageRetentionInDay; @@ -105,28 +105,28 @@ public partial class EventhubProperties : public long? MessageRetentionInDay { get => this._messageRetentionInDay; set => this._messageRetentionInDay = value; } /// Internal Acessors for CaptureDescription - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescription Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal.CaptureDescription { get => (this._captureDescription = this._captureDescription ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.CaptureDescription()); set { {_captureDescription = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescription Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal.CaptureDescription { get => (this._captureDescription = this._captureDescription ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.CaptureDescription()); set { {_captureDescription = value;} } } /// Internal Acessors for CaptureDescriptionDestination - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestination Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal.CaptureDescriptionDestination { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)CaptureDescription).Destination; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)CaptureDescription).Destination = value; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestination Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal.CaptureDescriptionDestination { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)CaptureDescription).Destination; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)CaptureDescription).Destination = value; } /// Internal Acessors for CreatedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal.CreatedAt { get => this._createdAt; set { {_createdAt = value;} } } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal.CreatedAt { get => this._createdAt; set { {_createdAt = value;} } } /// Internal Acessors for DestinationIdentity - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureIdentity Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal.DestinationIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)CaptureDescription).DestinationIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)CaptureDescription).DestinationIdentity = value; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureIdentity Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal.DestinationIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)CaptureDescription).DestinationIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)CaptureDescription).DestinationIdentity = value; } /// Internal Acessors for DestinationProperty - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationProperties Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal.DestinationProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)CaptureDescription).DestinationProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)CaptureDescription).DestinationProperty = value; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationProperties Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal.DestinationProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)CaptureDescription).DestinationProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)CaptureDescription).DestinationProperty = value; } /// Internal Acessors for PartitionId - string[] Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal.PartitionId { get => this._partitionId; set { {_partitionId = value;} } } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal.PartitionId { get => this._partitionId; set { {_partitionId = value;} } } /// Internal Acessors for RetentionDescription - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRetentionDescription Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal.RetentionDescription { get => (this._retentionDescription = this._retentionDescription ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.RetentionDescription()); set { {_retentionDescription = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRetentionDescription Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal.RetentionDescription { get => (this._retentionDescription = this._retentionDescription ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.RetentionDescription()); set { {_retentionDescription = value;} } } /// Internal Acessors for UpdatedAt - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubPropertiesInternal.UpdatedAt { get => this._updatedAt; set { {_updatedAt = value;} } } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubPropertiesInternal.UpdatedAt { get => this._updatedAt; set { {_updatedAt = value;} } } /// Backing field for property. private long? _partitionCount; @@ -138,29 +138,29 @@ public partial class EventhubProperties : public long? PartitionCount { get => this._partitionCount; set => this._partitionCount = value; } /// Backing field for property. - private string[] _partitionId; + private System.Collections.Generic.List _partitionId; /// Current number of shards on the Event Hub. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public string[] PartitionId { get => this._partitionId; } + public System.Collections.Generic.List PartitionId { get => this._partitionId; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRetentionDescription _retentionDescription; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRetentionDescription _retentionDescription; /// Event Hub retention settings [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRetentionDescription RetentionDescription { get => (this._retentionDescription = this._retentionDescription ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.RetentionDescription()); set => this._retentionDescription = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRetentionDescription RetentionDescription { get => (this._retentionDescription = this._retentionDescription ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.RetentionDescription()); set => this._retentionDescription = value; } /// Enumerates the possible values for cleanup policy [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CleanupPolicyRetentionDescription? RetentionDescriptionCleanupPolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRetentionDescriptionInternal)RetentionDescription).CleanupPolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRetentionDescriptionInternal)RetentionDescription).CleanupPolicy = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CleanupPolicyRetentionDescription)""); } + public string RetentionDescriptionCleanupPolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRetentionDescriptionInternal)RetentionDescription).CleanupPolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRetentionDescriptionInternal)RetentionDescription).CleanupPolicy = value ?? null; } /// /// Number of hours to retain the events for this Event Hub. This value is only used when cleanupPolicy is Delete. If cleanupPolicy /// is Compact the returned value of this property is Long.MaxValue /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public long? RetentionDescriptionRetentionTimeInHour { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRetentionDescriptionInternal)RetentionDescription).RetentionTimeInHour; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRetentionDescriptionInternal)RetentionDescription).RetentionTimeInHour = value ?? default(long); } + public long? RetentionDescriptionRetentionTimeInHour { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRetentionDescriptionInternal)RetentionDescription).RetentionTimeInHour; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRetentionDescriptionInternal)RetentionDescription).RetentionTimeInHour = value ?? default(long); } /// /// Number of hours to retain the tombstone markers of a compacted Event Hub. This value is only used when cleanupPolicy is @@ -169,18 +169,18 @@ public partial class EventhubProperties : /// compacted Event Hub /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public int? RetentionDescriptionTombstoneRetentionTimeInHour { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRetentionDescriptionInternal)RetentionDescription).TombstoneRetentionTimeInHour; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRetentionDescriptionInternal)RetentionDescription).TombstoneRetentionTimeInHour = value ?? default(int); } + public int? RetentionDescriptionTombstoneRetentionTimeInHour { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRetentionDescriptionInternal)RetentionDescription).TombstoneRetentionTimeInHour; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRetentionDescriptionInternal)RetentionDescription).TombstoneRetentionTimeInHour = value ?? default(int); } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus? _status; + private string _status; /// Enumerates the possible values for the status of the Event Hub. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus? Status { get => this._status; set => this._status = value; } + public string Status { get => this._status; set => this._status = value; } /// Resource id of the storage account to be used to create the blobs [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string StorageAccountResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)CaptureDescription).StorageAccountResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescriptionInternal)CaptureDescription).StorageAccountResourceId = value ?? null; } + public string StorageAccountResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)CaptureDescription).StorageAccountResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescriptionInternal)CaptureDescription).StorageAccountResourceId = value ?? null; } /// Backing field for property. private global::System.DateTime? _updatedAt; @@ -206,6 +206,9 @@ public partial interface IEventhubProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Blob naming convention for archive, e.g. {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}. Here all the parameters (Namespace,EventHub .. etc) are mandatory irrespective of order", SerializedName = @"archiveNameFormat", PossibleTypes = new [] { typeof(string) })] @@ -214,6 +217,9 @@ public partial interface IEventhubProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Blob container Name", SerializedName = @"blobContainer", PossibleTypes = new [] { typeof(string) })] @@ -222,6 +228,9 @@ public partial interface IEventhubProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"A value that indicates whether capture description is enabled. ", SerializedName = @"enabled", PossibleTypes = new [] { typeof(bool) })] @@ -233,10 +242,14 @@ public partial interface IEventhubProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Enumerates the possible values for the encoding format of capture description. Note: 'AvroDeflate' will be deprecated in New API Version", SerializedName = @"encoding", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription? CaptureDescriptionEncoding { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Avro", "AvroDeflate")] + string CaptureDescriptionEncoding { get; set; } /// /// The time window allows you to set the frequency with which the capture to Azure Blobs will happen, value should between /// 60 to 900 seconds @@ -244,6 +257,9 @@ public partial interface IEventhubProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The time window allows you to set the frequency with which the capture to Azure Blobs will happen, value should between 60 to 900 seconds", SerializedName = @"intervalInSeconds", PossibleTypes = new [] { typeof(int) })] @@ -255,6 +271,9 @@ public partial interface IEventhubProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The size window defines the amount of data built up in your Event Hub before an capture operation, value should be between 10485760 to 524288000 bytes", SerializedName = @"sizeLimitInBytes", PossibleTypes = new [] { typeof(int) })] @@ -263,6 +282,9 @@ public partial interface IEventhubProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"A value that indicates whether to Skip Empty Archives", SerializedName = @"skipEmptyArchives", PossibleTypes = new [] { typeof(bool) })] @@ -271,6 +293,9 @@ public partial interface IEventhubProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Exact time the Event Hub was created.", SerializedName = @"createdAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -279,6 +304,9 @@ public partial interface IEventhubProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The Azure Data Lake Store name for the captured events", SerializedName = @"dataLakeAccountName", PossibleTypes = new [] { typeof(string) })] @@ -287,6 +315,9 @@ public partial interface IEventhubProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The destination folder path for the captured events", SerializedName = @"dataLakeFolderPath", PossibleTypes = new [] { typeof(string) })] @@ -295,6 +326,9 @@ public partial interface IEventhubProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Subscription Id of Azure Data Lake Store", SerializedName = @"dataLakeSubscriptionId", PossibleTypes = new [] { typeof(string) })] @@ -303,6 +337,9 @@ public partial interface IEventhubProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Name for capture destination", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] @@ -311,10 +348,14 @@ public partial interface IEventhubProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Type of Azure Active Directory Managed Identity.", SerializedName = @"type", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType? IdentityType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("SystemAssigned", "UserAssigned")] + string IdentityType { get; set; } /// /// ARM ID of Managed User Identity. This property is required is the type is UserAssignedIdentity. If type is SystemAssigned, /// then the System Assigned Identity Associated with the namespace will be used. @@ -322,6 +363,9 @@ public partial interface IEventhubProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"ARM ID of Managed User Identity. This property is required is the type is UserAssignedIdentity. If type is SystemAssigned, then the System Assigned Identity Associated with the namespace will be used.", SerializedName = @"userAssignedIdentity", PossibleTypes = new [] { typeof(string) })] @@ -332,6 +376,9 @@ public partial interface IEventhubProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Number of days to retain the events for this Event Hub, value should be 1 to 7 days", SerializedName = @"messageRetentionInDays", PossibleTypes = new [] { typeof(long) })] @@ -342,6 +389,9 @@ public partial interface IEventhubProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Number of partitions created for the Event Hub, allowed values are from 1 to 32 partitions.", SerializedName = @"partitionCount", PossibleTypes = new [] { typeof(long) })] @@ -350,18 +400,25 @@ public partial interface IEventhubProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Current number of shards on the Event Hub.", SerializedName = @"partitionIds", PossibleTypes = new [] { typeof(string) })] - string[] PartitionId { get; } + System.Collections.Generic.List PartitionId { get; } /// Enumerates the possible values for cleanup policy [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Enumerates the possible values for cleanup policy", SerializedName = @"cleanupPolicy", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CleanupPolicyRetentionDescription) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CleanupPolicyRetentionDescription? RetentionDescriptionCleanupPolicy { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Delete", "Compact")] + string RetentionDescriptionCleanupPolicy { get; set; } /// /// Number of hours to retain the events for this Event Hub. This value is only used when cleanupPolicy is Delete. If cleanupPolicy /// is Compact the returned value of this property is Long.MaxValue @@ -369,6 +426,9 @@ public partial interface IEventhubProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Number of hours to retain the events for this Event Hub. This value is only used when cleanupPolicy is Delete. If cleanupPolicy is Compact the returned value of this property is Long.MaxValue ", SerializedName = @"retentionTimeInHours", PossibleTypes = new [] { typeof(long) })] @@ -382,6 +442,9 @@ public partial interface IEventhubProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Number of hours to retain the tombstone markers of a compacted Event Hub. This value is only used when cleanupPolicy is Compact. Consumer must complete reading the tombstone marker within this specified amount of time if consumer begins from starting offset to ensure they get a valid snapshot for the specific key described by the tombstone marker within the compacted Event Hub", SerializedName = @"tombstoneRetentionTimeInHours", PossibleTypes = new [] { typeof(int) })] @@ -390,14 +453,21 @@ public partial interface IEventhubProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Enumerates the possible values for the status of the Event Hub.", SerializedName = @"status", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus? Status { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Active", "Disabled", "Restoring", "SendDisabled", "ReceiveDisabled", "Creating", "Deleting", "Renaming", "Unknown")] + string Status { get; set; } /// Resource id of the storage account to be used to create the blobs [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Resource id of the storage account to be used to create the blobs", SerializedName = @"storageAccountResourceId", PossibleTypes = new [] { typeof(string) })] @@ -406,6 +476,9 @@ public partial interface IEventhubProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The exact time the message was updated.", SerializedName = @"updatedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -424,18 +497,19 @@ internal partial interface IEventhubPropertiesInternal /// Blob container Name string BlobContainer { get; set; } /// Properties of capture description - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureDescription CaptureDescription { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureDescription CaptureDescription { get; set; } /// /// Properties of Destination where capture will be stored. (Storage Account, Blob Names) /// - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestination CaptureDescriptionDestination { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestination CaptureDescriptionDestination { get; set; } /// A value that indicates whether capture description is enabled. bool? CaptureDescriptionEnabled { get; set; } /// /// Enumerates the possible values for the encoding format of capture description. Note: 'AvroDeflate' will be deprecated /// in New API Version /// - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription? CaptureDescriptionEncoding { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Avro", "AvroDeflate")] + string CaptureDescriptionEncoding { get; set; } /// /// The time window allows you to set the frequency with which the capture to Azure Blobs will happen, value should between /// 60 to 900 seconds @@ -457,15 +531,16 @@ internal partial interface IEventhubPropertiesInternal /// Subscription Id of Azure Data Lake Store string DataLakeSubscriptionId { get; set; } /// A value that indicates whether capture description is enabled. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICaptureIdentity DestinationIdentity { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICaptureIdentity DestinationIdentity { get; set; } /// Name for capture destination string DestinationName { get; set; } /// /// Properties describing the storage account, blob container and archive name format for capture destination /// - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IDestinationProperties DestinationProperty { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IDestinationProperties DestinationProperty { get; set; } /// Type of Azure Active Directory Managed Identity. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType? IdentityType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("SystemAssigned", "UserAssigned")] + string IdentityType { get; set; } /// /// ARM ID of Managed User Identity. This property is required is the type is UserAssignedIdentity. If type is SystemAssigned, /// then the System Assigned Identity Associated with the namespace will be used. @@ -480,11 +555,12 @@ internal partial interface IEventhubPropertiesInternal /// long? PartitionCount { get; set; } /// Current number of shards on the Event Hub. - string[] PartitionId { get; set; } + System.Collections.Generic.List PartitionId { get; set; } /// Event Hub retention settings - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRetentionDescription RetentionDescription { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRetentionDescription RetentionDescription { get; set; } /// Enumerates the possible values for cleanup policy - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CleanupPolicyRetentionDescription? RetentionDescriptionCleanupPolicy { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Delete", "Compact")] + string RetentionDescriptionCleanupPolicy { get; set; } /// /// Number of hours to retain the events for this Event Hub. This value is only used when cleanupPolicy is Delete. If cleanupPolicy /// is Compact the returned value of this property is Long.MaxValue @@ -498,7 +574,8 @@ internal partial interface IEventhubPropertiesInternal /// int? RetentionDescriptionTombstoneRetentionTimeInHour { get; set; } /// Enumerates the possible values for the status of the Event Hub. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus? Status { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Active", "Disabled", "Restoring", "SendDisabled", "ReceiveDisabled", "Creating", "Deleting", "Renaming", "Unknown")] + string Status { get; set; } /// Resource id of the storage account to be used to create the blobs string StorageAccountResourceId { get; set; } /// The exact time the message was updated. diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EventhubProperties.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/EventhubProperties.json.cs similarity index 89% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EventhubProperties.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/EventhubProperties.json.cs index 7be844469478..03813ab3c9fd 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/EventhubProperties.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/EventhubProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -65,25 +65,25 @@ internal EventhubProperties(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime. { return; } - {_captureDescription = If( json?.PropertyT("captureDescription"), out var __jsonCaptureDescription) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.CaptureDescription.FromJson(__jsonCaptureDescription) : CaptureDescription;} - {_retentionDescription = If( json?.PropertyT("retentionDescription"), out var __jsonRetentionDescription) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.RetentionDescription.FromJson(__jsonRetentionDescription) : RetentionDescription;} - {_partitionId = If( json?.PropertyT("partitionIds"), out var __jsonPartitionIds) ? If( __jsonPartitionIds as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : PartitionId;} - {_createdAt = If( json?.PropertyT("createdAt"), out var __jsonCreatedAt) ? global::System.DateTime.TryParse((string)__jsonCreatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedAtValue) ? __jsonCreatedAtValue : CreatedAt : CreatedAt;} - {_updatedAt = If( json?.PropertyT("updatedAt"), out var __jsonUpdatedAt) ? global::System.DateTime.TryParse((string)__jsonUpdatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonUpdatedAtValue) ? __jsonUpdatedAtValue : UpdatedAt : UpdatedAt;} - {_messageRetentionInDay = If( json?.PropertyT("messageRetentionInDays"), out var __jsonMessageRetentionInDays) ? (long?)__jsonMessageRetentionInDays : MessageRetentionInDay;} - {_partitionCount = If( json?.PropertyT("partitionCount"), out var __jsonPartitionCount) ? (long?)__jsonPartitionCount : PartitionCount;} - {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} + {_captureDescription = If( json?.PropertyT("captureDescription"), out var __jsonCaptureDescription) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.CaptureDescription.FromJson(__jsonCaptureDescription) : _captureDescription;} + {_retentionDescription = If( json?.PropertyT("retentionDescription"), out var __jsonRetentionDescription) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.RetentionDescription.FromJson(__jsonRetentionDescription) : _retentionDescription;} + {_partitionId = If( json?.PropertyT("partitionIds"), out var __jsonPartitionIds) ? If( __jsonPartitionIds as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : _partitionId;} + {_createdAt = If( json?.PropertyT("createdAt"), out var __jsonCreatedAt) ? global::System.DateTime.TryParse((string)__jsonCreatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedAtValue) ? __jsonCreatedAtValue : _createdAt : _createdAt;} + {_updatedAt = If( json?.PropertyT("updatedAt"), out var __jsonUpdatedAt) ? global::System.DateTime.TryParse((string)__jsonUpdatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonUpdatedAtValue) ? __jsonUpdatedAtValue : _updatedAt : _updatedAt;} + {_messageRetentionInDay = If( json?.PropertyT("messageRetentionInDays"), out var __jsonMessageRetentionInDays) ? (long?)__jsonMessageRetentionInDays : _messageRetentionInDay;} + {_partitionCount = If( json?.PropertyT("partitionCount"), out var __jsonPartitionCount) ? (long?)__jsonPartitionCount : _partitionCount;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)_status;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhubProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhubProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new EventhubProperties(json) : null; } @@ -109,7 +109,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode ToJson( } AddIf( null != this._captureDescription ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) this._captureDescription.ToJson(null,serializationMode) : null, "captureDescription" ,container.Add ); AddIf( null != this._retentionDescription ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) this._retentionDescription.ToJson(null,serializationMode) : null, "retentionDescription" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { if (null != this._partitionId) { @@ -121,11 +121,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode ToJson( container.Add("partitionIds",__w); } } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._createdAt ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._createdAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "createdAt" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._updatedAt ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._updatedAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "updatedAt" ,container.Add ); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/FailOver.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/FailOver.PowerShell.cs similarity index 74% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/FailOver.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/FailOver.PowerShell.cs index 4fe659fe3970..caea3656c498 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/FailOver.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/FailOver.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -62,33 +62,33 @@ public partial class FailOver partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IFailOver DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IFailOver DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new FailOver(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IFailOver DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IFailOver DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new FailOver(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -103,21 +103,21 @@ internal FailOver(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IFailOverInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IFailOverProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IFailOverInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.FailOverPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IFailOverInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IFailOverProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IFailOverInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.FailOverPropertiesTypeConverter.ConvertFrom); } if (content.Contains("PrimaryLocation")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IFailOverInternal)this).PrimaryLocation = (string) content.GetValueForProperty("PrimaryLocation",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IFailOverInternal)this).PrimaryLocation, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IFailOverInternal)this).PrimaryLocation = (string) content.GetValueForProperty("PrimaryLocation",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IFailOverInternal)this).PrimaryLocation, global::System.Convert.ToString); } if (content.Contains("MaximumGracePeriodInMin")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IFailOverInternal)this).MaximumGracePeriodInMin = (int?) content.GetValueForProperty("MaximumGracePeriodInMin",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IFailOverInternal)this).MaximumGracePeriodInMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IFailOverInternal)this).MaximumGracePeriodInMin = (int?) content.GetValueForProperty("MaximumGracePeriodInMin",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IFailOverInternal)this).MaximumGracePeriodInMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -132,15 +132,15 @@ internal FailOver(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IFailOverInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IFailOverProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IFailOverInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.FailOverPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IFailOverInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IFailOverProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IFailOverInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.FailOverPropertiesTypeConverter.ConvertFrom); } if (content.Contains("PrimaryLocation")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IFailOverInternal)this).PrimaryLocation = (string) content.GetValueForProperty("PrimaryLocation",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IFailOverInternal)this).PrimaryLocation, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IFailOverInternal)this).PrimaryLocation = (string) content.GetValueForProperty("PrimaryLocation",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IFailOverInternal)this).PrimaryLocation, global::System.Convert.ToString); } if (content.Contains("MaximumGracePeriodInMin")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IFailOverInternal)this).MaximumGracePeriodInMin = (int?) content.GetValueForProperty("MaximumGracePeriodInMin",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IFailOverInternal)this).MaximumGracePeriodInMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IFailOverInternal)this).MaximumGracePeriodInMin = (int?) content.GetValueForProperty("MaximumGracePeriodInMin",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IFailOverInternal)this).MaximumGracePeriodInMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } AfterDeserializePSObject(content); } @@ -150,7 +150,7 @@ internal FailOver(global::System.Management.Automation.PSObject content) /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IFailOver FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IFailOver FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/FailOver.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/FailOver.TypeConverter.cs similarity index 97% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/FailOver.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/FailOver.TypeConverter.cs index 5a3651047c64..4a8380f9f75b 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/FailOver.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/FailOver.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IFailOver ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IFailOver ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IFailOver).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IFailOver).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/FailOver.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/FailOver.cs similarity index 76% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/FailOver.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/FailOver.cs index 7c54f8a011d0..3628598752e8 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/FailOver.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/FailOver.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class FailOver : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IFailOver, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IFailOverInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IFailOver, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IFailOverInternal { /// @@ -21,20 +21,20 @@ public partial class FailOver : /// replication the namespace stops accepting any new publishing requests /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public int? MaximumGracePeriodInMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IFailOverPropertiesInternal)Property).MaximumGracePeriodInMin; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IFailOverPropertiesInternal)Property).MaximumGracePeriodInMin = value ?? default(int); } + public int? MaximumGracePeriodInMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IFailOverPropertiesInternal)Property).MaximumGracePeriodInMin; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IFailOverPropertiesInternal)Property).MaximumGracePeriodInMin = value ?? default(int); } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IFailOverProperties Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IFailOverInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.FailOverProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IFailOverProperties Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IFailOverInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.FailOverProperties()); set { {_property = value;} } } /// Query parameter for the new primary location after failover. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string PrimaryLocation { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IFailOverPropertiesInternal)Property).PrimaryLocation; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IFailOverPropertiesInternal)Property).PrimaryLocation = value ?? null; } + public string PrimaryLocation { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IFailOverPropertiesInternal)Property).PrimaryLocation; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IFailOverPropertiesInternal)Property).PrimaryLocation = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IFailOverProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IFailOverProperties _property; [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IFailOverProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.FailOverProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IFailOverProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.FailOverProperties()); set => this._property = value; } /// Creates an new instance. public FailOver() @@ -55,6 +55,9 @@ public partial interface IFailOver : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Maximum time duration allowed complete data replication from primary to secondary. Use maximumGracePeriodInMins = 0: For Unplanned Geo-Failover, which switches the role between primary and secondary immediately. The data that is not being replicated yet will be discarded. Use maximumGracePeriodInMins > 0: For Planned Geo-Failover/DR Drill, continue replicating data until grace period expires. Any data that is not replicated during the grace period will be discarded. During the replication the namespace stops accepting any new publishing requests", SerializedName = @"maximumGracePeriodInMins", PossibleTypes = new [] { typeof(int) })] @@ -63,6 +66,9 @@ public partial interface IFailOver : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Query parameter for the new primary location after failover.", SerializedName = @"primaryLocation", PossibleTypes = new [] { typeof(string) })] @@ -83,7 +89,7 @@ internal partial interface IFailOverInternal /// Query parameter for the new primary location after failover. string PrimaryLocation { get; set; } - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IFailOverProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IFailOverProperties Property { get; set; } } } \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/FailOver.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/FailOver.json.cs similarity index 92% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/FailOver.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/FailOver.json.cs index d7d09317b56f..444bbdb7cdb3 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/FailOver.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/FailOver.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -64,18 +64,16 @@ internal FailOver(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonO { return; } - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.FailOverProperties.FromJson(__jsonProperties) : Property;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.FailOverProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IFailOver. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IFailOver. /// /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IFailOver. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IFailOver FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IFailOver. + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IFailOver FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new FailOver(json) : null; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/FailOverProperties.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/FailOverProperties.PowerShell.cs similarity index 78% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/FailOverProperties.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/FailOverProperties.PowerShell.cs index 2e2cbe10f596..f763313c2a2b 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/FailOverProperties.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/FailOverProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -62,33 +62,33 @@ public partial class FailOverProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IFailOverProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IFailOverProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new FailOverProperties(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IFailOverProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IFailOverProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new FailOverProperties(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -103,17 +103,17 @@ internal FailOverProperties(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("PrimaryLocation")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IFailOverPropertiesInternal)this).PrimaryLocation = (string) content.GetValueForProperty("PrimaryLocation",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IFailOverPropertiesInternal)this).PrimaryLocation, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IFailOverPropertiesInternal)this).PrimaryLocation = (string) content.GetValueForProperty("PrimaryLocation",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IFailOverPropertiesInternal)this).PrimaryLocation, global::System.Convert.ToString); } if (content.Contains("MaximumGracePeriodInMin")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IFailOverPropertiesInternal)this).MaximumGracePeriodInMin = (int?) content.GetValueForProperty("MaximumGracePeriodInMin",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IFailOverPropertiesInternal)this).MaximumGracePeriodInMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IFailOverPropertiesInternal)this).MaximumGracePeriodInMin = (int?) content.GetValueForProperty("MaximumGracePeriodInMin",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IFailOverPropertiesInternal)this).MaximumGracePeriodInMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -128,11 +128,11 @@ internal FailOverProperties(global::System.Management.Automation.PSObject conten // actually deserialize if (content.Contains("PrimaryLocation")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IFailOverPropertiesInternal)this).PrimaryLocation = (string) content.GetValueForProperty("PrimaryLocation",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IFailOverPropertiesInternal)this).PrimaryLocation, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IFailOverPropertiesInternal)this).PrimaryLocation = (string) content.GetValueForProperty("PrimaryLocation",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IFailOverPropertiesInternal)this).PrimaryLocation, global::System.Convert.ToString); } if (content.Contains("MaximumGracePeriodInMin")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IFailOverPropertiesInternal)this).MaximumGracePeriodInMin = (int?) content.GetValueForProperty("MaximumGracePeriodInMin",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IFailOverPropertiesInternal)this).MaximumGracePeriodInMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IFailOverPropertiesInternal)this).MaximumGracePeriodInMin = (int?) content.GetValueForProperty("MaximumGracePeriodInMin",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IFailOverPropertiesInternal)this).MaximumGracePeriodInMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } AfterDeserializePSObject(content); } @@ -142,7 +142,7 @@ internal FailOverProperties(global::System.Management.Automation.PSObject conten /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IFailOverProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IFailOverProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/FailOverProperties.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/FailOverProperties.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/FailOverProperties.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/FailOverProperties.TypeConverter.cs index 9d3bda9566de..3e338fb217da 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/FailOverProperties.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/FailOverProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IFailOverProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IFailOverProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IFailOverProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IFailOverProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/FailOverProperties.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/FailOverProperties.cs similarity index 93% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/FailOverProperties.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/FailOverProperties.cs index 3af7c0571a7e..6aa9b094ff4f 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/FailOverProperties.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/FailOverProperties.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class FailOverProperties : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IFailOverProperties, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IFailOverPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IFailOverProperties, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IFailOverPropertiesInternal { /// Backing field for property. @@ -52,6 +52,9 @@ public partial interface IFailOverProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Maximum time duration allowed complete data replication from primary to secondary. Use maximumGracePeriodInMins = 0: For Unplanned Geo-Failover, which switches the role between primary and secondary immediately. The data that is not being replicated yet will be discarded. Use maximumGracePeriodInMins > 0: For Planned Geo-Failover/DR Drill, continue replicating data until grace period expires. Any data that is not replicated during the grace period will be discarded. During the replication the namespace stops accepting any new publishing requests", SerializedName = @"maximumGracePeriodInMins", PossibleTypes = new [] { typeof(int) })] @@ -60,6 +63,9 @@ public partial interface IFailOverProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Query parameter for the new primary location after failover.", SerializedName = @"primaryLocation", PossibleTypes = new [] { typeof(string) })] diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/FailOverProperties.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/FailOverProperties.json.cs similarity index 93% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/FailOverProperties.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/FailOverProperties.json.cs index 66574245a484..a31f76f3153f 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/FailOverProperties.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/FailOverProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -64,19 +64,19 @@ internal FailOverProperties(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime. { return; } - {_primaryLocation = If( json?.PropertyT("primaryLocation"), out var __jsonPrimaryLocation) ? (string)__jsonPrimaryLocation : (string)PrimaryLocation;} - {_maximumGracePeriodInMin = If( json?.PropertyT("maximumGracePeriodInMins"), out var __jsonMaximumGracePeriodInMins) ? (int?)__jsonMaximumGracePeriodInMins : MaximumGracePeriodInMin;} + {_primaryLocation = If( json?.PropertyT("primaryLocation"), out var __jsonPrimaryLocation) ? (string)__jsonPrimaryLocation : (string)_primaryLocation;} + {_maximumGracePeriodInMin = If( json?.PropertyT("maximumGracePeriodInMins"), out var __jsonMaximumGracePeriodInMins) ? (int?)__jsonMaximumGracePeriodInMins : _maximumGracePeriodInMin;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IFailOverProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IFailOverProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IFailOverProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IFailOverProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IFailOverProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IFailOverProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new FailOverProperties(json) : null; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/GeoDataReplicationProperties.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/GeoDataReplicationProperties.PowerShell.cs similarity index 73% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/GeoDataReplicationProperties.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/GeoDataReplicationProperties.PowerShell.cs index c6c2d2a3c6c4..090aa043cc96 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/GeoDataReplicationProperties.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/GeoDataReplicationProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class GeoDataReplicationProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IGeoDataReplicationProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IGeoDataReplicationProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new GeoDataReplicationProperties(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IGeoDataReplicationProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IGeoDataReplicationProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new GeoDataReplicationProperties(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IGeoDataReplicationProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IGeoDataReplicationProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,17 +111,17 @@ internal GeoDataReplicationProperties(global::System.Collections.IDictionary con // actually deserialize if (content.Contains("MaxReplicationLagDurationInSecond")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IGeoDataReplicationPropertiesInternal)this).MaxReplicationLagDurationInSecond = (int?) content.GetValueForProperty("MaxReplicationLagDurationInSecond",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IGeoDataReplicationPropertiesInternal)this).MaxReplicationLagDurationInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IGeoDataReplicationPropertiesInternal)this).MaxReplicationLagDurationInSecond = (int?) content.GetValueForProperty("MaxReplicationLagDurationInSecond",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IGeoDataReplicationPropertiesInternal)this).MaxReplicationLagDurationInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IGeoDataReplicationPropertiesInternal)this).Location = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INamespaceReplicaLocation[]) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IGeoDataReplicationPropertiesInternal)this).Location, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NamespaceReplicaLocationTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IGeoDataReplicationPropertiesInternal)this).Location = (System.Collections.Generic.List) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IGeoDataReplicationPropertiesInternal)this).Location, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NamespaceReplicaLocationTypeConverter.ConvertFrom)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -138,11 +136,11 @@ internal GeoDataReplicationProperties(global::System.Management.Automation.PSObj // actually deserialize if (content.Contains("MaxReplicationLagDurationInSecond")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IGeoDataReplicationPropertiesInternal)this).MaxReplicationLagDurationInSecond = (int?) content.GetValueForProperty("MaxReplicationLagDurationInSecond",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IGeoDataReplicationPropertiesInternal)this).MaxReplicationLagDurationInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IGeoDataReplicationPropertiesInternal)this).MaxReplicationLagDurationInSecond = (int?) content.GetValueForProperty("MaxReplicationLagDurationInSecond",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IGeoDataReplicationPropertiesInternal)this).MaxReplicationLagDurationInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IGeoDataReplicationPropertiesInternal)this).Location = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INamespaceReplicaLocation[]) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IGeoDataReplicationPropertiesInternal)this).Location, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NamespaceReplicaLocationTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IGeoDataReplicationPropertiesInternal)this).Location = (System.Collections.Generic.List) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IGeoDataReplicationPropertiesInternal)this).Location, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NamespaceReplicaLocationTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/GeoDataReplicationProperties.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/GeoDataReplicationProperties.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/GeoDataReplicationProperties.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/GeoDataReplicationProperties.TypeConverter.cs index a94f25a1cf60..f7f7089f9566 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/GeoDataReplicationProperties.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/GeoDataReplicationProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IGeoDataReplicationProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IGeoDataReplicationProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IGeoDataReplicationProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IGeoDataReplicationProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/GeoDataReplicationProperties.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/GeoDataReplicationProperties.cs similarity index 79% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/GeoDataReplicationProperties.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/GeoDataReplicationProperties.cs index 387d2e9eb18d..9c04f9f3ba3d 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/GeoDataReplicationProperties.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/GeoDataReplicationProperties.cs @@ -3,23 +3,23 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// GeoDR Replication properties [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class GeoDataReplicationProperties : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IGeoDataReplicationProperties, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IGeoDataReplicationPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IGeoDataReplicationProperties, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IGeoDataReplicationPropertiesInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INamespaceReplicaLocation[] _location; + private System.Collections.Generic.List _location; /// A list of regions where replicas of the namespace are maintained. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INamespaceReplicaLocation[] Location { get => this._location; set => this._location = value; } + public System.Collections.Generic.List Location { get => this._location; set => this._location = value; } /// Backing field for property. private int? _maxReplicationLagDurationInSecond; @@ -46,10 +46,13 @@ public partial interface IGeoDataReplicationProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"A list of regions where replicas of the namespace are maintained.", SerializedName = @"locations", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INamespaceReplicaLocation) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INamespaceReplicaLocation[] Location { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INamespaceReplicaLocation) })] + System.Collections.Generic.List Location { get; set; } /// /// The maximum acceptable lag for data replication operations from the primary replica to a quorum of secondary replicas. /// When the lag exceeds the configured amount, operations on the primary replica will be failed. The allowed values are 0 @@ -58,6 +61,9 @@ public partial interface IGeoDataReplicationProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The maximum acceptable lag for data replication operations from the primary replica to a quorum of secondary replicas. When the lag exceeds the configured amount, operations on the primary replica will be failed. The allowed values are 0 and 5 minutes to 1 day.", SerializedName = @"maxReplicationLagDurationInSeconds", PossibleTypes = new [] { typeof(int) })] @@ -69,7 +75,7 @@ internal partial interface IGeoDataReplicationPropertiesInternal { /// A list of regions where replicas of the namespace are maintained. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INamespaceReplicaLocation[] Location { get; set; } + System.Collections.Generic.List Location { get; set; } /// /// The maximum acceptable lag for data replication operations from the primary replica to a quorum of secondary replicas. /// When the lag exceeds the configured amount, operations on the primary replica will be failed. The allowed values are 0 diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/GeoDataReplicationProperties.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/GeoDataReplicationProperties.json.cs similarity index 89% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/GeoDataReplicationProperties.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/GeoDataReplicationProperties.json.cs index 290b8bb67bcf..3e1c897bbc80 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/GeoDataReplicationProperties.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/GeoDataReplicationProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class GeoDataReplicationProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IGeoDataReplicationProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IGeoDataReplicationProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IGeoDataReplicationProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IGeoDataReplicationProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IGeoDataReplicationProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IGeoDataReplicationProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new GeoDataReplicationProperties(json) : null; } @@ -77,8 +77,8 @@ internal GeoDataReplicationProperties(Microsoft.Azure.PowerShell.Cmdlets.EventHu { return; } - {_maxReplicationLagDurationInSecond = If( json?.PropertyT("maxReplicationLagDurationInSeconds"), out var __jsonMaxReplicationLagDurationInSeconds) ? (int?)__jsonMaxReplicationLagDurationInSeconds : MaxReplicationLagDurationInSecond;} - {_location = If( json?.PropertyT("locations"), out var __jsonLocations) ? If( __jsonLocations as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INamespaceReplicaLocation) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NamespaceReplicaLocation.FromJson(__u) )) ))() : null : Location;} + {_maxReplicationLagDurationInSecond = If( json?.PropertyT("maxReplicationLagDurationInSeconds"), out var __jsonMaxReplicationLagDurationInSeconds) ? (int?)__jsonMaxReplicationLagDurationInSeconds : _maxReplicationLagDurationInSecond;} + {_location = If( json?.PropertyT("locations"), out var __jsonLocations) ? If( __jsonLocations as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INamespaceReplicaLocation) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NamespaceReplicaLocation.FromJson(__u) )) ))() : null : _location;} AfterFromJson(json); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Identity.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/Identity.PowerShell.cs similarity index 71% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Identity.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/Identity.PowerShell.cs index 592578e6d89d..5d25d9d123d3 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Identity.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/Identity.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class Identity partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new Identity(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new Identity(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -111,25 +111,25 @@ internal Identity(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("PrincipalId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityInternal)this).PrincipalId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityInternal)this).PrincipalId, global::System.Convert.ToString); } if (content.Contains("TenantId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityInternal)this).TenantId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityInternal)this).TenantId, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("UserAssignedIdentity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityInternal)this).UserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityUserAssignedIdentities) content.GetValueForProperty("UserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityInternal)this).UserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IdentityUserAssignedIdentitiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityInternal)this).UserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityUserAssignedIdentities) content.GetValueForProperty("UserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityInternal)this).UserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IdentityUserAssignedIdentitiesTypeConverter.ConvertFrom); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -144,19 +144,19 @@ internal Identity(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("PrincipalId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityInternal)this).PrincipalId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityInternal)this).PrincipalId, global::System.Convert.ToString); } if (content.Contains("TenantId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityInternal)this).TenantId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityInternal)this).TenantId, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("UserAssignedIdentity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityInternal)this).UserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityUserAssignedIdentities) content.GetValueForProperty("UserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityInternal)this).UserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IdentityUserAssignedIdentitiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityInternal)this).UserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityUserAssignedIdentities) content.GetValueForProperty("UserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityInternal)this).UserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IdentityUserAssignedIdentitiesTypeConverter.ConvertFrom); } AfterDeserializePSObject(content); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Identity.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/Identity.TypeConverter.cs similarity index 97% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Identity.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/Identity.TypeConverter.cs index a8bddc207ae1..acc2b50c7135 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Identity.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/Identity.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentity ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentity ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentity).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentity).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Identity.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/Identity.cs similarity index 70% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Identity.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/Identity.cs index 764480ce6dd5..54b3983163ca 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Identity.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/Identity.cs @@ -3,22 +3,22 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// Properties to configure Identity for Bring your Own Keys [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class Identity : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentity, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentity, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityInternal { /// Internal Acessors for PrincipalId - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityInternal.PrincipalId { get => this._principalId; set { {_principalId = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityInternal.PrincipalId { get => this._principalId; set { {_principalId = value;} } } /// Internal Acessors for TenantId - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityInternal.TenantId { get => this._tenantId; set { {_tenantId = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityInternal.TenantId { get => this._tenantId; set { {_tenantId = value;} } } /// Backing field for property. private string _principalId; @@ -35,18 +35,18 @@ public partial class Identity : public string TenantId { get => this._tenantId; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType? _type; + private string _type; /// Type of managed service identity. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType? Type { get => this._type; set => this._type = value; } + public string Type { get => this._type; set => this._type = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityUserAssignedIdentities _userAssignedIdentity; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityUserAssignedIdentities _userAssignedIdentity; /// Properties for User Assigned Identities [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityUserAssignedIdentities UserAssignedIdentity { get => (this._userAssignedIdentity = this._userAssignedIdentity ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IdentityUserAssignedIdentities()); set => this._userAssignedIdentity = value; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityUserAssignedIdentities UserAssignedIdentity { get => (this._userAssignedIdentity = this._userAssignedIdentity ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IdentityUserAssignedIdentities()); set => this._userAssignedIdentity = value; } /// Creates an new instance. public Identity() @@ -62,6 +62,9 @@ public partial interface IIdentity : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"ObjectId from the KeyVault", SerializedName = @"principalId", PossibleTypes = new [] { typeof(string) })] @@ -70,6 +73,9 @@ public partial interface IIdentity : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"TenantId from the KeyVault", SerializedName = @"tenantId", PossibleTypes = new [] { typeof(string) })] @@ -78,18 +84,25 @@ public partial interface IIdentity : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Type of managed service identity.", SerializedName = @"type", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType? Type { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned", "None")] + string Type { get; set; } /// Properties for User Assigned Identities [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Properties for User Assigned Identities", SerializedName = @"userAssignedIdentities", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityUserAssignedIdentities) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityUserAssignedIdentities UserAssignedIdentity { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityUserAssignedIdentities) })] + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityUserAssignedIdentities UserAssignedIdentity { get; set; } } /// Properties to configure Identity for Bring your Own Keys @@ -101,9 +114,10 @@ internal partial interface IIdentityInternal /// TenantId from the KeyVault string TenantId { get; set; } /// Type of managed service identity. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType? Type { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned", "None")] + string Type { get; set; } /// Properties for User Assigned Identities - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityUserAssignedIdentities UserAssignedIdentity { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityUserAssignedIdentities UserAssignedIdentity { get; set; } } } \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Identity.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/Identity.json.cs similarity index 90% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Identity.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/Identity.json.cs index 4fd3d373e1e2..c74d19531b0e 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Identity.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/Identity.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -54,13 +54,11 @@ public partial class Identity partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentity. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentity. /// /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentity. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentity. + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new Identity(json) : null; } @@ -77,10 +75,10 @@ internal Identity(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonO { return; } - {_principalId = If( json?.PropertyT("principalId"), out var __jsonPrincipalId) ? (string)__jsonPrincipalId : (string)PrincipalId;} - {_tenantId = If( json?.PropertyT("tenantId"), out var __jsonTenantId) ? (string)__jsonTenantId : (string)TenantId;} - {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} - {_userAssignedIdentity = If( json?.PropertyT("userAssignedIdentities"), out var __jsonUserAssignedIdentities) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IdentityUserAssignedIdentities.FromJson(__jsonUserAssignedIdentities) : UserAssignedIdentity;} + {_principalId = If( json?.PropertyT("principalId"), out var __jsonPrincipalId) ? (string)__jsonPrincipalId : (string)_principalId;} + {_tenantId = If( json?.PropertyT("tenantId"), out var __jsonTenantId) ? (string)__jsonTenantId : (string)_tenantId;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} + {_userAssignedIdentity = If( json?.PropertyT("userAssignedIdentities"), out var __jsonUserAssignedIdentities) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IdentityUserAssignedIdentities.FromJson(__jsonUserAssignedIdentities) : _userAssignedIdentity;} AfterFromJson(json); } @@ -103,11 +101,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode ToJson( { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._principalId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._principalId.ToString()) : null, "principalId" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._tenantId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._tenantId.ToString()) : null, "tenantId" ,container.Add ); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/IdentityUserAssignedIdentities.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/IdentityUserAssignedIdentities.PowerShell.cs similarity index 88% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/IdentityUserAssignedIdentities.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/IdentityUserAssignedIdentities.PowerShell.cs index 13c3deaaafda..6164eae9e9a1 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/IdentityUserAssignedIdentities.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/IdentityUserAssignedIdentities.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class IdentityUserAssignedIdentities partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityUserAssignedIdentities DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityUserAssignedIdentities DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new IdentityUserAssignedIdentities(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityUserAssignedIdentities DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityUserAssignedIdentities DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new IdentityUserAssignedIdentities(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityUserAssignedIdentities FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityUserAssignedIdentities FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -117,7 +115,7 @@ internal IdentityUserAssignedIdentities(global::System.Collections.IDictionary c } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/IdentityUserAssignedIdentities.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/IdentityUserAssignedIdentities.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/IdentityUserAssignedIdentities.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/IdentityUserAssignedIdentities.TypeConverter.cs index c908fa84f1a9..1a4c2a91fb55 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/IdentityUserAssignedIdentities.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/IdentityUserAssignedIdentities.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityUserAssignedIdentities ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityUserAssignedIdentities ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityUserAssignedIdentities).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityUserAssignedIdentities).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/IdentityUserAssignedIdentities.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/IdentityUserAssignedIdentities.cs similarity index 77% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/IdentityUserAssignedIdentities.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/IdentityUserAssignedIdentities.cs index 95c36ef9e86f..ec5157fa3bc9 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/IdentityUserAssignedIdentities.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/IdentityUserAssignedIdentities.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// Properties for User Assigned Identities public partial class IdentityUserAssignedIdentities : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityUserAssignedIdentities, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityUserAssignedIdentitiesInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityUserAssignedIdentities, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityUserAssignedIdentitiesInternal { /// Creates an new instance. @@ -22,7 +22,7 @@ public IdentityUserAssignedIdentities() /// Properties for User Assigned Identities public partial interface IIdentityUserAssignedIdentities : Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IAssociativeArray + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IAssociativeArray { } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/IdentityUserAssignedIdentities.dictionary.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/IdentityUserAssignedIdentities.dictionary.cs similarity index 66% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/IdentityUserAssignedIdentities.dictionary.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/IdentityUserAssignedIdentities.dictionary.cs index 20d12f65b5b0..0362176b6956 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/IdentityUserAssignedIdentities.dictionary.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/IdentityUserAssignedIdentities.dictionary.cs @@ -3,28 +3,28 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; public partial class IdentityUserAssignedIdentities : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IAssociativeArray + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IAssociativeArray { - protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); - global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } - int Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + int Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } - global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } - global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IUserAssignedIdentity this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IUserAssignedIdentity this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } /// /// - public void Add(global::System.String key, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IUserAssignedIdentity value) => __additionalProperties.Add( key, value); + public void Add(global::System.String key, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IUserAssignedIdentity value) => __additionalProperties.Add( key, value); public void Clear() => __additionalProperties.Clear(); @@ -40,7 +40,7 @@ public void CopyFrom(global::System.Collections.IDictionary source) { if ((null != property.Key && null != property.Value)) { - this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); } } } @@ -55,7 +55,7 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) { if ((null != property.Key && null != property.Value)) { - this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); } } } @@ -66,10 +66,10 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// /// - public bool TryGetValue(global::System.String key, out Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IUserAssignedIdentity value) => __additionalProperties.TryGetValue( key, out value); + public bool TryGetValue(global::System.String key, out Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IUserAssignedIdentity value) => __additionalProperties.TryGetValue( key, out value); /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IdentityUserAssignedIdentities source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IdentityUserAssignedIdentities source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/IdentityUserAssignedIdentities.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/IdentityUserAssignedIdentities.json.cs similarity index 90% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/IdentityUserAssignedIdentities.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/IdentityUserAssignedIdentities.json.cs index 6ed81d252da8..7967a2878dfd 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/IdentityUserAssignedIdentities.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/IdentityUserAssignedIdentities.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class IdentityUserAssignedIdentities partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityUserAssignedIdentities. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityUserAssignedIdentities. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityUserAssignedIdentities. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityUserAssignedIdentities. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityUserAssignedIdentities FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityUserAssignedIdentities FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new IdentityUserAssignedIdentities(json) : null; } @@ -78,7 +78,7 @@ internal IdentityUserAssignedIdentities(Microsoft.Azure.PowerShell.Cmdlets.Event { return; } - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IAssociativeArray)this).AdditionalProperties, (j) => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.UserAssignedIdentity.FromJson(j) ,exclusions ); + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IAssociativeArray)this).AdditionalProperties, (j) => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.UserAssignedIdentity.FromJson(j) ,exclusions ); AfterFromJson(json); } @@ -101,7 +101,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode ToJson( { return container; } - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IAssociativeArray)this).AdditionalProperties, container); + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IAssociativeArray)this).AdditionalProperties, container); AfterToJson(ref container); return container; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/KeyVaultProperties.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/KeyVaultProperties.PowerShell.cs similarity index 69% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/KeyVaultProperties.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/KeyVaultProperties.PowerShell.cs index aa7c4f09f3ca..03da75ec6b18 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/KeyVaultProperties.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/KeyVaultProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class KeyVaultProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new KeyVaultProperties(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new KeyVaultProperties(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -111,29 +111,29 @@ internal KeyVaultProperties(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Identity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultPropertiesInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IUserAssignedIdentityProperties) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultPropertiesInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.UserAssignedIdentityPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultPropertiesInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IUserAssignedIdentityProperties) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultPropertiesInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.UserAssignedIdentityPropertiesTypeConverter.ConvertFrom); } if (content.Contains("KeyName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultPropertiesInternal)this).KeyName = (string) content.GetValueForProperty("KeyName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultPropertiesInternal)this).KeyName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultPropertiesInternal)this).KeyName = (string) content.GetValueForProperty("KeyName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultPropertiesInternal)this).KeyName, global::System.Convert.ToString); } if (content.Contains("KeyVaultUri")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultPropertiesInternal)this).KeyVaultUri = (string) content.GetValueForProperty("KeyVaultUri",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultPropertiesInternal)this).KeyVaultUri, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultPropertiesInternal)this).KeyVaultUri = (string) content.GetValueForProperty("KeyVaultUri",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultPropertiesInternal)this).KeyVaultUri, global::System.Convert.ToString); } if (content.Contains("KeyVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultPropertiesInternal)this).KeyVersion = (string) content.GetValueForProperty("KeyVersion",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultPropertiesInternal)this).KeyVersion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultPropertiesInternal)this).KeyVersion = (string) content.GetValueForProperty("KeyVersion",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultPropertiesInternal)this).KeyVersion, global::System.Convert.ToString); } if (content.Contains("UserAssignedIdentity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultPropertiesInternal)this).UserAssignedIdentity = (string) content.GetValueForProperty("UserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultPropertiesInternal)this).UserAssignedIdentity, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultPropertiesInternal)this).UserAssignedIdentity = (string) content.GetValueForProperty("UserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultPropertiesInternal)this).UserAssignedIdentity, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -148,23 +148,23 @@ internal KeyVaultProperties(global::System.Management.Automation.PSObject conten // actually deserialize if (content.Contains("Identity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultPropertiesInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IUserAssignedIdentityProperties) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultPropertiesInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.UserAssignedIdentityPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultPropertiesInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IUserAssignedIdentityProperties) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultPropertiesInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.UserAssignedIdentityPropertiesTypeConverter.ConvertFrom); } if (content.Contains("KeyName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultPropertiesInternal)this).KeyName = (string) content.GetValueForProperty("KeyName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultPropertiesInternal)this).KeyName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultPropertiesInternal)this).KeyName = (string) content.GetValueForProperty("KeyName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultPropertiesInternal)this).KeyName, global::System.Convert.ToString); } if (content.Contains("KeyVaultUri")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultPropertiesInternal)this).KeyVaultUri = (string) content.GetValueForProperty("KeyVaultUri",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultPropertiesInternal)this).KeyVaultUri, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultPropertiesInternal)this).KeyVaultUri = (string) content.GetValueForProperty("KeyVaultUri",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultPropertiesInternal)this).KeyVaultUri, global::System.Convert.ToString); } if (content.Contains("KeyVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultPropertiesInternal)this).KeyVersion = (string) content.GetValueForProperty("KeyVersion",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultPropertiesInternal)this).KeyVersion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultPropertiesInternal)this).KeyVersion = (string) content.GetValueForProperty("KeyVersion",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultPropertiesInternal)this).KeyVersion, global::System.Convert.ToString); } if (content.Contains("UserAssignedIdentity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultPropertiesInternal)this).UserAssignedIdentity = (string) content.GetValueForProperty("UserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultPropertiesInternal)this).UserAssignedIdentity, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultPropertiesInternal)this).UserAssignedIdentity = (string) content.GetValueForProperty("UserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultPropertiesInternal)this).UserAssignedIdentity, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/KeyVaultProperties.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/KeyVaultProperties.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/KeyVaultProperties.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/KeyVaultProperties.TypeConverter.cs index 5e15b089b769..d8c45e14d9ab 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/KeyVaultProperties.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/KeyVaultProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/KeyVaultProperties.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/KeyVaultProperties.cs similarity index 76% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/KeyVaultProperties.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/KeyVaultProperties.cs index eb3958479855..ebd47af288dd 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/KeyVaultProperties.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/KeyVaultProperties.cs @@ -3,22 +3,22 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// Properties to configure keyVault Properties [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class KeyVaultProperties : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultProperties, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultProperties, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultPropertiesInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IUserAssignedIdentityProperties _identity; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IUserAssignedIdentityProperties _identity; [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IUserAssignedIdentityProperties Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.UserAssignedIdentityProperties()); set => this._identity = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IUserAssignedIdentityProperties Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.UserAssignedIdentityProperties()); set => this._identity = value; } /// Backing field for property. private string _keyName; @@ -42,11 +42,11 @@ public partial class KeyVaultProperties : public string KeyVersion { get => this._keyVersion; set => this._keyVersion = value; } /// Internal Acessors for Identity - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IUserAssignedIdentityProperties Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultPropertiesInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.UserAssignedIdentityProperties()); set { {_identity = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IUserAssignedIdentityProperties Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultPropertiesInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.UserAssignedIdentityProperties()); set { {_identity = value;} } } /// ARM ID of user Identity selected for encryption [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string UserAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IUserAssignedIdentityPropertiesInternal)Identity).UserAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IUserAssignedIdentityPropertiesInternal)Identity).UserAssignedIdentity = value ?? null; } + public string UserAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IUserAssignedIdentityPropertiesInternal)Identity).UserAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IUserAssignedIdentityPropertiesInternal)Identity).UserAssignedIdentity = value ?? null; } /// Creates an new instance. public KeyVaultProperties() @@ -62,6 +62,9 @@ public partial interface IKeyVaultProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Name of the Key from KeyVault", SerializedName = @"keyName", PossibleTypes = new [] { typeof(string) })] @@ -70,6 +73,9 @@ public partial interface IKeyVaultProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Uri of KeyVault", SerializedName = @"keyVaultUri", PossibleTypes = new [] { typeof(string) })] @@ -78,6 +84,9 @@ public partial interface IKeyVaultProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Key Version", SerializedName = @"keyVersion", PossibleTypes = new [] { typeof(string) })] @@ -86,6 +95,9 @@ public partial interface IKeyVaultProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"ARM ID of user Identity selected for encryption", SerializedName = @"userAssignedIdentity", PossibleTypes = new [] { typeof(string) })] @@ -96,7 +108,7 @@ public partial interface IKeyVaultProperties : internal partial interface IKeyVaultPropertiesInternal { - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IUserAssignedIdentityProperties Identity { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IUserAssignedIdentityProperties Identity { get; set; } /// Name of the Key from KeyVault string KeyName { get; set; } /// Uri of KeyVault diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/KeyVaultProperties.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/KeyVaultProperties.json.cs similarity index 93% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/KeyVaultProperties.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/KeyVaultProperties.json.cs index 7fc7d5c6430c..2320be45d377 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/KeyVaultProperties.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/KeyVaultProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class KeyVaultProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new KeyVaultProperties(json) : null; } @@ -77,10 +77,10 @@ internal KeyVaultProperties(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime. { return; } - {_identity = If( json?.PropertyT("identity"), out var __jsonIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.UserAssignedIdentityProperties.FromJson(__jsonIdentity) : Identity;} - {_keyName = If( json?.PropertyT("keyName"), out var __jsonKeyName) ? (string)__jsonKeyName : (string)KeyName;} - {_keyVaultUri = If( json?.PropertyT("keyVaultUri"), out var __jsonKeyVaultUri) ? (string)__jsonKeyVaultUri : (string)KeyVaultUri;} - {_keyVersion = If( json?.PropertyT("keyVersion"), out var __jsonKeyVersion) ? (string)__jsonKeyVersion : (string)KeyVersion;} + {_identity = If( json?.PropertyT("identity"), out var __jsonIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.UserAssignedIdentityProperties.FromJson(__jsonIdentity) : _identity;} + {_keyName = If( json?.PropertyT("keyName"), out var __jsonKeyName) ? (string)__jsonKeyName : (string)_keyName;} + {_keyVaultUri = If( json?.PropertyT("keyVaultUri"), out var __jsonKeyVaultUri) ? (string)__jsonKeyVaultUri : (string)_keyVaultUri;} + {_keyVersion = If( json?.PropertyT("keyVersion"), out var __jsonKeyVersion) ? (string)__jsonKeyVersion : (string)_keyVersion;} AfterFromJson(json); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NamespaceReplicaLocation.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NamespaceReplicaLocation.PowerShell.cs similarity index 74% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NamespaceReplicaLocation.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NamespaceReplicaLocation.PowerShell.cs index d8249658a920..68d36324cbf1 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NamespaceReplicaLocation.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NamespaceReplicaLocation.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class NamespaceReplicaLocation partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INamespaceReplicaLocation DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INamespaceReplicaLocation DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new NamespaceReplicaLocation(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INamespaceReplicaLocation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INamespaceReplicaLocation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new NamespaceReplicaLocation(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INamespaceReplicaLocation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INamespaceReplicaLocation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,21 +111,21 @@ internal NamespaceReplicaLocation(global::System.Collections.IDictionary content // actually deserialize if (content.Contains("LocationName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INamespaceReplicaLocationInternal)this).LocationName = (string) content.GetValueForProperty("LocationName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INamespaceReplicaLocationInternal)this).LocationName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INamespaceReplicaLocationInternal)this).LocationName = (string) content.GetValueForProperty("LocationName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INamespaceReplicaLocationInternal)this).LocationName, global::System.Convert.ToString); } if (content.Contains("RoleType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INamespaceReplicaLocationInternal)this).RoleType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.GeoDrRoleType?) content.GetValueForProperty("RoleType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INamespaceReplicaLocationInternal)this).RoleType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.GeoDrRoleType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INamespaceReplicaLocationInternal)this).RoleType = (string) content.GetValueForProperty("RoleType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INamespaceReplicaLocationInternal)this).RoleType, global::System.Convert.ToString); } if (content.Contains("ClusterArmId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INamespaceReplicaLocationInternal)this).ClusterArmId = (string) content.GetValueForProperty("ClusterArmId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INamespaceReplicaLocationInternal)this).ClusterArmId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INamespaceReplicaLocationInternal)this).ClusterArmId = (string) content.GetValueForProperty("ClusterArmId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INamespaceReplicaLocationInternal)this).ClusterArmId, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -142,15 +140,15 @@ internal NamespaceReplicaLocation(global::System.Management.Automation.PSObject // actually deserialize if (content.Contains("LocationName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INamespaceReplicaLocationInternal)this).LocationName = (string) content.GetValueForProperty("LocationName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INamespaceReplicaLocationInternal)this).LocationName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INamespaceReplicaLocationInternal)this).LocationName = (string) content.GetValueForProperty("LocationName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INamespaceReplicaLocationInternal)this).LocationName, global::System.Convert.ToString); } if (content.Contains("RoleType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INamespaceReplicaLocationInternal)this).RoleType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.GeoDrRoleType?) content.GetValueForProperty("RoleType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INamespaceReplicaLocationInternal)this).RoleType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.GeoDrRoleType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INamespaceReplicaLocationInternal)this).RoleType = (string) content.GetValueForProperty("RoleType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INamespaceReplicaLocationInternal)this).RoleType, global::System.Convert.ToString); } if (content.Contains("ClusterArmId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INamespaceReplicaLocationInternal)this).ClusterArmId = (string) content.GetValueForProperty("ClusterArmId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INamespaceReplicaLocationInternal)this).ClusterArmId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INamespaceReplicaLocationInternal)this).ClusterArmId = (string) content.GetValueForProperty("ClusterArmId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INamespaceReplicaLocationInternal)this).ClusterArmId, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NamespaceReplicaLocation.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NamespaceReplicaLocation.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NamespaceReplicaLocation.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NamespaceReplicaLocation.TypeConverter.cs index dcb24519f784..1918e7fb8fea 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NamespaceReplicaLocation.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NamespaceReplicaLocation.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INamespaceReplicaLocation ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INamespaceReplicaLocation ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INamespaceReplicaLocation).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INamespaceReplicaLocation).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NamespaceReplicaLocation.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NamespaceReplicaLocation.cs similarity index 81% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NamespaceReplicaLocation.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NamespaceReplicaLocation.cs index b17b5be82fcc..f6a0d853c681 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NamespaceReplicaLocation.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NamespaceReplicaLocation.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// Namespace replication properties [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class NamespaceReplicaLocation : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INamespaceReplicaLocation, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INamespaceReplicaLocationInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INamespaceReplicaLocation, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INamespaceReplicaLocationInternal { /// Backing field for property. @@ -32,11 +32,11 @@ public partial class NamespaceReplicaLocation : public string LocationName { get => this._locationName; set => this._locationName = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.GeoDrRoleType? _roleType; + private string _roleType; /// GeoDR Role Types [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.GeoDrRoleType? RoleType { get => this._roleType; set => this._roleType = value; } + public string RoleType { get => this._roleType; set => this._roleType = value; } /// Creates an new instance. public NamespaceReplicaLocation() @@ -55,6 +55,9 @@ public partial interface INamespaceReplicaLocation : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Optional property that denotes the ARM ID of the Cluster. This is required, if a namespace replica should be placed in a Dedicated Event Hub Cluster", SerializedName = @"clusterArmId", PossibleTypes = new [] { typeof(string) })] @@ -63,6 +66,9 @@ public partial interface INamespaceReplicaLocation : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Azure regions where a replica of the namespace is maintained", SerializedName = @"locationName", PossibleTypes = new [] { typeof(string) })] @@ -71,10 +77,14 @@ public partial interface INamespaceReplicaLocation : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"GeoDR Role Types", SerializedName = @"roleType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.GeoDrRoleType) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.GeoDrRoleType? RoleType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Primary", "Secondary")] + string RoleType { get; set; } } /// Namespace replication properties @@ -89,7 +99,8 @@ internal partial interface INamespaceReplicaLocationInternal /// Azure regions where a replica of the namespace is maintained string LocationName { get; set; } /// GeoDR Role Types - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.GeoDrRoleType? RoleType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Primary", "Secondary")] + string RoleType { get; set; } } } \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NamespaceReplicaLocation.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NamespaceReplicaLocation.json.cs similarity index 93% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NamespaceReplicaLocation.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NamespaceReplicaLocation.json.cs index ee9b28260dac..1334780b0fc3 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NamespaceReplicaLocation.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NamespaceReplicaLocation.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class NamespaceReplicaLocation partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INamespaceReplicaLocation. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INamespaceReplicaLocation. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INamespaceReplicaLocation. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INamespaceReplicaLocation. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INamespaceReplicaLocation FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INamespaceReplicaLocation FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new NamespaceReplicaLocation(json) : null; } @@ -77,9 +77,9 @@ internal NamespaceReplicaLocation(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Ru { return; } - {_locationName = If( json?.PropertyT("locationName"), out var __jsonLocationName) ? (string)__jsonLocationName : (string)LocationName;} - {_roleType = If( json?.PropertyT("roleType"), out var __jsonRoleType) ? (string)__jsonRoleType : (string)RoleType;} - {_clusterArmId = If( json?.PropertyT("clusterArmId"), out var __jsonClusterArmId) ? (string)__jsonClusterArmId : (string)ClusterArmId;} + {_locationName = If( json?.PropertyT("locationName"), out var __jsonLocationName) ? (string)__jsonLocationName : (string)_locationName;} + {_roleType = If( json?.PropertyT("roleType"), out var __jsonRoleType) ? (string)__jsonRoleType : (string)_roleType;} + {_clusterArmId = If( json?.PropertyT("clusterArmId"), out var __jsonClusterArmId) ? (string)__jsonClusterArmId : (string)_clusterArmId;} AfterFromJson(json); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/NamespacesFailoverAcceptedResponseHeaders.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NamespacesFailoverAcceptedResponseHeaders.cs index 0e23667e6644..5a543d907f4b 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/NamespacesFailoverAcceptedResponseHeaders.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NamespacesFailoverAcceptedResponseHeaders.cs @@ -53,6 +53,9 @@ public partial interface INamespacesFailoverAcceptedResponseHeaders [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"", SerializedName = @"azure-AsyncOperation", PossibleTypes = new [] { typeof(string) })] @@ -61,6 +64,9 @@ public partial interface INamespacesFailoverAcceptedResponseHeaders [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"", SerializedName = @"location", PossibleTypes = new [] { typeof(string) })] diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkRuleSet.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkRuleSet.PowerShell.cs new file mode 100644 index 000000000000..22ade1284eff --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkRuleSet.PowerShell.cs @@ -0,0 +1,292 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + + /// Description of topic resource. + [System.ComponentModel.TypeConverter(typeof(NetworkRuleSetTypeConverter))] + public partial class NetworkRuleSet + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new NetworkRuleSet(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new NetworkRuleSet(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal NetworkRuleSet(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NetworkRuleSetPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("DefaultAction")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetInternal)this).DefaultAction = (string) content.GetValueForProperty("DefaultAction",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetInternal)this).DefaultAction, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TrustedServiceAccessEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetInternal)this).TrustedServiceAccessEnabled = (bool?) content.GetValueForProperty("TrustedServiceAccessEnabled",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetInternal)this).TrustedServiceAccessEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("VirtualNetworkRule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetInternal)this).VirtualNetworkRule = (System.Collections.Generic.List) content.GetValueForProperty("VirtualNetworkRule",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetInternal)this).VirtualNetworkRule, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NwRuleSetVirtualNetworkRulesTypeConverter.ConvertFrom)); + } + if (content.Contains("IPRule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetInternal)this).IPRule = (System.Collections.Generic.List) content.GetValueForProperty("IPRule",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetInternal)this).IPRule, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NwRuleSetIPRulesTypeConverter.ConvertFrom)); + } + if (content.Contains("PublicNetworkAccess")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetInternal)this).PublicNetworkAccess = (string) content.GetValueForProperty("PublicNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetInternal)this).PublicNetworkAccess, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal NetworkRuleSet(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NetworkRuleSetPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("DefaultAction")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetInternal)this).DefaultAction = (string) content.GetValueForProperty("DefaultAction",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetInternal)this).DefaultAction, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TrustedServiceAccessEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetInternal)this).TrustedServiceAccessEnabled = (bool?) content.GetValueForProperty("TrustedServiceAccessEnabled",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetInternal)this).TrustedServiceAccessEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("VirtualNetworkRule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetInternal)this).VirtualNetworkRule = (System.Collections.Generic.List) content.GetValueForProperty("VirtualNetworkRule",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetInternal)this).VirtualNetworkRule, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NwRuleSetVirtualNetworkRulesTypeConverter.ConvertFrom)); + } + if (content.Contains("IPRule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetInternal)this).IPRule = (System.Collections.Generic.List) content.GetValueForProperty("IPRule",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetInternal)this).IPRule, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NwRuleSetIPRulesTypeConverter.ConvertFrom)); + } + if (content.Contains("PublicNetworkAccess")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetInternal)this).PublicNetworkAccess = (string) content.GetValueForProperty("PublicNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetInternal)this).PublicNetworkAccess, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Description of topic resource. + [System.ComponentModel.TypeConverter(typeof(NetworkRuleSetTypeConverter))] + public partial interface INetworkRuleSet + + { + + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkRuleSet.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkRuleSet.TypeConverter.cs similarity index 97% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkRuleSet.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NetworkRuleSet.TypeConverter.cs index f00d54c68669..8431a939fbc5 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkRuleSet.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkRuleSet.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkRuleSet.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkRuleSet.cs similarity index 58% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkRuleSet.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NetworkRuleSet.cs index 3f36f1586b6b..1d2adf017a22 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkRuleSet.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkRuleSet.cs @@ -3,125 +3,124 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// Description of topic resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class NetworkRuleSet : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetInternal, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetInternal, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IValidates { /// - /// Backing field for Inherited model + /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ProxyResource(); + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ProxyResource(); /// Default Action for Network Rule Set [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.DefaultAction? DefaultAction { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetPropertiesInternal)Property).DefaultAction; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetPropertiesInternal)Property).DefaultAction = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.DefaultAction)""); } + public string DefaultAction { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetPropertiesInternal)Property).DefaultAction; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetPropertiesInternal)Property).DefaultAction = value ?? null; } /// List of IpRules [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetIPRules[] IPRule { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetPropertiesInternal)Property).IPRule; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetPropertiesInternal)Property).IPRule = value ?? null /* arrayOf */; } + public System.Collections.Generic.List IPRule { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetPropertiesInternal)Property).IPRule; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetPropertiesInternal)Property).IPRule = value ?? null /* arrayOf */; } /// /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Id; } /// The geo-location where the resource lives [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Location; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Location; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetProperties Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NetworkRuleSetProperties()); set { {_property = value;} } } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SystemData()); set { {_systemData = value;} } } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Id = value; } /// Internal Acessors for Location - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal.Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Location = value; } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal.Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Location = value; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Name = value; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Type = value; } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetProperties Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NetworkRuleSetProperties()); set { {_property = value;} } } - - /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.SystemData()); set { {_systemData = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Type = value; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Name; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetProperties _property; /// NetworkRuleSet properties [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NetworkRuleSetProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NetworkRuleSetProperties()); set => this._property = value; } /// /// This determines if traffic is allowed over public network. By default it is enabled. If value is SecuredByPerimeter then /// Inbound and Outbound communication is controlled by the network security perimeter and profile's access rules. /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccessFlag? PublicNetworkAccess { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetPropertiesInternal)Property).PublicNetworkAccess; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetPropertiesInternal)Property).PublicNetworkAccess = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccessFlag)""); } + public string PublicNetworkAccess { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetPropertiesInternal)Property).PublicNetworkAccess; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetPropertiesInternal)Property).PublicNetworkAccess = value ?? null; } /// Gets the resource group name [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData _systemData; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData _systemData; /// The system meta data relating to this resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.SystemData()); } + internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SystemData()); } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType)""); } + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedByType = value ?? null; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType)""); } + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedByType = value ?? null; } /// Value that indicates whether Trusted Service Access is Enabled or not. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public bool? TrustedServiceAccessEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetPropertiesInternal)Property).TrustedServiceAccessEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetPropertiesInternal)Property).TrustedServiceAccessEnabled = value ?? default(bool); } + public bool? TrustedServiceAccessEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetPropertiesInternal)Property).TrustedServiceAccessEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetPropertiesInternal)Property).TrustedServiceAccessEnabled = value ?? default(bool); } /// /// The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs" /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Type; } /// List VirtualNetwork Rules [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetVirtualNetworkRules[] VirtualNetworkRule { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetPropertiesInternal)Property).VirtualNetworkRule; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetPropertiesInternal)Property).VirtualNetworkRule = value ?? null /* arrayOf */; } + public System.Collections.Generic.List VirtualNetworkRule { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetPropertiesInternal)Property).VirtualNetworkRule; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetPropertiesInternal)Property).VirtualNetworkRule = value ?? null /* arrayOf */; } /// Creates an new instance. public NetworkRuleSet() @@ -144,24 +143,31 @@ public NetworkRuleSet() /// Description of topic resource. public partial interface INetworkRuleSet : Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResource + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResource { /// Default Action for Network Rule Set [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Default Action for Network Rule Set", SerializedName = @"defaultAction", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.DefaultAction) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.DefaultAction? DefaultAction { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Allow", "Deny")] + string DefaultAction { get; set; } /// List of IpRules [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"List of IpRules", SerializedName = @"ipRules", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetIPRules) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetIPRules[] IPRule { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetIPRules) })] + System.Collections.Generic.List IPRule { get; set; } /// /// This determines if traffic is allowed over public network. By default it is enabled. If value is SecuredByPerimeter then /// Inbound and Outbound communication is controlled by the network security perimeter and profile's access rules. @@ -169,62 +175,89 @@ public partial interface INetworkRuleSet : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"This determines if traffic is allowed over public network. By default it is enabled. If value is SecuredByPerimeter then Inbound and Outbound communication is controlled by the network security perimeter and profile's access rules. ", SerializedName = @"publicNetworkAccess", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccessFlag) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccessFlag? PublicNetworkAccess { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Enabled", "Disabled", "SecuredByPerimeter")] + string PublicNetworkAccess { get; set; } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The timestamp of resource creation (UTC).", SerializedName = @"createdAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? SystemDataCreatedAt { get; set; } + global::System.DateTime? SystemDataCreatedAt { get; } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The identity that created the resource.", SerializedName = @"createdBy", PossibleTypes = new [] { typeof(string) })] - string SystemDataCreatedBy { get; set; } + string SystemDataCreatedBy { get; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that created the resource.", SerializedName = @"createdByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataCreatedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that last modified the resource.", SerializedName = @"lastModifiedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? SystemDataLastModifiedAt { get; set; } + global::System.DateTime? SystemDataLastModifiedAt { get; } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The identity that last modified the resource.", SerializedName = @"lastModifiedBy", PossibleTypes = new [] { typeof(string) })] - string SystemDataLastModifiedBy { get; set; } + string SystemDataLastModifiedBy { get; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that last modified the resource.", SerializedName = @"lastModifiedByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; } /// Value that indicates whether Trusted Service Access is Enabled or not. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Value that indicates whether Trusted Service Access is Enabled or not.", SerializedName = @"trustedServiceAccessEnabled", PossibleTypes = new [] { typeof(bool) })] @@ -233,45 +266,52 @@ public partial interface INetworkRuleSet : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"List VirtualNetwork Rules", SerializedName = @"virtualNetworkRules", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetVirtualNetworkRules) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetVirtualNetworkRules[] VirtualNetworkRule { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetVirtualNetworkRules) })] + System.Collections.Generic.List VirtualNetworkRule { get; set; } } /// Description of topic resource. internal partial interface INetworkRuleSetInternal : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal { /// Default Action for Network Rule Set - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.DefaultAction? DefaultAction { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Allow", "Deny")] + string DefaultAction { get; set; } /// List of IpRules - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetIPRules[] IPRule { get; set; } + System.Collections.Generic.List IPRule { get; set; } /// NetworkRuleSet properties - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetProperties Property { get; set; } /// /// This determines if traffic is allowed over public network. By default it is enabled. If value is SecuredByPerimeter then /// Inbound and Outbound communication is controlled by the network security perimeter and profile's access rules. /// - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccessFlag? PublicNetworkAccess { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Enabled", "Disabled", "SecuredByPerimeter")] + string PublicNetworkAccess { get; set; } /// The system meta data relating to this resource. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData SystemData { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData SystemData { get; set; } /// The timestamp of resource creation (UTC). global::System.DateTime? SystemDataCreatedAt { get; set; } /// The identity that created the resource. string SystemDataCreatedBy { get; set; } /// The type of identity that created the resource. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataCreatedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; set; } /// The type of identity that last modified the resource. global::System.DateTime? SystemDataLastModifiedAt { get; set; } /// The identity that last modified the resource. string SystemDataLastModifiedBy { get; set; } /// The type of identity that last modified the resource. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; set; } /// Value that indicates whether Trusted Service Access is Enabled or not. bool? TrustedServiceAccessEnabled { get; set; } /// List VirtualNetwork Rules - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetVirtualNetworkRules[] VirtualNetworkRule { get; set; } + System.Collections.Generic.List VirtualNetworkRule { get; set; } } } \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkRuleSet.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkRuleSet.json.cs similarity index 91% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkRuleSet.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NetworkRuleSet.json.cs index 70b0b898829f..1e6de8cdda07 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkRuleSet.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkRuleSet.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class NetworkRuleSet partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new NetworkRuleSet(json) : null; } @@ -77,9 +77,9 @@ internal NetworkRuleSet(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json { return; } - __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ProxyResource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NetworkRuleSetProperties.FromJson(__jsonProperties) : Property;} - {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.SystemData.FromJson(__jsonSystemData) : SystemData;} + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NetworkRuleSetProperties.FromJson(__jsonProperties) : _property;} + {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SystemData.FromJson(__jsonSystemData) : _systemData;} AfterFromJson(json); } @@ -104,7 +104,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode ToJson( } __proxyResource?.ToJson(container, serializationMode); AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add ); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkRuleSetListResult.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkRuleSetListResult.PowerShell.cs similarity index 75% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkRuleSetListResult.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NetworkRuleSetListResult.PowerShell.cs index c8241eb9f889..d046958eef38 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkRuleSetListResult.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkRuleSetListResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class NetworkRuleSetListResult partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new NetworkRuleSetListResult(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new NetworkRuleSetListResult(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,17 +111,17 @@ internal NetworkRuleSetListResult(global::System.Collections.IDictionary content // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NetworkRuleSetTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NetworkRuleSetTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -138,11 +136,11 @@ internal NetworkRuleSetListResult(global::System.Management.Automation.PSObject // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NetworkRuleSetTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NetworkRuleSetTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkRuleSetListResult.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkRuleSetListResult.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkRuleSetListResult.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NetworkRuleSetListResult.TypeConverter.cs index 75e1d8efaf05..76e4763b12ae 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkRuleSetListResult.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkRuleSetListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkRuleSetListResult.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkRuleSetListResult.cs similarity index 75% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkRuleSetListResult.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NetworkRuleSetListResult.cs index b980053fa798..bbfc885d1987 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkRuleSetListResult.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkRuleSetListResult.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// The response of the List NetworkRuleSet operation [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class NetworkRuleSetListResult : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetListResult, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetListResult, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetListResultInternal { /// Backing field for property. @@ -24,11 +24,11 @@ public partial class NetworkRuleSetListResult : public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet[] _value; + private System.Collections.Generic.List _value; /// Result of the List NetworkRuleSet operation [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet[] Value { get => this._value; set => this._value = value; } + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } /// Creates an new instance. public NetworkRuleSetListResult() @@ -46,6 +46,9 @@ public partial interface INetworkRuleSetListResult : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Link to the next set of results. Not empty if Value contains incomplete list of NetworkRuleSet.", SerializedName = @"nextLink", PossibleTypes = new [] { typeof(string) })] @@ -54,10 +57,13 @@ public partial interface INetworkRuleSetListResult : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Result of the List NetworkRuleSet operation", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet) })] + System.Collections.Generic.List Value { get; set; } } /// The response of the List NetworkRuleSet operation @@ -69,7 +75,7 @@ internal partial interface INetworkRuleSetListResultInternal /// string NextLink { get; set; } /// Result of the List NetworkRuleSet operation - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet[] Value { get; set; } + System.Collections.Generic.List Value { get; set; } } } \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkRuleSetListResult.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkRuleSetListResult.json.cs similarity index 89% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkRuleSetListResult.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NetworkRuleSetListResult.json.cs index 7ed6178638db..6fe5c595df65 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkRuleSetListResult.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkRuleSetListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class NetworkRuleSetListResult partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new NetworkRuleSetListResult(json) : null; } @@ -77,8 +77,8 @@ internal NetworkRuleSetListResult(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Ru { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NetworkRuleSet.FromJson(__u) )) ))() : null : Value;} - {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NetworkRuleSet.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} AfterFromJson(json); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkRuleSetProperties.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkRuleSetProperties.PowerShell.cs similarity index 60% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkRuleSetProperties.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NetworkRuleSetProperties.PowerShell.cs index ea6552b75adb..f93fe38b5d32 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkRuleSetProperties.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkRuleSetProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class NetworkRuleSetProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new NetworkRuleSetProperties(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new NetworkRuleSetProperties(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,29 +111,29 @@ internal NetworkRuleSetProperties(global::System.Collections.IDictionary content // actually deserialize if (content.Contains("TrustedServiceAccessEnabled")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetPropertiesInternal)this).TrustedServiceAccessEnabled = (bool?) content.GetValueForProperty("TrustedServiceAccessEnabled",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetPropertiesInternal)this).TrustedServiceAccessEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetPropertiesInternal)this).TrustedServiceAccessEnabled = (bool?) content.GetValueForProperty("TrustedServiceAccessEnabled",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetPropertiesInternal)this).TrustedServiceAccessEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("DefaultAction")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetPropertiesInternal)this).DefaultAction = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.DefaultAction?) content.GetValueForProperty("DefaultAction",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetPropertiesInternal)this).DefaultAction, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.DefaultAction.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetPropertiesInternal)this).DefaultAction = (string) content.GetValueForProperty("DefaultAction",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetPropertiesInternal)this).DefaultAction, global::System.Convert.ToString); } if (content.Contains("VirtualNetworkRule")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetPropertiesInternal)this).VirtualNetworkRule = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetVirtualNetworkRules[]) content.GetValueForProperty("VirtualNetworkRule",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetPropertiesInternal)this).VirtualNetworkRule, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NwRuleSetVirtualNetworkRulesTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetPropertiesInternal)this).VirtualNetworkRule = (System.Collections.Generic.List) content.GetValueForProperty("VirtualNetworkRule",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetPropertiesInternal)this).VirtualNetworkRule, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NwRuleSetVirtualNetworkRulesTypeConverter.ConvertFrom)); } if (content.Contains("IPRule")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetPropertiesInternal)this).IPRule = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetIPRules[]) content.GetValueForProperty("IPRule",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetPropertiesInternal)this).IPRule, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NwRuleSetIPRulesTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetPropertiesInternal)this).IPRule = (System.Collections.Generic.List) content.GetValueForProperty("IPRule",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetPropertiesInternal)this).IPRule, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NwRuleSetIPRulesTypeConverter.ConvertFrom)); } if (content.Contains("PublicNetworkAccess")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetPropertiesInternal)this).PublicNetworkAccess = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccessFlag?) content.GetValueForProperty("PublicNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetPropertiesInternal)this).PublicNetworkAccess, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccessFlag.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetPropertiesInternal)this).PublicNetworkAccess = (string) content.GetValueForProperty("PublicNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetPropertiesInternal)this).PublicNetworkAccess, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -150,23 +148,23 @@ internal NetworkRuleSetProperties(global::System.Management.Automation.PSObject // actually deserialize if (content.Contains("TrustedServiceAccessEnabled")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetPropertiesInternal)this).TrustedServiceAccessEnabled = (bool?) content.GetValueForProperty("TrustedServiceAccessEnabled",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetPropertiesInternal)this).TrustedServiceAccessEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetPropertiesInternal)this).TrustedServiceAccessEnabled = (bool?) content.GetValueForProperty("TrustedServiceAccessEnabled",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetPropertiesInternal)this).TrustedServiceAccessEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("DefaultAction")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetPropertiesInternal)this).DefaultAction = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.DefaultAction?) content.GetValueForProperty("DefaultAction",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetPropertiesInternal)this).DefaultAction, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.DefaultAction.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetPropertiesInternal)this).DefaultAction = (string) content.GetValueForProperty("DefaultAction",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetPropertiesInternal)this).DefaultAction, global::System.Convert.ToString); } if (content.Contains("VirtualNetworkRule")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetPropertiesInternal)this).VirtualNetworkRule = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetVirtualNetworkRules[]) content.GetValueForProperty("VirtualNetworkRule",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetPropertiesInternal)this).VirtualNetworkRule, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NwRuleSetVirtualNetworkRulesTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetPropertiesInternal)this).VirtualNetworkRule = (System.Collections.Generic.List) content.GetValueForProperty("VirtualNetworkRule",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetPropertiesInternal)this).VirtualNetworkRule, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NwRuleSetVirtualNetworkRulesTypeConverter.ConvertFrom)); } if (content.Contains("IPRule")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetPropertiesInternal)this).IPRule = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetIPRules[]) content.GetValueForProperty("IPRule",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetPropertiesInternal)this).IPRule, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NwRuleSetIPRulesTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetPropertiesInternal)this).IPRule = (System.Collections.Generic.List) content.GetValueForProperty("IPRule",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetPropertiesInternal)this).IPRule, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NwRuleSetIPRulesTypeConverter.ConvertFrom)); } if (content.Contains("PublicNetworkAccess")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetPropertiesInternal)this).PublicNetworkAccess = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccessFlag?) content.GetValueForProperty("PublicNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetPropertiesInternal)this).PublicNetworkAccess, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccessFlag.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetPropertiesInternal)this).PublicNetworkAccess = (string) content.GetValueForProperty("PublicNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetPropertiesInternal)this).PublicNetworkAccess, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkRuleSetProperties.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkRuleSetProperties.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkRuleSetProperties.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NetworkRuleSetProperties.TypeConverter.cs index d4ec065cfa68..786a7eaefba9 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkRuleSetProperties.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkRuleSetProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkRuleSetProperties.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkRuleSetProperties.cs similarity index 65% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkRuleSetProperties.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NetworkRuleSetProperties.cs index e089e5d94200..b6c6cc52a482 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkRuleSetProperties.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkRuleSetProperties.cs @@ -3,40 +3,40 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// NetworkRuleSet properties [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class NetworkRuleSetProperties : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetProperties, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetProperties, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetPropertiesInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.DefaultAction? _defaultAction; + private string _defaultAction; /// Default Action for Network Rule Set [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.DefaultAction? DefaultAction { get => this._defaultAction; set => this._defaultAction = value; } + public string DefaultAction { get => this._defaultAction; set => this._defaultAction = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetIPRules[] _iPRule; + private System.Collections.Generic.List _iPRule; /// List of IpRules [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetIPRules[] IPRule { get => this._iPRule; set => this._iPRule = value; } + public System.Collections.Generic.List IPRule { get => this._iPRule; set => this._iPRule = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccessFlag? _publicNetworkAccess; + private string _publicNetworkAccess; /// /// This determines if traffic is allowed over public network. By default it is enabled. If value is SecuredByPerimeter then /// Inbound and Outbound communication is controlled by the network security perimeter and profile's access rules. /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccessFlag? PublicNetworkAccess { get => this._publicNetworkAccess; set => this._publicNetworkAccess = value; } + public string PublicNetworkAccess { get => this._publicNetworkAccess; set => this._publicNetworkAccess = value; } /// Backing field for property. private bool? _trustedServiceAccessEnabled; @@ -46,11 +46,11 @@ public partial class NetworkRuleSetProperties : public bool? TrustedServiceAccessEnabled { get => this._trustedServiceAccessEnabled; set => this._trustedServiceAccessEnabled = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetVirtualNetworkRules[] _virtualNetworkRule; + private System.Collections.Generic.List _virtualNetworkRule; /// List VirtualNetwork Rules [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetVirtualNetworkRules[] VirtualNetworkRule { get => this._virtualNetworkRule; set => this._virtualNetworkRule = value; } + public System.Collections.Generic.List VirtualNetworkRule { get => this._virtualNetworkRule; set => this._virtualNetworkRule = value; } /// Creates an new instance. public NetworkRuleSetProperties() @@ -66,18 +66,25 @@ public partial interface INetworkRuleSetProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Default Action for Network Rule Set", SerializedName = @"defaultAction", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.DefaultAction) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.DefaultAction? DefaultAction { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Allow", "Deny")] + string DefaultAction { get; set; } /// List of IpRules [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"List of IpRules", SerializedName = @"ipRules", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetIPRules) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetIPRules[] IPRule { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetIPRules) })] + System.Collections.Generic.List IPRule { get; set; } /// /// This determines if traffic is allowed over public network. By default it is enabled. If value is SecuredByPerimeter then /// Inbound and Outbound communication is controlled by the network security perimeter and profile's access rules. @@ -85,14 +92,21 @@ public partial interface INetworkRuleSetProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"This determines if traffic is allowed over public network. By default it is enabled. If value is SecuredByPerimeter then Inbound and Outbound communication is controlled by the network security perimeter and profile's access rules. ", SerializedName = @"publicNetworkAccess", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccessFlag) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccessFlag? PublicNetworkAccess { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Enabled", "Disabled", "SecuredByPerimeter")] + string PublicNetworkAccess { get; set; } /// Value that indicates whether Trusted Service Access is Enabled or not. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Value that indicates whether Trusted Service Access is Enabled or not.", SerializedName = @"trustedServiceAccessEnabled", PossibleTypes = new [] { typeof(bool) })] @@ -101,10 +115,13 @@ public partial interface INetworkRuleSetProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"List VirtualNetwork Rules", SerializedName = @"virtualNetworkRules", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetVirtualNetworkRules) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetVirtualNetworkRules[] VirtualNetworkRule { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetVirtualNetworkRules) })] + System.Collections.Generic.List VirtualNetworkRule { get; set; } } /// NetworkRuleSet properties @@ -112,18 +129,20 @@ internal partial interface INetworkRuleSetPropertiesInternal { /// Default Action for Network Rule Set - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.DefaultAction? DefaultAction { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Allow", "Deny")] + string DefaultAction { get; set; } /// List of IpRules - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetIPRules[] IPRule { get; set; } + System.Collections.Generic.List IPRule { get; set; } /// /// This determines if traffic is allowed over public network. By default it is enabled. If value is SecuredByPerimeter then /// Inbound and Outbound communication is controlled by the network security perimeter and profile's access rules. /// - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccessFlag? PublicNetworkAccess { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Enabled", "Disabled", "SecuredByPerimeter")] + string PublicNetworkAccess { get; set; } /// Value that indicates whether Trusted Service Access is Enabled or not. bool? TrustedServiceAccessEnabled { get; set; } /// List VirtualNetwork Rules - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetVirtualNetworkRules[] VirtualNetworkRule { get; set; } + System.Collections.Generic.List VirtualNetworkRule { get; set; } } } \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkRuleSetProperties.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkRuleSetProperties.json.cs similarity index 86% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkRuleSetProperties.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NetworkRuleSetProperties.json.cs index 616bc52bf6c8..4ee6c05c22cc 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkRuleSetProperties.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkRuleSetProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class NetworkRuleSetProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new NetworkRuleSetProperties(json) : null; } @@ -77,11 +77,11 @@ internal NetworkRuleSetProperties(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Ru { return; } - {_trustedServiceAccessEnabled = If( json?.PropertyT("trustedServiceAccessEnabled"), out var __jsonTrustedServiceAccessEnabled) ? (bool?)__jsonTrustedServiceAccessEnabled : TrustedServiceAccessEnabled;} - {_defaultAction = If( json?.PropertyT("defaultAction"), out var __jsonDefaultAction) ? (string)__jsonDefaultAction : (string)DefaultAction;} - {_virtualNetworkRule = If( json?.PropertyT("virtualNetworkRules"), out var __jsonVirtualNetworkRules) ? If( __jsonVirtualNetworkRules as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetVirtualNetworkRules) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NwRuleSetVirtualNetworkRules.FromJson(__u) )) ))() : null : VirtualNetworkRule;} - {_iPRule = If( json?.PropertyT("ipRules"), out var __jsonIPRules) ? If( __jsonIPRules as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetIPRules) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NwRuleSetIPRules.FromJson(__p) )) ))() : null : IPRule;} - {_publicNetworkAccess = If( json?.PropertyT("publicNetworkAccess"), out var __jsonPublicNetworkAccess) ? (string)__jsonPublicNetworkAccess : (string)PublicNetworkAccess;} + {_trustedServiceAccessEnabled = If( json?.PropertyT("trustedServiceAccessEnabled"), out var __jsonTrustedServiceAccessEnabled) ? (bool?)__jsonTrustedServiceAccessEnabled : _trustedServiceAccessEnabled;} + {_defaultAction = If( json?.PropertyT("defaultAction"), out var __jsonDefaultAction) ? (string)__jsonDefaultAction : (string)_defaultAction;} + {_virtualNetworkRule = If( json?.PropertyT("virtualNetworkRules"), out var __jsonVirtualNetworkRules) ? If( __jsonVirtualNetworkRules as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetVirtualNetworkRules) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NwRuleSetVirtualNetworkRules.FromJson(__u) )) ))() : null : _virtualNetworkRule;} + {_iPRule = If( json?.PropertyT("ipRules"), out var __jsonIPRules) ? If( __jsonIPRules as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __q) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetIPRules) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NwRuleSetIPRules.FromJson(__p) )) ))() : null : _iPRule;} + {_publicNetworkAccess = If( json?.PropertyT("publicNetworkAccess"), out var __jsonPublicNetworkAccess) ? (string)__jsonPublicNetworkAccess : (string)_publicNetworkAccess;} AfterFromJson(json); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeter.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeter.PowerShell.cs similarity index 76% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeter.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeter.PowerShell.cs index 0dd9a9db1539..718644940ace 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeter.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeter.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class NetworkSecurityPerimeter partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeter DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeter DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new NetworkSecurityPerimeter(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeter DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeter DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new NetworkSecurityPerimeter(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeter FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeter FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,21 +111,21 @@ internal NetworkSecurityPerimeter(global::System.Collections.IDictionary content // actually deserialize if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("PerimeterGuid")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterInternal)this).PerimeterGuid = (string) content.GetValueForProperty("PerimeterGuid",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterInternal)this).PerimeterGuid, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterInternal)this).PerimeterGuid = (string) content.GetValueForProperty("PerimeterGuid",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterInternal)this).PerimeterGuid, global::System.Convert.ToString); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterInternal)this).Location, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -142,15 +140,15 @@ internal NetworkSecurityPerimeter(global::System.Management.Automation.PSObject // actually deserialize if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("PerimeterGuid")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterInternal)this).PerimeterGuid = (string) content.GetValueForProperty("PerimeterGuid",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterInternal)this).PerimeterGuid, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterInternal)this).PerimeterGuid = (string) content.GetValueForProperty("PerimeterGuid",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterInternal)this).PerimeterGuid, global::System.Convert.ToString); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterInternal)this).Location, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeter.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeter.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeter.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeter.TypeConverter.cs index b99a61c7b3e2..ee3bccec013d 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeter.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeter.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeter ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeter ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeter).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeter).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeter.cs similarity index 89% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeter.cs index cc2a16b35d1d..f04a5077346f 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeter.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// NetworkSecurityPerimeter related information [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class NetworkSecurityPerimeter : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeter, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeter, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterInternal { /// Backing field for property. @@ -49,6 +49,9 @@ public partial interface INetworkSecurityPerimeter : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Fully qualified identifier of the resource", SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] @@ -57,6 +60,9 @@ public partial interface INetworkSecurityPerimeter : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Location of the resource", SerializedName = @"location", PossibleTypes = new [] { typeof(string) })] @@ -65,6 +71,9 @@ public partial interface INetworkSecurityPerimeter : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Guid of the resource", SerializedName = @"perimeterGuid", PossibleTypes = new [] { typeof(string) })] diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeter.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeter.json.cs similarity index 93% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeter.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeter.json.cs index 13be8f9a6d56..b52d790fa1f7 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeter.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeter.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class NetworkSecurityPerimeter partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeter. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeter. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeter. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeter. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeter FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeter FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new NetworkSecurityPerimeter(json) : null; } @@ -77,9 +77,9 @@ internal NetworkSecurityPerimeter(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Ru { return; } - {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} - {_perimeterGuid = If( json?.PropertyT("perimeterGuid"), out var __jsonPerimeterGuid) ? (string)__jsonPerimeterGuid : (string)PerimeterGuid;} - {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)Location;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;} + {_perimeterGuid = If( json?.PropertyT("perimeterGuid"), out var __jsonPerimeterGuid) ? (string)__jsonPerimeterGuid : (string)_perimeterGuid;} + {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)_location;} AfterFromJson(json); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfiguration.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfiguration.PowerShell.cs new file mode 100644 index 000000000000..e053b4c89ee3 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfiguration.PowerShell.cs @@ -0,0 +1,335 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + + /// Network Security Perimeter related configurations of a given namespace + [System.ComponentModel.TypeConverter(typeof(NetworkSecurityPerimeterConfigurationTypeConverter))] + public partial class NetworkSecurityPerimeterConfiguration + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfiguration DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new NetworkSecurityPerimeterConfiguration(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfiguration DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new NetworkSecurityPerimeterConfiguration(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json + /// string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfiguration FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal NetworkSecurityPerimeterConfiguration(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NetworkSecurityPerimeterConfigurationPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("NetworkSecurityPerimeter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).NetworkSecurityPerimeter = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeter) content.GetValueForProperty("NetworkSecurityPerimeter",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).NetworkSecurityPerimeter, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NetworkSecurityPerimeterTypeConverter.ConvertFrom); + } + if (content.Contains("ResourceAssociation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).ResourceAssociation = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociation) content.GetValueForProperty("ResourceAssociation",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).ResourceAssociation, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NetworkSecurityPerimeterConfigurationPropertiesResourceAssociationTypeConverter.ConvertFrom); + } + if (content.Contains("Profile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).Profile = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesProfile) content.GetValueForProperty("Profile",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).Profile, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NetworkSecurityPerimeterConfigurationPropertiesProfileTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningIssue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).ProvisioningIssue = (System.Collections.Generic.List) content.GetValueForProperty("ProvisioningIssue",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).ProvisioningIssue, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ProvisioningIssueTypeConverter.ConvertFrom)); + } + if (content.Contains("IsBackingResource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).IsBackingResource = (bool?) content.GetValueForProperty("IsBackingResource",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).IsBackingResource, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ApplicableFeature")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).ApplicableFeature = (System.Collections.Generic.List) content.GetValueForProperty("ApplicableFeature",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).ApplicableFeature, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("ParentAssociationName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).ParentAssociationName = (string) content.GetValueForProperty("ParentAssociationName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).ParentAssociationName, global::System.Convert.ToString); + } + if (content.Contains("SourceResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).SourceResourceId = (string) content.GetValueForProperty("SourceResourceId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).SourceResourceId, global::System.Convert.ToString); + } + if (content.Contains("NetworkSecurityPerimeterId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).NetworkSecurityPerimeterId = (string) content.GetValueForProperty("NetworkSecurityPerimeterId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).NetworkSecurityPerimeterId, global::System.Convert.ToString); + } + if (content.Contains("NetworkSecurityPerimeterLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).NetworkSecurityPerimeterLocation = (string) content.GetValueForProperty("NetworkSecurityPerimeterLocation",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).NetworkSecurityPerimeterLocation, global::System.Convert.ToString); + } + if (content.Contains("ResourceAssociationAccessMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).ResourceAssociationAccessMode = (string) content.GetValueForProperty("ResourceAssociationAccessMode",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).ResourceAssociationAccessMode, global::System.Convert.ToString); + } + if (content.Contains("NetworkSecurityPerimeterGuid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).NetworkSecurityPerimeterGuid = (string) content.GetValueForProperty("NetworkSecurityPerimeterGuid",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).NetworkSecurityPerimeterGuid, global::System.Convert.ToString); + } + if (content.Contains("ResourceAssociationName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).ResourceAssociationName = (string) content.GetValueForProperty("ResourceAssociationName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).ResourceAssociationName, global::System.Convert.ToString); + } + if (content.Contains("ProfileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).ProfileName = (string) content.GetValueForProperty("ProfileName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).ProfileName, global::System.Convert.ToString); + } + if (content.Contains("ProfileAccessRulesVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).ProfileAccessRulesVersion = (string) content.GetValueForProperty("ProfileAccessRulesVersion",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).ProfileAccessRulesVersion, global::System.Convert.ToString); + } + if (content.Contains("ProfileAccessRule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).ProfileAccessRule = (System.Collections.Generic.List) content.GetValueForProperty("ProfileAccessRule",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).ProfileAccessRule, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NspAccessRuleTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal NetworkSecurityPerimeterConfiguration(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NetworkSecurityPerimeterConfigurationPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("NetworkSecurityPerimeter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).NetworkSecurityPerimeter = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeter) content.GetValueForProperty("NetworkSecurityPerimeter",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).NetworkSecurityPerimeter, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NetworkSecurityPerimeterTypeConverter.ConvertFrom); + } + if (content.Contains("ResourceAssociation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).ResourceAssociation = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociation) content.GetValueForProperty("ResourceAssociation",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).ResourceAssociation, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NetworkSecurityPerimeterConfigurationPropertiesResourceAssociationTypeConverter.ConvertFrom); + } + if (content.Contains("Profile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).Profile = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesProfile) content.GetValueForProperty("Profile",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).Profile, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NetworkSecurityPerimeterConfigurationPropertiesProfileTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningIssue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).ProvisioningIssue = (System.Collections.Generic.List) content.GetValueForProperty("ProvisioningIssue",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).ProvisioningIssue, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ProvisioningIssueTypeConverter.ConvertFrom)); + } + if (content.Contains("IsBackingResource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).IsBackingResource = (bool?) content.GetValueForProperty("IsBackingResource",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).IsBackingResource, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ApplicableFeature")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).ApplicableFeature = (System.Collections.Generic.List) content.GetValueForProperty("ApplicableFeature",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).ApplicableFeature, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("ParentAssociationName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).ParentAssociationName = (string) content.GetValueForProperty("ParentAssociationName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).ParentAssociationName, global::System.Convert.ToString); + } + if (content.Contains("SourceResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).SourceResourceId = (string) content.GetValueForProperty("SourceResourceId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).SourceResourceId, global::System.Convert.ToString); + } + if (content.Contains("NetworkSecurityPerimeterId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).NetworkSecurityPerimeterId = (string) content.GetValueForProperty("NetworkSecurityPerimeterId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).NetworkSecurityPerimeterId, global::System.Convert.ToString); + } + if (content.Contains("NetworkSecurityPerimeterLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).NetworkSecurityPerimeterLocation = (string) content.GetValueForProperty("NetworkSecurityPerimeterLocation",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).NetworkSecurityPerimeterLocation, global::System.Convert.ToString); + } + if (content.Contains("ResourceAssociationAccessMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).ResourceAssociationAccessMode = (string) content.GetValueForProperty("ResourceAssociationAccessMode",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).ResourceAssociationAccessMode, global::System.Convert.ToString); + } + if (content.Contains("NetworkSecurityPerimeterGuid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).NetworkSecurityPerimeterGuid = (string) content.GetValueForProperty("NetworkSecurityPerimeterGuid",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).NetworkSecurityPerimeterGuid, global::System.Convert.ToString); + } + if (content.Contains("ResourceAssociationName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).ResourceAssociationName = (string) content.GetValueForProperty("ResourceAssociationName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).ResourceAssociationName, global::System.Convert.ToString); + } + if (content.Contains("ProfileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).ProfileName = (string) content.GetValueForProperty("ProfileName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).ProfileName, global::System.Convert.ToString); + } + if (content.Contains("ProfileAccessRulesVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).ProfileAccessRulesVersion = (string) content.GetValueForProperty("ProfileAccessRulesVersion",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).ProfileAccessRulesVersion, global::System.Convert.ToString); + } + if (content.Contains("ProfileAccessRule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).ProfileAccessRule = (System.Collections.Generic.List) content.GetValueForProperty("ProfileAccessRule",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal)this).ProfileAccessRule, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NspAccessRuleTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Network Security Perimeter related configurations of a given namespace + [System.ComponentModel.TypeConverter(typeof(NetworkSecurityPerimeterConfigurationTypeConverter))] + public partial interface INetworkSecurityPerimeterConfiguration + + { + + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfiguration.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfiguration.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfiguration.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfiguration.TypeConverter.cs index 37551044aca0..cdcc0e22ea6f 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfiguration.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfiguration.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -109,14 +109,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfiguration ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfiguration ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfiguration).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfiguration).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfiguration.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfiguration.cs similarity index 53% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfiguration.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfiguration.cs index 8478af03e9e4..ce220da77ad0 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfiguration.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfiguration.cs @@ -3,146 +3,145 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// Network Security Perimeter related configurations of a given namespace [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class NetworkSecurityPerimeterConfiguration : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfiguration, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfiguration, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IValidates { /// - /// Backing field for Inherited model + /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ProxyResource(); + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ProxyResource(); /// /// Indicates that the NSP controls related to backing association are only applicable to a specific feature in backing resource's /// data plane. /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string[] ApplicableFeature { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).ApplicableFeature; } + public System.Collections.Generic.List ApplicableFeature { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).ApplicableFeature; } /// /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Id; } /// /// True if the EventHub namespace is backed by another Azure resource and not visible to end users. /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public bool? IsBackingResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).IsBackingResource; } + public bool? IsBackingResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).IsBackingResource; } /// The geo-location where the resource lives [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Location; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Id = value; } - - /// Internal Acessors for Location - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal.Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Location = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Name = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Type = value; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Location; } /// Internal Acessors for ApplicableFeature - string[] Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal.ApplicableFeature { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).ApplicableFeature; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).ApplicableFeature = value; } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal.ApplicableFeature { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).ApplicableFeature; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).ApplicableFeature = value; } /// Internal Acessors for IsBackingResource - bool? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal.IsBackingResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).IsBackingResource; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).IsBackingResource = value; } + bool? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal.IsBackingResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).IsBackingResource; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).IsBackingResource = value; } /// Internal Acessors for NetworkSecurityPerimeter - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeter Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal.NetworkSecurityPerimeter { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).NetworkSecurityPerimeter; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).NetworkSecurityPerimeter = value; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeter Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal.NetworkSecurityPerimeter { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).NetworkSecurityPerimeter; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).NetworkSecurityPerimeter = value; } /// Internal Acessors for ParentAssociationName - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal.ParentAssociationName { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).ParentAssociationName; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).ParentAssociationName = value; } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal.ParentAssociationName { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).ParentAssociationName; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).ParentAssociationName = value; } /// Internal Acessors for Profile - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesProfile Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal.Profile { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).Profile; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).Profile = value; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesProfile Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal.Profile { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).Profile; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).Profile = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationProperties Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NetworkSecurityPerimeterConfigurationProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationProperties Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NetworkSecurityPerimeterConfigurationProperties()); set { {_property = value;} } } /// Internal Acessors for ResourceAssociation - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociation Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal.ResourceAssociation { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).ResourceAssociation; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).ResourceAssociation = value; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociation Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal.ResourceAssociation { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).ResourceAssociation; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).ResourceAssociation = value; } /// Internal Acessors for SourceResourceId - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationInternal.SourceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).SourceResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).SourceResourceId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationInternal.SourceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).SourceResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).SourceResourceId = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Id = value; } + + /// Internal Acessors for Location + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal.Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Location = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Type = value; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Name; } /// Guid of the resource [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string NetworkSecurityPerimeterGuid { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).NetworkSecurityPerimeterGuid; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).NetworkSecurityPerimeterGuid = value ?? null; } + public string NetworkSecurityPerimeterGuid { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).NetworkSecurityPerimeterGuid; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).NetworkSecurityPerimeterGuid = value ?? null; } /// Fully qualified identifier of the resource [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string NetworkSecurityPerimeterId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).NetworkSecurityPerimeterId; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).NetworkSecurityPerimeterId = value ?? null; } + public string NetworkSecurityPerimeterId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).NetworkSecurityPerimeterId; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).NetworkSecurityPerimeterId = value ?? null; } /// Location of the resource [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string NetworkSecurityPerimeterLocation { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).NetworkSecurityPerimeterLocation; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).NetworkSecurityPerimeterLocation = value ?? null; } + public string NetworkSecurityPerimeterLocation { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).NetworkSecurityPerimeterLocation; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).NetworkSecurityPerimeterLocation = value ?? null; } /// Source Resource Association name [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string ParentAssociationName { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).ParentAssociationName; } + public string ParentAssociationName { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).ParentAssociationName; } /// List of Access Rules [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRule[] ProfileAccessRule { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).ProfileAccessRule; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).ProfileAccessRule = value ?? null /* arrayOf */; } + public System.Collections.Generic.List ProfileAccessRule { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).ProfileAccessRule; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).ProfileAccessRule = value ?? null /* arrayOf */; } /// Current access rules version [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string ProfileAccessRulesVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).ProfileAccessRulesVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).ProfileAccessRulesVersion = value ?? null; } + public string ProfileAccessRulesVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).ProfileAccessRulesVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).ProfileAccessRulesVersion = value ?? null; } /// Name of the resource [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string ProfileName { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).ProfileName; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).ProfileName = value ?? null; } + public string ProfileName { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).ProfileName; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).ProfileName = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationProperties _property; /// Properties of the Network Security Perimeter Configuration [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NetworkSecurityPerimeterConfigurationProperties()); } + internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NetworkSecurityPerimeterConfigurationProperties()); } /// List of Provisioning Issues if any [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssue[] ProvisioningIssue { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).ProvisioningIssue; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).ProvisioningIssue = value ?? null /* arrayOf */; } + public System.Collections.Generic.List ProvisioningIssue { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).ProvisioningIssue; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).ProvisioningIssue = value ?? null /* arrayOf */; } /// Provisioning state of NetworkSecurityPerimeter configuration propagation [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkSecurityPerimeterConfigurationProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).ProvisioningState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkSecurityPerimeterConfigurationProvisioningState)""); } + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).ProvisioningState = value ?? null; } /// Access Mode of the resource association [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ResourceAssociationAccessMode? ResourceAssociationAccessMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).ResourceAssociationAccessMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).ResourceAssociationAccessMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ResourceAssociationAccessMode)""); } + public string ResourceAssociationAccessMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).ResourceAssociationAccessMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).ResourceAssociationAccessMode = value ?? null; } /// Name of the resource association [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string ResourceAssociationName { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).ResourceAssociationName; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).ResourceAssociationName = value ?? null; } + public string ResourceAssociationName { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).ResourceAssociationName; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).ResourceAssociationName = value ?? null; } /// ARM Id of source resource [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string SourceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).SourceResourceId; } + public string SourceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)Property).SourceResourceId; } /// /// The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs" /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Type; } /// Creates an new instance. public NetworkSecurityPerimeterConfiguration() @@ -165,7 +164,7 @@ public NetworkSecurityPerimeterConfiguration() /// Network Security Perimeter related configurations of a given namespace public partial interface INetworkSecurityPerimeterConfiguration : Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResource + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResource { /// /// Indicates that the NSP controls related to backing association are only applicable to a specific feature in backing resource's @@ -174,16 +173,22 @@ public partial interface INetworkSecurityPerimeterConfiguration : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Indicates that the NSP controls related to backing association are only applicable to a specific feature in backing resource's data plane.", SerializedName = @"applicableFeatures", PossibleTypes = new [] { typeof(string) })] - string[] ApplicableFeature { get; } + System.Collections.Generic.List ApplicableFeature { get; } /// /// True if the EventHub namespace is backed by another Azure resource and not visible to end users. /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"True if the EventHub namespace is backed by another Azure resource and not visible to end users.", SerializedName = @"isBackingResource", PossibleTypes = new [] { typeof(bool) })] @@ -191,31 +196,43 @@ public partial interface INetworkSecurityPerimeterConfiguration : /// Guid of the resource [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Guid of the resource", SerializedName = @"perimeterGuid", PossibleTypes = new [] { typeof(string) })] - string NetworkSecurityPerimeterGuid { get; set; } + string NetworkSecurityPerimeterGuid { get; } /// Fully qualified identifier of the resource [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Fully qualified identifier of the resource", SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] - string NetworkSecurityPerimeterId { get; set; } + string NetworkSecurityPerimeterId { get; } /// Location of the resource [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Location of the resource", SerializedName = @"location", PossibleTypes = new [] { typeof(string) })] - string NetworkSecurityPerimeterLocation { get; set; } + string NetworkSecurityPerimeterLocation { get; } /// Source Resource Association name [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Source Resource Association name", SerializedName = @"parentAssociationName", PossibleTypes = new [] { typeof(string) })] @@ -223,63 +240,89 @@ public partial interface INetworkSecurityPerimeterConfiguration : /// List of Access Rules [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"List of Access Rules", SerializedName = @"accessRules", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRule) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRule[] ProfileAccessRule { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRule) })] + System.Collections.Generic.List ProfileAccessRule { get; } /// Current access rules version [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Current access rules version", SerializedName = @"accessRulesVersion", PossibleTypes = new [] { typeof(string) })] - string ProfileAccessRulesVersion { get; set; } + string ProfileAccessRulesVersion { get; } /// Name of the resource [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Name of the resource", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] - string ProfileName { get; set; } + string ProfileName { get; } /// List of Provisioning Issues if any [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"List of Provisioning Issues if any", SerializedName = @"provisioningIssues", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssue) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssue[] ProvisioningIssue { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssue) })] + System.Collections.Generic.List ProvisioningIssue { get; } /// Provisioning state of NetworkSecurityPerimeter configuration propagation [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Provisioning state of NetworkSecurityPerimeter configuration propagation", SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkSecurityPerimeterConfigurationProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkSecurityPerimeterConfigurationProvisioningState? ProvisioningState { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Unknown", "Creating", "Updating", "Accepted", "InvalidResponse", "Succeeded", "SucceededWithIssues", "Failed", "Deleting", "Deleted", "Canceled")] + string ProvisioningState { get; } /// Access Mode of the resource association [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Access Mode of the resource association", SerializedName = @"accessMode", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ResourceAssociationAccessMode) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ResourceAssociationAccessMode? ResourceAssociationAccessMode { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("NoAssociationMode", "EnforcedMode", "LearningMode", "AuditMode", "UnspecifiedMode")] + string ResourceAssociationAccessMode { get; } /// Name of the resource association [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Name of the resource association", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] - string ResourceAssociationName { get; set; } + string ResourceAssociationName { get; } /// ARM Id of source resource [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"ARM Id of source resource", SerializedName = @"sourceResourceId", PossibleTypes = new [] { typeof(string) })] @@ -288,19 +331,19 @@ public partial interface INetworkSecurityPerimeterConfiguration : } /// Network Security Perimeter related configurations of a given namespace internal partial interface INetworkSecurityPerimeterConfigurationInternal : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal { /// /// Indicates that the NSP controls related to backing association are only applicable to a specific feature in backing resource's /// data plane. /// - string[] ApplicableFeature { get; set; } + System.Collections.Generic.List ApplicableFeature { get; set; } /// /// True if the EventHub namespace is backed by another Azure resource and not visible to end users. /// bool? IsBackingResource { get; set; } /// NetworkSecurityPerimeter related information - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeter NetworkSecurityPerimeter { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeter NetworkSecurityPerimeter { get; set; } /// Guid of the resource string NetworkSecurityPerimeterGuid { get; set; } /// Fully qualified identifier of the resource @@ -310,23 +353,25 @@ internal partial interface INetworkSecurityPerimeterConfigurationInternal : /// Source Resource Association name string ParentAssociationName { get; set; } /// Information about current network profile - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesProfile Profile { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesProfile Profile { get; set; } /// List of Access Rules - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRule[] ProfileAccessRule { get; set; } + System.Collections.Generic.List ProfileAccessRule { get; set; } /// Current access rules version string ProfileAccessRulesVersion { get; set; } /// Name of the resource string ProfileName { get; set; } /// Properties of the Network Security Perimeter Configuration - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationProperties Property { get; set; } /// List of Provisioning Issues if any - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssue[] ProvisioningIssue { get; set; } + System.Collections.Generic.List ProvisioningIssue { get; set; } /// Provisioning state of NetworkSecurityPerimeter configuration propagation - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkSecurityPerimeterConfigurationProvisioningState? ProvisioningState { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Unknown", "Creating", "Updating", "Accepted", "InvalidResponse", "Succeeded", "SucceededWithIssues", "Failed", "Deleting", "Deleted", "Canceled")] + string ProvisioningState { get; set; } /// Information about resource association - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociation ResourceAssociation { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociation ResourceAssociation { get; set; } /// Access Mode of the resource association - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ResourceAssociationAccessMode? ResourceAssociationAccessMode { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("NoAssociationMode", "EnforcedMode", "LearningMode", "AuditMode", "UnspecifiedMode")] + string ResourceAssociationAccessMode { get; set; } /// Name of the resource association string ResourceAssociationName { get; set; } /// ARM Id of source resource diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfiguration.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfiguration.json.cs similarity index 91% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfiguration.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfiguration.json.cs index 90e47c4c224e..bc379249cb35 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfiguration.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfiguration.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class NetworkSecurityPerimeterConfiguration partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfiguration. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfiguration. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfiguration. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfiguration. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfiguration FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfiguration FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new NetworkSecurityPerimeterConfiguration(json) : null; } @@ -77,8 +77,8 @@ internal NetworkSecurityPerimeterConfiguration(Microsoft.Azure.PowerShell.Cmdlet { return; } - __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ProxyResource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NetworkSecurityPerimeterConfigurationProperties.FromJson(__jsonProperties) : Property;} + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NetworkSecurityPerimeterConfigurationProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } @@ -103,7 +103,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode ToJson( return container; } __proxyResource?.ToJson(container, serializationMode); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfigurationList.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfigurationList.PowerShell.cs similarity index 76% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfigurationList.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfigurationList.PowerShell.cs index 097f013f7308..e3b5c0b8a1f0 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfigurationList.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfigurationList.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,29 +63,29 @@ public partial class NetworkSecurityPerimeterConfigurationList partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationList DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationList DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new NetworkSecurityPerimeterConfigurationList(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new NetworkSecurityPerimeterConfigurationList(content); } @@ -98,10 +98,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -116,13 +116,13 @@ internal NetworkSecurityPerimeterConfigurationList(global::System.Collections.ID // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfiguration[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NetworkSecurityPerimeterConfigurationTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationListInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationListInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NetworkSecurityPerimeterConfigurationTypeConverter.ConvertFrom)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -137,7 +137,7 @@ internal NetworkSecurityPerimeterConfigurationList(global::System.Management.Aut // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfiguration[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NetworkSecurityPerimeterConfigurationTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationListInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationListInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NetworkSecurityPerimeterConfigurationTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfigurationList.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfigurationList.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfigurationList.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfigurationList.TypeConverter.cs index 4c12b588862d..822a39867a98 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfigurationList.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfigurationList.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -110,14 +110,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationList ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationList ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationList).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationList).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfigurationList.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfigurationList.cs similarity index 61% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfigurationList.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfigurationList.cs index 7b233d3c7d2d..d71ca5de0bf8 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfigurationList.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfigurationList.cs @@ -3,26 +3,26 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// Result of the List NetworkSecurityPerimeterConfiguration operation. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class NetworkSecurityPerimeterConfigurationList : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationList, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationListInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationList, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationListInternal { /// Internal Acessors for Value - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfiguration[] Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationListInternal.Value { get => this._value; set { {_value = value;} } } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationListInternal.Value { get => this._value; set { {_value = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfiguration[] _value; + private System.Collections.Generic.List _value; /// A collection of NetworkSecurityPerimeterConfigurations [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfiguration[] Value { get => this._value; } + public System.Collections.Generic.List Value { get => this._value; } /// /// Creates an new instance. @@ -40,10 +40,13 @@ public partial interface INetworkSecurityPerimeterConfigurationList : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"A collection of NetworkSecurityPerimeterConfigurations", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfiguration) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfiguration[] Value { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfiguration) })] + System.Collections.Generic.List Value { get; } } /// Result of the List NetworkSecurityPerimeterConfiguration operation. @@ -51,7 +54,7 @@ internal partial interface INetworkSecurityPerimeterConfigurationListInternal { /// A collection of NetworkSecurityPerimeterConfigurations - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfiguration[] Value { get; set; } + System.Collections.Generic.List Value { get; set; } } } \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfigurationList.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfigurationList.json.cs similarity index 88% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfigurationList.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfigurationList.json.cs index 3a16f24dc51f..91f248af0b12 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfigurationList.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfigurationList.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class NetworkSecurityPerimeterConfigurationList partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationList. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationList. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationList. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationList. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationList FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationList FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new NetworkSecurityPerimeterConfigurationList(json) : null; } @@ -77,7 +77,7 @@ internal NetworkSecurityPerimeterConfigurationList(Microsoft.Azure.PowerShell.Cm { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfiguration) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NetworkSecurityPerimeterConfiguration.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfiguration) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NetworkSecurityPerimeterConfiguration.FromJson(__u) )) ))() : null : _value;} AfterFromJson(json); } @@ -102,7 +102,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode ToJson( { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { if (null != this._value) { diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfigurationProperties.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfigurationProperties.PowerShell.cs new file mode 100644 index 000000000000..14e9bb19a257 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfigurationProperties.PowerShell.cs @@ -0,0 +1,297 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + + /// Properties of NetworkSecurityPerimeterConfiguration + [System.ComponentModel.TypeConverter(typeof(NetworkSecurityPerimeterConfigurationPropertiesTypeConverter))] + public partial class NetworkSecurityPerimeterConfigurationProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new NetworkSecurityPerimeterConfigurationProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new NetworkSecurityPerimeterConfigurationProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from + /// a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal NetworkSecurityPerimeterConfigurationProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("NetworkSecurityPerimeter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).NetworkSecurityPerimeter = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeter) content.GetValueForProperty("NetworkSecurityPerimeter",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).NetworkSecurityPerimeter, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NetworkSecurityPerimeterTypeConverter.ConvertFrom); + } + if (content.Contains("ResourceAssociation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ResourceAssociation = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociation) content.GetValueForProperty("ResourceAssociation",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ResourceAssociation, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NetworkSecurityPerimeterConfigurationPropertiesResourceAssociationTypeConverter.ConvertFrom); + } + if (content.Contains("Profile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).Profile = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesProfile) content.GetValueForProperty("Profile",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).Profile, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NetworkSecurityPerimeterConfigurationPropertiesProfileTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningIssue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ProvisioningIssue = (System.Collections.Generic.List) content.GetValueForProperty("ProvisioningIssue",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ProvisioningIssue, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ProvisioningIssueTypeConverter.ConvertFrom)); + } + if (content.Contains("IsBackingResource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).IsBackingResource = (bool?) content.GetValueForProperty("IsBackingResource",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).IsBackingResource, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ApplicableFeature")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ApplicableFeature = (System.Collections.Generic.List) content.GetValueForProperty("ApplicableFeature",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ApplicableFeature, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("ParentAssociationName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ParentAssociationName = (string) content.GetValueForProperty("ParentAssociationName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ParentAssociationName, global::System.Convert.ToString); + } + if (content.Contains("SourceResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).SourceResourceId = (string) content.GetValueForProperty("SourceResourceId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).SourceResourceId, global::System.Convert.ToString); + } + if (content.Contains("NetworkSecurityPerimeterId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).NetworkSecurityPerimeterId = (string) content.GetValueForProperty("NetworkSecurityPerimeterId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).NetworkSecurityPerimeterId, global::System.Convert.ToString); + } + if (content.Contains("NetworkSecurityPerimeterLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).NetworkSecurityPerimeterLocation = (string) content.GetValueForProperty("NetworkSecurityPerimeterLocation",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).NetworkSecurityPerimeterLocation, global::System.Convert.ToString); + } + if (content.Contains("ResourceAssociationAccessMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ResourceAssociationAccessMode = (string) content.GetValueForProperty("ResourceAssociationAccessMode",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ResourceAssociationAccessMode, global::System.Convert.ToString); + } + if (content.Contains("NetworkSecurityPerimeterGuid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).NetworkSecurityPerimeterGuid = (string) content.GetValueForProperty("NetworkSecurityPerimeterGuid",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).NetworkSecurityPerimeterGuid, global::System.Convert.ToString); + } + if (content.Contains("ResourceAssociationName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ResourceAssociationName = (string) content.GetValueForProperty("ResourceAssociationName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ResourceAssociationName, global::System.Convert.ToString); + } + if (content.Contains("ProfileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ProfileName = (string) content.GetValueForProperty("ProfileName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ProfileName, global::System.Convert.ToString); + } + if (content.Contains("ProfileAccessRulesVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ProfileAccessRulesVersion = (string) content.GetValueForProperty("ProfileAccessRulesVersion",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ProfileAccessRulesVersion, global::System.Convert.ToString); + } + if (content.Contains("ProfileAccessRule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ProfileAccessRule = (System.Collections.Generic.List) content.GetValueForProperty("ProfileAccessRule",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ProfileAccessRule, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NspAccessRuleTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal NetworkSecurityPerimeterConfigurationProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("NetworkSecurityPerimeter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).NetworkSecurityPerimeter = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeter) content.GetValueForProperty("NetworkSecurityPerimeter",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).NetworkSecurityPerimeter, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NetworkSecurityPerimeterTypeConverter.ConvertFrom); + } + if (content.Contains("ResourceAssociation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ResourceAssociation = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociation) content.GetValueForProperty("ResourceAssociation",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ResourceAssociation, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NetworkSecurityPerimeterConfigurationPropertiesResourceAssociationTypeConverter.ConvertFrom); + } + if (content.Contains("Profile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).Profile = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesProfile) content.GetValueForProperty("Profile",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).Profile, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NetworkSecurityPerimeterConfigurationPropertiesProfileTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningIssue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ProvisioningIssue = (System.Collections.Generic.List) content.GetValueForProperty("ProvisioningIssue",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ProvisioningIssue, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ProvisioningIssueTypeConverter.ConvertFrom)); + } + if (content.Contains("IsBackingResource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).IsBackingResource = (bool?) content.GetValueForProperty("IsBackingResource",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).IsBackingResource, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ApplicableFeature")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ApplicableFeature = (System.Collections.Generic.List) content.GetValueForProperty("ApplicableFeature",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ApplicableFeature, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("ParentAssociationName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ParentAssociationName = (string) content.GetValueForProperty("ParentAssociationName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ParentAssociationName, global::System.Convert.ToString); + } + if (content.Contains("SourceResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).SourceResourceId = (string) content.GetValueForProperty("SourceResourceId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).SourceResourceId, global::System.Convert.ToString); + } + if (content.Contains("NetworkSecurityPerimeterId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).NetworkSecurityPerimeterId = (string) content.GetValueForProperty("NetworkSecurityPerimeterId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).NetworkSecurityPerimeterId, global::System.Convert.ToString); + } + if (content.Contains("NetworkSecurityPerimeterLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).NetworkSecurityPerimeterLocation = (string) content.GetValueForProperty("NetworkSecurityPerimeterLocation",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).NetworkSecurityPerimeterLocation, global::System.Convert.ToString); + } + if (content.Contains("ResourceAssociationAccessMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ResourceAssociationAccessMode = (string) content.GetValueForProperty("ResourceAssociationAccessMode",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ResourceAssociationAccessMode, global::System.Convert.ToString); + } + if (content.Contains("NetworkSecurityPerimeterGuid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).NetworkSecurityPerimeterGuid = (string) content.GetValueForProperty("NetworkSecurityPerimeterGuid",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).NetworkSecurityPerimeterGuid, global::System.Convert.ToString); + } + if (content.Contains("ResourceAssociationName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ResourceAssociationName = (string) content.GetValueForProperty("ResourceAssociationName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ResourceAssociationName, global::System.Convert.ToString); + } + if (content.Contains("ProfileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ProfileName = (string) content.GetValueForProperty("ProfileName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ProfileName, global::System.Convert.ToString); + } + if (content.Contains("ProfileAccessRulesVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ProfileAccessRulesVersion = (string) content.GetValueForProperty("ProfileAccessRulesVersion",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ProfileAccessRulesVersion, global::System.Convert.ToString); + } + if (content.Contains("ProfileAccessRule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ProfileAccessRule = (System.Collections.Generic.List) content.GetValueForProperty("ProfileAccessRule",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal)this).ProfileAccessRule, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NspAccessRuleTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Properties of NetworkSecurityPerimeterConfiguration + [System.ComponentModel.TypeConverter(typeof(NetworkSecurityPerimeterConfigurationPropertiesTypeConverter))] + public partial interface INetworkSecurityPerimeterConfigurationProperties + + { + + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfigurationProperties.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfigurationProperties.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfigurationProperties.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfigurationProperties.TypeConverter.cs index 372339dbcce3..13e1e7de2186 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfigurationProperties.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfigurationProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -112,14 +112,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// an instance of , or null if there is no suitable /// conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfigurationProperties.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfigurationProperties.cs similarity index 58% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfigurationProperties.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfigurationProperties.cs index 35e8c162cea9..b873331a00da 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfigurationProperties.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfigurationProperties.cs @@ -3,26 +3,26 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// Properties of NetworkSecurityPerimeterConfiguration [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class NetworkSecurityPerimeterConfigurationProperties : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationProperties, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationProperties, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal { /// Backing field for property. - private string[] _applicableFeature; + private System.Collections.Generic.List _applicableFeature; /// /// Indicates that the NSP controls related to backing association are only applicable to a specific feature in backing resource's /// data plane. /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public string[] ApplicableFeature { get => this._applicableFeature; } + public System.Collections.Generic.List ApplicableFeature { get => this._applicableFeature; } /// Backing field for property. private bool? _isBackingResource; @@ -34,44 +34,44 @@ public partial class NetworkSecurityPerimeterConfigurationProperties : public bool? IsBackingResource { get => this._isBackingResource; } /// Internal Acessors for ApplicableFeature - string[] Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal.ApplicableFeature { get => this._applicableFeature; set { {_applicableFeature = value;} } } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal.ApplicableFeature { get => this._applicableFeature; set { {_applicableFeature = value;} } } /// Internal Acessors for IsBackingResource - bool? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal.IsBackingResource { get => this._isBackingResource; set { {_isBackingResource = value;} } } + bool? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal.IsBackingResource { get => this._isBackingResource; set { {_isBackingResource = value;} } } /// Internal Acessors for NetworkSecurityPerimeter - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeter Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal.NetworkSecurityPerimeter { get => (this._networkSecurityPerimeter = this._networkSecurityPerimeter ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NetworkSecurityPerimeter()); set { {_networkSecurityPerimeter = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeter Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal.NetworkSecurityPerimeter { get => (this._networkSecurityPerimeter = this._networkSecurityPerimeter ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NetworkSecurityPerimeter()); set { {_networkSecurityPerimeter = value;} } } /// Internal Acessors for ParentAssociationName - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal.ParentAssociationName { get => this._parentAssociationName; set { {_parentAssociationName = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal.ParentAssociationName { get => this._parentAssociationName; set { {_parentAssociationName = value;} } } /// Internal Acessors for Profile - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesProfile Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal.Profile { get => (this._profile = this._profile ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NetworkSecurityPerimeterConfigurationPropertiesProfile()); set { {_profile = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesProfile Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal.Profile { get => (this._profile = this._profile ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NetworkSecurityPerimeterConfigurationPropertiesProfile()); set { {_profile = value;} } } /// Internal Acessors for ResourceAssociation - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociation Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal.ResourceAssociation { get => (this._resourceAssociation = this._resourceAssociation ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation()); set { {_resourceAssociation = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociation Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal.ResourceAssociation { get => (this._resourceAssociation = this._resourceAssociation ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation()); set { {_resourceAssociation = value;} } } /// Internal Acessors for SourceResourceId - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesInternal.SourceResourceId { get => this._sourceResourceId; set { {_sourceResourceId = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesInternal.SourceResourceId { get => this._sourceResourceId; set { {_sourceResourceId = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeter _networkSecurityPerimeter; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeter _networkSecurityPerimeter; /// NetworkSecurityPerimeter related information [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeter NetworkSecurityPerimeter { get => (this._networkSecurityPerimeter = this._networkSecurityPerimeter ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NetworkSecurityPerimeter()); } + internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeter NetworkSecurityPerimeter { get => (this._networkSecurityPerimeter = this._networkSecurityPerimeter ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NetworkSecurityPerimeter()); } /// Guid of the resource [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string NetworkSecurityPerimeterGuid { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterInternal)NetworkSecurityPerimeter).PerimeterGuid; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterInternal)NetworkSecurityPerimeter).PerimeterGuid = value ?? null; } + public string NetworkSecurityPerimeterGuid { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterInternal)NetworkSecurityPerimeter).PerimeterGuid; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterInternal)NetworkSecurityPerimeter).PerimeterGuid = value ?? null; } /// Fully qualified identifier of the resource [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string NetworkSecurityPerimeterId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterInternal)NetworkSecurityPerimeter).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterInternal)NetworkSecurityPerimeter).Id = value ?? null; } + public string NetworkSecurityPerimeterId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterInternal)NetworkSecurityPerimeter).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterInternal)NetworkSecurityPerimeter).Id = value ?? null; } /// Location of the resource [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string NetworkSecurityPerimeterLocation { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterInternal)NetworkSecurityPerimeter).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterInternal)NetworkSecurityPerimeter).Location = value ?? null; } + public string NetworkSecurityPerimeterLocation { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterInternal)NetworkSecurityPerimeter).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterInternal)NetworkSecurityPerimeter).Location = value ?? null; } /// Backing field for property. private string _parentAssociationName; @@ -81,52 +81,52 @@ public partial class NetworkSecurityPerimeterConfigurationProperties : public string ParentAssociationName { get => this._parentAssociationName; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesProfile _profile; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesProfile _profile; /// Information about current network profile [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesProfile Profile { get => (this._profile = this._profile ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NetworkSecurityPerimeterConfigurationPropertiesProfile()); } + internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesProfile Profile { get => (this._profile = this._profile ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NetworkSecurityPerimeterConfigurationPropertiesProfile()); } /// List of Access Rules [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRule[] ProfileAccessRule { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesProfileInternal)Profile).AccessRule; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesProfileInternal)Profile).AccessRule = value ?? null /* arrayOf */; } + public System.Collections.Generic.List ProfileAccessRule { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesProfileInternal)Profile).AccessRule; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesProfileInternal)Profile).AccessRule = value ?? null /* arrayOf */; } /// Current access rules version [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string ProfileAccessRulesVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesProfileInternal)Profile).AccessRulesVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesProfileInternal)Profile).AccessRulesVersion = value ?? null; } + public string ProfileAccessRulesVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesProfileInternal)Profile).AccessRulesVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesProfileInternal)Profile).AccessRulesVersion = value ?? null; } /// Name of the resource [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string ProfileName { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesProfileInternal)Profile).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesProfileInternal)Profile).Name = value ?? null; } + public string ProfileName { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesProfileInternal)Profile).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesProfileInternal)Profile).Name = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssue[] _provisioningIssue; + private System.Collections.Generic.List _provisioningIssue; /// List of Provisioning Issues if any [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssue[] ProvisioningIssue { get => this._provisioningIssue; set => this._provisioningIssue = value; } + public System.Collections.Generic.List ProvisioningIssue { get => this._provisioningIssue; set => this._provisioningIssue = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkSecurityPerimeterConfigurationProvisioningState? _provisioningState; + private string _provisioningState; /// Provisioning state of NetworkSecurityPerimeter configuration propagation [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkSecurityPerimeterConfigurationProvisioningState? ProvisioningState { get => this._provisioningState; set => this._provisioningState = value; } + public string ProvisioningState { get => this._provisioningState; set => this._provisioningState = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociation _resourceAssociation; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociation _resourceAssociation; /// Information about resource association [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociation ResourceAssociation { get => (this._resourceAssociation = this._resourceAssociation ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation()); } + internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociation ResourceAssociation { get => (this._resourceAssociation = this._resourceAssociation ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation()); } /// Access Mode of the resource association [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ResourceAssociationAccessMode? ResourceAssociationAccessMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociationInternal)ResourceAssociation).AccessMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociationInternal)ResourceAssociation).AccessMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ResourceAssociationAccessMode)""); } + public string ResourceAssociationAccessMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociationInternal)ResourceAssociation).AccessMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociationInternal)ResourceAssociation).AccessMode = value ?? null; } /// Name of the resource association [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string ResourceAssociationName { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociationInternal)ResourceAssociation).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociationInternal)ResourceAssociation).Name = value ?? null; } + public string ResourceAssociationName { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociationInternal)ResourceAssociation).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociationInternal)ResourceAssociation).Name = value ?? null; } /// Backing field for property. private string _sourceResourceId; @@ -154,16 +154,22 @@ public partial interface INetworkSecurityPerimeterConfigurationProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Indicates that the NSP controls related to backing association are only applicable to a specific feature in backing resource's data plane.", SerializedName = @"applicableFeatures", PossibleTypes = new [] { typeof(string) })] - string[] ApplicableFeature { get; } + System.Collections.Generic.List ApplicableFeature { get; } /// /// True if the EventHub namespace is backed by another Azure resource and not visible to end users. /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"True if the EventHub namespace is backed by another Azure resource and not visible to end users.", SerializedName = @"isBackingResource", PossibleTypes = new [] { typeof(bool) })] @@ -171,31 +177,43 @@ public partial interface INetworkSecurityPerimeterConfigurationProperties : /// Guid of the resource [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Guid of the resource", SerializedName = @"perimeterGuid", PossibleTypes = new [] { typeof(string) })] - string NetworkSecurityPerimeterGuid { get; set; } + string NetworkSecurityPerimeterGuid { get; } /// Fully qualified identifier of the resource [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Fully qualified identifier of the resource", SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] - string NetworkSecurityPerimeterId { get; set; } + string NetworkSecurityPerimeterId { get; } /// Location of the resource [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Location of the resource", SerializedName = @"location", PossibleTypes = new [] { typeof(string) })] - string NetworkSecurityPerimeterLocation { get; set; } + string NetworkSecurityPerimeterLocation { get; } /// Source Resource Association name [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Source Resource Association name", SerializedName = @"parentAssociationName", PossibleTypes = new [] { typeof(string) })] @@ -203,63 +221,89 @@ public partial interface INetworkSecurityPerimeterConfigurationProperties : /// List of Access Rules [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"List of Access Rules", SerializedName = @"accessRules", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRule) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRule[] ProfileAccessRule { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRule) })] + System.Collections.Generic.List ProfileAccessRule { get; } /// Current access rules version [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Current access rules version", SerializedName = @"accessRulesVersion", PossibleTypes = new [] { typeof(string) })] - string ProfileAccessRulesVersion { get; set; } + string ProfileAccessRulesVersion { get; } /// Name of the resource [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Name of the resource", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] - string ProfileName { get; set; } + string ProfileName { get; } /// List of Provisioning Issues if any [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"List of Provisioning Issues if any", SerializedName = @"provisioningIssues", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssue) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssue[] ProvisioningIssue { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssue) })] + System.Collections.Generic.List ProvisioningIssue { get; set; } /// Provisioning state of NetworkSecurityPerimeter configuration propagation [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Provisioning state of NetworkSecurityPerimeter configuration propagation", SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkSecurityPerimeterConfigurationProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkSecurityPerimeterConfigurationProvisioningState? ProvisioningState { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Unknown", "Creating", "Updating", "Accepted", "InvalidResponse", "Succeeded", "SucceededWithIssues", "Failed", "Deleting", "Deleted", "Canceled")] + string ProvisioningState { get; set; } /// Access Mode of the resource association [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Access Mode of the resource association", SerializedName = @"accessMode", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ResourceAssociationAccessMode) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ResourceAssociationAccessMode? ResourceAssociationAccessMode { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("NoAssociationMode", "EnforcedMode", "LearningMode", "AuditMode", "UnspecifiedMode")] + string ResourceAssociationAccessMode { get; } /// Name of the resource association [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Name of the resource association", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] - string ResourceAssociationName { get; set; } + string ResourceAssociationName { get; } /// ARM Id of source resource [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"ARM Id of source resource", SerializedName = @"sourceResourceId", PossibleTypes = new [] { typeof(string) })] @@ -274,13 +318,13 @@ internal partial interface INetworkSecurityPerimeterConfigurationPropertiesInter /// Indicates that the NSP controls related to backing association are only applicable to a specific feature in backing resource's /// data plane. /// - string[] ApplicableFeature { get; set; } + System.Collections.Generic.List ApplicableFeature { get; set; } /// /// True if the EventHub namespace is backed by another Azure resource and not visible to end users. /// bool? IsBackingResource { get; set; } /// NetworkSecurityPerimeter related information - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeter NetworkSecurityPerimeter { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeter NetworkSecurityPerimeter { get; set; } /// Guid of the resource string NetworkSecurityPerimeterGuid { get; set; } /// Fully qualified identifier of the resource @@ -290,21 +334,23 @@ internal partial interface INetworkSecurityPerimeterConfigurationPropertiesInter /// Source Resource Association name string ParentAssociationName { get; set; } /// Information about current network profile - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesProfile Profile { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesProfile Profile { get; set; } /// List of Access Rules - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRule[] ProfileAccessRule { get; set; } + System.Collections.Generic.List ProfileAccessRule { get; set; } /// Current access rules version string ProfileAccessRulesVersion { get; set; } /// Name of the resource string ProfileName { get; set; } /// List of Provisioning Issues if any - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssue[] ProvisioningIssue { get; set; } + System.Collections.Generic.List ProvisioningIssue { get; set; } /// Provisioning state of NetworkSecurityPerimeter configuration propagation - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkSecurityPerimeterConfigurationProvisioningState? ProvisioningState { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Unknown", "Creating", "Updating", "Accepted", "InvalidResponse", "Succeeded", "SucceededWithIssues", "Failed", "Deleting", "Deleted", "Canceled")] + string ProvisioningState { get; set; } /// Information about resource association - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociation ResourceAssociation { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociation ResourceAssociation { get; set; } /// Access Mode of the resource association - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ResourceAssociationAccessMode? ResourceAssociationAccessMode { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("NoAssociationMode", "EnforcedMode", "LearningMode", "AuditMode", "UnspecifiedMode")] + string ResourceAssociationAccessMode { get; set; } /// Name of the resource association string ResourceAssociationName { get; set; } /// ARM Id of source resource diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfigurationProperties.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfigurationProperties.json.cs similarity index 84% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfigurationProperties.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfigurationProperties.json.cs index cd3fea4469f2..11513a949782 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfigurationProperties.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfigurationProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class NetworkSecurityPerimeterConfigurationProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new NetworkSecurityPerimeterConfigurationProperties(json) : null; } @@ -78,15 +78,15 @@ internal NetworkSecurityPerimeterConfigurationProperties(Microsoft.Azure.PowerSh { return; } - {_networkSecurityPerimeter = If( json?.PropertyT("networkSecurityPerimeter"), out var __jsonNetworkSecurityPerimeter) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NetworkSecurityPerimeter.FromJson(__jsonNetworkSecurityPerimeter) : NetworkSecurityPerimeter;} - {_resourceAssociation = If( json?.PropertyT("resourceAssociation"), out var __jsonResourceAssociation) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation.FromJson(__jsonResourceAssociation) : ResourceAssociation;} - {_profile = If( json?.PropertyT("profile"), out var __jsonProfile) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NetworkSecurityPerimeterConfigurationPropertiesProfile.FromJson(__jsonProfile) : Profile;} - {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} - {_provisioningIssue = If( json?.PropertyT("provisioningIssues"), out var __jsonProvisioningIssues) ? If( __jsonProvisioningIssues as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssue) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ProvisioningIssue.FromJson(__u) )) ))() : null : ProvisioningIssue;} - {_isBackingResource = If( json?.PropertyT("isBackingResource"), out var __jsonIsBackingResource) ? (bool?)__jsonIsBackingResource : IsBackingResource;} - {_applicableFeature = If( json?.PropertyT("applicableFeatures"), out var __jsonApplicableFeatures) ? If( __jsonApplicableFeatures as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(string) (__p is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString __o ? (string)(__o.ToString()) : null)) ))() : null : ApplicableFeature;} - {_parentAssociationName = If( json?.PropertyT("parentAssociationName"), out var __jsonParentAssociationName) ? (string)__jsonParentAssociationName : (string)ParentAssociationName;} - {_sourceResourceId = If( json?.PropertyT("sourceResourceId"), out var __jsonSourceResourceId) ? (string)__jsonSourceResourceId : (string)SourceResourceId;} + {_networkSecurityPerimeter = If( json?.PropertyT("networkSecurityPerimeter"), out var __jsonNetworkSecurityPerimeter) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NetworkSecurityPerimeter.FromJson(__jsonNetworkSecurityPerimeter) : _networkSecurityPerimeter;} + {_resourceAssociation = If( json?.PropertyT("resourceAssociation"), out var __jsonResourceAssociation) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation.FromJson(__jsonResourceAssociation) : _resourceAssociation;} + {_profile = If( json?.PropertyT("profile"), out var __jsonProfile) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NetworkSecurityPerimeterConfigurationPropertiesProfile.FromJson(__jsonProfile) : _profile;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} + {_provisioningIssue = If( json?.PropertyT("provisioningIssues"), out var __jsonProvisioningIssues) ? If( __jsonProvisioningIssues as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssue) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ProvisioningIssue.FromJson(__u) )) ))() : null : _provisioningIssue;} + {_isBackingResource = If( json?.PropertyT("isBackingResource"), out var __jsonIsBackingResource) ? (bool?)__jsonIsBackingResource : _isBackingResource;} + {_applicableFeature = If( json?.PropertyT("applicableFeatures"), out var __jsonApplicableFeatures) ? If( __jsonApplicableFeatures as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __q) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__q, (__p)=>(string) (__p is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString __o ? (string)(__o.ToString()) : null)) ))() : null : _applicableFeature;} + {_parentAssociationName = If( json?.PropertyT("parentAssociationName"), out var __jsonParentAssociationName) ? (string)__jsonParentAssociationName : (string)_parentAssociationName;} + {_sourceResourceId = If( json?.PropertyT("sourceResourceId"), out var __jsonSourceResourceId) ? (string)__jsonSourceResourceId : (string)_sourceResourceId;} AfterFromJson(json); } @@ -111,15 +111,15 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode ToJson( { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._networkSecurityPerimeter ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) this._networkSecurityPerimeter.ToJson(null,serializationMode) : null, "networkSecurityPerimeter" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._resourceAssociation ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) this._resourceAssociation.ToJson(null,serializationMode) : null, "resourceAssociation" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._profile ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) this._profile.ToJson(null,serializationMode) : null, "profile" ,container.Add ); } @@ -133,11 +133,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode ToJson( } container.Add("provisioningIssues",__w); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._isBackingResource ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonBoolean((bool)this._isBackingResource) : null, "isBackingResource" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { if (null != this._applicableFeature) { @@ -149,11 +149,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode ToJson( container.Add("applicableFeatures",__r); } } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._parentAssociationName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._parentAssociationName.ToString()) : null, "parentAssociationName" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._sourceResourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._sourceResourceId.ToString()) : null, "sourceResourceId" ,container.Add ); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfigurationPropertiesProfile.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfigurationPropertiesProfile.PowerShell.cs similarity index 70% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfigurationPropertiesProfile.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfigurationPropertiesProfile.PowerShell.cs index f430b4e4fc92..42b19da0d18b 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfigurationPropertiesProfile.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfigurationPropertiesProfile.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,29 +63,29 @@ public partial class NetworkSecurityPerimeterConfigurationPropertiesProfile partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new NetworkSecurityPerimeterConfigurationPropertiesProfile(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new NetworkSecurityPerimeterConfigurationPropertiesProfile(content); } @@ -98,10 +98,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -116,21 +116,21 @@ internal NetworkSecurityPerimeterConfigurationPropertiesProfile(global::System.C // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesProfileInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesProfileInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesProfileInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesProfileInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("AccessRulesVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesProfileInternal)this).AccessRulesVersion = (string) content.GetValueForProperty("AccessRulesVersion",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesProfileInternal)this).AccessRulesVersion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesProfileInternal)this).AccessRulesVersion = (string) content.GetValueForProperty("AccessRulesVersion",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesProfileInternal)this).AccessRulesVersion, global::System.Convert.ToString); } if (content.Contains("AccessRule")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesProfileInternal)this).AccessRule = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRule[]) content.GetValueForProperty("AccessRule",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesProfileInternal)this).AccessRule, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NspAccessRuleTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesProfileInternal)this).AccessRule = (System.Collections.Generic.List) content.GetValueForProperty("AccessRule",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesProfileInternal)this).AccessRule, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NspAccessRuleTypeConverter.ConvertFrom)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -145,15 +145,15 @@ internal NetworkSecurityPerimeterConfigurationPropertiesProfile(global::System.M // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesProfileInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesProfileInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesProfileInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesProfileInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("AccessRulesVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesProfileInternal)this).AccessRulesVersion = (string) content.GetValueForProperty("AccessRulesVersion",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesProfileInternal)this).AccessRulesVersion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesProfileInternal)this).AccessRulesVersion = (string) content.GetValueForProperty("AccessRulesVersion",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesProfileInternal)this).AccessRulesVersion, global::System.Convert.ToString); } if (content.Contains("AccessRule")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesProfileInternal)this).AccessRule = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRule[]) content.GetValueForProperty("AccessRule",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesProfileInternal)this).AccessRule, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NspAccessRuleTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesProfileInternal)this).AccessRule = (System.Collections.Generic.List) content.GetValueForProperty("AccessRule",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesProfileInternal)this).AccessRule, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NspAccessRuleTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfigurationPropertiesProfile.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfigurationPropertiesProfile.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfigurationPropertiesProfile.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfigurationPropertiesProfile.TypeConverter.cs index 5ecaa9acbe3a..51e3378efe46 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfigurationPropertiesProfile.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfigurationPropertiesProfile.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -112,14 +112,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// an instance of , or null if there is no suitable /// conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesProfile ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesProfile ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesProfile).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesProfile).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfigurationPropertiesProfile.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfigurationPropertiesProfile.cs similarity index 76% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfigurationPropertiesProfile.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfigurationPropertiesProfile.cs index 4d700b1352ff..a884f35947ec 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfigurationPropertiesProfile.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfigurationPropertiesProfile.cs @@ -3,23 +3,23 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// Information about current network profile [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class NetworkSecurityPerimeterConfigurationPropertiesProfile : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesProfile, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesProfileInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesProfile, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesProfileInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRule[] _accessRule; + private System.Collections.Generic.List _accessRule; /// List of Access Rules [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRule[] AccessRule { get => this._accessRule; set => this._accessRule = value; } + public System.Collections.Generic.List AccessRule { get => this._accessRule; set => this._accessRule = value; } /// Backing field for property. private string _accessRulesVersion; @@ -51,14 +51,20 @@ public partial interface INetworkSecurityPerimeterConfigurationPropertiesProfile [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"List of Access Rules", SerializedName = @"accessRules", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRule) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRule[] AccessRule { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRule) })] + System.Collections.Generic.List AccessRule { get; set; } /// Current access rules version [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Current access rules version", SerializedName = @"accessRulesVersion", PossibleTypes = new [] { typeof(string) })] @@ -67,6 +73,9 @@ public partial interface INetworkSecurityPerimeterConfigurationPropertiesProfile [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Name of the resource", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] @@ -78,7 +87,7 @@ internal partial interface INetworkSecurityPerimeterConfigurationPropertiesProfi { /// List of Access Rules - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRule[] AccessRule { get; set; } + System.Collections.Generic.List AccessRule { get; set; } /// Current access rules version string AccessRulesVersion { get; set; } /// Name of the resource diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfigurationPropertiesProfile.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfigurationPropertiesProfile.json.cs similarity index 88% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfigurationPropertiesProfile.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfigurationPropertiesProfile.json.cs index 653828656f8c..f947799db26e 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfigurationPropertiesProfile.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfigurationPropertiesProfile.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class NetworkSecurityPerimeterConfigurationPropertiesProfile partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesProfile. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesProfile. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesProfile. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesProfile. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new NetworkSecurityPerimeterConfigurationPropertiesProfile(json) : null; } @@ -78,9 +78,9 @@ internal NetworkSecurityPerimeterConfigurationPropertiesProfile(Microsoft.Azure. { return; } - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_accessRulesVersion = If( json?.PropertyT("accessRulesVersion"), out var __jsonAccessRulesVersion) ? (string)__jsonAccessRulesVersion : (string)AccessRulesVersion;} - {_accessRule = If( json?.PropertyT("accessRules"), out var __jsonAccessRules) ? If( __jsonAccessRules as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRule) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NspAccessRule.FromJson(__u) )) ))() : null : AccessRule;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_accessRulesVersion = If( json?.PropertyT("accessRulesVersion"), out var __jsonAccessRulesVersion) ? (string)__jsonAccessRulesVersion : (string)_accessRulesVersion;} + {_accessRule = If( json?.PropertyT("accessRules"), out var __jsonAccessRules) ? If( __jsonAccessRules as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRule) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NspAccessRule.FromJson(__u) )) ))() : null : _accessRule;} AfterFromJson(json); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation.PowerShell.cs similarity index 73% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation.PowerShell.cs index 01e6a94e6885..680dc455447f 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,29 +63,29 @@ public partial class NetworkSecurityPerimeterConfigurationPropertiesResourceAsso partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociation DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociation DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation(content); } @@ -98,10 +98,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -116,17 +116,17 @@ internal NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation(glob // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociationInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociationInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("AccessMode")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociationInternal)this).AccessMode = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ResourceAssociationAccessMode?) content.GetValueForProperty("AccessMode",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociationInternal)this).AccessMode, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ResourceAssociationAccessMode.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociationInternal)this).AccessMode = (string) content.GetValueForProperty("AccessMode",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociationInternal)this).AccessMode, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -141,11 +141,11 @@ internal NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation(glob // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociationInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociationInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("AccessMode")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociationInternal)this).AccessMode = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ResourceAssociationAccessMode?) content.GetValueForProperty("AccessMode",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociationInternal)this).AccessMode, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ResourceAssociationAccessMode.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociationInternal)this).AccessMode = (string) content.GetValueForProperty("AccessMode",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociationInternal)this).AccessMode, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation.TypeConverter.cs index d4af24e5ccb0..baf9bf999aa7 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -112,14 +112,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// an instance of , or null if there /// is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociation ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociation ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociation).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociation).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation.cs similarity index 72% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation.cs index fa7d3c691214..ca10738eae82 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation.cs @@ -3,23 +3,23 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// Information about resource association [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociation, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociationInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociation, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociationInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ResourceAssociationAccessMode? _accessMode; + private string _accessMode; /// Access Mode of the resource association [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ResourceAssociationAccessMode? AccessMode { get => this._accessMode; set => this._accessMode = value; } + public string AccessMode { get => this._accessMode; set => this._accessMode = value; } /// Backing field for property. private string _name; @@ -44,14 +44,21 @@ public partial interface INetworkSecurityPerimeterConfigurationPropertiesResourc [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Access Mode of the resource association", SerializedName = @"accessMode", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ResourceAssociationAccessMode) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ResourceAssociationAccessMode? AccessMode { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("NoAssociationMode", "EnforcedMode", "LearningMode", "AuditMode", "UnspecifiedMode")] + string AccessMode { get; set; } /// Name of the resource association [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Name of the resource association", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] @@ -63,7 +70,8 @@ internal partial interface INetworkSecurityPerimeterConfigurationPropertiesResou { /// Access Mode of the resource association - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ResourceAssociationAccessMode? AccessMode { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("NoAssociationMode", "EnforcedMode", "LearningMode", "AuditMode", "UnspecifiedMode")] + string AccessMode { get; set; } /// Name of the resource association string Name { get; set; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation.json.cs similarity index 92% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation.json.cs index ae14223e8aef..5d45112e9952 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class NetworkSecurityPerimeterConfigurationPropertiesResourceAsso partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociation. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociation. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociation. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociation. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociation FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeterConfigurationPropertiesResourceAssociation FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation(json) : null; } @@ -78,8 +78,8 @@ internal NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation(Micr { return; } - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_accessMode = If( json?.PropertyT("accessMode"), out var __jsonAccessMode) ? (string)__jsonAccessMode : (string)AccessMode;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_accessMode = If( json?.PropertyT("accessMode"), out var __jsonAccessMode) ? (string)__jsonAccessMode : (string)_accessMode;} AfterFromJson(json); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NspAccessRule.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NspAccessRule.PowerShell.cs similarity index 56% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NspAccessRule.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NspAccessRule.PowerShell.cs index b6d113a61ce3..6bf9e6cb0200 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NspAccessRule.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NspAccessRule.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class NspAccessRule partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRule DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRule DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new NspAccessRule(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRule DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRule DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new NspAccessRule(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRule FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRule FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -111,45 +111,45 @@ internal NspAccessRule(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRuleInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRuleProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRuleInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NspAccessRulePropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRuleInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRuleProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRuleInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NspAccessRulePropertiesTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRuleInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRuleInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRuleInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRuleInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRuleInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRuleInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRuleInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRuleInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRuleInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRuleInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRuleInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRuleInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Direction")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRuleInternal)this).Direction = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NspAccessRuleDirection?) content.GetValueForProperty("Direction",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRuleInternal)this).Direction, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NspAccessRuleDirection.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRuleInternal)this).Direction = (string) content.GetValueForProperty("Direction",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRuleInternal)this).Direction, global::System.Convert.ToString); } if (content.Contains("AddressPrefix")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRuleInternal)this).AddressPrefix = (string[]) content.GetValueForProperty("AddressPrefix",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRuleInternal)this).AddressPrefix, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRuleInternal)this).AddressPrefix = (System.Collections.Generic.List) content.GetValueForProperty("AddressPrefix",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRuleInternal)this).AddressPrefix, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } if (content.Contains("Subscription")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRuleInternal)this).Subscription = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesSubscriptionsItem[]) content.GetValueForProperty("Subscription",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRuleInternal)this).Subscription, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NspAccessRulePropertiesSubscriptionsItemTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRuleInternal)this).Subscription = (System.Collections.Generic.List) content.GetValueForProperty("Subscription",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRuleInternal)this).Subscription, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NspAccessRulePropertiesSubscriptionsItemTypeConverter.ConvertFrom)); } if (content.Contains("NetworkSecurityPerimeter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRuleInternal)this).NetworkSecurityPerimeter = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeter[]) content.GetValueForProperty("NetworkSecurityPerimeter",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRuleInternal)this).NetworkSecurityPerimeter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NetworkSecurityPerimeterTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRuleInternal)this).NetworkSecurityPerimeter = (System.Collections.Generic.List) content.GetValueForProperty("NetworkSecurityPerimeter",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRuleInternal)this).NetworkSecurityPerimeter, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NetworkSecurityPerimeterTypeConverter.ConvertFrom)); } if (content.Contains("FullyQualifiedDomainName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRuleInternal)this).FullyQualifiedDomainName = (string[]) content.GetValueForProperty("FullyQualifiedDomainName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRuleInternal)this).FullyQualifiedDomainName, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRuleInternal)this).FullyQualifiedDomainName = (System.Collections.Generic.List) content.GetValueForProperty("FullyQualifiedDomainName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRuleInternal)this).FullyQualifiedDomainName, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -164,39 +164,39 @@ internal NspAccessRule(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRuleInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRuleProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRuleInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NspAccessRulePropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRuleInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRuleProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRuleInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NspAccessRulePropertiesTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRuleInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRuleInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRuleInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRuleInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRuleInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRuleInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRuleInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRuleInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRuleInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRuleInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRuleInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRuleInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Direction")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRuleInternal)this).Direction = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NspAccessRuleDirection?) content.GetValueForProperty("Direction",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRuleInternal)this).Direction, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NspAccessRuleDirection.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRuleInternal)this).Direction = (string) content.GetValueForProperty("Direction",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRuleInternal)this).Direction, global::System.Convert.ToString); } if (content.Contains("AddressPrefix")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRuleInternal)this).AddressPrefix = (string[]) content.GetValueForProperty("AddressPrefix",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRuleInternal)this).AddressPrefix, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRuleInternal)this).AddressPrefix = (System.Collections.Generic.List) content.GetValueForProperty("AddressPrefix",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRuleInternal)this).AddressPrefix, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } if (content.Contains("Subscription")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRuleInternal)this).Subscription = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesSubscriptionsItem[]) content.GetValueForProperty("Subscription",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRuleInternal)this).Subscription, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NspAccessRulePropertiesSubscriptionsItemTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRuleInternal)this).Subscription = (System.Collections.Generic.List) content.GetValueForProperty("Subscription",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRuleInternal)this).Subscription, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NspAccessRulePropertiesSubscriptionsItemTypeConverter.ConvertFrom)); } if (content.Contains("NetworkSecurityPerimeter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRuleInternal)this).NetworkSecurityPerimeter = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeter[]) content.GetValueForProperty("NetworkSecurityPerimeter",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRuleInternal)this).NetworkSecurityPerimeter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NetworkSecurityPerimeterTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRuleInternal)this).NetworkSecurityPerimeter = (System.Collections.Generic.List) content.GetValueForProperty("NetworkSecurityPerimeter",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRuleInternal)this).NetworkSecurityPerimeter, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NetworkSecurityPerimeterTypeConverter.ConvertFrom)); } if (content.Contains("FullyQualifiedDomainName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRuleInternal)this).FullyQualifiedDomainName = (string[]) content.GetValueForProperty("FullyQualifiedDomainName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRuleInternal)this).FullyQualifiedDomainName, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRuleInternal)this).FullyQualifiedDomainName = (System.Collections.Generic.List) content.GetValueForProperty("FullyQualifiedDomainName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRuleInternal)this).FullyQualifiedDomainName, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } AfterDeserializePSObject(content); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NspAccessRule.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NspAccessRule.TypeConverter.cs similarity index 97% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NspAccessRule.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NspAccessRule.TypeConverter.cs index 90814427d3fc..ec31c8b5374a 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NspAccessRule.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NspAccessRule.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRule ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRule ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRule).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRule).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NspAccessRule.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NspAccessRule.cs similarity index 56% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NspAccessRule.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NspAccessRule.cs index 6fa36e16dd18..f25f363350ef 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NspAccessRule.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NspAccessRule.cs @@ -3,28 +3,28 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// Information of Access Rule in Network Profile [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class NspAccessRule : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRule, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRuleInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRule, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRuleInternal { /// Address prefixes in the CIDR format for inbound rules [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string[] AddressPrefix { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesInternal)Property).AddressPrefix; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesInternal)Property).AddressPrefix = value ?? null /* arrayOf */; } + public System.Collections.Generic.List AddressPrefix { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRulePropertiesInternal)Property).AddressPrefix; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRulePropertiesInternal)Property).AddressPrefix = value ?? null /* arrayOf */; } /// Direction of Access Rule [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NspAccessRuleDirection? Direction { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesInternal)Property).Direction; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesInternal)Property).Direction = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NspAccessRuleDirection)""); } + public string Direction { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRulePropertiesInternal)Property).Direction; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRulePropertiesInternal)Property).Direction = value ?? null; } /// FQDN for outbound rules [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string[] FullyQualifiedDomainName { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesInternal)Property).FullyQualifiedDomainName; } + public System.Collections.Generic.List FullyQualifiedDomainName { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRulePropertiesInternal)Property).FullyQualifiedDomainName; } /// Backing field for property. private string _id; @@ -34,13 +34,13 @@ public partial class NspAccessRule : public string Id { get => this._id; set => this._id = value; } /// Internal Acessors for FullyQualifiedDomainName - string[] Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRuleInternal.FullyQualifiedDomainName { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesInternal)Property).FullyQualifiedDomainName; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesInternal)Property).FullyQualifiedDomainName = value; } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRuleInternal.FullyQualifiedDomainName { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRulePropertiesInternal)Property).FullyQualifiedDomainName; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRulePropertiesInternal)Property).FullyQualifiedDomainName = value; } /// Internal Acessors for NetworkSecurityPerimeter - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeter[] Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRuleInternal.NetworkSecurityPerimeter { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesInternal)Property).NetworkSecurityPerimeter; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesInternal)Property).NetworkSecurityPerimeter = value; } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRuleInternal.NetworkSecurityPerimeter { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRulePropertiesInternal)Property).NetworkSecurityPerimeter; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRulePropertiesInternal)Property).NetworkSecurityPerimeter = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRuleProperties Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRuleInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NspAccessRuleProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRuleProperties Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRuleInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NspAccessRuleProperties()); set { {_property = value;} } } /// Backing field for property. private string _name; @@ -51,18 +51,18 @@ public partial class NspAccessRule : /// NetworkSecurityPerimeters for inbound rules [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeter[] NetworkSecurityPerimeter { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesInternal)Property).NetworkSecurityPerimeter; } + public System.Collections.Generic.List NetworkSecurityPerimeter { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRulePropertiesInternal)Property).NetworkSecurityPerimeter; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRuleProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRuleProperties _property; /// Properties of Access Rule [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRuleProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NspAccessRuleProperties()); } + internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRuleProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NspAccessRuleProperties()); } /// Subscriptions for inbound rules [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesSubscriptionsItem[] Subscription { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesInternal)Property).Subscription; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesInternal)Property).Subscription = value ?? null /* arrayOf */; } + public System.Collections.Generic.List Subscription { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRulePropertiesInternal)Property).Subscription; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRulePropertiesInternal)Property).Subscription = value ?? null /* arrayOf */; } /// Backing field for property. private string _type; @@ -84,31 +84,44 @@ public partial interface INspAccessRule : /// Address prefixes in the CIDR format for inbound rules [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Address prefixes in the CIDR format for inbound rules", SerializedName = @"addressPrefixes", PossibleTypes = new [] { typeof(string) })] - string[] AddressPrefix { get; set; } + System.Collections.Generic.List AddressPrefix { get; } /// Direction of Access Rule [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Direction of Access Rule", SerializedName = @"direction", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NspAccessRuleDirection) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NspAccessRuleDirection? Direction { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Inbound", "Outbound")] + string Direction { get; } /// FQDN for outbound rules [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"FQDN for outbound rules", SerializedName = @"fullyQualifiedDomainNames", PossibleTypes = new [] { typeof(string) })] - string[] FullyQualifiedDomainName { get; } + System.Collections.Generic.List FullyQualifiedDomainName { get; } /// Fully qualified identifier of the resource [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Fully qualified identifier of the resource", SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] @@ -117,6 +130,9 @@ public partial interface INspAccessRule : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Name of the resource", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] @@ -125,22 +141,31 @@ public partial interface INspAccessRule : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"NetworkSecurityPerimeters for inbound rules", SerializedName = @"networkSecurityPerimeters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeter) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeter[] NetworkSecurityPerimeter { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeter) })] + System.Collections.Generic.List NetworkSecurityPerimeter { get; } /// Subscriptions for inbound rules [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Subscriptions for inbound rules", SerializedName = @"subscriptions", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesSubscriptionsItem) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesSubscriptionsItem[] Subscription { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRulePropertiesSubscriptionsItem) })] + System.Collections.Generic.List Subscription { get; } /// Type of the resource [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Type of the resource", SerializedName = @"type", PossibleTypes = new [] { typeof(string) })] @@ -152,21 +177,22 @@ internal partial interface INspAccessRuleInternal { /// Address prefixes in the CIDR format for inbound rules - string[] AddressPrefix { get; set; } + System.Collections.Generic.List AddressPrefix { get; set; } /// Direction of Access Rule - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NspAccessRuleDirection? Direction { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Inbound", "Outbound")] + string Direction { get; set; } /// FQDN for outbound rules - string[] FullyQualifiedDomainName { get; set; } + System.Collections.Generic.List FullyQualifiedDomainName { get; set; } /// Fully qualified identifier of the resource string Id { get; set; } /// Name of the resource string Name { get; set; } /// NetworkSecurityPerimeters for inbound rules - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeter[] NetworkSecurityPerimeter { get; set; } + System.Collections.Generic.List NetworkSecurityPerimeter { get; set; } /// Properties of Access Rule - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRuleProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRuleProperties Property { get; set; } /// Subscriptions for inbound rules - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesSubscriptionsItem[] Subscription { get; set; } + System.Collections.Generic.List Subscription { get; set; } /// Type of the resource string Type { get; set; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NspAccessRule.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NspAccessRule.json.cs similarity index 92% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NspAccessRule.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NspAccessRule.json.cs index 019c23eb7723..1823c81a91e2 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NspAccessRule.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NspAccessRule.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class NspAccessRule partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRule. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRule. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRule. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRule. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRule FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRule FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new NspAccessRule(json) : null; } @@ -77,10 +77,10 @@ internal NspAccessRule(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json. { return; } - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NspAccessRuleProperties.FromJson(__jsonProperties) : Property;} - {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NspAccessRuleProperties.FromJson(__jsonProperties) : _property;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} AfterFromJson(json); } @@ -103,7 +103,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode ToJson( { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NspAccessRuleProperties.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NspAccessRuleProperties.PowerShell.cs similarity index 60% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NspAccessRuleProperties.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NspAccessRuleProperties.PowerShell.cs index dc730a51fa18..ae847d129a59 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NspAccessRuleProperties.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NspAccessRuleProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class NspAccessRuleProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRuleProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRuleProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new NspAccessRuleProperties(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRuleProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRuleProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new NspAccessRuleProperties(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRuleProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRuleProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,29 +111,29 @@ internal NspAccessRuleProperties(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Direction")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesInternal)this).Direction = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NspAccessRuleDirection?) content.GetValueForProperty("Direction",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesInternal)this).Direction, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NspAccessRuleDirection.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRulePropertiesInternal)this).Direction = (string) content.GetValueForProperty("Direction",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRulePropertiesInternal)this).Direction, global::System.Convert.ToString); } if (content.Contains("AddressPrefix")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesInternal)this).AddressPrefix = (string[]) content.GetValueForProperty("AddressPrefix",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesInternal)this).AddressPrefix, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRulePropertiesInternal)this).AddressPrefix = (System.Collections.Generic.List) content.GetValueForProperty("AddressPrefix",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRulePropertiesInternal)this).AddressPrefix, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } if (content.Contains("Subscription")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesInternal)this).Subscription = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesSubscriptionsItem[]) content.GetValueForProperty("Subscription",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesInternal)this).Subscription, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NspAccessRulePropertiesSubscriptionsItemTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRulePropertiesInternal)this).Subscription = (System.Collections.Generic.List) content.GetValueForProperty("Subscription",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRulePropertiesInternal)this).Subscription, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NspAccessRulePropertiesSubscriptionsItemTypeConverter.ConvertFrom)); } if (content.Contains("NetworkSecurityPerimeter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesInternal)this).NetworkSecurityPerimeter = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeter[]) content.GetValueForProperty("NetworkSecurityPerimeter",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesInternal)this).NetworkSecurityPerimeter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NetworkSecurityPerimeterTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRulePropertiesInternal)this).NetworkSecurityPerimeter = (System.Collections.Generic.List) content.GetValueForProperty("NetworkSecurityPerimeter",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRulePropertiesInternal)this).NetworkSecurityPerimeter, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NetworkSecurityPerimeterTypeConverter.ConvertFrom)); } if (content.Contains("FullyQualifiedDomainName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesInternal)this).FullyQualifiedDomainName = (string[]) content.GetValueForProperty("FullyQualifiedDomainName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesInternal)this).FullyQualifiedDomainName, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRulePropertiesInternal)this).FullyQualifiedDomainName = (System.Collections.Generic.List) content.GetValueForProperty("FullyQualifiedDomainName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRulePropertiesInternal)this).FullyQualifiedDomainName, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -150,23 +148,23 @@ internal NspAccessRuleProperties(global::System.Management.Automation.PSObject c // actually deserialize if (content.Contains("Direction")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesInternal)this).Direction = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NspAccessRuleDirection?) content.GetValueForProperty("Direction",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesInternal)this).Direction, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NspAccessRuleDirection.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRulePropertiesInternal)this).Direction = (string) content.GetValueForProperty("Direction",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRulePropertiesInternal)this).Direction, global::System.Convert.ToString); } if (content.Contains("AddressPrefix")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesInternal)this).AddressPrefix = (string[]) content.GetValueForProperty("AddressPrefix",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesInternal)this).AddressPrefix, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRulePropertiesInternal)this).AddressPrefix = (System.Collections.Generic.List) content.GetValueForProperty("AddressPrefix",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRulePropertiesInternal)this).AddressPrefix, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } if (content.Contains("Subscription")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesInternal)this).Subscription = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesSubscriptionsItem[]) content.GetValueForProperty("Subscription",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesInternal)this).Subscription, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NspAccessRulePropertiesSubscriptionsItemTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRulePropertiesInternal)this).Subscription = (System.Collections.Generic.List) content.GetValueForProperty("Subscription",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRulePropertiesInternal)this).Subscription, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NspAccessRulePropertiesSubscriptionsItemTypeConverter.ConvertFrom)); } if (content.Contains("NetworkSecurityPerimeter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesInternal)this).NetworkSecurityPerimeter = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeter[]) content.GetValueForProperty("NetworkSecurityPerimeter",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesInternal)this).NetworkSecurityPerimeter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NetworkSecurityPerimeterTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRulePropertiesInternal)this).NetworkSecurityPerimeter = (System.Collections.Generic.List) content.GetValueForProperty("NetworkSecurityPerimeter",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRulePropertiesInternal)this).NetworkSecurityPerimeter, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NetworkSecurityPerimeterTypeConverter.ConvertFrom)); } if (content.Contains("FullyQualifiedDomainName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesInternal)this).FullyQualifiedDomainName = (string[]) content.GetValueForProperty("FullyQualifiedDomainName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesInternal)this).FullyQualifiedDomainName, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRulePropertiesInternal)this).FullyQualifiedDomainName = (System.Collections.Generic.List) content.GetValueForProperty("FullyQualifiedDomainName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRulePropertiesInternal)this).FullyQualifiedDomainName, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } AfterDeserializePSObject(content); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NspAccessRuleProperties.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NspAccessRuleProperties.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NspAccessRuleProperties.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NspAccessRuleProperties.TypeConverter.cs index f2a958dbc54a..798a158ce291 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NspAccessRuleProperties.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NspAccessRuleProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRuleProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRuleProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRuleProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRuleProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NspAccessRuleProperties.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NspAccessRuleProperties.cs similarity index 54% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NspAccessRuleProperties.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NspAccessRuleProperties.cs index 3a45b2f40f02..340ac97c3153 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NspAccessRuleProperties.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NspAccessRuleProperties.cs @@ -3,57 +3,57 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// Properties of Access Rule [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class NspAccessRuleProperties : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRuleProperties, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRuleProperties, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRulePropertiesInternal { /// Backing field for property. - private string[] _addressPrefix; + private System.Collections.Generic.List _addressPrefix; /// Address prefixes in the CIDR format for inbound rules [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public string[] AddressPrefix { get => this._addressPrefix; set => this._addressPrefix = value; } + public System.Collections.Generic.List AddressPrefix { get => this._addressPrefix; set => this._addressPrefix = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NspAccessRuleDirection? _direction; + private string _direction; /// Direction of Access Rule [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NspAccessRuleDirection? Direction { get => this._direction; set => this._direction = value; } + public string Direction { get => this._direction; set => this._direction = value; } /// Backing field for property. - private string[] _fullyQualifiedDomainName; + private System.Collections.Generic.List _fullyQualifiedDomainName; /// FQDN for outbound rules [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public string[] FullyQualifiedDomainName { get => this._fullyQualifiedDomainName; } + public System.Collections.Generic.List FullyQualifiedDomainName { get => this._fullyQualifiedDomainName; } /// Internal Acessors for FullyQualifiedDomainName - string[] Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesInternal.FullyQualifiedDomainName { get => this._fullyQualifiedDomainName; set { {_fullyQualifiedDomainName = value;} } } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRulePropertiesInternal.FullyQualifiedDomainName { get => this._fullyQualifiedDomainName; set { {_fullyQualifiedDomainName = value;} } } /// Internal Acessors for NetworkSecurityPerimeter - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeter[] Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesInternal.NetworkSecurityPerimeter { get => this._networkSecurityPerimeter; set { {_networkSecurityPerimeter = value;} } } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRulePropertiesInternal.NetworkSecurityPerimeter { get => this._networkSecurityPerimeter; set { {_networkSecurityPerimeter = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeter[] _networkSecurityPerimeter; + private System.Collections.Generic.List _networkSecurityPerimeter; /// NetworkSecurityPerimeters for inbound rules [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeter[] NetworkSecurityPerimeter { get => this._networkSecurityPerimeter; } + public System.Collections.Generic.List NetworkSecurityPerimeter { get => this._networkSecurityPerimeter; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesSubscriptionsItem[] _subscription; + private System.Collections.Generic.List _subscription; /// Subscriptions for inbound rules [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesSubscriptionsItem[] Subscription { get => this._subscription; set => this._subscription = value; } + public System.Collections.Generic.List Subscription { get => this._subscription; set => this._subscription = value; } /// Creates an new instance. public NspAccessRuleProperties() @@ -69,42 +69,58 @@ public partial interface INspAccessRuleProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Address prefixes in the CIDR format for inbound rules", SerializedName = @"addressPrefixes", PossibleTypes = new [] { typeof(string) })] - string[] AddressPrefix { get; set; } + System.Collections.Generic.List AddressPrefix { get; set; } /// Direction of Access Rule [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Direction of Access Rule", SerializedName = @"direction", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NspAccessRuleDirection) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NspAccessRuleDirection? Direction { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Inbound", "Outbound")] + string Direction { get; set; } /// FQDN for outbound rules [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"FQDN for outbound rules", SerializedName = @"fullyQualifiedDomainNames", PossibleTypes = new [] { typeof(string) })] - string[] FullyQualifiedDomainName { get; } + System.Collections.Generic.List FullyQualifiedDomainName { get; } /// NetworkSecurityPerimeters for inbound rules [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"NetworkSecurityPerimeters for inbound rules", SerializedName = @"networkSecurityPerimeters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeter) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeter[] NetworkSecurityPerimeter { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeter) })] + System.Collections.Generic.List NetworkSecurityPerimeter { get; } /// Subscriptions for inbound rules [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Subscriptions for inbound rules", SerializedName = @"subscriptions", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesSubscriptionsItem) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesSubscriptionsItem[] Subscription { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRulePropertiesSubscriptionsItem) })] + System.Collections.Generic.List Subscription { get; set; } } /// Properties of Access Rule @@ -112,15 +128,16 @@ internal partial interface INspAccessRulePropertiesInternal { /// Address prefixes in the CIDR format for inbound rules - string[] AddressPrefix { get; set; } + System.Collections.Generic.List AddressPrefix { get; set; } /// Direction of Access Rule - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NspAccessRuleDirection? Direction { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Inbound", "Outbound")] + string Direction { get; set; } /// FQDN for outbound rules - string[] FullyQualifiedDomainName { get; set; } + System.Collections.Generic.List FullyQualifiedDomainName { get; set; } /// NetworkSecurityPerimeters for inbound rules - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeter[] NetworkSecurityPerimeter { get; set; } + System.Collections.Generic.List NetworkSecurityPerimeter { get; set; } /// Subscriptions for inbound rules - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesSubscriptionsItem[] Subscription { get; set; } + System.Collections.Generic.List Subscription { get; set; } } } \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NspAccessRuleProperties.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NspAccessRuleProperties.json.cs similarity index 82% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NspAccessRuleProperties.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NspAccessRuleProperties.json.cs index 2fa5277c8a38..814c448d71f9 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NspAccessRuleProperties.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NspAccessRuleProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class NspAccessRuleProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRuleProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRuleProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRuleProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRuleProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRuleProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRuleProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new NspAccessRuleProperties(json) : null; } @@ -77,11 +77,11 @@ internal NspAccessRuleProperties(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Run { return; } - {_direction = If( json?.PropertyT("direction"), out var __jsonDirection) ? (string)__jsonDirection : (string)Direction;} - {_addressPrefix = If( json?.PropertyT("addressPrefixes"), out var __jsonAddressPrefixes) ? If( __jsonAddressPrefixes as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : AddressPrefix;} - {_subscription = If( json?.PropertyT("subscriptions"), out var __jsonSubscriptions) ? If( __jsonSubscriptions as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesSubscriptionsItem) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NspAccessRulePropertiesSubscriptionsItem.FromJson(__p) )) ))() : null : Subscription;} - {_networkSecurityPerimeter = If( json?.PropertyT("networkSecurityPerimeters"), out var __jsonNetworkSecurityPerimeters) ? If( __jsonNetworkSecurityPerimeters as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __l) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__l, (__k)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkSecurityPerimeter) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NetworkSecurityPerimeter.FromJson(__k) )) ))() : null : NetworkSecurityPerimeter;} - {_fullyQualifiedDomainName = If( json?.PropertyT("fullyQualifiedDomainNames"), out var __jsonFullyQualifiedDomainNames) ? If( __jsonFullyQualifiedDomainNames as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __g) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__g, (__f)=>(string) (__f is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString __e ? (string)(__e.ToString()) : null)) ))() : null : FullyQualifiedDomainName;} + {_direction = If( json?.PropertyT("direction"), out var __jsonDirection) ? (string)__jsonDirection : (string)_direction;} + {_addressPrefix = If( json?.PropertyT("addressPrefixes"), out var __jsonAddressPrefixes) ? If( __jsonAddressPrefixes as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : _addressPrefix;} + {_subscription = If( json?.PropertyT("subscriptions"), out var __jsonSubscriptions) ? If( __jsonSubscriptions as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __q) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRulePropertiesSubscriptionsItem) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NspAccessRulePropertiesSubscriptionsItem.FromJson(__p) )) ))() : null : _subscription;} + {_networkSecurityPerimeter = If( json?.PropertyT("networkSecurityPerimeters"), out var __jsonNetworkSecurityPerimeters) ? If( __jsonNetworkSecurityPerimeters as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __l) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__l, (__k)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkSecurityPerimeter) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NetworkSecurityPerimeter.FromJson(__k) )) ))() : null : _networkSecurityPerimeter;} + {_fullyQualifiedDomainName = If( json?.PropertyT("fullyQualifiedDomainNames"), out var __jsonFullyQualifiedDomainNames) ? If( __jsonFullyQualifiedDomainNames as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __g) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__g, (__f)=>(string) (__f is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString __e ? (string)(__e.ToString()) : null)) ))() : null : _fullyQualifiedDomainName;} AfterFromJson(json); } @@ -123,7 +123,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode ToJson( } container.Add("subscriptions",__r); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { if (null != this._networkSecurityPerimeter) { @@ -135,7 +135,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode ToJson( container.Add("networkSecurityPerimeters",__m); } } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { if (null != this._fullyQualifiedDomainName) { diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NspAccessRulePropertiesSubscriptionsItem.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NspAccessRulePropertiesSubscriptionsItem.PowerShell.cs similarity index 82% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NspAccessRulePropertiesSubscriptionsItem.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NspAccessRulePropertiesSubscriptionsItem.PowerShell.cs index 9d7e1cb9063a..1d3cb696695f 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NspAccessRulePropertiesSubscriptionsItem.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NspAccessRulePropertiesSubscriptionsItem.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,29 +63,29 @@ public partial class NspAccessRulePropertiesSubscriptionsItem partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesSubscriptionsItem DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRulePropertiesSubscriptionsItem DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new NspAccessRulePropertiesSubscriptionsItem(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesSubscriptionsItem DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRulePropertiesSubscriptionsItem DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new NspAccessRulePropertiesSubscriptionsItem(content); } @@ -98,10 +98,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesSubscriptionsItem FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRulePropertiesSubscriptionsItem FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -116,13 +116,13 @@ internal NspAccessRulePropertiesSubscriptionsItem(global::System.Collections.IDi // actually deserialize if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesSubscriptionsItemInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesSubscriptionsItemInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRulePropertiesSubscriptionsItemInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRulePropertiesSubscriptionsItemInternal)this).Id, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -137,7 +137,7 @@ internal NspAccessRulePropertiesSubscriptionsItem(global::System.Management.Auto // actually deserialize if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesSubscriptionsItemInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesSubscriptionsItemInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRulePropertiesSubscriptionsItemInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRulePropertiesSubscriptionsItemInternal)this).Id, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NspAccessRulePropertiesSubscriptionsItem.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NspAccessRulePropertiesSubscriptionsItem.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NspAccessRulePropertiesSubscriptionsItem.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NspAccessRulePropertiesSubscriptionsItem.TypeConverter.cs index 0f6a86106e35..86be4e77290c 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NspAccessRulePropertiesSubscriptionsItem.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NspAccessRulePropertiesSubscriptionsItem.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -110,14 +110,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesSubscriptionsItem ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRulePropertiesSubscriptionsItem ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesSubscriptionsItem).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRulePropertiesSubscriptionsItem).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NspAccessRulePropertiesSubscriptionsItem.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NspAccessRulePropertiesSubscriptionsItem.cs similarity index 85% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NspAccessRulePropertiesSubscriptionsItem.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NspAccessRulePropertiesSubscriptionsItem.cs index b51b05b06c69..7407cbacda14 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NspAccessRulePropertiesSubscriptionsItem.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NspAccessRulePropertiesSubscriptionsItem.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// Subscription for inbound rule [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class NspAccessRulePropertiesSubscriptionsItem : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesSubscriptionsItem, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesSubscriptionsItemInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRulePropertiesSubscriptionsItem, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRulePropertiesSubscriptionsItemInternal { /// Backing field for property. @@ -37,6 +37,9 @@ public partial interface INspAccessRulePropertiesSubscriptionsItem : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Fully qualified identifier of subscription", SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NspAccessRulePropertiesSubscriptionsItem.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NspAccessRulePropertiesSubscriptionsItem.json.cs similarity index 93% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NspAccessRulePropertiesSubscriptionsItem.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NspAccessRulePropertiesSubscriptionsItem.json.cs index e220f862625c..665816f3a693 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NspAccessRulePropertiesSubscriptionsItem.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NspAccessRulePropertiesSubscriptionsItem.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class NspAccessRulePropertiesSubscriptionsItem partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesSubscriptionsItem. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRulePropertiesSubscriptionsItem. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesSubscriptionsItem. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRulePropertiesSubscriptionsItem. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INspAccessRulePropertiesSubscriptionsItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INspAccessRulePropertiesSubscriptionsItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new NspAccessRulePropertiesSubscriptionsItem(json) : null; } @@ -77,7 +77,7 @@ internal NspAccessRulePropertiesSubscriptionsItem(Microsoft.Azure.PowerShell.Cmd { return; } - {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;} AfterFromJson(json); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NwRuleSetIPRules.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NwRuleSetIPRules.PowerShell.cs similarity index 78% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NwRuleSetIPRules.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NwRuleSetIPRules.PowerShell.cs index ee5b36b1d9c7..2406e9d5d508 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NwRuleSetIPRules.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NwRuleSetIPRules.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class NwRuleSetIPRules partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetIPRules DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetIPRules DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new NwRuleSetIPRules(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetIPRules DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetIPRules DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new NwRuleSetIPRules(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetIPRules FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetIPRules FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -111,17 +111,17 @@ internal NwRuleSetIPRules(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("IPMask")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetIPRulesInternal)this).IPMask = (string) content.GetValueForProperty("IPMask",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetIPRulesInternal)this).IPMask, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetIPRulesInternal)this).IPMask = (string) content.GetValueForProperty("IPMask",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetIPRulesInternal)this).IPMask, global::System.Convert.ToString); } if (content.Contains("Action")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetIPRulesInternal)this).Action = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkRuleIPAction?) content.GetValueForProperty("Action",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetIPRulesInternal)this).Action, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkRuleIPAction.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetIPRulesInternal)this).Action = (string) content.GetValueForProperty("Action",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetIPRulesInternal)this).Action, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -136,11 +136,11 @@ internal NwRuleSetIPRules(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("IPMask")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetIPRulesInternal)this).IPMask = (string) content.GetValueForProperty("IPMask",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetIPRulesInternal)this).IPMask, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetIPRulesInternal)this).IPMask = (string) content.GetValueForProperty("IPMask",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetIPRulesInternal)this).IPMask, global::System.Convert.ToString); } if (content.Contains("Action")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetIPRulesInternal)this).Action = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkRuleIPAction?) content.GetValueForProperty("Action",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetIPRulesInternal)this).Action, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkRuleIPAction.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetIPRulesInternal)this).Action = (string) content.GetValueForProperty("Action",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetIPRulesInternal)this).Action, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NwRuleSetIPRules.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NwRuleSetIPRules.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NwRuleSetIPRules.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NwRuleSetIPRules.TypeConverter.cs index 4b8cac3bf5b7..44aec48dae23 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NwRuleSetIPRules.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NwRuleSetIPRules.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetIPRules ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetIPRules ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetIPRules).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetIPRules).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NwRuleSetIPRules.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NwRuleSetIPRules.cs similarity index 73% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NwRuleSetIPRules.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NwRuleSetIPRules.cs index e749bdbdee72..c809c65142ca 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NwRuleSetIPRules.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NwRuleSetIPRules.cs @@ -3,23 +3,23 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// The response from the List namespace operation. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class NwRuleSetIPRules : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetIPRules, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetIPRulesInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetIPRules, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetIPRulesInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkRuleIPAction? _action; + private string _action; /// The IP Filter Action [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkRuleIPAction? Action { get => this._action; set => this._action = value; } + public string Action { get => this._action; set => this._action = value; } /// Backing field for property. private string _iPMask; @@ -42,14 +42,21 @@ public partial interface INwRuleSetIPRules : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The IP Filter Action", SerializedName = @"action", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkRuleIPAction) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkRuleIPAction? Action { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Allow")] + string Action { get; set; } /// IP Mask [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"IP Mask", SerializedName = @"ipMask", PossibleTypes = new [] { typeof(string) })] @@ -61,7 +68,8 @@ internal partial interface INwRuleSetIPRulesInternal { /// The IP Filter Action - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkRuleIPAction? Action { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Allow")] + string Action { get; set; } /// IP Mask string IPMask { get; set; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NwRuleSetIPRules.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NwRuleSetIPRules.json.cs similarity index 93% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NwRuleSetIPRules.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NwRuleSetIPRules.json.cs index 170b70e51a1a..5a4ca73d7e41 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NwRuleSetIPRules.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NwRuleSetIPRules.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class NwRuleSetIPRules partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetIPRules. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetIPRules. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetIPRules. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetIPRules. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetIPRules FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetIPRules FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new NwRuleSetIPRules(json) : null; } @@ -77,8 +77,8 @@ internal NwRuleSetIPRules(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Js { return; } - {_iPMask = If( json?.PropertyT("ipMask"), out var __jsonIPMask) ? (string)__jsonIPMask : (string)IPMask;} - {_action = If( json?.PropertyT("action"), out var __jsonAction) ? (string)__jsonAction : (string)Action;} + {_iPMask = If( json?.PropertyT("ipMask"), out var __jsonIPMask) ? (string)__jsonIPMask : (string)_iPMask;} + {_action = If( json?.PropertyT("action"), out var __jsonAction) ? (string)__jsonAction : (string)_action;} AfterFromJson(json); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NwRuleSetVirtualNetworkRules.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NwRuleSetVirtualNetworkRules.PowerShell.cs similarity index 72% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NwRuleSetVirtualNetworkRules.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NwRuleSetVirtualNetworkRules.PowerShell.cs index 9c4f8ddf6634..cb3150c9f7b6 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NwRuleSetVirtualNetworkRules.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NwRuleSetVirtualNetworkRules.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class NwRuleSetVirtualNetworkRules partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetVirtualNetworkRules DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetVirtualNetworkRules DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new NwRuleSetVirtualNetworkRules(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetVirtualNetworkRules DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetVirtualNetworkRules DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new NwRuleSetVirtualNetworkRules(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetVirtualNetworkRules FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetVirtualNetworkRules FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,21 +111,21 @@ internal NwRuleSetVirtualNetworkRules(global::System.Collections.IDictionary con // actually deserialize if (content.Contains("Subnet")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetVirtualNetworkRulesInternal)this).Subnet = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISubnet) content.GetValueForProperty("Subnet",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetVirtualNetworkRulesInternal)this).Subnet, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.SubnetTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetVirtualNetworkRulesInternal)this).Subnet = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISubnet) content.GetValueForProperty("Subnet",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetVirtualNetworkRulesInternal)this).Subnet, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SubnetTypeConverter.ConvertFrom); } if (content.Contains("IgnoreMissingVnetServiceEndpoint")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetVirtualNetworkRulesInternal)this).IgnoreMissingVnetServiceEndpoint = (bool?) content.GetValueForProperty("IgnoreMissingVnetServiceEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetVirtualNetworkRulesInternal)this).IgnoreMissingVnetServiceEndpoint, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetVirtualNetworkRulesInternal)this).IgnoreMissingVnetServiceEndpoint = (bool?) content.GetValueForProperty("IgnoreMissingVnetServiceEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetVirtualNetworkRulesInternal)this).IgnoreMissingVnetServiceEndpoint, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("SubnetId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetVirtualNetworkRulesInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetVirtualNetworkRulesInternal)this).SubnetId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetVirtualNetworkRulesInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetVirtualNetworkRulesInternal)this).SubnetId, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -142,15 +140,15 @@ internal NwRuleSetVirtualNetworkRules(global::System.Management.Automation.PSObj // actually deserialize if (content.Contains("Subnet")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetVirtualNetworkRulesInternal)this).Subnet = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISubnet) content.GetValueForProperty("Subnet",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetVirtualNetworkRulesInternal)this).Subnet, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.SubnetTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetVirtualNetworkRulesInternal)this).Subnet = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISubnet) content.GetValueForProperty("Subnet",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetVirtualNetworkRulesInternal)this).Subnet, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SubnetTypeConverter.ConvertFrom); } if (content.Contains("IgnoreMissingVnetServiceEndpoint")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetVirtualNetworkRulesInternal)this).IgnoreMissingVnetServiceEndpoint = (bool?) content.GetValueForProperty("IgnoreMissingVnetServiceEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetVirtualNetworkRulesInternal)this).IgnoreMissingVnetServiceEndpoint, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetVirtualNetworkRulesInternal)this).IgnoreMissingVnetServiceEndpoint = (bool?) content.GetValueForProperty("IgnoreMissingVnetServiceEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetVirtualNetworkRulesInternal)this).IgnoreMissingVnetServiceEndpoint, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("SubnetId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetVirtualNetworkRulesInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetVirtualNetworkRulesInternal)this).SubnetId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetVirtualNetworkRulesInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetVirtualNetworkRulesInternal)this).SubnetId, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NwRuleSetVirtualNetworkRules.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NwRuleSetVirtualNetworkRules.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NwRuleSetVirtualNetworkRules.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NwRuleSetVirtualNetworkRules.TypeConverter.cs index 03bf5d3a60d3..953bec7e0c0e 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NwRuleSetVirtualNetworkRules.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NwRuleSetVirtualNetworkRules.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetVirtualNetworkRules ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetVirtualNetworkRules ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetVirtualNetworkRules).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetVirtualNetworkRules).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NwRuleSetVirtualNetworkRules.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NwRuleSetVirtualNetworkRules.cs similarity index 75% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NwRuleSetVirtualNetworkRules.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NwRuleSetVirtualNetworkRules.cs index 87eaa14c86f3..05c9d9bccfc8 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NwRuleSetVirtualNetworkRules.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NwRuleSetVirtualNetworkRules.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// The response from the List namespace operation. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class NwRuleSetVirtualNetworkRules : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetVirtualNetworkRules, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetVirtualNetworkRulesInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetVirtualNetworkRules, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetVirtualNetworkRulesInternal { /// Backing field for property. @@ -22,18 +22,18 @@ public partial class NwRuleSetVirtualNetworkRules : public bool? IgnoreMissingVnetServiceEndpoint { get => this._ignoreMissingVnetServiceEndpoint; set => this._ignoreMissingVnetServiceEndpoint = value; } /// Internal Acessors for Subnet - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISubnet Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetVirtualNetworkRulesInternal.Subnet { get => (this._subnet = this._subnet ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.Subnet()); set { {_subnet = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISubnet Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetVirtualNetworkRulesInternal.Subnet { get => (this._subnet = this._subnet ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Subnet()); set { {_subnet = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISubnet _subnet; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISubnet _subnet; /// Subnet properties [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISubnet Subnet { get => (this._subnet = this._subnet ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.Subnet()); set => this._subnet = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISubnet Subnet { get => (this._subnet = this._subnet ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Subnet()); set => this._subnet = value; } /// Resource ID of Virtual Network Subnet [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string SubnetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISubnetInternal)Subnet).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISubnetInternal)Subnet).Id = value ?? null; } + public string SubnetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISubnetInternal)Subnet).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISubnetInternal)Subnet).Id = value ?? null; } /// Creates an new instance. public NwRuleSetVirtualNetworkRules() @@ -49,6 +49,9 @@ public partial interface INwRuleSetVirtualNetworkRules : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Value that indicates whether to ignore missing Vnet Service Endpoint", SerializedName = @"ignoreMissingVnetServiceEndpoint", PossibleTypes = new [] { typeof(bool) })] @@ -57,6 +60,9 @@ public partial interface INwRuleSetVirtualNetworkRules : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Resource ID of Virtual Network Subnet", SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] @@ -70,7 +76,7 @@ internal partial interface INwRuleSetVirtualNetworkRulesInternal /// Value that indicates whether to ignore missing Vnet Service Endpoint bool? IgnoreMissingVnetServiceEndpoint { get; set; } /// Subnet properties - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISubnet Subnet { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISubnet Subnet { get; set; } /// Resource ID of Virtual Network Subnet string SubnetId { get; set; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NwRuleSetVirtualNetworkRules.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/NwRuleSetVirtualNetworkRules.json.cs similarity index 93% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NwRuleSetVirtualNetworkRules.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/NwRuleSetVirtualNetworkRules.json.cs index d212080d0ab1..4898b49a9b17 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/NwRuleSetVirtualNetworkRules.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/NwRuleSetVirtualNetworkRules.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class NwRuleSetVirtualNetworkRules partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetVirtualNetworkRules. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetVirtualNetworkRules. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetVirtualNetworkRules. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetVirtualNetworkRules. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetVirtualNetworkRules FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetVirtualNetworkRules FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new NwRuleSetVirtualNetworkRules(json) : null; } @@ -77,8 +77,8 @@ internal NwRuleSetVirtualNetworkRules(Microsoft.Azure.PowerShell.Cmdlets.EventHu { return; } - {_subnet = If( json?.PropertyT("subnet"), out var __jsonSubnet) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.Subnet.FromJson(__jsonSubnet) : Subnet;} - {_ignoreMissingVnetServiceEndpoint = If( json?.PropertyT("ignoreMissingVnetServiceEndpoint"), out var __jsonIgnoreMissingVnetServiceEndpoint) ? (bool?)__jsonIgnoreMissingVnetServiceEndpoint : IgnoreMissingVnetServiceEndpoint;} + {_subnet = If( json?.PropertyT("subnet"), out var __jsonSubnet) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Subnet.FromJson(__jsonSubnet) : _subnet;} + {_ignoreMissingVnetServiceEndpoint = If( json?.PropertyT("ignoreMissingVnetServiceEndpoint"), out var __jsonIgnoreMissingVnetServiceEndpoint) ? (bool?)__jsonIgnoreMissingVnetServiceEndpoint : _ignoreMissingVnetServiceEndpoint;} AfterFromJson(json); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Operation.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/Operation.PowerShell.cs similarity index 62% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Operation.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/Operation.PowerShell.cs index 76a68530ceaa..8a08c63678b9 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Operation.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/Operation.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class Operation partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperation DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperation DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new Operation(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new Operation(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -111,45 +111,45 @@ internal Operation(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Display")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.OperationDisplayTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.OperationDisplayTypeConverter.ConvertFrom); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("IsDataAction")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationInternal)this).IsDataAction = (bool?) content.GetValueForProperty("IsDataAction",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationInternal)this).IsDataAction, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationInternal)this).IsDataAction = (bool?) content.GetValueForProperty("IsDataAction",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationInternal)this).IsDataAction, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("Origin")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationInternal)this).Origin = (string) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationInternal)this).Origin, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationInternal)this).Origin = (string) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationInternal)this).Origin, global::System.Convert.ToString); } if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAny) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.AnyTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAny) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.AnyTypeConverter.ConvertFrom); } if (content.Contains("DisplayProvider")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationInternal)this).DisplayProvider, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationInternal)this).DisplayProvider, global::System.Convert.ToString); } if (content.Contains("DisplayResource")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationInternal)this).DisplayResource, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationInternal)this).DisplayResource, global::System.Convert.ToString); } if (content.Contains("DisplayOperation")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationInternal)this).DisplayOperation, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationInternal)this).DisplayOperation, global::System.Convert.ToString); } if (content.Contains("DisplayDescription")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationInternal)this).DisplayDescription, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationInternal)this).DisplayDescription, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -164,39 +164,39 @@ internal Operation(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Display")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.OperationDisplayTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.OperationDisplayTypeConverter.ConvertFrom); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("IsDataAction")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationInternal)this).IsDataAction = (bool?) content.GetValueForProperty("IsDataAction",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationInternal)this).IsDataAction, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationInternal)this).IsDataAction = (bool?) content.GetValueForProperty("IsDataAction",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationInternal)this).IsDataAction, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("Origin")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationInternal)this).Origin = (string) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationInternal)this).Origin, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationInternal)this).Origin = (string) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationInternal)this).Origin, global::System.Convert.ToString); } if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAny) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.AnyTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAny) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.AnyTypeConverter.ConvertFrom); } if (content.Contains("DisplayProvider")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationInternal)this).DisplayProvider, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationInternal)this).DisplayProvider, global::System.Convert.ToString); } if (content.Contains("DisplayResource")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationInternal)this).DisplayResource, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationInternal)this).DisplayResource, global::System.Convert.ToString); } if (content.Contains("DisplayOperation")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationInternal)this).DisplayOperation, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationInternal)this).DisplayOperation, global::System.Convert.ToString); } if (content.Contains("DisplayDescription")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationInternal)this).DisplayDescription, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationInternal)this).DisplayDescription, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Operation.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/Operation.TypeConverter.cs similarity index 97% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Operation.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/Operation.TypeConverter.cs index 697b5eaa5a20..8a802c3a13a2 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Operation.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/Operation.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperation ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperation ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperation).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperation).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Operation.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/Operation.cs similarity index 76% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Operation.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/Operation.cs index 8faff6d38b82..7e6ed59ab550 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Operation.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/Operation.cs @@ -3,39 +3,39 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// A Event Hub REST API operation [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class Operation : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperation, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperation, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationDisplay _display; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationDisplay _display; /// Display of the operation [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationDisplay Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.OperationDisplay()); set => this._display = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationDisplay Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.OperationDisplay()); set => this._display = value; } /// Localized friendly description for the operation [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationDisplayInternal)Display).Description; } + public string DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationDisplayInternal)Display).Description; } /// Localized friendly name for the operation [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationDisplayInternal)Display).Operation; } + public string DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationDisplayInternal)Display).Operation; } /// Resource provider of the operation [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationDisplayInternal)Display).Provider; } + public string DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationDisplayInternal)Display).Provider; } /// Resource of the operation [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationDisplayInternal)Display).Resource; } + public string DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationDisplayInternal)Display).Resource; } /// Backing field for property. private bool? _isDataAction; @@ -45,22 +45,22 @@ public partial class Operation : public bool? IsDataAction { get => this._isDataAction; set => this._isDataAction = value; } /// Internal Acessors for Display - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationDisplay Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationInternal.Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.OperationDisplay()); set { {_display = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationDisplay Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationInternal.Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.OperationDisplay()); set { {_display = value;} } } /// Internal Acessors for DisplayDescription - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationInternal.DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationDisplayInternal)Display).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationDisplayInternal)Display).Description = value; } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationInternal.DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationDisplayInternal)Display).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationDisplayInternal)Display).Description = value; } /// Internal Acessors for DisplayOperation - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationInternal.DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationDisplayInternal)Display).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationDisplayInternal)Display).Operation = value; } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationInternal.DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationDisplayInternal)Display).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationDisplayInternal)Display).Operation = value; } /// Internal Acessors for DisplayProvider - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationInternal.DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationDisplayInternal)Display).Provider; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationDisplayInternal)Display).Provider = value; } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationInternal.DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationDisplayInternal)Display).Provider; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationDisplayInternal)Display).Provider = value; } /// Internal Acessors for DisplayResource - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationInternal.DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationDisplayInternal)Display).Resource; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationDisplayInternal)Display).Resource = value; } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationInternal.DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationDisplayInternal)Display).Resource; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationDisplayInternal)Display).Resource = value; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationInternal.Name { get => this._name; set { {_name = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationInternal.Name { get => this._name; set { {_name = value;} } } /// Backing field for property. private string _name; @@ -97,6 +97,9 @@ public partial interface IOperation : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Localized friendly description for the operation", SerializedName = @"description", PossibleTypes = new [] { typeof(string) })] @@ -105,6 +108,9 @@ public partial interface IOperation : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Localized friendly name for the operation", SerializedName = @"operation", PossibleTypes = new [] { typeof(string) })] @@ -113,6 +119,9 @@ public partial interface IOperation : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Resource provider of the operation", SerializedName = @"provider", PossibleTypes = new [] { typeof(string) })] @@ -121,6 +130,9 @@ public partial interface IOperation : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Resource of the operation", SerializedName = @"resource", PossibleTypes = new [] { typeof(string) })] @@ -129,6 +141,9 @@ public partial interface IOperation : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Indicates whether the operation is a data action", SerializedName = @"isDataAction", PossibleTypes = new [] { typeof(bool) })] @@ -137,6 +152,9 @@ public partial interface IOperation : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Operation name: {provider}/{resource}/{operation}", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] @@ -145,6 +163,9 @@ public partial interface IOperation : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Origin of the operation", SerializedName = @"origin", PossibleTypes = new [] { typeof(string) })] @@ -153,6 +174,9 @@ public partial interface IOperation : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Properties of the operation", SerializedName = @"properties", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAny) })] @@ -164,7 +188,7 @@ internal partial interface IOperationInternal { /// Display of the operation - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationDisplay Display { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationDisplay Display { get; set; } /// Localized friendly description for the operation string DisplayDescription { get; set; } /// Localized friendly name for the operation diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Operation.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/Operation.json.cs similarity index 91% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Operation.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/Operation.json.cs index c55cbf945bac..d079272af02f 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Operation.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/Operation.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -54,13 +54,11 @@ public partial class Operation partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperation. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperation. /// /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperation. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperation. + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new Operation(json) : null; } @@ -77,11 +75,11 @@ internal Operation(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.Json { return; } - {_display = If( json?.PropertyT("display"), out var __jsonDisplay) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.OperationDisplay.FromJson(__jsonDisplay) : Display;} - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_isDataAction = If( json?.PropertyT("isDataAction"), out var __jsonIsDataAction) ? (bool?)__jsonIsDataAction : IsDataAction;} - {_origin = If( json?.PropertyT("origin"), out var __jsonOrigin) ? (string)__jsonOrigin : (string)Origin;} - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Any.FromJson(__jsonProperties) : Property;} + {_display = If( json?.PropertyT("display"), out var __jsonDisplay) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.OperationDisplay.FromJson(__jsonDisplay) : _display;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_isDataAction = If( json?.PropertyT("isDataAction"), out var __jsonIsDataAction) ? (bool?)__jsonIsDataAction : _isDataAction;} + {_origin = If( json?.PropertyT("origin"), out var __jsonOrigin) ? (string)__jsonOrigin : (string)_origin;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Any.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } @@ -105,7 +103,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode ToJson( return container; } AddIf( null != this._display ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) this._display.ToJson(null,serializationMode) : null, "display" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/OperationDisplay.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/OperationDisplay.PowerShell.cs similarity index 74% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/OperationDisplay.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/OperationDisplay.PowerShell.cs index 9c653c4ceb4f..aebab67ca599 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/OperationDisplay.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/OperationDisplay.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class OperationDisplay partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationDisplay DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationDisplay DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new OperationDisplay(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationDisplay DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationDisplay DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new OperationDisplay(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationDisplay FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationDisplay FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -111,25 +111,25 @@ internal OperationDisplay(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Provider")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationDisplayInternal)this).Provider, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationDisplayInternal)this).Provider, global::System.Convert.ToString); } if (content.Contains("Resource")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationDisplayInternal)this).Resource, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationDisplayInternal)this).Resource, global::System.Convert.ToString); } if (content.Contains("Operation")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationDisplayInternal)this).Operation, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationDisplayInternal)this).Operation, global::System.Convert.ToString); } if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationDisplayInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationDisplayInternal)this).Description, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -144,19 +144,19 @@ internal OperationDisplay(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Provider")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationDisplayInternal)this).Provider, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationDisplayInternal)this).Provider, global::System.Convert.ToString); } if (content.Contains("Resource")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationDisplayInternal)this).Resource, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationDisplayInternal)this).Resource, global::System.Convert.ToString); } if (content.Contains("Operation")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationDisplayInternal)this).Operation, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationDisplayInternal)this).Operation, global::System.Convert.ToString); } if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationDisplayInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationDisplayInternal)this).Description, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/OperationDisplay.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/OperationDisplay.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/OperationDisplay.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/OperationDisplay.TypeConverter.cs index cdc8375b1bfe..cfa199fdc996 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/OperationDisplay.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/OperationDisplay.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationDisplay ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationDisplay ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationDisplay).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationDisplay).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/OperationDisplay.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/OperationDisplay.cs similarity index 84% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/OperationDisplay.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/OperationDisplay.cs index 8852269b62e9..90d198c9dbfe 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/OperationDisplay.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/OperationDisplay.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// Operation display payload [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class OperationDisplay : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationDisplay, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationDisplayInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationDisplay, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationDisplayInternal { /// Backing field for property. @@ -22,16 +22,16 @@ public partial class OperationDisplay : public string Description { get => this._description; } /// Internal Acessors for Description - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationDisplayInternal.Description { get => this._description; set { {_description = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationDisplayInternal.Description { get => this._description; set { {_description = value;} } } /// Internal Acessors for Operation - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationDisplayInternal.Operation { get => this._operation; set { {_operation = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationDisplayInternal.Operation { get => this._operation; set { {_operation = value;} } } /// Internal Acessors for Provider - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationDisplayInternal.Provider { get => this._provider; set { {_provider = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationDisplayInternal.Provider { get => this._provider; set { {_provider = value;} } } /// Internal Acessors for Resource - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationDisplayInternal.Resource { get => this._resource; set { {_resource = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationDisplayInternal.Resource { get => this._resource; set { {_resource = value;} } } /// Backing field for property. private string _operation; @@ -68,6 +68,9 @@ public partial interface IOperationDisplay : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Localized friendly description for the operation", SerializedName = @"description", PossibleTypes = new [] { typeof(string) })] @@ -76,6 +79,9 @@ public partial interface IOperationDisplay : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Localized friendly name for the operation", SerializedName = @"operation", PossibleTypes = new [] { typeof(string) })] @@ -84,6 +90,9 @@ public partial interface IOperationDisplay : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Resource provider of the operation", SerializedName = @"provider", PossibleTypes = new [] { typeof(string) })] @@ -92,6 +101,9 @@ public partial interface IOperationDisplay : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Resource of the operation", SerializedName = @"resource", PossibleTypes = new [] { typeof(string) })] diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/OperationDisplay.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/OperationDisplay.json.cs similarity index 90% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/OperationDisplay.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/OperationDisplay.json.cs index 6c42eb915359..2fa993d1e70f 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/OperationDisplay.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/OperationDisplay.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class OperationDisplay partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationDisplay. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationDisplay. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationDisplay. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationDisplay. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationDisplay FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationDisplay FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new OperationDisplay(json) : null; } @@ -77,10 +77,10 @@ internal OperationDisplay(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Js { return; } - {_provider = If( json?.PropertyT("provider"), out var __jsonProvider) ? (string)__jsonProvider : (string)Provider;} - {_resource = If( json?.PropertyT("resource"), out var __jsonResource) ? (string)__jsonResource : (string)Resource;} - {_operation = If( json?.PropertyT("operation"), out var __jsonOperation) ? (string)__jsonOperation : (string)Operation;} - {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} + {_provider = If( json?.PropertyT("provider"), out var __jsonProvider) ? (string)__jsonProvider : (string)_provider;} + {_resource = If( json?.PropertyT("resource"), out var __jsonResource) ? (string)__jsonResource : (string)_resource;} + {_operation = If( json?.PropertyT("operation"), out var __jsonOperation) ? (string)__jsonOperation : (string)_operation;} + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)_description;} AfterFromJson(json); } @@ -103,19 +103,19 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode ToJson( { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._provider)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._provider.ToString()) : null, "provider" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._resource)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._resource.ToString()) : null, "resource" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._operation)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._operation.ToString()) : null, "operation" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/OperationListResult.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/OperationListResult.PowerShell.cs similarity index 76% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/OperationListResult.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/OperationListResult.PowerShell.cs index 323a7caf697a..e8eccb841d6f 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/OperationListResult.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/OperationListResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -66,27 +66,27 @@ public partial class OperationListResult partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new OperationListResult(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new OperationListResult(content); } @@ -96,10 +96,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -114,17 +114,17 @@ internal OperationListResult(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperation[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.OperationTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.OperationTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -139,11 +139,11 @@ internal OperationListResult(global::System.Management.Automation.PSObject conte // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperation[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.OperationTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.OperationTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/OperationListResult.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/OperationListResult.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/OperationListResult.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/OperationListResult.TypeConverter.cs index 06eb5f386fe6..38270f957b95 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/OperationListResult.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/OperationListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/OperationListResult.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/OperationListResult.cs similarity index 73% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/OperationListResult.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/OperationListResult.cs index e79887bfdad6..b08e419dc4c9 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/OperationListResult.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/OperationListResult.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -13,15 +13,15 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class OperationListResult : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationListResult, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationListResult, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationListResultInternal { /// Internal Acessors for NextLink - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } /// Internal Acessors for Value - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperation[] Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationListResultInternal.Value { get => this._value; set { {_value = value;} } } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationListResultInternal.Value { get => this._value; set { {_value = value;} } } /// Backing field for property. private string _nextLink; @@ -31,13 +31,13 @@ public partial class OperationListResult : public string NextLink { get => this._nextLink; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperation[] _value; + private System.Collections.Generic.List _value; /// /// List of Event Hub operations supported by the Microsoft.EventHub resource provider. /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperation[] Value { get => this._value; } + public System.Collections.Generic.List Value { get => this._value; } /// Creates an new instance. public OperationListResult() @@ -54,6 +54,9 @@ public partial interface IOperationListResult : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"URL to get the next set of operation list results if there are any.", SerializedName = @"nextLink", PossibleTypes = new [] { typeof(string) })] @@ -64,10 +67,13 @@ public partial interface IOperationListResult : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"List of Event Hub operations supported by the Microsoft.EventHub resource provider.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperation) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperation[] Value { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperation) })] + System.Collections.Generic.List Value { get; } } /// Result of the request to list Event Hub operations. It contains a list of operations and a URL link to get the next set @@ -80,7 +86,7 @@ internal partial interface IOperationListResultInternal /// /// List of Event Hub operations supported by the Microsoft.EventHub resource provider. /// - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperation[] Value { get; set; } + System.Collections.Generic.List Value { get; set; } } } \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/OperationListResult.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/OperationListResult.json.cs similarity index 88% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/OperationListResult.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/OperationListResult.json.cs index d44c60d098ac..82f45eada6cb 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/OperationListResult.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/OperationListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -57,13 +57,13 @@ public partial class OperationListResult partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new OperationListResult(json) : null; } @@ -80,8 +80,8 @@ internal OperationListResult(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperation) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.Operation.FromJson(__u) )) ))() : null : Value;} - {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperation) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Operation.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} AfterFromJson(json); } @@ -104,7 +104,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode ToJson( { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { if (null != this._value) { @@ -116,7 +116,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode ToJson( container.Add("value",__w); } } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateEndpoint.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateEndpoint.PowerShell.cs similarity index 84% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateEndpoint.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/PrivateEndpoint.PowerShell.cs index 284b4eaebd8c..487faeb26604 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateEndpoint.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateEndpoint.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class PrivateEndpoint partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpoint DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpoint DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new PrivateEndpoint(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpoint DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpoint DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new PrivateEndpoint(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpoint FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpoint FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -111,13 +111,13 @@ internal PrivateEndpoint(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointInternal)this).Id, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -132,7 +132,7 @@ internal PrivateEndpoint(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointInternal)this).Id, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateEndpoint.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateEndpoint.TypeConverter.cs similarity index 97% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateEndpoint.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/PrivateEndpoint.TypeConverter.cs index f972407c2a55..41ccbeef1f82 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateEndpoint.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateEndpoint.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpoint ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpoint ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpoint).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpoint).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateEndpoint.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateEndpoint.cs similarity index 86% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateEndpoint.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/PrivateEndpoint.cs index 24e79a46e53a..f33862c2b327 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateEndpoint.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateEndpoint.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// PrivateEndpoint information. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class PrivateEndpoint : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpoint, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpoint, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointInternal { /// Backing field for property. @@ -35,6 +35,9 @@ public partial interface IPrivateEndpoint : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The ARM identifier for Private Endpoint.", SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateEndpoint.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateEndpoint.json.cs similarity index 94% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateEndpoint.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/PrivateEndpoint.json.cs index 0444e684313f..ba2ff230775e 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateEndpoint.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateEndpoint.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class PrivateEndpoint partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpoint. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpoint. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpoint. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpoint. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpoint FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpoint FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new PrivateEndpoint(json) : null; } @@ -77,7 +77,7 @@ internal PrivateEndpoint(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Jso { return; } - {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;} AfterFromJson(json); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateEndpointConnection.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateEndpointConnection.PowerShell.cs new file mode 100644 index 000000000000..3d5d5daa3d34 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateEndpointConnection.PowerShell.cs @@ -0,0 +1,300 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + + /// Properties of the PrivateEndpointConnection. + [System.ComponentModel.TypeConverter(typeof(PrivateEndpointConnectionTypeConverter))] + public partial class PrivateEndpointConnection + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new PrivateEndpointConnection(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new PrivateEndpointConnection(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal PrivateEndpointConnection(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.PrivateEndpointConnectionPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).PrivateEndpoint = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpoint) content.GetValueForProperty("PrivateEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).PrivateEndpoint, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.PrivateEndpointTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("PrivateLinkServiceConnectionState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionState = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConnectionState) content.GetValueForProperty("PrivateLinkServiceConnectionState",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionState, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ConnectionStateTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpointId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).PrivateEndpointId = (string) content.GetValueForProperty("PrivateEndpointId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).PrivateEndpointId, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ConnectionState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).ConnectionState = (string) content.GetValueForProperty("ConnectionState",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).ConnectionState, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).Description, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal PrivateEndpointConnection(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.PrivateEndpointConnectionPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).PrivateEndpoint = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpoint) content.GetValueForProperty("PrivateEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).PrivateEndpoint, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.PrivateEndpointTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("PrivateLinkServiceConnectionState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionState = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConnectionState) content.GetValueForProperty("PrivateLinkServiceConnectionState",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionState, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ConnectionStateTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpointId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).PrivateEndpointId = (string) content.GetValueForProperty("PrivateEndpointId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).PrivateEndpointId, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ConnectionState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).ConnectionState = (string) content.GetValueForProperty("ConnectionState",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).ConnectionState, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal)this).Description, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Properties of the PrivateEndpointConnection. + [System.ComponentModel.TypeConverter(typeof(PrivateEndpointConnectionTypeConverter))] + public partial interface IPrivateEndpointConnection + + { + + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateEndpointConnection.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateEndpointConnection.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateEndpointConnection.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/PrivateEndpointConnection.TypeConverter.cs index 5a96eee326f8..4dd915d43872 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateEndpointConnection.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateEndpointConnection.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateEndpointConnection.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateEndpointConnection.cs similarity index 56% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateEndpointConnection.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/PrivateEndpointConnection.cs index bddcb7029d99..448969ad8a18 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateEndpointConnection.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateEndpointConnection.cs @@ -3,124 +3,123 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// Properties of the PrivateEndpointConnection. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class PrivateEndpointConnection : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IValidates { /// - /// Backing field for Inherited model + /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ProxyResource(); + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ProxyResource(); /// Status of the connection. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PrivateLinkConnectionStatus? ConnectionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionStateStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionStateStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PrivateLinkConnectionStatus)""); } + public string ConnectionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionStateStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionStateStatus = value ?? null; } /// Description of the connection state. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionStateDescription; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionStateDescription = value ?? null; } + public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionStateDescription; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionStateDescription = value ?? null; } /// /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Id; } /// The geo-location where the resource lives [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Location; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Id = value; } - - /// Internal Acessors for Location - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal.Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Location = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Name = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Type = value; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Location; } /// Internal Acessors for PrivateEndpoint - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpoint Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal.PrivateEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateEndpoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateEndpoint = value; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpoint Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal.PrivateEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateEndpoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateEndpoint = value; } /// Internal Acessors for PrivateLinkServiceConnectionState - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConnectionState Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal.PrivateLinkServiceConnectionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionState; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionState = value; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConnectionState Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal.PrivateLinkServiceConnectionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionState; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionState = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionProperties Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.PrivateEndpointConnectionProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionProperties Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.PrivateEndpointConnectionProperties()); set { {_property = value;} } } /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.SystemData()); set { {_systemData = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SystemData()); set { {_systemData = value;} } } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Id = value; } + + /// Internal Acessors for Location + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal.Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Location = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Type = value; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Name; } /// The ARM identifier for Private Endpoint. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string PrivateEndpointId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateEndpointId; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateEndpointId = value ?? null; } + public string PrivateEndpointId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateEndpointId; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateEndpointId = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionProperties _property; /// Properties of the PrivateEndpointConnection. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.PrivateEndpointConnectionProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.PrivateEndpointConnectionProperties()); set => this._property = value; } /// Provisioning state of the Private Endpoint Connection. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EndPointProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionPropertiesInternal)Property).ProvisioningState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EndPointProvisioningState)""); } + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionPropertiesInternal)Property).ProvisioningState = value ?? null; } /// Gets the resource group name [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData _systemData; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData _systemData; /// The system meta data relating to this resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.SystemData()); } + internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SystemData()); } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType)""); } + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedByType = value ?? null; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType)""); } + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedByType = value ?? null; } /// /// The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs" /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Type; } /// Creates an new instance. public PrivateEndpointConnection() @@ -143,20 +142,27 @@ public PrivateEndpointConnection() /// Properties of the PrivateEndpointConnection. public partial interface IPrivateEndpointConnection : Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResource + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResource { /// Status of the connection. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Status of the connection.", SerializedName = @"status", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PrivateLinkConnectionStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PrivateLinkConnectionStatus? ConnectionState { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Pending", "Approved", "Rejected", "Disconnected")] + string ConnectionState { get; set; } /// Description of the connection state. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Description of the connection state.", SerializedName = @"description", PossibleTypes = new [] { typeof(string) })] @@ -165,6 +171,9 @@ public partial interface IPrivateEndpointConnection : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The ARM identifier for Private Endpoint.", SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] @@ -173,92 +182,120 @@ public partial interface IPrivateEndpointConnection : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Provisioning state of the Private Endpoint Connection.", SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EndPointProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EndPointProvisioningState? ProvisioningState { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Creating", "Updating", "Deleting", "Succeeded", "Canceled", "Failed")] + string ProvisioningState { get; set; } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The timestamp of resource creation (UTC).", SerializedName = @"createdAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? SystemDataCreatedAt { get; set; } + global::System.DateTime? SystemDataCreatedAt { get; } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The identity that created the resource.", SerializedName = @"createdBy", PossibleTypes = new [] { typeof(string) })] - string SystemDataCreatedBy { get; set; } + string SystemDataCreatedBy { get; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that created the resource.", SerializedName = @"createdByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataCreatedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that last modified the resource.", SerializedName = @"lastModifiedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? SystemDataLastModifiedAt { get; set; } + global::System.DateTime? SystemDataLastModifiedAt { get; } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The identity that last modified the resource.", SerializedName = @"lastModifiedBy", PossibleTypes = new [] { typeof(string) })] - string SystemDataLastModifiedBy { get; set; } + string SystemDataLastModifiedBy { get; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that last modified the resource.", SerializedName = @"lastModifiedByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; } } /// Properties of the PrivateEndpointConnection. internal partial interface IPrivateEndpointConnectionInternal : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal { /// Status of the connection. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PrivateLinkConnectionStatus? ConnectionState { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Pending", "Approved", "Rejected", "Disconnected")] + string ConnectionState { get; set; } /// Description of the connection state. string Description { get; set; } /// The Private Endpoint resource for this Connection. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpoint PrivateEndpoint { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpoint PrivateEndpoint { get; set; } /// The ARM identifier for Private Endpoint. string PrivateEndpointId { get; set; } /// Details about the state of the connection. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConnectionState PrivateLinkServiceConnectionState { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConnectionState PrivateLinkServiceConnectionState { get; set; } /// Properties of the PrivateEndpointConnection. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionProperties Property { get; set; } /// Provisioning state of the Private Endpoint Connection. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EndPointProvisioningState? ProvisioningState { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Creating", "Updating", "Deleting", "Succeeded", "Canceled", "Failed")] + string ProvisioningState { get; set; } /// The system meta data relating to this resource. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData SystemData { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData SystemData { get; set; } /// The timestamp of resource creation (UTC). global::System.DateTime? SystemDataCreatedAt { get; set; } /// The identity that created the resource. string SystemDataCreatedBy { get; set; } /// The type of identity that created the resource. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataCreatedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; set; } /// The type of identity that last modified the resource. global::System.DateTime? SystemDataLastModifiedAt { get; set; } /// The identity that last modified the resource. string SystemDataLastModifiedBy { get; set; } /// The type of identity that last modified the resource. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; set; } } } \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateEndpointConnection.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateEndpointConnection.json.cs similarity index 91% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateEndpointConnection.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/PrivateEndpointConnection.json.cs index af3690ef3d94..aebc09538ab5 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateEndpointConnection.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateEndpointConnection.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class PrivateEndpointConnection partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new PrivateEndpointConnection(json) : null; } @@ -77,9 +77,9 @@ internal PrivateEndpointConnection(Microsoft.Azure.PowerShell.Cmdlets.EventHub.R { return; } - __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ProxyResource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.PrivateEndpointConnectionProperties.FromJson(__jsonProperties) : Property;} - {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.SystemData.FromJson(__jsonSystemData) : SystemData;} + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.PrivateEndpointConnectionProperties.FromJson(__jsonProperties) : _property;} + {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SystemData.FromJson(__jsonSystemData) : _systemData;} AfterFromJson(json); } @@ -104,7 +104,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode ToJson( } __proxyResource?.ToJson(container, serializationMode); AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add ); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateEndpointConnectionListResult.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateEndpointConnectionListResult.PowerShell.cs similarity index 74% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateEndpointConnectionListResult.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/PrivateEndpointConnectionListResult.PowerShell.cs index d7afda6bb163..7e0143acf68f 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateEndpointConnectionListResult.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateEndpointConnectionListResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class PrivateEndpointConnectionListResult partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new PrivateEndpointConnectionListResult(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new PrivateEndpointConnectionListResult(content); } @@ -97,10 +95,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -115,17 +113,17 @@ internal PrivateEndpointConnectionListResult(global::System.Collections.IDiction // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.PrivateEndpointConnectionTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.PrivateEndpointConnectionTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -140,11 +138,11 @@ internal PrivateEndpointConnectionListResult(global::System.Management.Automatio // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.PrivateEndpointConnectionTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.PrivateEndpointConnectionTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateEndpointConnectionListResult.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateEndpointConnectionListResult.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateEndpointConnectionListResult.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/PrivateEndpointConnectionListResult.TypeConverter.cs index 71069f341210..91bcb7770765 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateEndpointConnectionListResult.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateEndpointConnectionListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -108,14 +108,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateEndpointConnectionListResult.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateEndpointConnectionListResult.cs similarity index 73% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateEndpointConnectionListResult.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/PrivateEndpointConnectionListResult.cs index 8acddd23100b..d22a27964510 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateEndpointConnectionListResult.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateEndpointConnectionListResult.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// Result of the list of all private endpoint connections operation. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class PrivateEndpointConnectionListResult : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionListResult, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionListResult, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionListResultInternal { /// Backing field for property. @@ -22,11 +22,11 @@ public partial class PrivateEndpointConnectionListResult : public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection[] _value; + private System.Collections.Generic.List _value; /// A collection of private endpoint connection resources. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection[] Value { get => this._value; set => this._value = value; } + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } /// Creates an new instance. public PrivateEndpointConnectionListResult() @@ -42,6 +42,9 @@ public partial interface IPrivateEndpointConnectionListResult : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"A link for the next page of private endpoint connection resources.", SerializedName = @"nextLink", PossibleTypes = new [] { typeof(string) })] @@ -50,10 +53,13 @@ public partial interface IPrivateEndpointConnectionListResult : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"A collection of private endpoint connection resources.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection) })] + System.Collections.Generic.List Value { get; set; } } /// Result of the list of all private endpoint connections operation. @@ -63,7 +69,7 @@ internal partial interface IPrivateEndpointConnectionListResultInternal /// A link for the next page of private endpoint connection resources. string NextLink { get; set; } /// A collection of private endpoint connection resources. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection[] Value { get; set; } + System.Collections.Generic.List Value { get; set; } } } \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateEndpointConnectionListResult.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateEndpointConnectionListResult.json.cs similarity index 89% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateEndpointConnectionListResult.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/PrivateEndpointConnectionListResult.json.cs index ddfdb3cbdf12..4d837d290257 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateEndpointConnectionListResult.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateEndpointConnectionListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class PrivateEndpointConnectionListResult partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new PrivateEndpointConnectionListResult(json) : null; } @@ -77,8 +77,8 @@ internal PrivateEndpointConnectionListResult(Microsoft.Azure.PowerShell.Cmdlets. { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.PrivateEndpointConnection.FromJson(__u) )) ))() : null : Value;} - {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.PrivateEndpointConnection.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} AfterFromJson(json); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateEndpointConnectionProperties.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateEndpointConnectionProperties.PowerShell.cs similarity index 59% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateEndpointConnectionProperties.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/PrivateEndpointConnectionProperties.PowerShell.cs index 4647282feba0..907237f9b5da 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateEndpointConnectionProperties.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateEndpointConnectionProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class PrivateEndpointConnectionProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new PrivateEndpointConnectionProperties(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new PrivateEndpointConnectionProperties(content); } @@ -97,10 +95,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -115,33 +113,33 @@ internal PrivateEndpointConnectionProperties(global::System.Collections.IDiction // actually deserialize if (content.Contains("PrivateEndpoint")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpoint = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpoint) content.GetValueForProperty("PrivateEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpoint, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.PrivateEndpointTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpoint = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpoint) content.GetValueForProperty("PrivateEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpoint, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.PrivateEndpointTypeConverter.ConvertFrom); } if (content.Contains("PrivateLinkServiceConnectionState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionState = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConnectionState) content.GetValueForProperty("PrivateLinkServiceConnectionState",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionState, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ConnectionStateTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionState = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConnectionState) content.GetValueForProperty("PrivateLinkServiceConnectionState",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionState, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ConnectionStateTypeConverter.ConvertFrom); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EndPointProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EndPointProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); } if (content.Contains("PrivateEndpointId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpointId = (string) content.GetValueForProperty("PrivateEndpointId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpointId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpointId = (string) content.GetValueForProperty("PrivateEndpointId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpointId, global::System.Convert.ToString); } if (content.Contains("PrivateLinkServiceConnectionStateStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateStatus = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PrivateLinkConnectionStatus?) content.GetValueForProperty("PrivateLinkServiceConnectionStateStatus",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateStatus, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PrivateLinkConnectionStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateStatus = (string) content.GetValueForProperty("PrivateLinkServiceConnectionStateStatus",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateStatus, global::System.Convert.ToString); } if (content.Contains("PrivateLinkServiceConnectionStateDescription")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateDescription = (string) content.GetValueForProperty("PrivateLinkServiceConnectionStateDescription",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateDescription, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateDescription = (string) content.GetValueForProperty("PrivateLinkServiceConnectionStateDescription",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateDescription, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -156,27 +154,27 @@ internal PrivateEndpointConnectionProperties(global::System.Management.Automatio // actually deserialize if (content.Contains("PrivateEndpoint")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpoint = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpoint) content.GetValueForProperty("PrivateEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpoint, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.PrivateEndpointTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpoint = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpoint) content.GetValueForProperty("PrivateEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpoint, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.PrivateEndpointTypeConverter.ConvertFrom); } if (content.Contains("PrivateLinkServiceConnectionState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionState = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConnectionState) content.GetValueForProperty("PrivateLinkServiceConnectionState",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionState, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ConnectionStateTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionState = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConnectionState) content.GetValueForProperty("PrivateLinkServiceConnectionState",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionState, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ConnectionStateTypeConverter.ConvertFrom); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EndPointProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EndPointProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); } if (content.Contains("PrivateEndpointId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpointId = (string) content.GetValueForProperty("PrivateEndpointId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpointId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpointId = (string) content.GetValueForProperty("PrivateEndpointId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpointId, global::System.Convert.ToString); } if (content.Contains("PrivateLinkServiceConnectionStateStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateStatus = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PrivateLinkConnectionStatus?) content.GetValueForProperty("PrivateLinkServiceConnectionStateStatus",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateStatus, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PrivateLinkConnectionStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateStatus = (string) content.GetValueForProperty("PrivateLinkServiceConnectionStateStatus",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateStatus, global::System.Convert.ToString); } if (content.Contains("PrivateLinkServiceConnectionStateDescription")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateDescription = (string) content.GetValueForProperty("PrivateLinkServiceConnectionStateDescription",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateDescription, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateDescription = (string) content.GetValueForProperty("PrivateLinkServiceConnectionStateDescription",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateDescription, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateEndpointConnectionProperties.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateEndpointConnectionProperties.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateEndpointConnectionProperties.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/PrivateEndpointConnectionProperties.TypeConverter.cs index ea087fd62ee6..3f94c8d12f5a 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateEndpointConnectionProperties.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateEndpointConnectionProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -108,14 +108,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateEndpointConnectionProperties.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateEndpointConnectionProperties.cs similarity index 55% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateEndpointConnectionProperties.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/PrivateEndpointConnectionProperties.cs index 965d7bb3b356..12024bea535a 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateEndpointConnectionProperties.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateEndpointConnectionProperties.cs @@ -3,55 +3,55 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// Properties of the private endpoint connection resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class PrivateEndpointConnectionProperties : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionProperties, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionProperties, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionPropertiesInternal { /// Internal Acessors for PrivateEndpoint - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpoint Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionPropertiesInternal.PrivateEndpoint { get => (this._privateEndpoint = this._privateEndpoint ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.PrivateEndpoint()); set { {_privateEndpoint = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpoint Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionPropertiesInternal.PrivateEndpoint { get => (this._privateEndpoint = this._privateEndpoint ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.PrivateEndpoint()); set { {_privateEndpoint = value;} } } /// Internal Acessors for PrivateLinkServiceConnectionState - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConnectionState Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionPropertiesInternal.PrivateLinkServiceConnectionState { get => (this._privateLinkServiceConnectionState = this._privateLinkServiceConnectionState ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ConnectionState()); set { {_privateLinkServiceConnectionState = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConnectionState Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionPropertiesInternal.PrivateLinkServiceConnectionState { get => (this._privateLinkServiceConnectionState = this._privateLinkServiceConnectionState ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ConnectionState()); set { {_privateLinkServiceConnectionState = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpoint _privateEndpoint; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpoint _privateEndpoint; /// The Private Endpoint resource for this Connection. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpoint PrivateEndpoint { get => (this._privateEndpoint = this._privateEndpoint ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.PrivateEndpoint()); set => this._privateEndpoint = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpoint PrivateEndpoint { get => (this._privateEndpoint = this._privateEndpoint ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.PrivateEndpoint()); set => this._privateEndpoint = value; } /// The ARM identifier for Private Endpoint. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string PrivateEndpointId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointInternal)PrivateEndpoint).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointInternal)PrivateEndpoint).Id = value ?? null; } + public string PrivateEndpointId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointInternal)PrivateEndpoint).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointInternal)PrivateEndpoint).Id = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConnectionState _privateLinkServiceConnectionState; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConnectionState _privateLinkServiceConnectionState; /// Details about the state of the connection. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConnectionState PrivateLinkServiceConnectionState { get => (this._privateLinkServiceConnectionState = this._privateLinkServiceConnectionState ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ConnectionState()); set => this._privateLinkServiceConnectionState = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConnectionState PrivateLinkServiceConnectionState { get => (this._privateLinkServiceConnectionState = this._privateLinkServiceConnectionState ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ConnectionState()); set => this._privateLinkServiceConnectionState = value; } /// Description of the connection state. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string PrivateLinkServiceConnectionStateDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConnectionStateInternal)PrivateLinkServiceConnectionState).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConnectionStateInternal)PrivateLinkServiceConnectionState).Description = value ?? null; } + public string PrivateLinkServiceConnectionStateDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConnectionStateInternal)PrivateLinkServiceConnectionState).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConnectionStateInternal)PrivateLinkServiceConnectionState).Description = value ?? null; } /// Status of the connection. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PrivateLinkConnectionStatus? PrivateLinkServiceConnectionStateStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConnectionStateInternal)PrivateLinkServiceConnectionState).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConnectionStateInternal)PrivateLinkServiceConnectionState).Status = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PrivateLinkConnectionStatus)""); } + public string PrivateLinkServiceConnectionStateStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConnectionStateInternal)PrivateLinkServiceConnectionState).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConnectionStateInternal)PrivateLinkServiceConnectionState).Status = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EndPointProvisioningState? _provisioningState; + private string _provisioningState; /// Provisioning state of the Private Endpoint Connection. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EndPointProvisioningState? ProvisioningState { get => this._provisioningState; set => this._provisioningState = value; } + public string ProvisioningState { get => this._provisioningState; set => this._provisioningState = value; } /// Creates an new instance. public PrivateEndpointConnectionProperties() @@ -67,6 +67,9 @@ public partial interface IPrivateEndpointConnectionProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The ARM identifier for Private Endpoint.", SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] @@ -75,6 +78,9 @@ public partial interface IPrivateEndpointConnectionProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Description of the connection state.", SerializedName = @"description", PossibleTypes = new [] { typeof(string) })] @@ -83,18 +89,26 @@ public partial interface IPrivateEndpointConnectionProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Status of the connection.", SerializedName = @"status", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PrivateLinkConnectionStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PrivateLinkConnectionStatus? PrivateLinkServiceConnectionStateStatus { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Pending", "Approved", "Rejected", "Disconnected")] + string PrivateLinkServiceConnectionStateStatus { get; set; } /// Provisioning state of the Private Endpoint Connection. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Provisioning state of the Private Endpoint Connection.", SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EndPointProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EndPointProvisioningState? ProvisioningState { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Creating", "Updating", "Deleting", "Succeeded", "Canceled", "Failed")] + string ProvisioningState { get; set; } } /// Properties of the private endpoint connection resource. @@ -102,17 +116,19 @@ internal partial interface IPrivateEndpointConnectionPropertiesInternal { /// The Private Endpoint resource for this Connection. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpoint PrivateEndpoint { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpoint PrivateEndpoint { get; set; } /// The ARM identifier for Private Endpoint. string PrivateEndpointId { get; set; } /// Details about the state of the connection. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConnectionState PrivateLinkServiceConnectionState { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConnectionState PrivateLinkServiceConnectionState { get; set; } /// Description of the connection state. string PrivateLinkServiceConnectionStateDescription { get; set; } /// Status of the connection. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PrivateLinkConnectionStatus? PrivateLinkServiceConnectionStateStatus { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Pending", "Approved", "Rejected", "Disconnected")] + string PrivateLinkServiceConnectionStateStatus { get; set; } /// Provisioning state of the Private Endpoint Connection. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EndPointProvisioningState? ProvisioningState { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Creating", "Updating", "Deleting", "Succeeded", "Canceled", "Failed")] + string ProvisioningState { get; set; } } } \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateEndpointConnectionProperties.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateEndpointConnectionProperties.json.cs similarity index 91% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateEndpointConnectionProperties.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/PrivateEndpointConnectionProperties.json.cs index 9de05ae08943..ec041c3f6b39 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateEndpointConnectionProperties.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateEndpointConnectionProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class PrivateEndpointConnectionProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new PrivateEndpointConnectionProperties(json) : null; } @@ -77,9 +77,9 @@ internal PrivateEndpointConnectionProperties(Microsoft.Azure.PowerShell.Cmdlets. { return; } - {_privateEndpoint = If( json?.PropertyT("privateEndpoint"), out var __jsonPrivateEndpoint) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.PrivateEndpoint.FromJson(__jsonPrivateEndpoint) : PrivateEndpoint;} - {_privateLinkServiceConnectionState = If( json?.PropertyT("privateLinkServiceConnectionState"), out var __jsonPrivateLinkServiceConnectionState) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ConnectionState.FromJson(__jsonPrivateLinkServiceConnectionState) : PrivateLinkServiceConnectionState;} - {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} + {_privateEndpoint = If( json?.PropertyT("privateEndpoint"), out var __jsonPrivateEndpoint) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.PrivateEndpoint.FromJson(__jsonPrivateEndpoint) : _privateEndpoint;} + {_privateLinkServiceConnectionState = If( json?.PropertyT("privateLinkServiceConnectionState"), out var __jsonPrivateLinkServiceConnectionState) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ConnectionState.FromJson(__jsonPrivateLinkServiceConnectionState) : _privateLinkServiceConnectionState;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} AfterFromJson(json); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateLinkResource.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateLinkResource.PowerShell.cs similarity index 64% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateLinkResource.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/PrivateLinkResource.PowerShell.cs index b0dc0b0c31fb..9fb3fed78391 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateLinkResource.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateLinkResource.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class PrivateLinkResource partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResource DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new PrivateLinkResource(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new PrivateLinkResource(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -111,37 +111,37 @@ internal PrivateLinkResource(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.PrivateLinkResourcePropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.PrivateLinkResourcePropertiesTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("GroupId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourceInternal)this).GroupId = (string) content.GetValueForProperty("GroupId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourceInternal)this).GroupId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourceInternal)this).GroupId = (string) content.GetValueForProperty("GroupId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourceInternal)this).GroupId, global::System.Convert.ToString); } if (content.Contains("RequiredMember")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourceInternal)this).RequiredMember = (string[]) content.GetValueForProperty("RequiredMember",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourceInternal)this).RequiredMember, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourceInternal)this).RequiredMember = (System.Collections.Generic.List) content.GetValueForProperty("RequiredMember",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourceInternal)this).RequiredMember, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } if (content.Contains("RequiredZoneName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourceInternal)this).RequiredZoneName = (string[]) content.GetValueForProperty("RequiredZoneName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourceInternal)this).RequiredZoneName, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourceInternal)this).RequiredZoneName = (System.Collections.Generic.List) content.GetValueForProperty("RequiredZoneName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourceInternal)this).RequiredZoneName, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -156,31 +156,31 @@ internal PrivateLinkResource(global::System.Management.Automation.PSObject conte // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.PrivateLinkResourcePropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.PrivateLinkResourcePropertiesTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("GroupId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourceInternal)this).GroupId = (string) content.GetValueForProperty("GroupId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourceInternal)this).GroupId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourceInternal)this).GroupId = (string) content.GetValueForProperty("GroupId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourceInternal)this).GroupId, global::System.Convert.ToString); } if (content.Contains("RequiredMember")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourceInternal)this).RequiredMember = (string[]) content.GetValueForProperty("RequiredMember",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourceInternal)this).RequiredMember, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourceInternal)this).RequiredMember = (System.Collections.Generic.List) content.GetValueForProperty("RequiredMember",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourceInternal)this).RequiredMember, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } if (content.Contains("RequiredZoneName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourceInternal)this).RequiredZoneName = (string[]) content.GetValueForProperty("RequiredZoneName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourceInternal)this).RequiredZoneName, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourceInternal)this).RequiredZoneName = (System.Collections.Generic.List) content.GetValueForProperty("RequiredZoneName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourceInternal)this).RequiredZoneName, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } AfterDeserializePSObject(content); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateLinkResource.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateLinkResource.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateLinkResource.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/PrivateLinkResource.TypeConverter.cs index fcc9713d96e1..03a716afe129 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateLinkResource.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateLinkResource.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateLinkResource.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateLinkResource.cs similarity index 70% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateLinkResource.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/PrivateLinkResource.cs index bce9fb9c0e8e..5bbb247034c8 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateLinkResource.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateLinkResource.cs @@ -3,20 +3,20 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// Information of the private link resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class PrivateLinkResource : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResource, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResource, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourceInternal { /// The private link resource group id. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string GroupId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourcePropertiesInternal)Property).GroupId; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourcePropertiesInternal)Property).GroupId = value ?? null; } + public string GroupId { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourcePropertiesInternal)Property).GroupId; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourcePropertiesInternal)Property).GroupId = value ?? null; } /// Backing field for property. private string _id; @@ -26,7 +26,7 @@ public partial class PrivateLinkResource : public string Id { get => this._id; set => this._id = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourceProperties Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.PrivateLinkResourceProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourceProperties Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.PrivateLinkResourceProperties()); set { {_property = value;} } } /// Backing field for property. private string _name; @@ -36,19 +36,19 @@ public partial class PrivateLinkResource : public string Name { get => this._name; set => this._name = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourceProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourceProperties _property; /// Properties of the private link resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.PrivateLinkResourceProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.PrivateLinkResourceProperties()); set => this._property = value; } /// The private link resource required member names. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string[] RequiredMember { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourcePropertiesInternal)Property).RequiredMember; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourcePropertiesInternal)Property).RequiredMember = value ?? null /* arrayOf */; } + public System.Collections.Generic.List RequiredMember { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourcePropertiesInternal)Property).RequiredMember; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourcePropertiesInternal)Property).RequiredMember = value ?? null /* arrayOf */; } /// The private link resource Private link DNS zone name. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string[] RequiredZoneName { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourcePropertiesInternal)Property).RequiredZoneName; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourcePropertiesInternal)Property).RequiredZoneName = value ?? null /* arrayOf */; } + public System.Collections.Generic.List RequiredZoneName { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourcePropertiesInternal)Property).RequiredZoneName; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourcePropertiesInternal)Property).RequiredZoneName = value ?? null /* arrayOf */; } /// Backing field for property. private string _type; @@ -71,6 +71,9 @@ public partial interface IPrivateLinkResource : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The private link resource group id.", SerializedName = @"groupId", PossibleTypes = new [] { typeof(string) })] @@ -79,6 +82,9 @@ public partial interface IPrivateLinkResource : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Fully qualified identifier of the resource.", SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] @@ -87,6 +93,9 @@ public partial interface IPrivateLinkResource : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Name of the resource", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] @@ -95,22 +104,31 @@ public partial interface IPrivateLinkResource : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The private link resource required member names.", SerializedName = @"requiredMembers", PossibleTypes = new [] { typeof(string) })] - string[] RequiredMember { get; set; } + System.Collections.Generic.List RequiredMember { get; set; } /// The private link resource Private link DNS zone name. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The private link resource Private link DNS zone name.", SerializedName = @"requiredZoneNames", PossibleTypes = new [] { typeof(string) })] - string[] RequiredZoneName { get; set; } + System.Collections.Generic.List RequiredZoneName { get; set; } /// Type of the resource [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Type of the resource", SerializedName = @"type", PossibleTypes = new [] { typeof(string) })] @@ -128,11 +146,11 @@ internal partial interface IPrivateLinkResourceInternal /// Name of the resource string Name { get; set; } /// Properties of the private link resource. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourceProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourceProperties Property { get; set; } /// The private link resource required member names. - string[] RequiredMember { get; set; } + System.Collections.Generic.List RequiredMember { get; set; } /// The private link resource Private link DNS zone name. - string[] RequiredZoneName { get; set; } + System.Collections.Generic.List RequiredZoneName { get; set; } /// Type of the resource string Type { get; set; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateLinkResource.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateLinkResource.json.cs similarity index 92% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateLinkResource.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/PrivateLinkResource.json.cs index decda62c06df..391dcd7dd66c 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateLinkResource.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateLinkResource.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class PrivateLinkResource partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResource. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new PrivateLinkResource(json) : null; } @@ -77,10 +77,10 @@ internal PrivateLinkResource(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime { return; } - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.PrivateLinkResourceProperties.FromJson(__jsonProperties) : Property;} - {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.PrivateLinkResourceProperties.FromJson(__jsonProperties) : _property;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} AfterFromJson(json); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateLinkResourceProperties.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateLinkResourceProperties.PowerShell.cs similarity index 73% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateLinkResourceProperties.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/PrivateLinkResourceProperties.PowerShell.cs index 7ee010493461..baec4713a1b8 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateLinkResourceProperties.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateLinkResourceProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class PrivateLinkResourceProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new PrivateLinkResourceProperties(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new PrivateLinkResourceProperties(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,21 +111,21 @@ internal PrivateLinkResourceProperties(global::System.Collections.IDictionary co // actually deserialize if (content.Contains("GroupId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourcePropertiesInternal)this).GroupId = (string) content.GetValueForProperty("GroupId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourcePropertiesInternal)this).GroupId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourcePropertiesInternal)this).GroupId = (string) content.GetValueForProperty("GroupId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourcePropertiesInternal)this).GroupId, global::System.Convert.ToString); } if (content.Contains("RequiredMember")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourcePropertiesInternal)this).RequiredMember = (string[]) content.GetValueForProperty("RequiredMember",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourcePropertiesInternal)this).RequiredMember, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourcePropertiesInternal)this).RequiredMember = (System.Collections.Generic.List) content.GetValueForProperty("RequiredMember",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourcePropertiesInternal)this).RequiredMember, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } if (content.Contains("RequiredZoneName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourcePropertiesInternal)this).RequiredZoneName = (string[]) content.GetValueForProperty("RequiredZoneName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourcePropertiesInternal)this).RequiredZoneName, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourcePropertiesInternal)this).RequiredZoneName = (System.Collections.Generic.List) content.GetValueForProperty("RequiredZoneName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourcePropertiesInternal)this).RequiredZoneName, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -142,15 +140,15 @@ internal PrivateLinkResourceProperties(global::System.Management.Automation.PSOb // actually deserialize if (content.Contains("GroupId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourcePropertiesInternal)this).GroupId = (string) content.GetValueForProperty("GroupId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourcePropertiesInternal)this).GroupId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourcePropertiesInternal)this).GroupId = (string) content.GetValueForProperty("GroupId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourcePropertiesInternal)this).GroupId, global::System.Convert.ToString); } if (content.Contains("RequiredMember")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourcePropertiesInternal)this).RequiredMember = (string[]) content.GetValueForProperty("RequiredMember",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourcePropertiesInternal)this).RequiredMember, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourcePropertiesInternal)this).RequiredMember = (System.Collections.Generic.List) content.GetValueForProperty("RequiredMember",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourcePropertiesInternal)this).RequiredMember, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } if (content.Contains("RequiredZoneName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourcePropertiesInternal)this).RequiredZoneName = (string[]) content.GetValueForProperty("RequiredZoneName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourcePropertiesInternal)this).RequiredZoneName, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourcePropertiesInternal)this).RequiredZoneName = (System.Collections.Generic.List) content.GetValueForProperty("RequiredZoneName",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourcePropertiesInternal)this).RequiredZoneName, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } AfterDeserializePSObject(content); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateLinkResourceProperties.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateLinkResourceProperties.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateLinkResourceProperties.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/PrivateLinkResourceProperties.TypeConverter.cs index 07e128f212b3..8dc5054d2238 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateLinkResourceProperties.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateLinkResourceProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourceProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourceProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourceProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourceProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateLinkResourceProperties.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateLinkResourceProperties.cs similarity index 74% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateLinkResourceProperties.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/PrivateLinkResourceProperties.cs index c5c23e2d67a6..e786d490ba4e 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateLinkResourceProperties.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateLinkResourceProperties.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// Properties of PrivateLinkResource [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class PrivateLinkResourceProperties : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourceProperties, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourcePropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourceProperties, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourcePropertiesInternal { /// Backing field for property. @@ -22,18 +22,18 @@ public partial class PrivateLinkResourceProperties : public string GroupId { get => this._groupId; set => this._groupId = value; } /// Backing field for property. - private string[] _requiredMember; + private System.Collections.Generic.List _requiredMember; /// The private link resource required member names. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public string[] RequiredMember { get => this._requiredMember; set => this._requiredMember = value; } + public System.Collections.Generic.List RequiredMember { get => this._requiredMember; set => this._requiredMember = value; } /// Backing field for property. - private string[] _requiredZoneName; + private System.Collections.Generic.List _requiredZoneName; /// The private link resource Private link DNS zone name. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public string[] RequiredZoneName { get => this._requiredZoneName; set => this._requiredZoneName = value; } + public System.Collections.Generic.List RequiredZoneName { get => this._requiredZoneName; set => this._requiredZoneName = value; } /// Creates an new instance. public PrivateLinkResourceProperties() @@ -49,6 +49,9 @@ public partial interface IPrivateLinkResourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The private link resource group id.", SerializedName = @"groupId", PossibleTypes = new [] { typeof(string) })] @@ -57,18 +60,24 @@ public partial interface IPrivateLinkResourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The private link resource required member names.", SerializedName = @"requiredMembers", PossibleTypes = new [] { typeof(string) })] - string[] RequiredMember { get; set; } + System.Collections.Generic.List RequiredMember { get; set; } /// The private link resource Private link DNS zone name. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The private link resource Private link DNS zone name.", SerializedName = @"requiredZoneNames", PossibleTypes = new [] { typeof(string) })] - string[] RequiredZoneName { get; set; } + System.Collections.Generic.List RequiredZoneName { get; set; } } /// Properties of PrivateLinkResource @@ -78,9 +87,9 @@ internal partial interface IPrivateLinkResourcePropertiesInternal /// The private link resource group id. string GroupId { get; set; } /// The private link resource required member names. - string[] RequiredMember { get; set; } + System.Collections.Generic.List RequiredMember { get; set; } /// The private link resource Private link DNS zone name. - string[] RequiredZoneName { get; set; } + System.Collections.Generic.List RequiredZoneName { get; set; } } } \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateLinkResourceProperties.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateLinkResourceProperties.json.cs similarity index 88% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateLinkResourceProperties.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/PrivateLinkResourceProperties.json.cs index 5e2911cce234..74a7b1c49893 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateLinkResourceProperties.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateLinkResourceProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class PrivateLinkResourceProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourceProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourceProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourceProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourceProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new PrivateLinkResourceProperties(json) : null; } @@ -77,9 +77,9 @@ internal PrivateLinkResourceProperties(Microsoft.Azure.PowerShell.Cmdlets.EventH { return; } - {_groupId = If( json?.PropertyT("groupId"), out var __jsonGroupId) ? (string)__jsonGroupId : (string)GroupId;} - {_requiredMember = If( json?.PropertyT("requiredMembers"), out var __jsonRequiredMembers) ? If( __jsonRequiredMembers as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : RequiredMember;} - {_requiredZoneName = If( json?.PropertyT("requiredZoneNames"), out var __jsonRequiredZoneNames) ? If( __jsonRequiredZoneNames as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(string) (__p is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString __o ? (string)(__o.ToString()) : null)) ))() : null : RequiredZoneName;} + {_groupId = If( json?.PropertyT("groupId"), out var __jsonGroupId) ? (string)__jsonGroupId : (string)_groupId;} + {_requiredMember = If( json?.PropertyT("requiredMembers"), out var __jsonRequiredMembers) ? If( __jsonRequiredMembers as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : _requiredMember;} + {_requiredZoneName = If( json?.PropertyT("requiredZoneNames"), out var __jsonRequiredZoneNames) ? If( __jsonRequiredZoneNames as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __q) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__q, (__p)=>(string) (__p is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString __o ? (string)(__o.ToString()) : null)) ))() : null : _requiredZoneName;} AfterFromJson(json); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateLinkResourcesListResult.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateLinkResourcesListResult.PowerShell.cs similarity index 74% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateLinkResourcesListResult.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/PrivateLinkResourcesListResult.PowerShell.cs index 9d0f2ea4f874..e305d327f189 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateLinkResourcesListResult.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateLinkResourcesListResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class PrivateLinkResourcesListResult partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourcesListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourcesListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new PrivateLinkResourcesListResult(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourcesListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourcesListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new PrivateLinkResourcesListResult(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourcesListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourcesListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,17 +111,17 @@ internal PrivateLinkResourcesListResult(global::System.Collections.IDictionary c // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourcesListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResource[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourcesListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.PrivateLinkResourceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourcesListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourcesListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.PrivateLinkResourceTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourcesListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourcesListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourcesListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourcesListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -138,11 +136,11 @@ internal PrivateLinkResourcesListResult(global::System.Management.Automation.PSO // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourcesListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResource[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourcesListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.PrivateLinkResourceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourcesListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourcesListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.PrivateLinkResourceTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourcesListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourcesListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourcesListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourcesListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateLinkResourcesListResult.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateLinkResourcesListResult.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateLinkResourcesListResult.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/PrivateLinkResourcesListResult.TypeConverter.cs index 7a1b992e19d9..283f81b5153b 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateLinkResourcesListResult.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateLinkResourcesListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourcesListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourcesListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourcesListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourcesListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateLinkResourcesListResult.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateLinkResourcesListResult.cs similarity index 73% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateLinkResourcesListResult.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/PrivateLinkResourcesListResult.cs index 399f22dd222c..252751600ccf 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateLinkResourcesListResult.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateLinkResourcesListResult.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// Result of the List private link resources operation. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class PrivateLinkResourcesListResult : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourcesListResult, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourcesListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourcesListResult, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourcesListResultInternal { /// Backing field for property. @@ -22,11 +22,11 @@ public partial class PrivateLinkResourcesListResult : public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResource[] _value; + private System.Collections.Generic.List _value; /// A collection of private link resources [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResource[] Value { get => this._value; set => this._value = value; } + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } /// Creates an new instance. public PrivateLinkResourcesListResult() @@ -42,6 +42,9 @@ public partial interface IPrivateLinkResourcesListResult : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"A link for the next page of private link resources.", SerializedName = @"nextLink", PossibleTypes = new [] { typeof(string) })] @@ -50,10 +53,13 @@ public partial interface IPrivateLinkResourcesListResult : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"A collection of private link resources", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResource) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResource[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResource) })] + System.Collections.Generic.List Value { get; set; } } /// Result of the List private link resources operation. @@ -63,7 +69,7 @@ internal partial interface IPrivateLinkResourcesListResultInternal /// A link for the next page of private link resources. string NextLink { get; set; } /// A collection of private link resources - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResource[] Value { get; set; } + System.Collections.Generic.List Value { get; set; } } } \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateLinkResourcesListResult.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateLinkResourcesListResult.json.cs similarity index 89% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateLinkResourcesListResult.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/PrivateLinkResourcesListResult.json.cs index 8580bc5239a9..536bbc23bf22 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/PrivateLinkResourcesListResult.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/PrivateLinkResourcesListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class PrivateLinkResourcesListResult partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourcesListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourcesListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourcesListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourcesListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourcesListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourcesListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new PrivateLinkResourcesListResult(json) : null; } @@ -77,8 +77,8 @@ internal PrivateLinkResourcesListResult(Microsoft.Azure.PowerShell.Cmdlets.Event { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResource) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.PrivateLinkResource.FromJson(__u) )) ))() : null : Value;} - {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResource) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.PrivateLinkResource.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} AfterFromJson(json); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ProvisioningIssue.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ProvisioningIssue.PowerShell.cs similarity index 72% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ProvisioningIssue.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ProvisioningIssue.PowerShell.cs index f7b9369c23f0..776b0dfe295d 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ProvisioningIssue.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ProvisioningIssue.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class ProvisioningIssue partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssue DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssue DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ProvisioningIssue(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssue DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssue DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ProvisioningIssue(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssue FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssue FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -111,25 +111,25 @@ internal ProvisioningIssue(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssueInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssueProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssueInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ProvisioningIssuePropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssueInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssueProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssueInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ProvisioningIssuePropertiesTypeConverter.ConvertFrom); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssueInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssueInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssueInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssueInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("IssueType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssueInternal)this).IssueType = (string) content.GetValueForProperty("IssueType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssueInternal)this).IssueType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssueInternal)this).IssueType = (string) content.GetValueForProperty("IssueType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssueInternal)this).IssueType, global::System.Convert.ToString); } if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssueInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssueInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssueInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssueInternal)this).Description, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -144,19 +144,19 @@ internal ProvisioningIssue(global::System.Management.Automation.PSObject content // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssueInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssueProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssueInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ProvisioningIssuePropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssueInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssueProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssueInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ProvisioningIssuePropertiesTypeConverter.ConvertFrom); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssueInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssueInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssueInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssueInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("IssueType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssueInternal)this).IssueType = (string) content.GetValueForProperty("IssueType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssueInternal)this).IssueType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssueInternal)this).IssueType = (string) content.GetValueForProperty("IssueType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssueInternal)this).IssueType, global::System.Convert.ToString); } if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssueInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssueInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssueInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssueInternal)this).Description, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ProvisioningIssue.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ProvisioningIssue.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ProvisioningIssue.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ProvisioningIssue.TypeConverter.cs index 6558e45ef428..2c81c7676569 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ProvisioningIssue.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ProvisioningIssue.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssue ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssue ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssue).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssue).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ProvisioningIssue.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ProvisioningIssue.cs similarity index 68% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ProvisioningIssue.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ProvisioningIssue.cs index c2c4bce2841d..39a2fa6cb92b 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ProvisioningIssue.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ProvisioningIssue.cs @@ -3,27 +3,27 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// Describes Provisioning issue for given NetworkSecurityPerimeterConfiguration [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class ProvisioningIssue : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssue, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssueInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssue, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssueInternal { /// Description of the issue [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssuePropertiesInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssuePropertiesInternal)Property).Description = value ?? null; } + public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssuePropertiesInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssuePropertiesInternal)Property).Description = value ?? null; } /// Type of Issue [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string IssueType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssuePropertiesInternal)Property).IssueType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssuePropertiesInternal)Property).IssueType = value ?? null; } + public string IssueType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssuePropertiesInternal)Property).IssueType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssuePropertiesInternal)Property).IssueType = value ?? null; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssueProperties Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssueInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ProvisioningIssueProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssueProperties Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssueInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ProvisioningIssueProperties()); set { {_property = value;} } } /// Backing field for property. private string _name; @@ -33,11 +33,11 @@ public partial class ProvisioningIssue : public string Name { get => this._name; set => this._name = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssueProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssueProperties _property; /// Properties of Provisioning Issue [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssueProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ProvisioningIssueProperties()); } + internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssueProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ProvisioningIssueProperties()); } /// Creates an new instance. public ProvisioningIssue() @@ -52,23 +52,32 @@ public partial interface IProvisioningIssue : /// Description of the issue [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Description of the issue", SerializedName = @"description", PossibleTypes = new [] { typeof(string) })] - string Description { get; set; } + string Description { get; } /// Type of Issue [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Type of Issue", SerializedName = @"issueType", PossibleTypes = new [] { typeof(string) })] - string IssueType { get; set; } + string IssueType { get; } /// Name of the issue [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Name of the issue", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] @@ -86,7 +95,7 @@ internal partial interface IProvisioningIssueInternal /// Name of the issue string Name { get; set; } /// Properties of Provisioning Issue - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssueProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssueProperties Property { get; set; } } } \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ProvisioningIssue.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ProvisioningIssue.json.cs similarity index 92% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ProvisioningIssue.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ProvisioningIssue.json.cs index e77359776f92..10f3458c59b3 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ProvisioningIssue.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ProvisioningIssue.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ProvisioningIssue partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssue. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssue. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssue. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssue. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssue FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssue FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new ProvisioningIssue(json) : null; } @@ -77,8 +77,8 @@ internal ProvisioningIssue(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.J { return; } - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ProvisioningIssueProperties.FromJson(__jsonProperties) : Property;} - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ProvisioningIssueProperties.FromJson(__jsonProperties) : _property;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} AfterFromJson(json); } @@ -101,7 +101,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode ToJson( { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ProvisioningIssueProperties.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ProvisioningIssueProperties.PowerShell.cs similarity index 78% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ProvisioningIssueProperties.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ProvisioningIssueProperties.PowerShell.cs index c1b864e1ec75..ba37ece544ab 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ProvisioningIssueProperties.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ProvisioningIssueProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class ProvisioningIssueProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssueProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssueProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ProvisioningIssueProperties(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssueProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssueProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ProvisioningIssueProperties(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssueProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssueProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,17 +111,17 @@ internal ProvisioningIssueProperties(global::System.Collections.IDictionary cont // actually deserialize if (content.Contains("IssueType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssuePropertiesInternal)this).IssueType = (string) content.GetValueForProperty("IssueType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssuePropertiesInternal)this).IssueType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssuePropertiesInternal)this).IssueType = (string) content.GetValueForProperty("IssueType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssuePropertiesInternal)this).IssueType, global::System.Convert.ToString); } if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssuePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssuePropertiesInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssuePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssuePropertiesInternal)this).Description, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -138,11 +136,11 @@ internal ProvisioningIssueProperties(global::System.Management.Automation.PSObje // actually deserialize if (content.Contains("IssueType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssuePropertiesInternal)this).IssueType = (string) content.GetValueForProperty("IssueType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssuePropertiesInternal)this).IssueType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssuePropertiesInternal)this).IssueType = (string) content.GetValueForProperty("IssueType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssuePropertiesInternal)this).IssueType, global::System.Convert.ToString); } if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssuePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssuePropertiesInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssuePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssuePropertiesInternal)this).Description, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ProvisioningIssueProperties.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ProvisioningIssueProperties.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ProvisioningIssueProperties.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ProvisioningIssueProperties.TypeConverter.cs index 9dc5db81fd23..d64b87f741c3 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ProvisioningIssueProperties.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ProvisioningIssueProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssueProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssueProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssueProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssueProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ProvisioningIssueProperties.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ProvisioningIssueProperties.cs similarity index 87% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ProvisioningIssueProperties.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ProvisioningIssueProperties.cs index 17c3d2ebe097..3149ff04b43e 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ProvisioningIssueProperties.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ProvisioningIssueProperties.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// Properties of Provisioning Issue [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class ProvisioningIssueProperties : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssueProperties, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssuePropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssueProperties, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssuePropertiesInternal { /// Backing field for property. @@ -42,6 +42,9 @@ public partial interface IProvisioningIssueProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Description of the issue", SerializedName = @"description", PossibleTypes = new [] { typeof(string) })] @@ -50,6 +53,9 @@ public partial interface IProvisioningIssueProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Type of Issue", SerializedName = @"issueType", PossibleTypes = new [] { typeof(string) })] diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ProvisioningIssueProperties.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ProvisioningIssueProperties.json.cs similarity index 93% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ProvisioningIssueProperties.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ProvisioningIssueProperties.json.cs index e096dfe7146d..792e1b45d2d1 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ProvisioningIssueProperties.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ProvisioningIssueProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ProvisioningIssueProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssueProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssueProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssueProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssueProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IProvisioningIssueProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProvisioningIssueProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new ProvisioningIssueProperties(json) : null; } @@ -77,8 +77,8 @@ internal ProvisioningIssueProperties(Microsoft.Azure.PowerShell.Cmdlets.EventHub { return; } - {_issueType = If( json?.PropertyT("issueType"), out var __jsonIssueType) ? (string)__jsonIssueType : (string)IssueType;} - {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} + {_issueType = If( json?.PropertyT("issueType"), out var __jsonIssueType) ? (string)__jsonIssueType : (string)_issueType;} + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)_description;} AfterFromJson(json); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ProxyResource.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ProxyResource.PowerShell.cs similarity index 77% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ProxyResource.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ProxyResource.PowerShell.cs index cccda2a6fa23..9fd49c39fdb6 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ProxyResource.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ProxyResource.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -65,27 +65,27 @@ public partial class ProxyResource partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResource DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ProxyResource(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ProxyResource(content); } @@ -95,10 +95,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyRes /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,25 +113,25 @@ internal ProxyResource(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Location, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -146,19 +146,19 @@ internal ProxyResource(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Location, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ProxyResource.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ProxyResource.TypeConverter.cs similarity index 97% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ProxyResource.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ProxyResource.TypeConverter.cs index 9d78c84375e0..4902728f651c 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ProxyResource.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ProxyResource.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ProxyResource.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ProxyResource.cs similarity index 88% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ProxyResource.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ProxyResource.cs index 0ced110bc0ed..8cae9cb0f249 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ProxyResource.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ProxyResource.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -12,8 +12,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20 /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class ProxyResource : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResource, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResource, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal { /// Backing field for property. @@ -33,16 +33,16 @@ public partial class ProxyResource : public string Location { get => this._location; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal.Id { get => this._id; set { {_id = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal.Id { get => this._id; set { {_id = value;} } } /// Internal Acessors for Location - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal.Location { get => this._location; set { {_location = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal.Location { get => this._location; set { {_location = value;} } } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal.Name { get => this._name; set { {_name = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal.Name { get => this._name; set { {_name = value;} } } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal.Type { get => this._type; set { {_type = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal.Type { get => this._type; set { {_type = value;} } } /// Backing field for property. private string _name; @@ -76,6 +76,9 @@ public partial interface IProxyResource : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}", SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] @@ -84,6 +87,9 @@ public partial interface IProxyResource : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The geo-location where the resource lives", SerializedName = @"location", PossibleTypes = new [] { typeof(string) })] @@ -92,6 +98,9 @@ public partial interface IProxyResource : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The name of the resource", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] @@ -102,6 +111,9 @@ public partial interface IProxyResource : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of the resource. E.g. ""Microsoft.EventHub/Namespaces"" or ""Microsoft.EventHub/Namespaces/EventHubs""", SerializedName = @"type", PossibleTypes = new [] { typeof(string) })] diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ProxyResource.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ProxyResource.json.cs similarity index 91% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ProxyResource.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ProxyResource.json.cs index dc3f5ac5af6b..604461f299e6 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api20/ProxyResource.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ProxyResource.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -56,13 +56,13 @@ public partial class ProxyResource partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResource. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new ProxyResource(json) : null; } @@ -79,10 +79,10 @@ internal ProxyResource(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json. { return; } - {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} - {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)Location;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} + {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)_location;} AfterFromJson(json); } @@ -105,19 +105,19 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode ToJson( { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._location)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._location.ToString()) : null, "location" ,container.Add ); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/RegenerateAccessKeyParameters.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/RegenerateAccessKeyParameters.PowerShell.cs similarity index 78% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/RegenerateAccessKeyParameters.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/RegenerateAccessKeyParameters.PowerShell.cs index c5d81d5198dd..be9607a95af3 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/RegenerateAccessKeyParameters.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/RegenerateAccessKeyParameters.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -65,29 +65,27 @@ public partial class RegenerateAccessKeyParameters partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRegenerateAccessKeyParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRegenerateAccessKeyParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new RegenerateAccessKeyParameters(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRegenerateAccessKeyParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRegenerateAccessKeyParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new RegenerateAccessKeyParameters(content); } @@ -97,10 +95,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRegenerateAccessKeyParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRegenerateAccessKeyParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -115,17 +113,17 @@ internal RegenerateAccessKeyParameters(global::System.Collections.IDictionary co // actually deserialize if (content.Contains("KeyType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRegenerateAccessKeyParametersInternal)this).KeyType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeyType) content.GetValueForProperty("KeyType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRegenerateAccessKeyParametersInternal)this).KeyType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeyType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRegenerateAccessKeyParametersInternal)this).KeyType = (string) content.GetValueForProperty("KeyType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRegenerateAccessKeyParametersInternal)this).KeyType, global::System.Convert.ToString); } if (content.Contains("Key")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRegenerateAccessKeyParametersInternal)this).Key = (string) content.GetValueForProperty("Key",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRegenerateAccessKeyParametersInternal)this).Key, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRegenerateAccessKeyParametersInternal)this).Key = (string) content.GetValueForProperty("Key",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRegenerateAccessKeyParametersInternal)this).Key, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -140,11 +138,11 @@ internal RegenerateAccessKeyParameters(global::System.Management.Automation.PSOb // actually deserialize if (content.Contains("KeyType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRegenerateAccessKeyParametersInternal)this).KeyType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeyType) content.GetValueForProperty("KeyType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRegenerateAccessKeyParametersInternal)this).KeyType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeyType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRegenerateAccessKeyParametersInternal)this).KeyType = (string) content.GetValueForProperty("KeyType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRegenerateAccessKeyParametersInternal)this).KeyType, global::System.Convert.ToString); } if (content.Contains("Key")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRegenerateAccessKeyParametersInternal)this).Key = (string) content.GetValueForProperty("Key",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRegenerateAccessKeyParametersInternal)this).Key, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRegenerateAccessKeyParametersInternal)this).Key = (string) content.GetValueForProperty("Key",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRegenerateAccessKeyParametersInternal)this).Key, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/RegenerateAccessKeyParameters.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/RegenerateAccessKeyParameters.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/RegenerateAccessKeyParameters.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/RegenerateAccessKeyParameters.TypeConverter.cs index bbe7f2020c7f..5e6be10dda8c 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/RegenerateAccessKeyParameters.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/RegenerateAccessKeyParameters.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRegenerateAccessKeyParameters ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRegenerateAccessKeyParameters ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRegenerateAccessKeyParameters).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRegenerateAccessKeyParameters).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/RegenerateAccessKeyParameters.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/RegenerateAccessKeyParameters.cs similarity index 77% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/RegenerateAccessKeyParameters.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/RegenerateAccessKeyParameters.cs index 55aeeccb5629..8cda2505fd7a 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/RegenerateAccessKeyParameters.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/RegenerateAccessKeyParameters.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -12,8 +12,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class RegenerateAccessKeyParameters : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRegenerateAccessKeyParameters, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRegenerateAccessKeyParametersInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRegenerateAccessKeyParameters, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRegenerateAccessKeyParametersInternal { /// Backing field for property. @@ -26,11 +26,11 @@ public partial class RegenerateAccessKeyParameters : public string Key { get => this._key; set => this._key = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeyType _keyType; + private string _keyType; /// The access key to regenerate. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeyType KeyType { get => this._keyType; set => this._keyType = value; } + public string KeyType { get => this._keyType; set => this._keyType = value; } /// Creates an new instance. public RegenerateAccessKeyParameters() @@ -48,6 +48,9 @@ public partial interface IRegenerateAccessKeyParameters : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Optional, if the key value provided, is set for KeyType or autogenerated Key value set for keyType", SerializedName = @"key", PossibleTypes = new [] { typeof(string) })] @@ -56,10 +59,14 @@ public partial interface IRegenerateAccessKeyParameters : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = true, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The access key to regenerate.", SerializedName = @"keyType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeyType) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeyType KeyType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("PrimaryKey", "SecondaryKey")] + string KeyType { get; set; } } /// Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset. @@ -71,7 +78,8 @@ internal partial interface IRegenerateAccessKeyParametersInternal /// string Key { get; set; } /// The access key to regenerate. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeyType KeyType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("PrimaryKey", "SecondaryKey")] + string KeyType { get; set; } } } \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/RegenerateAccessKeyParameters.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/RegenerateAccessKeyParameters.json.cs similarity index 93% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/RegenerateAccessKeyParameters.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/RegenerateAccessKeyParameters.json.cs index b74949f9f2e8..a7df048a1cd6 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/RegenerateAccessKeyParameters.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/RegenerateAccessKeyParameters.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -56,13 +56,13 @@ public partial class RegenerateAccessKeyParameters partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRegenerateAccessKeyParameters. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRegenerateAccessKeyParameters. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRegenerateAccessKeyParameters. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRegenerateAccessKeyParameters. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRegenerateAccessKeyParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRegenerateAccessKeyParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new RegenerateAccessKeyParameters(json) : null; } @@ -79,8 +79,8 @@ internal RegenerateAccessKeyParameters(Microsoft.Azure.PowerShell.Cmdlets.EventH { return; } - {_keyType = If( json?.PropertyT("keyType"), out var __jsonKeyType) ? (string)__jsonKeyType : (string)KeyType;} - {_key = If( json?.PropertyT("key"), out var __jsonKey) ? (string)__jsonKey : (string)Key;} + {_keyType = If( json?.PropertyT("keyType"), out var __jsonKeyType) ? (string)__jsonKeyType : (string)_keyType;} + {_key = If( json?.PropertyT("key"), out var __jsonKey) ? (string)__jsonKey : (string)_key;} AfterFromJson(json); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api10/Resource.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/Resource.PowerShell.cs similarity index 80% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api10/Resource.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/Resource.PowerShell.cs index 00a4c835ac4c..52617e86123f 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api10/Resource.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/Resource.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -65,27 +65,27 @@ public partial class Resource partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResource DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new Resource(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new Resource(content); } @@ -95,10 +95,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResource /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,21 +113,21 @@ internal Resource(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)this).Type, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -142,15 +142,15 @@ internal Resource(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)this).Type, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api10/Resource.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/Resource.TypeConverter.cs similarity index 97% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api10/Resource.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/Resource.TypeConverter.cs index b3ee6aea17d3..9602f6185de8 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api10/Resource.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/Resource.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api10/Resource.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/Resource.cs similarity index 88% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api10/Resource.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/Resource.cs index ec29c0a5101e..b8f5059e0c01 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api10/Resource.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/Resource.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -12,8 +12,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10 /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class Resource : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResource, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResource, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal { /// Backing field for property. @@ -26,13 +26,13 @@ public partial class Resource : public string Id { get => this._id; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal.Id { get => this._id; set { {_id = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal.Id { get => this._id; set { {_id = value;} } } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal.Name { get => this._name; set { {_name = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal.Name { get => this._name; set { {_name = value;} } } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal.Type { get => this._type; set { {_type = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal.Type { get => this._type; set { {_type = value;} } } /// Backing field for property. private string _name; @@ -66,6 +66,9 @@ public partial interface IResource : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}", SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] @@ -74,6 +77,9 @@ public partial interface IResource : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The name of the resource", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] @@ -84,6 +90,9 @@ public partial interface IResource : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of the resource. E.g. ""Microsoft.Compute/virtualMachines"" or ""Microsoft.Storage/storageAccounts""", SerializedName = @"type", PossibleTypes = new [] { typeof(string) })] diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api10/Resource.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/Resource.json.cs similarity index 91% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api10/Resource.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/Resource.json.cs index d477d0bfd010..2e54eb88b9af 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api10/Resource.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/Resource.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -56,13 +56,11 @@ public partial class Resource partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResource. /// /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResource. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResource. + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new Resource(json) : null; } @@ -79,9 +77,9 @@ internal Resource(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonO { return; } - {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} AfterFromJson(json); } @@ -104,15 +102,15 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode ToJson( { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/RetentionDescription.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/RetentionDescription.PowerShell.cs similarity index 72% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/RetentionDescription.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/RetentionDescription.PowerShell.cs index 5c0b70dab326..61ae5f09700d 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/RetentionDescription.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/RetentionDescription.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class RetentionDescription partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRetentionDescription DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRetentionDescription DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new RetentionDescription(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRetentionDescription DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRetentionDescription DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new RetentionDescription(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRetentionDescription FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRetentionDescription FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -111,21 +111,21 @@ internal RetentionDescription(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("CleanupPolicy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRetentionDescriptionInternal)this).CleanupPolicy = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CleanupPolicyRetentionDescription?) content.GetValueForProperty("CleanupPolicy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRetentionDescriptionInternal)this).CleanupPolicy, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CleanupPolicyRetentionDescription.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRetentionDescriptionInternal)this).CleanupPolicy = (string) content.GetValueForProperty("CleanupPolicy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRetentionDescriptionInternal)this).CleanupPolicy, global::System.Convert.ToString); } if (content.Contains("RetentionTimeInHour")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRetentionDescriptionInternal)this).RetentionTimeInHour = (long?) content.GetValueForProperty("RetentionTimeInHour",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRetentionDescriptionInternal)this).RetentionTimeInHour, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRetentionDescriptionInternal)this).RetentionTimeInHour = (long?) content.GetValueForProperty("RetentionTimeInHour",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRetentionDescriptionInternal)this).RetentionTimeInHour, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("TombstoneRetentionTimeInHour")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRetentionDescriptionInternal)this).TombstoneRetentionTimeInHour = (int?) content.GetValueForProperty("TombstoneRetentionTimeInHour",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRetentionDescriptionInternal)this).TombstoneRetentionTimeInHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRetentionDescriptionInternal)this).TombstoneRetentionTimeInHour = (int?) content.GetValueForProperty("TombstoneRetentionTimeInHour",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRetentionDescriptionInternal)this).TombstoneRetentionTimeInHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -140,15 +140,15 @@ internal RetentionDescription(global::System.Management.Automation.PSObject cont // actually deserialize if (content.Contains("CleanupPolicy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRetentionDescriptionInternal)this).CleanupPolicy = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CleanupPolicyRetentionDescription?) content.GetValueForProperty("CleanupPolicy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRetentionDescriptionInternal)this).CleanupPolicy, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CleanupPolicyRetentionDescription.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRetentionDescriptionInternal)this).CleanupPolicy = (string) content.GetValueForProperty("CleanupPolicy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRetentionDescriptionInternal)this).CleanupPolicy, global::System.Convert.ToString); } if (content.Contains("RetentionTimeInHour")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRetentionDescriptionInternal)this).RetentionTimeInHour = (long?) content.GetValueForProperty("RetentionTimeInHour",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRetentionDescriptionInternal)this).RetentionTimeInHour, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRetentionDescriptionInternal)this).RetentionTimeInHour = (long?) content.GetValueForProperty("RetentionTimeInHour",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRetentionDescriptionInternal)this).RetentionTimeInHour, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("TombstoneRetentionTimeInHour")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRetentionDescriptionInternal)this).TombstoneRetentionTimeInHour = (int?) content.GetValueForProperty("TombstoneRetentionTimeInHour",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRetentionDescriptionInternal)this).TombstoneRetentionTimeInHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRetentionDescriptionInternal)this).TombstoneRetentionTimeInHour = (int?) content.GetValueForProperty("TombstoneRetentionTimeInHour",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRetentionDescriptionInternal)this).TombstoneRetentionTimeInHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } AfterDeserializePSObject(content); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/RetentionDescription.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/RetentionDescription.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/RetentionDescription.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/RetentionDescription.TypeConverter.cs index 27fbbc472db5..88e0e1c5004a 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/RetentionDescription.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/RetentionDescription.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRetentionDescription ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRetentionDescription ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRetentionDescription).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRetentionDescription).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/RetentionDescription.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/RetentionDescription.cs similarity index 86% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/RetentionDescription.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/RetentionDescription.cs index 03cad8cdaf54..b937652df039 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/RetentionDescription.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/RetentionDescription.cs @@ -3,23 +3,23 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// Properties to configure retention settings for the eventhub [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class RetentionDescription : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRetentionDescription, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRetentionDescriptionInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRetentionDescription, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRetentionDescriptionInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CleanupPolicyRetentionDescription? _cleanupPolicy; + private string _cleanupPolicy; /// Enumerates the possible values for cleanup policy [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CleanupPolicyRetentionDescription? CleanupPolicy { get => this._cleanupPolicy; set => this._cleanupPolicy = value; } + public string CleanupPolicy { get => this._cleanupPolicy; set => this._cleanupPolicy = value; } /// Backing field for property. private long? _retentionTimeInHour; @@ -57,10 +57,14 @@ public partial interface IRetentionDescription : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Enumerates the possible values for cleanup policy", SerializedName = @"cleanupPolicy", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CleanupPolicyRetentionDescription) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CleanupPolicyRetentionDescription? CleanupPolicy { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Delete", "Compact")] + string CleanupPolicy { get; set; } /// /// Number of hours to retain the events for this Event Hub. This value is only used when cleanupPolicy is Delete. If cleanupPolicy /// is Compact the returned value of this property is Long.MaxValue @@ -68,6 +72,9 @@ public partial interface IRetentionDescription : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Number of hours to retain the events for this Event Hub. This value is only used when cleanupPolicy is Delete. If cleanupPolicy is Compact the returned value of this property is Long.MaxValue ", SerializedName = @"retentionTimeInHours", PossibleTypes = new [] { typeof(long) })] @@ -81,6 +88,9 @@ public partial interface IRetentionDescription : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Number of hours to retain the tombstone markers of a compacted Event Hub. This value is only used when cleanupPolicy is Compact. Consumer must complete reading the tombstone marker within this specified amount of time if consumer begins from starting offset to ensure they get a valid snapshot for the specific key described by the tombstone marker within the compacted Event Hub", SerializedName = @"tombstoneRetentionTimeInHours", PossibleTypes = new [] { typeof(int) })] @@ -92,7 +102,8 @@ internal partial interface IRetentionDescriptionInternal { /// Enumerates the possible values for cleanup policy - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CleanupPolicyRetentionDescription? CleanupPolicy { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Delete", "Compact")] + string CleanupPolicy { get; set; } /// /// Number of hours to retain the events for this Event Hub. This value is only used when cleanupPolicy is Delete. If cleanupPolicy /// is Compact the returned value of this property is Long.MaxValue diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/RetentionDescription.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/RetentionDescription.json.cs similarity index 94% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/RetentionDescription.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/RetentionDescription.json.cs index 5cf2ae2f04a7..0940613dcd69 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/RetentionDescription.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/RetentionDescription.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class RetentionDescription partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRetentionDescription. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRetentionDescription. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRetentionDescription. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRetentionDescription. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRetentionDescription FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRetentionDescription FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new RetentionDescription(json) : null; } @@ -77,9 +77,9 @@ internal RetentionDescription(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtim { return; } - {_cleanupPolicy = If( json?.PropertyT("cleanupPolicy"), out var __jsonCleanupPolicy) ? (string)__jsonCleanupPolicy : (string)CleanupPolicy;} - {_retentionTimeInHour = If( json?.PropertyT("retentionTimeInHours"), out var __jsonRetentionTimeInHours) ? (long?)__jsonRetentionTimeInHours : RetentionTimeInHour;} - {_tombstoneRetentionTimeInHour = If( json?.PropertyT("tombstoneRetentionTimeInHours"), out var __jsonTombstoneRetentionTimeInHours) ? (int?)__jsonTombstoneRetentionTimeInHours : TombstoneRetentionTimeInHour;} + {_cleanupPolicy = If( json?.PropertyT("cleanupPolicy"), out var __jsonCleanupPolicy) ? (string)__jsonCleanupPolicy : (string)_cleanupPolicy;} + {_retentionTimeInHour = If( json?.PropertyT("retentionTimeInHours"), out var __jsonRetentionTimeInHours) ? (long?)__jsonRetentionTimeInHours : _retentionTimeInHour;} + {_tombstoneRetentionTimeInHour = If( json?.PropertyT("tombstoneRetentionTimeInHours"), out var __jsonTombstoneRetentionTimeInHours) ? (int?)__jsonTombstoneRetentionTimeInHours : _tombstoneRetentionTimeInHour;} AfterFromJson(json); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/SchemaGroup.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/SchemaGroup.PowerShell.cs new file mode 100644 index 000000000000..3acbba165b57 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/SchemaGroup.PowerShell.cs @@ -0,0 +1,300 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + + /// Single item in List or Get Schema Group operation + [System.ComponentModel.TypeConverter(typeof(SchemaGroupTypeConverter))] + public partial class SchemaGroup + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SchemaGroup(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SchemaGroup(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SchemaGroup(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SchemaGroupProperties1TypeConverter.ConvertFrom); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("SchemaCompatibility")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).SchemaCompatibility = (string) content.GetValueForProperty("SchemaCompatibility",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).SchemaCompatibility, global::System.Convert.ToString); + } + if (content.Contains("SchemaType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).SchemaType = (string) content.GetValueForProperty("SchemaType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).SchemaType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("UpdatedAtUtc")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).UpdatedAtUtc = (global::System.DateTime?) content.GetValueForProperty("UpdatedAtUtc",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).UpdatedAtUtc, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("CreatedAtUtc")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).CreatedAtUtc = (global::System.DateTime?) content.GetValueForProperty("CreatedAtUtc",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).CreatedAtUtc, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ETag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).ETag = (string) content.GetValueForProperty("ETag",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).ETag, global::System.Convert.ToString); + } + if (content.Contains("GroupProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).GroupProperty = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties) content.GetValueForProperty("GroupProperty",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).GroupProperty, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SchemaGroupPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SchemaGroup(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SchemaGroupProperties1TypeConverter.ConvertFrom); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("SchemaCompatibility")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).SchemaCompatibility = (string) content.GetValueForProperty("SchemaCompatibility",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).SchemaCompatibility, global::System.Convert.ToString); + } + if (content.Contains("SchemaType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).SchemaType = (string) content.GetValueForProperty("SchemaType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).SchemaType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("UpdatedAtUtc")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).UpdatedAtUtc = (global::System.DateTime?) content.GetValueForProperty("UpdatedAtUtc",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).UpdatedAtUtc, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("CreatedAtUtc")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).CreatedAtUtc = (global::System.DateTime?) content.GetValueForProperty("CreatedAtUtc",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).CreatedAtUtc, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ETag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).ETag = (string) content.GetValueForProperty("ETag",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).ETag, global::System.Convert.ToString); + } + if (content.Contains("GroupProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).GroupProperty = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties) content.GetValueForProperty("GroupProperty",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).GroupProperty, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SchemaGroupPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Single item in List or Get Schema Group operation + [System.ComponentModel.TypeConverter(typeof(SchemaGroupTypeConverter))] + public partial interface ISchemaGroup + + { + + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/SchemaGroup.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/SchemaGroup.TypeConverter.cs similarity index 97% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/SchemaGroup.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/SchemaGroup.TypeConverter.cs index 46a4f714df4f..567745920459 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/SchemaGroup.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/SchemaGroup.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/SchemaGroup.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/SchemaGroup.cs similarity index 58% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/SchemaGroup.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/SchemaGroup.cs index 206187f4e97c..44b9b689e3f4 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/SchemaGroup.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/SchemaGroup.cs @@ -3,132 +3,131 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// Single item in List or Get Schema Group operation [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class SchemaGroup : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IValidates { /// - /// Backing field for Inherited model + /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ProxyResource(); + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ProxyResource(); /// Exact time the Schema Group was created. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public global::System.DateTime? CreatedAtUtc { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1Internal)Property).CreatedAtUtc; } + public global::System.DateTime? CreatedAtUtc { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1Internal)Property).CreatedAtUtc; } /// The ETag value. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string ETag { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1Internal)Property).ETag; } + public string ETag { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1Internal)Property).ETag; } /// dictionary object for SchemaGroup group properties [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties GroupProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1Internal)Property).GroupProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1Internal)Property).GroupProperty = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties GroupProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1Internal)Property).GroupProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1Internal)Property).GroupProperty = value ?? null /* model class */; } /// /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Id; } /// The geo-location where the resource lives [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Location; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Location; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Id = value; } /// Internal Acessors for Location - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal.Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Location = value; } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal.Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Location = value; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Name = value; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Type = value; } /// Internal Acessors for CreatedAtUtc - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal.CreatedAtUtc { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1Internal)Property).CreatedAtUtc; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1Internal)Property).CreatedAtUtc = value; } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal.CreatedAtUtc { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1Internal)Property).CreatedAtUtc; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1Internal)Property).CreatedAtUtc = value; } /// Internal Acessors for ETag - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal.ETag { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1Internal)Property).ETag; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1Internal)Property).ETag = value; } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal.ETag { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1Internal)Property).ETag; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1Internal)Property).ETag = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1 Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.SchemaGroupProperties1()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1 Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SchemaGroupProperties1()); set { {_property = value;} } } /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.SystemData()); set { {_systemData = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SystemData()); set { {_systemData = value;} } } /// Internal Acessors for UpdatedAtUtc - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupInternal.UpdatedAtUtc { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1Internal)Property).UpdatedAtUtc; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1Internal)Property).UpdatedAtUtc = value; } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupInternal.UpdatedAtUtc { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1Internal)Property).UpdatedAtUtc; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1Internal)Property).UpdatedAtUtc = value; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Name; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1 _property; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1 _property; [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1 Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.SchemaGroupProperties1()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1 Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SchemaGroupProperties1()); set => this._property = value; } /// Gets the resource group name [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaCompatibility? SchemaCompatibility { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1Internal)Property).SchemaCompatibility; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1Internal)Property).SchemaCompatibility = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaCompatibility)""); } + public string SchemaCompatibility { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1Internal)Property).SchemaCompatibility; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1Internal)Property).SchemaCompatibility = value ?? null; } [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaType? SchemaType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1Internal)Property).SchemaType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1Internal)Property).SchemaType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaType)""); } + public string SchemaType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1Internal)Property).SchemaType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1Internal)Property).SchemaType = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData _systemData; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData _systemData; /// The system meta data relating to this resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.SystemData()); } + internal Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SystemData()); } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType)""); } + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).CreatedByType = value ?? null; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)SystemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType)""); } + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)SystemData).LastModifiedByType = value ?? null; } /// /// The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs" /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal)__proxyResource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal)__proxyResource).Type; } /// Exact time the Schema Group was updated [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inlined)] - public global::System.DateTime? UpdatedAtUtc { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1Internal)Property).UpdatedAtUtc; } + public global::System.DateTime? UpdatedAtUtc { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1Internal)Property).UpdatedAtUtc; } /// Creates an new instance. public SchemaGroup() @@ -151,12 +150,15 @@ public SchemaGroup() /// Single item in List or Get Schema Group operation public partial interface ISchemaGroup : Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResource + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResource { /// Exact time the Schema Group was created. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Exact time the Schema Group was created.", SerializedName = @"createdAtUtc", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -165,6 +167,9 @@ public partial interface ISchemaGroup : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The ETag value.", SerializedName = @"eTag", PossibleTypes = new [] { typeof(string) })] @@ -173,78 +178,112 @@ public partial interface ISchemaGroup : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"dictionary object for SchemaGroup group properties", SerializedName = @"groupProperties", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties GroupProperty { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties) })] + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties GroupProperty { get; set; } [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"", SerializedName = @"schemaCompatibility", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaCompatibility) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaCompatibility? SchemaCompatibility { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("None", "Backward", "Forward")] + string SchemaCompatibility { get; set; } [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"", SerializedName = @"schemaType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaType) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaType? SchemaType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Unknown", "Avro")] + string SchemaType { get; set; } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The timestamp of resource creation (UTC).", SerializedName = @"createdAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? SystemDataCreatedAt { get; set; } + global::System.DateTime? SystemDataCreatedAt { get; } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The identity that created the resource.", SerializedName = @"createdBy", PossibleTypes = new [] { typeof(string) })] - string SystemDataCreatedBy { get; set; } + string SystemDataCreatedBy { get; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that created the resource.", SerializedName = @"createdByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataCreatedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that last modified the resource.", SerializedName = @"lastModifiedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? SystemDataLastModifiedAt { get; set; } + global::System.DateTime? SystemDataLastModifiedAt { get; } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The identity that last modified the resource.", SerializedName = @"lastModifiedBy", PossibleTypes = new [] { typeof(string) })] - string SystemDataLastModifiedBy { get; set; } + string SystemDataLastModifiedBy { get; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The type of identity that last modified the resource.", SerializedName = @"lastModifiedByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; } /// Exact time the Schema Group was updated [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Exact time the Schema Group was updated", SerializedName = @"updatedAtUtc", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -253,34 +292,38 @@ public partial interface ISchemaGroup : } /// Single item in List or Get Schema Group operation internal partial interface ISchemaGroupInternal : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IProxyResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IProxyResourceInternal { /// Exact time the Schema Group was created. global::System.DateTime? CreatedAtUtc { get; set; } /// The ETag value. string ETag { get; set; } /// dictionary object for SchemaGroup group properties - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties GroupProperty { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties GroupProperty { get; set; } - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1 Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1 Property { get; set; } - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaCompatibility? SchemaCompatibility { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("None", "Backward", "Forward")] + string SchemaCompatibility { get; set; } - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaType? SchemaType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Unknown", "Avro")] + string SchemaType { get; set; } /// The system meta data relating to this resource. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData SystemData { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData SystemData { get; set; } /// The timestamp of resource creation (UTC). global::System.DateTime? SystemDataCreatedAt { get; set; } /// The identity that created the resource. string SystemDataCreatedBy { get; set; } /// The type of identity that created the resource. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataCreatedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; set; } /// The type of identity that last modified the resource. global::System.DateTime? SystemDataLastModifiedAt { get; set; } /// The identity that last modified the resource. string SystemDataLastModifiedBy { get; set; } /// The type of identity that last modified the resource. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; set; } /// Exact time the Schema Group was updated global::System.DateTime? UpdatedAtUtc { get; set; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/SchemaGroup.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/SchemaGroup.json.cs similarity index 90% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/SchemaGroup.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/SchemaGroup.json.cs index cc586f62e06e..0b2db04ba7b7 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/SchemaGroup.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/SchemaGroup.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -54,13 +54,11 @@ public partial class SchemaGroup partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup. /// /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup. + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new SchemaGroup(json) : null; } @@ -77,9 +75,9 @@ internal SchemaGroup(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.Js { return; } - __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.ProxyResource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.SchemaGroupProperties1.FromJson(__jsonProperties) : Property;} - {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.SystemData.FromJson(__jsonSystemData) : SystemData;} + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SchemaGroupProperties1.FromJson(__jsonProperties) : _property;} + {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SystemData.FromJson(__jsonSystemData) : _systemData;} AfterFromJson(json); } @@ -104,7 +102,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode ToJson( } __proxyResource?.ToJson(container, serializationMode); AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add ); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/SchemaGroupListResult.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/SchemaGroupListResult.PowerShell.cs similarity index 75% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/SchemaGroupListResult.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/SchemaGroupListResult.PowerShell.cs index e5ca51717b21..63b708c19af4 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/SchemaGroupListResult.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/SchemaGroupListResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class SchemaGroupListResult partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SchemaGroupListResult(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SchemaGroupListResult(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,17 +111,17 @@ internal SchemaGroupListResult(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.SchemaGroupTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SchemaGroupTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -138,11 +136,11 @@ internal SchemaGroupListResult(global::System.Management.Automation.PSObject con // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.SchemaGroupTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SchemaGroupTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/SchemaGroupListResult.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/SchemaGroupListResult.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/SchemaGroupListResult.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/SchemaGroupListResult.TypeConverter.cs index e3d2dd6ecd85..5c15e6becd4f 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/SchemaGroupListResult.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/SchemaGroupListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/SchemaGroupListResult.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/SchemaGroupListResult.cs similarity index 75% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/SchemaGroupListResult.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/SchemaGroupListResult.cs index bb0ceed39be2..af3902f9bc2f 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/SchemaGroupListResult.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/SchemaGroupListResult.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// The result of the List SchemaGroup operation. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class SchemaGroupListResult : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupListResult, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupListResult, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupListResultInternal { /// Backing field for property. @@ -24,11 +24,11 @@ public partial class SchemaGroupListResult : public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup[] _value; + private System.Collections.Generic.List _value; /// Result of the List SchemaGroups operation. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup[] Value { get => this._value; set => this._value = value; } + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } /// Creates an new instance. public SchemaGroupListResult() @@ -46,6 +46,9 @@ public partial interface ISchemaGroupListResult : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Link to the next set of results. Not empty if Value contains incomplete list of Schema Groups.", SerializedName = @"nextLink", PossibleTypes = new [] { typeof(string) })] @@ -54,10 +57,13 @@ public partial interface ISchemaGroupListResult : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Result of the List SchemaGroups operation.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup) })] + System.Collections.Generic.List Value { get; set; } } /// The result of the List SchemaGroup operation. @@ -69,7 +75,7 @@ internal partial interface ISchemaGroupListResultInternal /// string NextLink { get; set; } /// Result of the List SchemaGroups operation. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup[] Value { get; set; } + System.Collections.Generic.List Value { get; set; } } } \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/SchemaGroupListResult.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/SchemaGroupListResult.json.cs similarity index 89% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/SchemaGroupListResult.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/SchemaGroupListResult.json.cs index 7e2cc9168039..765d3c8f7167 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/SchemaGroupListResult.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/SchemaGroupListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SchemaGroupListResult partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new SchemaGroupListResult(json) : null; } @@ -77,8 +77,8 @@ internal SchemaGroupListResult(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runti { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.SchemaGroup.FromJson(__u) )) ))() : null : Value;} - {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup) (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SchemaGroup.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} AfterFromJson(json); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/SchemaGroupProperties.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/SchemaGroupProperties.PowerShell.cs similarity index 88% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/SchemaGroupProperties.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/SchemaGroupProperties.PowerShell.cs index 5f3ca37af1a1..d5910b0fb345 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/SchemaGroupProperties.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/SchemaGroupProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class SchemaGroupProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SchemaGroupProperties(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SchemaGroupProperties(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -117,7 +115,7 @@ internal SchemaGroupProperties(global::System.Collections.IDictionary content) } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/SchemaGroupProperties.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/SchemaGroupProperties.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/SchemaGroupProperties.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/SchemaGroupProperties.TypeConverter.cs index 285fb67d6433..2cdbe198c8c0 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/SchemaGroupProperties.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/SchemaGroupProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/SchemaGroupProperties.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/SchemaGroupProperties.cs similarity index 79% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/SchemaGroupProperties.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/SchemaGroupProperties.cs index 575860133ed9..52a720da12df 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/SchemaGroupProperties.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/SchemaGroupProperties.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// dictionary object for SchemaGroup group properties public partial class SchemaGroupProperties : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupPropertiesInternal { /// Creates an new instance. diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/SchemaGroupProperties.dictionary.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/SchemaGroupProperties.dictionary.cs similarity index 95% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/SchemaGroupProperties.dictionary.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/SchemaGroupProperties.dictionary.cs index 8af0d342b047..8d1b3a461f94 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/SchemaGroupProperties.dictionary.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/SchemaGroupProperties.dictionary.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -70,6 +70,6 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.SchemaGroupProperties source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SchemaGroupProperties source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/SchemaGroupProperties.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/SchemaGroupProperties.json.cs similarity index 95% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/SchemaGroupProperties.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/SchemaGroupProperties.json.cs index dfdada1efa5a..d0baf0fd5a65 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/SchemaGroupProperties.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/SchemaGroupProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SchemaGroupProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new SchemaGroupProperties(json) : null; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/SchemaGroupProperties1.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/SchemaGroupProperties1.PowerShell.cs similarity index 61% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/SchemaGroupProperties1.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/SchemaGroupProperties1.PowerShell.cs index 0b406e585da4..1a4da1daa17c 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/SchemaGroupProperties1.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/SchemaGroupProperties1.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -62,29 +62,27 @@ public partial class SchemaGroupProperties1 partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1 DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1 DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SchemaGroupProperties1(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1 DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1 DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SchemaGroupProperties1(content); } @@ -94,10 +92,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1 FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1 FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -112,33 +110,33 @@ internal SchemaGroupProperties1(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("UpdatedAtUtc")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1Internal)this).UpdatedAtUtc = (global::System.DateTime?) content.GetValueForProperty("UpdatedAtUtc",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1Internal)this).UpdatedAtUtc, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1Internal)this).UpdatedAtUtc = (global::System.DateTime?) content.GetValueForProperty("UpdatedAtUtc",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1Internal)this).UpdatedAtUtc, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("CreatedAtUtc")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1Internal)this).CreatedAtUtc = (global::System.DateTime?) content.GetValueForProperty("CreatedAtUtc",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1Internal)this).CreatedAtUtc, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1Internal)this).CreatedAtUtc = (global::System.DateTime?) content.GetValueForProperty("CreatedAtUtc",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1Internal)this).CreatedAtUtc, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("ETag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1Internal)this).ETag = (string) content.GetValueForProperty("ETag",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1Internal)this).ETag, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1Internal)this).ETag = (string) content.GetValueForProperty("ETag",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1Internal)this).ETag, global::System.Convert.ToString); } if (content.Contains("GroupProperty")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1Internal)this).GroupProperty = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties) content.GetValueForProperty("GroupProperty",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1Internal)this).GroupProperty, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.SchemaGroupPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1Internal)this).GroupProperty = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties) content.GetValueForProperty("GroupProperty",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1Internal)this).GroupProperty, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SchemaGroupPropertiesTypeConverter.ConvertFrom); } if (content.Contains("SchemaCompatibility")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1Internal)this).SchemaCompatibility = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaCompatibility?) content.GetValueForProperty("SchemaCompatibility",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1Internal)this).SchemaCompatibility, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaCompatibility.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1Internal)this).SchemaCompatibility = (string) content.GetValueForProperty("SchemaCompatibility",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1Internal)this).SchemaCompatibility, global::System.Convert.ToString); } if (content.Contains("SchemaType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1Internal)this).SchemaType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaType?) content.GetValueForProperty("SchemaType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1Internal)this).SchemaType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1Internal)this).SchemaType = (string) content.GetValueForProperty("SchemaType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1Internal)this).SchemaType, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -153,27 +151,27 @@ internal SchemaGroupProperties1(global::System.Management.Automation.PSObject co // actually deserialize if (content.Contains("UpdatedAtUtc")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1Internal)this).UpdatedAtUtc = (global::System.DateTime?) content.GetValueForProperty("UpdatedAtUtc",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1Internal)this).UpdatedAtUtc, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1Internal)this).UpdatedAtUtc = (global::System.DateTime?) content.GetValueForProperty("UpdatedAtUtc",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1Internal)this).UpdatedAtUtc, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("CreatedAtUtc")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1Internal)this).CreatedAtUtc = (global::System.DateTime?) content.GetValueForProperty("CreatedAtUtc",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1Internal)this).CreatedAtUtc, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1Internal)this).CreatedAtUtc = (global::System.DateTime?) content.GetValueForProperty("CreatedAtUtc",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1Internal)this).CreatedAtUtc, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("ETag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1Internal)this).ETag = (string) content.GetValueForProperty("ETag",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1Internal)this).ETag, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1Internal)this).ETag = (string) content.GetValueForProperty("ETag",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1Internal)this).ETag, global::System.Convert.ToString); } if (content.Contains("GroupProperty")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1Internal)this).GroupProperty = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties) content.GetValueForProperty("GroupProperty",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1Internal)this).GroupProperty, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.SchemaGroupPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1Internal)this).GroupProperty = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties) content.GetValueForProperty("GroupProperty",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1Internal)this).GroupProperty, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SchemaGroupPropertiesTypeConverter.ConvertFrom); } if (content.Contains("SchemaCompatibility")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1Internal)this).SchemaCompatibility = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaCompatibility?) content.GetValueForProperty("SchemaCompatibility",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1Internal)this).SchemaCompatibility, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaCompatibility.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1Internal)this).SchemaCompatibility = (string) content.GetValueForProperty("SchemaCompatibility",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1Internal)this).SchemaCompatibility, global::System.Convert.ToString); } if (content.Contains("SchemaType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1Internal)this).SchemaType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaType?) content.GetValueForProperty("SchemaType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1Internal)this).SchemaType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1Internal)this).SchemaType = (string) content.GetValueForProperty("SchemaType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1Internal)this).SchemaType, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/SchemaGroupProperties1.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/SchemaGroupProperties1.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/SchemaGroupProperties1.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/SchemaGroupProperties1.TypeConverter.cs index 03f51d95ef06..1edf8f5542c9 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/SchemaGroupProperties1.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/SchemaGroupProperties1.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1 ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1 ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/SchemaGroupProperties1.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/SchemaGroupProperties1.cs similarity index 68% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/SchemaGroupProperties1.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/SchemaGroupProperties1.cs index a761ffb98261..879c45617628 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/SchemaGroupProperties1.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/SchemaGroupProperties1.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class SchemaGroupProperties1 : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1Internal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1Internal { /// Backing field for property. @@ -28,32 +28,32 @@ public partial class SchemaGroupProperties1 : public string ETag { get => this._eTag; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties _groupProperty; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties _groupProperty; /// dictionary object for SchemaGroup group properties [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties GroupProperty { get => (this._groupProperty = this._groupProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.SchemaGroupProperties()); set => this._groupProperty = value; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties GroupProperty { get => (this._groupProperty = this._groupProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SchemaGroupProperties()); set => this._groupProperty = value; } /// Internal Acessors for CreatedAtUtc - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1Internal.CreatedAtUtc { get => this._createdAtUtc; set { {_createdAtUtc = value;} } } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1Internal.CreatedAtUtc { get => this._createdAtUtc; set { {_createdAtUtc = value;} } } /// Internal Acessors for ETag - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1Internal.ETag { get => this._eTag; set { {_eTag = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1Internal.ETag { get => this._eTag; set { {_eTag = value;} } } /// Internal Acessors for UpdatedAtUtc - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1Internal.UpdatedAtUtc { get => this._updatedAtUtc; set { {_updatedAtUtc = value;} } } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1Internal.UpdatedAtUtc { get => this._updatedAtUtc; set { {_updatedAtUtc = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaCompatibility? _schemaCompatibility; + private string _schemaCompatibility; [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaCompatibility? SchemaCompatibility { get => this._schemaCompatibility; set => this._schemaCompatibility = value; } + public string SchemaCompatibility { get => this._schemaCompatibility; set => this._schemaCompatibility = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaType? _schemaType; + private string _schemaType; [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaType? SchemaType { get => this._schemaType; set => this._schemaType = value; } + public string SchemaType { get => this._schemaType; set => this._schemaType = value; } /// Backing field for property. private global::System.DateTime? _updatedAtUtc; @@ -75,6 +75,9 @@ public partial interface ISchemaGroupProperties1 : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Exact time the Schema Group was created.", SerializedName = @"createdAtUtc", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -83,6 +86,9 @@ public partial interface ISchemaGroupProperties1 : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The ETag value.", SerializedName = @"eTag", PossibleTypes = new [] { typeof(string) })] @@ -91,30 +97,44 @@ public partial interface ISchemaGroupProperties1 : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"dictionary object for SchemaGroup group properties", SerializedName = @"groupProperties", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties GroupProperty { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties) })] + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties GroupProperty { get; set; } [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"", SerializedName = @"schemaCompatibility", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaCompatibility) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaCompatibility? SchemaCompatibility { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("None", "Backward", "Forward")] + string SchemaCompatibility { get; set; } [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"", SerializedName = @"schemaType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaType) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaType? SchemaType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Unknown", "Avro")] + string SchemaType { get; set; } /// Exact time the Schema Group was updated [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Exact time the Schema Group was updated", SerializedName = @"updatedAtUtc", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -129,11 +149,13 @@ internal partial interface ISchemaGroupProperties1Internal /// The ETag value. string ETag { get; set; } /// dictionary object for SchemaGroup group properties - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties GroupProperty { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties GroupProperty { get; set; } - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaCompatibility? SchemaCompatibility { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("None", "Backward", "Forward")] + string SchemaCompatibility { get; set; } - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaType? SchemaType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Unknown", "Avro")] + string SchemaType { get; set; } /// Exact time the Schema Group was updated global::System.DateTime? UpdatedAtUtc { get; set; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/SchemaGroupProperties1.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/SchemaGroupProperties1.json.cs similarity index 91% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/SchemaGroupProperties1.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/SchemaGroupProperties1.json.cs index f51068404bc2..41e0a9412a73 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/SchemaGroupProperties1.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/SchemaGroupProperties1.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -53,13 +53,13 @@ public partial class SchemaGroupProperties1 partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties1 FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties1 FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new SchemaGroupProperties1(json) : null; } @@ -76,12 +76,12 @@ internal SchemaGroupProperties1(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runt { return; } - {_updatedAtUtc = If( json?.PropertyT("updatedAtUtc"), out var __jsonUpdatedAtUtc) ? global::System.DateTime.TryParse((string)__jsonUpdatedAtUtc, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonUpdatedAtUtcValue) ? __jsonUpdatedAtUtcValue : UpdatedAtUtc : UpdatedAtUtc;} - {_createdAtUtc = If( json?.PropertyT("createdAtUtc"), out var __jsonCreatedAtUtc) ? global::System.DateTime.TryParse((string)__jsonCreatedAtUtc, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedAtUtcValue) ? __jsonCreatedAtUtcValue : CreatedAtUtc : CreatedAtUtc;} - {_eTag = If( json?.PropertyT("eTag"), out var __jsonETag) ? (string)__jsonETag : (string)ETag;} - {_groupProperty = If( json?.PropertyT("groupProperties"), out var __jsonGroupProperties) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.SchemaGroupProperties.FromJson(__jsonGroupProperties) : GroupProperty;} - {_schemaCompatibility = If( json?.PropertyT("schemaCompatibility"), out var __jsonSchemaCompatibility) ? (string)__jsonSchemaCompatibility : (string)SchemaCompatibility;} - {_schemaType = If( json?.PropertyT("schemaType"), out var __jsonSchemaType) ? (string)__jsonSchemaType : (string)SchemaType;} + {_updatedAtUtc = If( json?.PropertyT("updatedAtUtc"), out var __jsonUpdatedAtUtc) ? global::System.DateTime.TryParse((string)__jsonUpdatedAtUtc, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonUpdatedAtUtcValue) ? __jsonUpdatedAtUtcValue : _updatedAtUtc : _updatedAtUtc;} + {_createdAtUtc = If( json?.PropertyT("createdAtUtc"), out var __jsonCreatedAtUtc) ? global::System.DateTime.TryParse((string)__jsonCreatedAtUtc, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedAtUtcValue) ? __jsonCreatedAtUtcValue : _createdAtUtc : _createdAtUtc;} + {_eTag = If( json?.PropertyT("eTag"), out var __jsonETag) ? (string)__jsonETag : (string)_eTag;} + {_groupProperty = If( json?.PropertyT("groupProperties"), out var __jsonGroupProperties) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SchemaGroupProperties.FromJson(__jsonGroupProperties) : _groupProperty;} + {_schemaCompatibility = If( json?.PropertyT("schemaCompatibility"), out var __jsonSchemaCompatibility) ? (string)__jsonSchemaCompatibility : (string)_schemaCompatibility;} + {_schemaType = If( json?.PropertyT("schemaType"), out var __jsonSchemaType) ? (string)__jsonSchemaType : (string)_schemaType;} AfterFromJson(json); } @@ -104,15 +104,15 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode ToJson( { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._updatedAtUtc ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._updatedAtUtc?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "updatedAtUtc" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._createdAtUtc ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._createdAtUtc?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "createdAtUtc" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._eTag)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._eTag.ToString()) : null, "eTag" ,container.Add ); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Sku.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/Sku.PowerShell.cs similarity index 76% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Sku.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/Sku.PowerShell.cs index 8efc22f8003c..f4c0747164ad 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Sku.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/Sku.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class Sku partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISku DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISku DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new Sku(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISku DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISku DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new Sku(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISku FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISku FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -111,21 +111,21 @@ internal Sku(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISkuInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuName) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISkuInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuName.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISkuInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISkuInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Tier")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISkuInternal)this).Tier = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuTier?) content.GetValueForProperty("Tier",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISkuInternal)this).Tier, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuTier.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISkuInternal)this).Tier = (string) content.GetValueForProperty("Tier",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISkuInternal)this).Tier, global::System.Convert.ToString); } if (content.Contains("Capacity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISkuInternal)this).Capacity = (int?) content.GetValueForProperty("Capacity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISkuInternal)this).Capacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISkuInternal)this).Capacity = (int?) content.GetValueForProperty("Capacity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISkuInternal)this).Capacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -140,15 +140,15 @@ internal Sku(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISkuInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuName) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISkuInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuName.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISkuInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISkuInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Tier")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISkuInternal)this).Tier = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuTier?) content.GetValueForProperty("Tier",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISkuInternal)this).Tier, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuTier.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISkuInternal)this).Tier = (string) content.GetValueForProperty("Tier",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISkuInternal)this).Tier, global::System.Convert.ToString); } if (content.Contains("Capacity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISkuInternal)this).Capacity = (int?) content.GetValueForProperty("Capacity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISkuInternal)this).Capacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISkuInternal)this).Capacity = (int?) content.GetValueForProperty("Capacity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISkuInternal)this).Capacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } AfterDeserializePSObject(content); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Sku.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/Sku.TypeConverter.cs similarity index 97% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Sku.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/Sku.TypeConverter.cs index 6c25e0ebe601..c91ae1c5b7d0 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Sku.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/Sku.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISku ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISku ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISku).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISku).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Sku.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/Sku.cs similarity index 74% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Sku.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/Sku.cs index 6efd6f8cea32..80d3c5056540 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Sku.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/Sku.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// SKU parameters supplied to the create namespace operation [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class Sku : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISku, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISkuInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISku, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISkuInternal { /// Backing field for property. @@ -25,18 +25,18 @@ public partial class Sku : public int? Capacity { get => this._capacity; set => this._capacity = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuName _name; + private string _name; /// Name of this SKU. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuName Name { get => this._name; set => this._name = value; } + public string Name { get => this._name; set => this._name = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuTier? _tier; + private string _tier; /// The billing tier of this particular SKU. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuTier? Tier { get => this._tier; set => this._tier = value; } + public string Tier { get => this._tier; set => this._tier = value; } /// Creates an new instance. public Sku() @@ -55,6 +55,9 @@ public partial interface ISku : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The Event Hubs throughput units for Basic or Standard tiers, where value should be 0 to 20 throughput units. The Event Hubs premium units for Premium tier, where value should be 0 to 10 premium units.", SerializedName = @"capacity", PossibleTypes = new [] { typeof(int) })] @@ -63,18 +66,26 @@ public partial interface ISku : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = true, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Name of this SKU.", SerializedName = @"name", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuName) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuName Name { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Basic", "Standard", "Premium")] + string Name { get; set; } /// The billing tier of this particular SKU. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The billing tier of this particular SKU.", SerializedName = @"tier", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuTier) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuTier? Tier { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Basic", "Standard", "Premium")] + string Tier { get; set; } } /// SKU parameters supplied to the create namespace operation @@ -87,9 +98,11 @@ internal partial interface ISkuInternal /// int? Capacity { get; set; } /// Name of this SKU. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuName Name { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Basic", "Standard", "Premium")] + string Name { get; set; } /// The billing tier of this particular SKU. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuTier? Tier { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Basic", "Standard", "Premium")] + string Tier { get; set; } } } \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Sku.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/Sku.json.cs similarity index 92% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Sku.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/Sku.json.cs index 282439ae4704..5dbde7214e39 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Sku.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/Sku.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -54,13 +54,11 @@ public partial class Sku partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISku. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISku. /// /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISku. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISku FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISku. + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISku FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new Sku(json) : null; } @@ -77,9 +75,9 @@ internal Sku(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject { return; } - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_tier = If( json?.PropertyT("tier"), out var __jsonTier) ? (string)__jsonTier : (string)Tier;} - {_capacity = If( json?.PropertyT("capacity"), out var __jsonCapacity) ? (int?)__jsonCapacity : Capacity;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_tier = If( json?.PropertyT("tier"), out var __jsonTier) ? (string)__jsonTier : (string)_tier;} + {_capacity = If( json?.PropertyT("capacity"), out var __jsonCapacity) ? (int?)__jsonCapacity : _capacity;} AfterFromJson(json); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Subnet.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/Subnet.PowerShell.cs similarity index 85% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Subnet.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/Subnet.PowerShell.cs index 92235b4f63ff..64b403254713 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Subnet.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/Subnet.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class Subnet partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISubnet DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISubnet DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new Subnet(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISubnet DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISubnet DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new Subnet(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISubnet FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISubnet FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -111,13 +111,13 @@ internal Subnet(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISubnetInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISubnetInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISubnetInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISubnetInternal)this).Id, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -132,7 +132,7 @@ internal Subnet(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISubnetInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISubnetInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISubnetInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISubnetInternal)this).Id, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Subnet.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/Subnet.TypeConverter.cs similarity index 97% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Subnet.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/Subnet.TypeConverter.cs index 2570798b45d8..f4ff8960f924 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Subnet.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/Subnet.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISubnet ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISubnet ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISubnet).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISubnet).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Subnet.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/Subnet.cs similarity index 86% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Subnet.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/Subnet.cs index 12d4f848d116..3171f83da93b 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Subnet.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/Subnet.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// Properties supplied for Subnet [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class Subnet : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISubnet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISubnetInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISubnet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISubnetInternal { /// Backing field for property. @@ -35,6 +35,9 @@ public partial interface ISubnet : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Resource ID of Virtual Network Subnet", SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Subnet.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/Subnet.json.cs similarity index 93% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Subnet.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/Subnet.json.cs index 4e8b7cdbafe0..d26d739d2969 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/Subnet.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/Subnet.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -54,13 +54,11 @@ public partial class Subnet partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISubnet. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISubnet. /// /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISubnet. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISubnet FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISubnet. + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISubnet FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new Subnet(json) : null; } @@ -77,7 +75,7 @@ internal Subnet(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObj { return; } - {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;} AfterFromJson(json); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api10/SystemData.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/SystemData.PowerShell.cs similarity index 67% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api10/SystemData.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/SystemData.PowerShell.cs index 7b309a5cdd47..78d1105091e4 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api10/SystemData.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/SystemData.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class SystemData partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SystemData(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SystemData(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDa /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -111,33 +111,33 @@ internal SystemData(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("CreatedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString); } if (content.Contains("CreatedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)this).CreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType?) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)this).CreatedByType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)this).CreatedByType = (string) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)this).CreatedByType, global::System.Convert.ToString); } if (content.Contains("CreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("LastModifiedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString); } if (content.Contains("LastModifiedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)this).LastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType?) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)this).LastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)this).LastModifiedByType = (string) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)this).LastModifiedByType, global::System.Convert.ToString); } if (content.Contains("LastModifiedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)this).LastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)this).LastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -152,27 +152,27 @@ internal SystemData(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("CreatedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString); } if (content.Contains("CreatedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)this).CreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType?) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)this).CreatedByType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)this).CreatedByType = (string) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)this).CreatedByType, global::System.Convert.ToString); } if (content.Contains("CreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("LastModifiedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString); } if (content.Contains("LastModifiedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)this).LastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType?) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)this).LastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)this).LastModifiedByType = (string) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)this).LastModifiedByType, global::System.Convert.ToString); } if (content.Contains("LastModifiedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal)this).LastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal)this).LastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } AfterDeserializePSObject(content); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api10/SystemData.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/SystemData.TypeConverter.cs similarity index 97% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api10/SystemData.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/SystemData.TypeConverter.cs index 3ead579b5158..e5f48c83e43b 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api10/SystemData.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/SystemData.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api10/SystemData.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/SystemData.cs similarity index 78% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api10/SystemData.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/SystemData.cs index 4240b0a29e4a..2de05242cca3 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api10/SystemData.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/SystemData.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// Metadata pertaining to creation and last modification of the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class SystemData : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemDataInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemDataInternal { /// Backing field for property. @@ -29,11 +29,11 @@ public partial class SystemData : public string CreatedBy { get => this._createdBy; set => this._createdBy = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? _createdByType; + private string _createdByType; /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? CreatedByType { get => this._createdByType; set => this._createdByType = value; } + public string CreatedByType { get => this._createdByType; set => this._createdByType = value; } /// Backing field for property. private global::System.DateTime? _lastModifiedAt; @@ -50,11 +50,11 @@ public partial class SystemData : public string LastModifiedBy { get => this._lastModifiedBy; set => this._lastModifiedBy = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? _lastModifiedByType; + private string _lastModifiedByType; /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? LastModifiedByType { get => this._lastModifiedByType; set => this._lastModifiedByType = value; } + public string LastModifiedByType { get => this._lastModifiedByType; set => this._lastModifiedByType = value; } /// Creates an new instance. public SystemData() @@ -70,6 +70,9 @@ public partial interface ISystemData : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The timestamp of resource creation (UTC).", SerializedName = @"createdAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -78,6 +81,9 @@ public partial interface ISystemData : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The identity that created the resource.", SerializedName = @"createdBy", PossibleTypes = new [] { typeof(string) })] @@ -86,14 +92,21 @@ public partial interface ISystemData : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The type of identity that created the resource.", SerializedName = @"createdByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? CreatedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string CreatedByType { get; set; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The type of identity that last modified the resource.", SerializedName = @"lastModifiedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -102,6 +115,9 @@ public partial interface ISystemData : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The identity that last modified the resource.", SerializedName = @"lastModifiedBy", PossibleTypes = new [] { typeof(string) })] @@ -110,10 +126,14 @@ public partial interface ISystemData : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The type of identity that last modified the resource.", SerializedName = @"lastModifiedByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? LastModifiedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string LastModifiedByType { get; set; } } /// Metadata pertaining to creation and last modification of the resource. @@ -125,13 +145,15 @@ internal partial interface ISystemDataInternal /// The identity that created the resource. string CreatedBy { get; set; } /// The type of identity that created the resource. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? CreatedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string CreatedByType { get; set; } /// The type of identity that last modified the resource. global::System.DateTime? LastModifiedAt { get; set; } /// The identity that last modified the resource. string LastModifiedBy { get; set; } /// The type of identity that last modified the resource. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType? LastModifiedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string LastModifiedByType { get; set; } } } \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api10/SystemData.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/SystemData.json.cs similarity index 93% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api10/SystemData.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/SystemData.json.cs index 0c5f68e2859c..52553f542101 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api10/SystemData.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/SystemData.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -54,13 +54,11 @@ public partial class SystemData partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData. /// /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ISystemData FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData. + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISystemData FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new SystemData(json) : null; } @@ -77,12 +75,12 @@ internal SystemData(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.Jso { return; } - {_createdBy = If( json?.PropertyT("createdBy"), out var __jsonCreatedBy) ? (string)__jsonCreatedBy : (string)CreatedBy;} - {_createdByType = If( json?.PropertyT("createdByType"), out var __jsonCreatedByType) ? (string)__jsonCreatedByType : (string)CreatedByType;} - {_createdAt = If( json?.PropertyT("createdAt"), out var __jsonCreatedAt) ? global::System.DateTime.TryParse((string)__jsonCreatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedAtValue) ? __jsonCreatedAtValue : CreatedAt : CreatedAt;} - {_lastModifiedBy = If( json?.PropertyT("lastModifiedBy"), out var __jsonLastModifiedBy) ? (string)__jsonLastModifiedBy : (string)LastModifiedBy;} - {_lastModifiedByType = If( json?.PropertyT("lastModifiedByType"), out var __jsonLastModifiedByType) ? (string)__jsonLastModifiedByType : (string)LastModifiedByType;} - {_lastModifiedAt = If( json?.PropertyT("lastModifiedAt"), out var __jsonLastModifiedAt) ? global::System.DateTime.TryParse((string)__jsonLastModifiedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastModifiedAtValue) ? __jsonLastModifiedAtValue : LastModifiedAt : LastModifiedAt;} + {_createdBy = If( json?.PropertyT("createdBy"), out var __jsonCreatedBy) ? (string)__jsonCreatedBy : (string)_createdBy;} + {_createdByType = If( json?.PropertyT("createdByType"), out var __jsonCreatedByType) ? (string)__jsonCreatedByType : (string)_createdByType;} + {_createdAt = If( json?.PropertyT("createdAt"), out var __jsonCreatedAt) ? global::System.DateTime.TryParse((string)__jsonCreatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedAtValue) ? __jsonCreatedAtValue : _createdAt : _createdAt;} + {_lastModifiedBy = If( json?.PropertyT("lastModifiedBy"), out var __jsonLastModifiedBy) ? (string)__jsonLastModifiedBy : (string)_lastModifiedBy;} + {_lastModifiedByType = If( json?.PropertyT("lastModifiedByType"), out var __jsonLastModifiedByType) ? (string)__jsonLastModifiedByType : (string)_lastModifiedByType;} + {_lastModifiedAt = If( json?.PropertyT("lastModifiedAt"), out var __jsonLastModifiedAt) ? global::System.DateTime.TryParse((string)__jsonLastModifiedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastModifiedAtValue) ? __jsonLastModifiedAtValue : _lastModifiedAt : _lastModifiedAt;} AfterFromJson(json); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ThrottlingPolicy.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ThrottlingPolicy.PowerShell.cs similarity index 72% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ThrottlingPolicy.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ThrottlingPolicy.PowerShell.cs index 32e7c88fa4f3..6e5f51ddb356 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ThrottlingPolicy.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ThrottlingPolicy.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class ThrottlingPolicy partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IThrottlingPolicy DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IThrottlingPolicy DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ThrottlingPolicy(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IThrottlingPolicy DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IThrottlingPolicy DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ThrottlingPolicy(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IThrottlingPolicy FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IThrottlingPolicy FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -111,25 +111,25 @@ internal ThrottlingPolicy(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("RateLimitThreshold")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IThrottlingPolicyInternal)this).RateLimitThreshold = (long) content.GetValueForProperty("RateLimitThreshold",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IThrottlingPolicyInternal)this).RateLimitThreshold, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IThrottlingPolicyInternal)this).RateLimitThreshold = (long) content.GetValueForProperty("RateLimitThreshold",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IThrottlingPolicyInternal)this).RateLimitThreshold, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("MetricId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IThrottlingPolicyInternal)this).MetricId = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.MetricId) content.GetValueForProperty("MetricId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IThrottlingPolicyInternal)this).MetricId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.MetricId.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IThrottlingPolicyInternal)this).MetricId = (string) content.GetValueForProperty("MetricId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IThrottlingPolicyInternal)this).MetricId, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicyInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicyInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicyInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicyInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicyInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicyInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicyInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicyInternal)this).Type, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -144,19 +144,19 @@ internal ThrottlingPolicy(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("RateLimitThreshold")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IThrottlingPolicyInternal)this).RateLimitThreshold = (long) content.GetValueForProperty("RateLimitThreshold",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IThrottlingPolicyInternal)this).RateLimitThreshold, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IThrottlingPolicyInternal)this).RateLimitThreshold = (long) content.GetValueForProperty("RateLimitThreshold",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IThrottlingPolicyInternal)this).RateLimitThreshold, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("MetricId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IThrottlingPolicyInternal)this).MetricId = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.MetricId) content.GetValueForProperty("MetricId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IThrottlingPolicyInternal)this).MetricId, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.MetricId.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IThrottlingPolicyInternal)this).MetricId = (string) content.GetValueForProperty("MetricId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IThrottlingPolicyInternal)this).MetricId, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicyInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicyInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicyInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicyInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicyInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicyInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicyInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicyInternal)this).Type, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ThrottlingPolicy.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ThrottlingPolicy.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ThrottlingPolicy.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ThrottlingPolicy.TypeConverter.cs index 3d2b0c61b0b1..5712cb26b142 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ThrottlingPolicy.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ThrottlingPolicy.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IThrottlingPolicy ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IThrottlingPolicy ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IThrottlingPolicy).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IThrottlingPolicy).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ThrottlingPolicy.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ThrottlingPolicy.cs similarity index 72% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ThrottlingPolicy.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ThrottlingPolicy.cs index d393db53bd30..05a4416d476a 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ThrottlingPolicy.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ThrottlingPolicy.cs @@ -3,39 +3,39 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// Properties of the throttling policy [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class ThrottlingPolicy : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IThrottlingPolicy, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IThrottlingPolicyInternal, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IThrottlingPolicy, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IThrottlingPolicyInternal, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicy __applicationGroupPolicy = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ApplicationGroupPolicy(); + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicy __applicationGroupPolicy = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ApplicationGroupPolicy(); /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.MetricId _metricId; + private string _metricId; /// /// Metric Id on which the throttle limit should be set, MetricId can be discovered by hovering over Metric in the Metrics /// section of Event Hub Namespace inside Azure Portal /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.MetricId MetricId { get => this._metricId; set => this._metricId = value; } + public string MetricId { get => this._metricId; set => this._metricId = value; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicyInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicyInternal)__applicationGroupPolicy).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicyInternal)__applicationGroupPolicy).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicyInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicyInternal)__applicationGroupPolicy).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicyInternal)__applicationGroupPolicy).Type = value; } /// The Name of this policy [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicyInternal)__applicationGroupPolicy).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicyInternal)__applicationGroupPolicy).Name = value ; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicyInternal)__applicationGroupPolicy).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicyInternal)__applicationGroupPolicy).Name = value ; } /// Backing field for property. private long _rateLimitThreshold; @@ -47,8 +47,9 @@ public partial class ThrottlingPolicy : public long RateLimitThreshold { get => this._rateLimitThreshold; set => this._rateLimitThreshold = value; } /// Application Group Policy types + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Constant] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicyInternal)__applicationGroupPolicy).Type; } + public string Type { get => "ThrottlingPolicy"; } /// Creates an new instance. public ThrottlingPolicy() @@ -71,7 +72,7 @@ public ThrottlingPolicy() /// Properties of the throttling policy public partial interface IThrottlingPolicy : Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicy + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicy { /// /// Metric Id on which the throttle limit should be set, MetricId can be discovered by hovering over Metric in the Metrics @@ -80,16 +81,23 @@ public partial interface IThrottlingPolicy : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = true, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Metric Id on which the throttle limit should be set, MetricId can be discovered by hovering over Metric in the Metrics section of Event Hub Namespace inside Azure Portal", SerializedName = @"metricId", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.MetricId) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.MetricId MetricId { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("IncomingBytes", "OutgoingBytes", "IncomingMessages", "OutgoingMessages")] + string MetricId { get; set; } /// /// The Threshold limit above which the application group will be throttled.Rate limit is always per second. /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = true, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The Threshold limit above which the application group will be throttled.Rate limit is always per second.", SerializedName = @"rateLimitThreshold", PossibleTypes = new [] { typeof(long) })] @@ -98,13 +106,14 @@ public partial interface IThrottlingPolicy : } /// Properties of the throttling policy internal partial interface IThrottlingPolicyInternal : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicyInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicyInternal { /// /// Metric Id on which the throttle limit should be set, MetricId can be discovered by hovering over Metric in the Metrics /// section of Event Hub Namespace inside Azure Portal /// - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.MetricId MetricId { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("IncomingBytes", "OutgoingBytes", "IncomingMessages", "OutgoingMessages")] + string MetricId { get; set; } /// /// The Threshold limit above which the application group will be throttled.Rate limit is always per second. /// diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ThrottlingPolicy.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/ThrottlingPolicy.json.cs similarity index 93% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ThrottlingPolicy.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/ThrottlingPolicy.json.cs index 5fdc7adaa477..a9b000da3462 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/ThrottlingPolicy.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/ThrottlingPolicy.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ThrottlingPolicy partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IThrottlingPolicy. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IThrottlingPolicy. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IThrottlingPolicy. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IThrottlingPolicy. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IThrottlingPolicy FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IThrottlingPolicy FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new ThrottlingPolicy(json) : null; } @@ -77,9 +77,9 @@ internal ThrottlingPolicy(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Js { return; } - __applicationGroupPolicy = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ApplicationGroupPolicy(json); - {_rateLimitThreshold = If( json?.PropertyT("rateLimitThreshold"), out var __jsonRateLimitThreshold) ? (long)__jsonRateLimitThreshold : RateLimitThreshold;} - {_metricId = If( json?.PropertyT("metricId"), out var __jsonMetricId) ? (string)__jsonMetricId : (string)MetricId;} + __applicationGroupPolicy = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ApplicationGroupPolicy(json); + {_rateLimitThreshold = If( json?.PropertyT("rateLimitThreshold"), out var __jsonRateLimitThreshold) ? (long)__jsonRateLimitThreshold : _rateLimitThreshold;} + {_metricId = If( json?.PropertyT("metricId"), out var __jsonMetricId) ? (string)__jsonMetricId : (string)_metricId;} AfterFromJson(json); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api10/TrackedResource.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/TrackedResource.PowerShell.cs similarity index 73% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api10/TrackedResource.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/TrackedResource.PowerShell.cs index cfa68438d30d..a1e3855c9823 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api10/TrackedResource.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/TrackedResource.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class TrackedResource partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResource DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new TrackedResource(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new TrackedResource(content); } @@ -93,7 +93,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedR /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -113,7 +113,7 @@ public override string ToString() } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -128,29 +128,29 @@ internal TrackedResource(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.TrackedResourceTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.TrackedResourceTagsTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)this).Type, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -165,23 +165,23 @@ internal TrackedResource(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.TrackedResourceTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.TrackedResourceTagsTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)this).Type, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api10/TrackedResource.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/TrackedResource.TypeConverter.cs similarity index 97% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api10/TrackedResource.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/TrackedResource.TypeConverter.cs index 6046be248589..4d3cf6c692f9 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api10/TrackedResource.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/TrackedResource.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api10/TrackedResource.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/TrackedResource.cs similarity index 71% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api10/TrackedResource.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/TrackedResource.cs index 5788763166ac..76a4198a0093 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api10/TrackedResource.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/TrackedResource.cs @@ -3,27 +3,27 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// Definition of resource. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class TrackedResource : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResource, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResource, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceInternal, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IValidates { /// - /// Backing field for Inherited model + /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.Resource(); + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Resource(); /// /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)__resource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)__resource).Id; } /// Backing field for property. private string _location; @@ -33,30 +33,30 @@ public partial class TrackedResource : public string Location { get => this._location; set => this._location = value; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)__resource).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)__resource).Id = value; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)__resource).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)__resource).Name = value; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)__resource).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)__resource).Type = value; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)__resource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)__resource).Name; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceTags _tag; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceTags _tag; /// Resource tags. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.TrackedResourceTags()); set => this._tag = value; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.TrackedResourceTags()); set => this._tag = value; } /// /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" /// [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Origin(Microsoft.Azure.PowerShell.Cmdlets.EventHub.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal)__resource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal)__resource).Type; } /// Creates an new instance. public TrackedResource() @@ -79,12 +79,15 @@ public TrackedResource() /// Definition of resource. public partial interface ITrackedResource : Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResource + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResource { /// Resource location. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = false, Description = @"Resource location.", SerializedName = @"location", PossibleTypes = new [] { typeof(string) })] @@ -93,20 +96,23 @@ public partial interface ITrackedResource : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceTags) })] - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceTags Tag { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceTags) })] + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceTags Tag { get; set; } } /// Definition of resource. internal partial interface ITrackedResourceInternal : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.IResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IResourceInternal { /// Resource location. string Location { get; set; } /// Resource tags. - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceTags Tag { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceTags Tag { get; set; } } } \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api10/TrackedResource.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/TrackedResource.json.cs similarity index 86% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api10/TrackedResource.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/TrackedResource.json.cs index 5720fbf395d5..eb8247e6823d 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api10/TrackedResource.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/TrackedResource.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class TrackedResource partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResource. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new TrackedResource(json) : null; } @@ -85,7 +85,10 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode ToJson( return container; } __resource?.ToJson(container, serializationMode); - AddIf( null != (((object)this._location)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._location.ToString()) : null, "location" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._location)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._location.ToString()) : null, "location" ,container.Add ); + } AddIf( null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) this._tag.ToJson(null,serializationMode) : null, "tags" ,container.Add ); AfterToJson(ref container); return container; @@ -103,9 +106,9 @@ internal TrackedResource(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Jso { return; } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.Resource(json); - {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)Location;} - {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.TrackedResourceTags.FromJson(__jsonTags) : Tag;} + __resource = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Resource(json); + {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)_location;} + {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.TrackedResourceTags.FromJson(__jsonTags) : _tag;} AfterFromJson(json); } } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api10/TrackedResourceTags.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/TrackedResourceTags.PowerShell.cs similarity index 90% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api10/TrackedResourceTags.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/TrackedResourceTags.PowerShell.cs index aeea2100eb11..97698b9bc6c6 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api10/TrackedResourceTags.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/TrackedResourceTags.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class TrackedResourceTags partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceTags DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceTags DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new TrackedResourceTags(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new TrackedResourceTags(content); } @@ -93,7 +93,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedR /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -113,7 +113,7 @@ public override string ToString() } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -132,7 +132,7 @@ internal TrackedResourceTags(global::System.Collections.IDictionary content) } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api10/TrackedResourceTags.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/TrackedResourceTags.TypeConverter.cs similarity index 97% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api10/TrackedResourceTags.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/TrackedResourceTags.TypeConverter.cs index b3248d7330b1..614a24b42387 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api10/TrackedResourceTags.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/TrackedResourceTags.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceTags ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceTags ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceTags).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceTags).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api10/TrackedResourceTags.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/TrackedResourceTags.cs similarity index 79% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api10/TrackedResourceTags.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/TrackedResourceTags.cs index f92b2b636692..f332c268f27a 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api10/TrackedResourceTags.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/TrackedResourceTags.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// Resource tags. public partial class TrackedResourceTags : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceTags, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceTagsInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceTags, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceTagsInternal { /// Creates an new instance. diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api10/TrackedResourceTags.dictionary.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/TrackedResourceTags.dictionary.cs similarity index 95% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api10/TrackedResourceTags.dictionary.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/TrackedResourceTags.dictionary.cs index f522efd69f04..bd9784ce75bb 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api10/TrackedResourceTags.dictionary.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/TrackedResourceTags.dictionary.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -70,6 +70,6 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.TrackedResourceTags source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.TrackedResourceTags source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api10/TrackedResourceTags.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/TrackedResourceTags.json.cs similarity index 95% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api10/TrackedResourceTags.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/TrackedResourceTags.json.cs index 120955c914d8..3b0104320d44 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api10/TrackedResourceTags.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/TrackedResourceTags.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class TrackedResourceTags partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceTags. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceTags. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceTags. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceTags. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new TrackedResourceTags(json) : null; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/UserAssignedIdentity.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/UserAssignedIdentity.PowerShell.cs similarity index 79% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/UserAssignedIdentity.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/UserAssignedIdentity.PowerShell.cs index 8ed4525b9c46..94924f75a694 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/UserAssignedIdentity.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/UserAssignedIdentity.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class UserAssignedIdentity partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IUserAssignedIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IUserAssignedIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new UserAssignedIdentity(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IUserAssignedIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IUserAssignedIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new UserAssignedIdentity(content); } @@ -93,7 +93,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IUserAssignedIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IUserAssignedIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -113,7 +113,7 @@ public override string ToString() } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -128,17 +128,17 @@ internal UserAssignedIdentity(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("PrincipalId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IUserAssignedIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IUserAssignedIdentityInternal)this).PrincipalId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IUserAssignedIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IUserAssignedIdentityInternal)this).PrincipalId, global::System.Convert.ToString); } if (content.Contains("ClientId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IUserAssignedIdentityInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IUserAssignedIdentityInternal)this).ClientId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IUserAssignedIdentityInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IUserAssignedIdentityInternal)this).ClientId, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -153,11 +153,11 @@ internal UserAssignedIdentity(global::System.Management.Automation.PSObject cont // actually deserialize if (content.Contains("PrincipalId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IUserAssignedIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IUserAssignedIdentityInternal)this).PrincipalId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IUserAssignedIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IUserAssignedIdentityInternal)this).PrincipalId, global::System.Convert.ToString); } if (content.Contains("ClientId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IUserAssignedIdentityInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IUserAssignedIdentityInternal)this).ClientId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IUserAssignedIdentityInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IUserAssignedIdentityInternal)this).ClientId, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/UserAssignedIdentity.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/UserAssignedIdentity.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/UserAssignedIdentity.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/UserAssignedIdentity.TypeConverter.cs index 374f5500a469..656c5f6795e5 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/UserAssignedIdentity.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/UserAssignedIdentity.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IUserAssignedIdentity ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IUserAssignedIdentity ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IUserAssignedIdentity).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IUserAssignedIdentity).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/UserAssignedIdentity.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/UserAssignedIdentity.cs similarity index 83% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/UserAssignedIdentity.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/UserAssignedIdentity.cs index 306272a6ce86..d1272ae71dde 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/UserAssignedIdentity.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/UserAssignedIdentity.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; /// Recognized Dictionary value. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class UserAssignedIdentity : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IUserAssignedIdentity, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IUserAssignedIdentityInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IUserAssignedIdentity, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IUserAssignedIdentityInternal { /// Backing field for property. @@ -22,10 +22,10 @@ public partial class UserAssignedIdentity : public string ClientId { get => this._clientId; } /// Internal Acessors for ClientId - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IUserAssignedIdentityInternal.ClientId { get => this._clientId; set { {_clientId = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IUserAssignedIdentityInternal.ClientId { get => this._clientId; set { {_clientId = value;} } } /// Internal Acessors for PrincipalId - string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IUserAssignedIdentityInternal.PrincipalId { get => this._principalId; set { {_principalId = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IUserAssignedIdentityInternal.PrincipalId { get => this._principalId; set { {_principalId = value;} } } /// Backing field for property. private string _principalId; @@ -48,6 +48,9 @@ public partial interface IUserAssignedIdentity : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Client Id of user assigned identity", SerializedName = @"clientId", PossibleTypes = new [] { typeof(string) })] @@ -56,6 +59,9 @@ public partial interface IUserAssignedIdentity : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Principal Id of user assigned identity", SerializedName = @"principalId", PossibleTypes = new [] { typeof(string) })] diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/UserAssignedIdentity.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/UserAssignedIdentity.json.cs similarity index 92% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/UserAssignedIdentity.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/UserAssignedIdentity.json.cs index 1965588acfe5..8d8e820b8007 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/UserAssignedIdentity.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/UserAssignedIdentity.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class UserAssignedIdentity partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IUserAssignedIdentity. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IUserAssignedIdentity. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IUserAssignedIdentity. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IUserAssignedIdentity. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IUserAssignedIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IUserAssignedIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new UserAssignedIdentity(json) : null; } @@ -84,11 +84,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode ToJson( { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._principalId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._principalId.ToString()) : null, "principalId" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._clientId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonString(this._clientId.ToString()) : null, "clientId" ,container.Add ); } @@ -108,8 +108,8 @@ internal UserAssignedIdentity(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtim { return; } - {_principalId = If( json?.PropertyT("principalId"), out var __jsonPrincipalId) ? (string)__jsonPrincipalId : (string)PrincipalId;} - {_clientId = If( json?.PropertyT("clientId"), out var __jsonClientId) ? (string)__jsonClientId : (string)ClientId;} + {_principalId = If( json?.PropertyT("principalId"), out var __jsonPrincipalId) ? (string)__jsonPrincipalId : (string)_principalId;} + {_clientId = If( json?.PropertyT("clientId"), out var __jsonClientId) ? (string)__jsonClientId : (string)_clientId;} AfterFromJson(json); } } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/UserAssignedIdentityProperties.PowerShell.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/UserAssignedIdentityProperties.PowerShell.cs similarity index 82% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/UserAssignedIdentityProperties.PowerShell.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/UserAssignedIdentityProperties.PowerShell.cs index affd8ae8029e..93a946648085 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/UserAssignedIdentityProperties.PowerShell.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/UserAssignedIdentityProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -62,29 +62,27 @@ public partial class UserAssignedIdentityProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IUserAssignedIdentityProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IUserAssignedIdentityProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new UserAssignedIdentityProperties(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IUserAssignedIdentityProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IUserAssignedIdentityProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new UserAssignedIdentityProperties(content); } @@ -94,7 +92,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Previe /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IUserAssignedIdentityProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IUserAssignedIdentityProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -114,7 +112,7 @@ public override string ToString() } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -129,13 +127,13 @@ internal UserAssignedIdentityProperties(global::System.Collections.IDictionary c // actually deserialize if (content.Contains("UserAssignedIdentity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IUserAssignedIdentityPropertiesInternal)this).UserAssignedIdentity = (string) content.GetValueForProperty("UserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IUserAssignedIdentityPropertiesInternal)this).UserAssignedIdentity, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IUserAssignedIdentityPropertiesInternal)this).UserAssignedIdentity = (string) content.GetValueForProperty("UserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IUserAssignedIdentityPropertiesInternal)this).UserAssignedIdentity, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -150,7 +148,7 @@ internal UserAssignedIdentityProperties(global::System.Management.Automation.PSO // actually deserialize if (content.Contains("UserAssignedIdentity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IUserAssignedIdentityPropertiesInternal)this).UserAssignedIdentity = (string) content.GetValueForProperty("UserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IUserAssignedIdentityPropertiesInternal)this).UserAssignedIdentity, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IUserAssignedIdentityPropertiesInternal)this).UserAssignedIdentity = (string) content.GetValueForProperty("UserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IUserAssignedIdentityPropertiesInternal)this).UserAssignedIdentity, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/UserAssignedIdentityProperties.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/UserAssignedIdentityProperties.TypeConverter.cs similarity index 96% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/UserAssignedIdentityProperties.TypeConverter.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/UserAssignedIdentityProperties.TypeConverter.cs index 3948843d78b4..309981a7e49e 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/UserAssignedIdentityProperties.TypeConverter.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/UserAssignedIdentityProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IUserAssignedIdentityProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IUserAssignedIdentityProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IUserAssignedIdentityProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IUserAssignedIdentityProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/UserAssignedIdentityProperties.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/UserAssignedIdentityProperties.cs similarity index 85% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/UserAssignedIdentityProperties.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/UserAssignedIdentityProperties.cs index eabcc6a52b8c..33527ac06b06 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/UserAssignedIdentityProperties.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/UserAssignedIdentityProperties.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotFormat] public partial class UserAssignedIdentityProperties : - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IUserAssignedIdentityProperties, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IUserAssignedIdentityPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IUserAssignedIdentityProperties, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IUserAssignedIdentityPropertiesInternal { /// Backing field for property. @@ -33,6 +33,9 @@ public partial interface IUserAssignedIdentityProperties : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"ARM ID of user Identity selected for encryption", SerializedName = @"userAssignedIdentity", PossibleTypes = new [] { typeof(string) })] diff --git a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/UserAssignedIdentityProperties.json.cs b/src/EventHub/EventHub.Autorest/generated/api/Models/UserAssignedIdentityProperties.json.cs similarity index 93% rename from src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/UserAssignedIdentityProperties.json.cs rename to src/EventHub/EventHub.Autorest/generated/api/Models/UserAssignedIdentityProperties.json.cs index e546396eeb07..a2524955feda 100644 --- a/src/EventHub/EventHub.Autorest/generated/api/Models/Api202301Preview/UserAssignedIdentityProperties.json.cs +++ b/src/EventHub/EventHub.Autorest/generated/api/Models/UserAssignedIdentityProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; @@ -53,13 +53,13 @@ public partial class UserAssignedIdentityProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IUserAssignedIdentityProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IUserAssignedIdentityProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IUserAssignedIdentityProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IUserAssignedIdentityProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IUserAssignedIdentityProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IUserAssignedIdentityProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Json.JsonObject json ? new UserAssignedIdentityProperties(json) : null; } @@ -100,7 +100,7 @@ internal UserAssignedIdentityProperties(Microsoft.Azure.PowerShell.Cmdlets.Event { return; } - {_userAssignedIdentity = If( json?.PropertyT("userAssignedIdentity"), out var __jsonUserAssignedIdentity) ? (string)__jsonUserAssignedIdentity : (string)UserAssignedIdentity;} + {_userAssignedIdentity = If( json?.PropertyT("userAssignedIdentity"), out var __jsonUserAssignedIdentity) ? (string)__jsonUserAssignedIdentity : (string)_userAssignedIdentity;} AfterFromJson(json); } } diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/AccessRights.Completer.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/AccessRights.Completer.cs deleted file mode 100644 index d52d5ee69483..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/AccessRights.Completer.cs +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// Argument completer implementation for AccessRights. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRightsTypeConverter))] - public partial struct AccessRights : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Manage".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Manage'", "Manage", global::System.Management.Automation.CompletionResultType.ParameterValue, "Manage"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Send".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Send'", "Send", global::System.Management.Automation.CompletionResultType.ParameterValue, "Send"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Listen".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Listen'", "Listen", global::System.Management.Automation.CompletionResultType.ParameterValue, "Listen"); - } - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/AccessRights.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/AccessRights.TypeConverter.cs deleted file mode 100644 index 193b56bdc671..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/AccessRights.TypeConverter.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// TypeConverter implementation for AccessRights. - public partial class AccessRightsTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => AccessRights.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/AccessRights.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/AccessRights.cs deleted file mode 100644 index 0273bd36e16b..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/AccessRights.cs +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - public partial struct AccessRights : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights Listen = @"Listen"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights Manage = @"Manage"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights Send = @"Send"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private AccessRights(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Conversion from arbitrary object to AccessRights - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new AccessRights(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type AccessRights - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type AccessRights (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is AccessRights && Equals((AccessRights)obj); - } - - /// Returns hashCode for enum AccessRights - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Returns string representation for AccessRights - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to AccessRights - /// the value to convert to an instance of . - - public static implicit operator AccessRights(string value) - { - return new AccessRights(value); - } - - /// Implicit operator to convert AccessRights to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights e) - { - return e._value; - } - - /// Overriding != operator for enum AccessRights - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum AccessRights - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/CaptureIdentityType.Completer.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/CaptureIdentityType.Completer.cs deleted file mode 100644 index ab8de0a97acc..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/CaptureIdentityType.Completer.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// Type of Azure Active Directory Managed Identity. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityTypeTypeConverter))] - public partial struct CaptureIdentityType : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "SystemAssigned".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'SystemAssigned'", "SystemAssigned", global::System.Management.Automation.CompletionResultType.ParameterValue, "SystemAssigned"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "UserAssigned".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'UserAssigned'", "UserAssigned", global::System.Management.Automation.CompletionResultType.ParameterValue, "UserAssigned"); - } - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/CaptureIdentityType.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/CaptureIdentityType.TypeConverter.cs deleted file mode 100644 index 410338c0b34c..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/CaptureIdentityType.TypeConverter.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// Type of Azure Active Directory Managed Identity. - public partial class CaptureIdentityTypeTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => CaptureIdentityType.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/CaptureIdentityType.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/CaptureIdentityType.cs deleted file mode 100644 index d2779268db21..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/CaptureIdentityType.cs +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// Type of Azure Active Directory Managed Identity. - public partial struct CaptureIdentityType : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType SystemAssigned = @"SystemAssigned"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType UserAssigned = @"UserAssigned"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private CaptureIdentityType(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Conversion from arbitrary object to CaptureIdentityType - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new CaptureIdentityType(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type CaptureIdentityType - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type CaptureIdentityType (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is CaptureIdentityType && Equals((CaptureIdentityType)obj); - } - - /// Returns hashCode for enum CaptureIdentityType - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Returns string representation for CaptureIdentityType - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to CaptureIdentityType - /// the value to convert to an instance of . - - public static implicit operator CaptureIdentityType(string value) - { - return new CaptureIdentityType(value); - } - - /// Implicit operator to convert CaptureIdentityType to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType e) - { - return e._value; - } - - /// Overriding != operator for enum CaptureIdentityType - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum CaptureIdentityType - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/CleanupPolicyRetentionDescription.Completer.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/CleanupPolicyRetentionDescription.Completer.cs deleted file mode 100644 index e8e910ecd5cd..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/CleanupPolicyRetentionDescription.Completer.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// Enumerates the possible values for cleanup policy - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CleanupPolicyRetentionDescriptionTypeConverter))] - public partial struct CleanupPolicyRetentionDescription : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Delete".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Delete'", "Delete", global::System.Management.Automation.CompletionResultType.ParameterValue, "Delete"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Compact".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Compact'", "Compact", global::System.Management.Automation.CompletionResultType.ParameterValue, "Compact"); - } - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/CleanupPolicyRetentionDescription.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/CleanupPolicyRetentionDescription.TypeConverter.cs deleted file mode 100644 index 1e1c096362ff..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/CleanupPolicyRetentionDescription.TypeConverter.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// Enumerates the possible values for cleanup policy - public partial class CleanupPolicyRetentionDescriptionTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => CleanupPolicyRetentionDescription.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/CleanupPolicyRetentionDescription.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/CleanupPolicyRetentionDescription.cs deleted file mode 100644 index 4068c45be9a9..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/CleanupPolicyRetentionDescription.cs +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// Enumerates the possible values for cleanup policy - public partial struct CleanupPolicyRetentionDescription : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CleanupPolicyRetentionDescription Compact = @"Compact"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CleanupPolicyRetentionDescription Delete = @"Delete"; - - /// - /// the value for an instance of the Enum. - /// - private string _value { get; set; } - - /// - /// Creates an instance of the Enum class. - /// - /// the value to create an instance for. - private CleanupPolicyRetentionDescription(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Conversion from arbitrary object to CleanupPolicyRetentionDescription - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new CleanupPolicyRetentionDescription(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type CleanupPolicyRetentionDescription - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CleanupPolicyRetentionDescription e) - { - return _value.Equals(e._value); - } - - /// - /// Compares values of enum type CleanupPolicyRetentionDescription (override for Object) - /// - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is CleanupPolicyRetentionDescription && Equals((CleanupPolicyRetentionDescription)obj); - } - - /// Returns hashCode for enum CleanupPolicyRetentionDescription - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Returns string representation for CleanupPolicyRetentionDescription - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to CleanupPolicyRetentionDescription - /// the value to convert to an instance of . - - public static implicit operator CleanupPolicyRetentionDescription(string value) - { - return new CleanupPolicyRetentionDescription(value); - } - - /// Implicit operator to convert CleanupPolicyRetentionDescription to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CleanupPolicyRetentionDescription e) - { - return e._value; - } - - /// Overriding != operator for enum CleanupPolicyRetentionDescription - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CleanupPolicyRetentionDescription e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CleanupPolicyRetentionDescription e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum CleanupPolicyRetentionDescription - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CleanupPolicyRetentionDescription e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CleanupPolicyRetentionDescription e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/CreatedByType.Completer.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/CreatedByType.Completer.cs deleted file mode 100644 index 796671d1760e..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/CreatedByType.Completer.cs +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// The type of identity that created the resource. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByTypeTypeConverter))] - public partial struct CreatedByType : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "User".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'User'", "User", global::System.Management.Automation.CompletionResultType.ParameterValue, "User"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Application".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Application'", "Application", global::System.Management.Automation.CompletionResultType.ParameterValue, "Application"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "ManagedIdentity".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'ManagedIdentity'", "ManagedIdentity", global::System.Management.Automation.CompletionResultType.ParameterValue, "ManagedIdentity"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Key".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Key'", "Key", global::System.Management.Automation.CompletionResultType.ParameterValue, "Key"); - } - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/CreatedByType.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/CreatedByType.TypeConverter.cs deleted file mode 100644 index 8c400d606629..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/CreatedByType.TypeConverter.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// The type of identity that created the resource. - public partial class CreatedByTypeTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => CreatedByType.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/CreatedByType.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/CreatedByType.cs deleted file mode 100644 index 7aade1c1556d..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/CreatedByType.cs +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// The type of identity that created the resource. - public partial struct CreatedByType : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType Application = @"Application"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType Key = @"Key"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType ManagedIdentity = @"ManagedIdentity"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType User = @"User"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to CreatedByType - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new CreatedByType(global::System.Convert.ToString(value)); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private CreatedByType(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Compares values of enum type CreatedByType - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type CreatedByType (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is CreatedByType && Equals((CreatedByType)obj); - } - - /// Returns hashCode for enum CreatedByType - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Returns string representation for CreatedByType - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to CreatedByType - /// the value to convert to an instance of . - - public static implicit operator CreatedByType(string value) - { - return new CreatedByType(value); - } - - /// Implicit operator to convert CreatedByType to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType e) - { - return e._value; - } - - /// Overriding != operator for enum CreatedByType - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum CreatedByType - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/DefaultAction.Completer.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/DefaultAction.Completer.cs deleted file mode 100644 index 75b6b146ee8e..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/DefaultAction.Completer.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// Default Action for Network Rule Set - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.DefaultActionTypeConverter))] - public partial struct DefaultAction : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Allow".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Allow'", "Allow", global::System.Management.Automation.CompletionResultType.ParameterValue, "Allow"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Deny".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Deny'", "Deny", global::System.Management.Automation.CompletionResultType.ParameterValue, "Deny"); - } - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/DefaultAction.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/DefaultAction.TypeConverter.cs deleted file mode 100644 index d99142f26133..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/DefaultAction.TypeConverter.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// Default Action for Network Rule Set - public partial class DefaultActionTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => DefaultAction.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/DefaultAction.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/DefaultAction.cs deleted file mode 100644 index e285de4858b1..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/DefaultAction.cs +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// Default Action for Network Rule Set - public partial struct DefaultAction : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.DefaultAction Allow = @"Allow"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.DefaultAction Deny = @"Deny"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to DefaultAction - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new DefaultAction(global::System.Convert.ToString(value)); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private DefaultAction(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Compares values of enum type DefaultAction - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.DefaultAction e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type DefaultAction (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is DefaultAction && Equals((DefaultAction)obj); - } - - /// Returns hashCode for enum DefaultAction - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Returns string representation for DefaultAction - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to DefaultAction - /// the value to convert to an instance of . - - public static implicit operator DefaultAction(string value) - { - return new DefaultAction(value); - } - - /// Implicit operator to convert DefaultAction to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.DefaultAction e) - { - return e._value; - } - - /// Overriding != operator for enum DefaultAction - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.DefaultAction e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.DefaultAction e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum DefaultAction - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.DefaultAction e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.DefaultAction e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/EncodingCaptureDescription.Completer.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/EncodingCaptureDescription.Completer.cs deleted file mode 100644 index 056412571e54..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/EncodingCaptureDescription.Completer.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// - /// Enumerates the possible values for the encoding format of capture description. Note: 'AvroDeflate' will be deprecated - /// in New API Version - /// - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescriptionTypeConverter))] - public partial struct EncodingCaptureDescription : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Avro".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Avro'", "Avro", global::System.Management.Automation.CompletionResultType.ParameterValue, "Avro"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "AvroDeflate".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'AvroDeflate'", "AvroDeflate", global::System.Management.Automation.CompletionResultType.ParameterValue, "AvroDeflate"); - } - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/EncodingCaptureDescription.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/EncodingCaptureDescription.TypeConverter.cs deleted file mode 100644 index a33f9989c181..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/EncodingCaptureDescription.TypeConverter.cs +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// - /// Enumerates the possible values for the encoding format of capture description. Note: 'AvroDeflate' will be deprecated - /// in New API Version - /// - public partial class EncodingCaptureDescriptionTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => EncodingCaptureDescription.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/EncodingCaptureDescription.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/EncodingCaptureDescription.cs deleted file mode 100644 index 502c1e3d6812..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/EncodingCaptureDescription.cs +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// - /// Enumerates the possible values for the encoding format of capture description. Note: 'AvroDeflate' will be deprecated - /// in New API Version - /// - public partial struct EncodingCaptureDescription : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription Avro = @"Avro"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription AvroDeflate = @"AvroDeflate"; - - /// - /// the value for an instance of the Enum. - /// - private string _value { get; set; } - - /// Conversion from arbitrary object to EncodingCaptureDescription - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new EncodingCaptureDescription(global::System.Convert.ToString(value)); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private EncodingCaptureDescription(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Compares values of enum type EncodingCaptureDescription - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type EncodingCaptureDescription (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is EncodingCaptureDescription && Equals((EncodingCaptureDescription)obj); - } - - /// Returns hashCode for enum EncodingCaptureDescription - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Returns string representation for EncodingCaptureDescription - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to EncodingCaptureDescription - /// the value to convert to an instance of . - - public static implicit operator EncodingCaptureDescription(string value) - { - return new EncodingCaptureDescription(value); - } - - /// Implicit operator to convert EncodingCaptureDescription to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription e) - { - return e._value; - } - - /// Overriding != operator for enum EncodingCaptureDescription - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum EncodingCaptureDescription - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/EndPointProvisioningState.Completer.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/EndPointProvisioningState.Completer.cs deleted file mode 100644 index a1944949ac5f..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/EndPointProvisioningState.Completer.cs +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// Provisioning state of the Private Endpoint Connection. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EndPointProvisioningStateTypeConverter))] - public partial struct EndPointProvisioningState : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Creating".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Creating'", "Creating", global::System.Management.Automation.CompletionResultType.ParameterValue, "Creating"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Updating".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Updating'", "Updating", global::System.Management.Automation.CompletionResultType.ParameterValue, "Updating"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Deleting".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Deleting'", "Deleting", global::System.Management.Automation.CompletionResultType.ParameterValue, "Deleting"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Succeeded".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Succeeded'", "Succeeded", global::System.Management.Automation.CompletionResultType.ParameterValue, "Succeeded"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Canceled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Canceled'", "Canceled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Canceled"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Failed".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Failed'", "Failed", global::System.Management.Automation.CompletionResultType.ParameterValue, "Failed"); - } - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/EndPointProvisioningState.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/EndPointProvisioningState.TypeConverter.cs deleted file mode 100644 index 6ad12ebffe50..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/EndPointProvisioningState.TypeConverter.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// Provisioning state of the Private Endpoint Connection. - public partial class EndPointProvisioningStateTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => EndPointProvisioningState.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/EndPointProvisioningState.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/EndPointProvisioningState.cs deleted file mode 100644 index 352a497b457b..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/EndPointProvisioningState.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// Provisioning state of the Private Endpoint Connection. - public partial struct EndPointProvisioningState : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EndPointProvisioningState Canceled = @"Canceled"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EndPointProvisioningState Creating = @"Creating"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EndPointProvisioningState Deleting = @"Deleting"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EndPointProvisioningState Failed = @"Failed"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EndPointProvisioningState Succeeded = @"Succeeded"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EndPointProvisioningState Updating = @"Updating"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to EndPointProvisioningState - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new EndPointProvisioningState(global::System.Convert.ToString(value)); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private EndPointProvisioningState(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Compares values of enum type EndPointProvisioningState - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EndPointProvisioningState e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type EndPointProvisioningState (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is EndPointProvisioningState && Equals((EndPointProvisioningState)obj); - } - - /// Returns hashCode for enum EndPointProvisioningState - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Returns string representation for EndPointProvisioningState - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to EndPointProvisioningState - /// the value to convert to an instance of . - - public static implicit operator EndPointProvisioningState(string value) - { - return new EndPointProvisioningState(value); - } - - /// Implicit operator to convert EndPointProvisioningState to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EndPointProvisioningState e) - { - return e._value; - } - - /// Overriding != operator for enum EndPointProvisioningState - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EndPointProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EndPointProvisioningState e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum EndPointProvisioningState - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EndPointProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EndPointProvisioningState e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/EntityStatus.Completer.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/EntityStatus.Completer.cs deleted file mode 100644 index 2b1cc2702c20..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/EntityStatus.Completer.cs +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// Enumerates the possible values for the status of the Event Hub. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatusTypeConverter))] - public partial struct EntityStatus : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Active".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Active'", "Active", global::System.Management.Automation.CompletionResultType.ParameterValue, "Active"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Disabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Disabled'", "Disabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Disabled"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Restoring".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Restoring'", "Restoring", global::System.Management.Automation.CompletionResultType.ParameterValue, "Restoring"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "SendDisabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'SendDisabled'", "SendDisabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "SendDisabled"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "ReceiveDisabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'ReceiveDisabled'", "ReceiveDisabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "ReceiveDisabled"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Creating".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Creating'", "Creating", global::System.Management.Automation.CompletionResultType.ParameterValue, "Creating"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Deleting".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Deleting'", "Deleting", global::System.Management.Automation.CompletionResultType.ParameterValue, "Deleting"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Renaming".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Renaming'", "Renaming", global::System.Management.Automation.CompletionResultType.ParameterValue, "Renaming"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Unknown".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Unknown'", "Unknown", global::System.Management.Automation.CompletionResultType.ParameterValue, "Unknown"); - } - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/EntityStatus.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/EntityStatus.TypeConverter.cs deleted file mode 100644 index e7cea8a2062b..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/EntityStatus.TypeConverter.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// Enumerates the possible values for the status of the Event Hub. - public partial class EntityStatusTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => EntityStatus.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/EntityStatus.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/EntityStatus.cs deleted file mode 100644 index 2d70c5d3d8e7..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/EntityStatus.cs +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// Enumerates the possible values for the status of the Event Hub. - public partial struct EntityStatus : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus Active = @"Active"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus Creating = @"Creating"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus Deleting = @"Deleting"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus Disabled = @"Disabled"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus ReceiveDisabled = @"ReceiveDisabled"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus Renaming = @"Renaming"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus Restoring = @"Restoring"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus SendDisabled = @"SendDisabled"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus Unknown = @"Unknown"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to EntityStatus - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new EntityStatus(global::System.Convert.ToString(value)); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private EntityStatus(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Compares values of enum type EntityStatus - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type EntityStatus (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is EntityStatus && Equals((EntityStatus)obj); - } - - /// Returns hashCode for enum EntityStatus - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Returns string representation for EntityStatus - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to EntityStatus - /// the value to convert to an instance of . - - public static implicit operator EntityStatus(string value) - { - return new EntityStatus(value); - } - - /// Implicit operator to convert EntityStatus to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus e) - { - return e._value; - } - - /// Overriding != operator for enum EntityStatus - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum EntityStatus - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/GeoDrRoleType.Completer.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/GeoDrRoleType.Completer.cs deleted file mode 100644 index f7dad3f2ef6d..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/GeoDrRoleType.Completer.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// GeoDR Role Types - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.GeoDrRoleTypeTypeConverter))] - public partial struct GeoDrRoleType : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Primary".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Primary'", "Primary", global::System.Management.Automation.CompletionResultType.ParameterValue, "Primary"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Secondary".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Secondary'", "Secondary", global::System.Management.Automation.CompletionResultType.ParameterValue, "Secondary"); - } - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/GeoDrRoleType.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/GeoDrRoleType.TypeConverter.cs deleted file mode 100644 index 441482279cbf..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/GeoDrRoleType.TypeConverter.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// GeoDR Role Types - public partial class GeoDrRoleTypeTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => GeoDrRoleType.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/GeoDrRoleType.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/GeoDrRoleType.cs deleted file mode 100644 index 2663999c8c58..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/GeoDrRoleType.cs +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// GeoDR Role Types - public partial struct GeoDrRoleType : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.GeoDrRoleType Primary = @"Primary"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.GeoDrRoleType Secondary = @"Secondary"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to GeoDrRoleType - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new GeoDrRoleType(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type GeoDrRoleType - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.GeoDrRoleType e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type GeoDrRoleType (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is GeoDrRoleType && Equals((GeoDrRoleType)obj); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private GeoDrRoleType(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns hashCode for enum GeoDrRoleType - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Returns string representation for GeoDrRoleType - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to GeoDrRoleType - /// the value to convert to an instance of . - - public static implicit operator GeoDrRoleType(string value) - { - return new GeoDrRoleType(value); - } - - /// Implicit operator to convert GeoDrRoleType to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.GeoDrRoleType e) - { - return e._value; - } - - /// Overriding != operator for enum GeoDrRoleType - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.GeoDrRoleType e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.GeoDrRoleType e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum GeoDrRoleType - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.GeoDrRoleType e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.GeoDrRoleType e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/KeySource.Completer.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/KeySource.Completer.cs deleted file mode 100644 index 63bd20ee0e34..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/KeySource.Completer.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// Enumerates the possible value of keySource for Encryption - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeySourceTypeConverter))] - public partial struct KeySource : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Microsoft.KeyVault".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Microsoft.KeyVault'", "Microsoft.KeyVault", global::System.Management.Automation.CompletionResultType.ParameterValue, "Microsoft.KeyVault"); - } - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/KeySource.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/KeySource.TypeConverter.cs deleted file mode 100644 index 643d79464055..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/KeySource.TypeConverter.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// Enumerates the possible value of keySource for Encryption - public partial class KeySourceTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => KeySource.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/KeySource.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/KeySource.cs deleted file mode 100644 index ce515222e97b..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/KeySource.cs +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// Enumerates the possible value of keySource for Encryption - public partial struct KeySource : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeySource MicrosoftKeyVault = @"Microsoft.KeyVault"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to KeySource - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new KeySource(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type KeySource - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeySource e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type KeySource (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is KeySource && Equals((KeySource)obj); - } - - /// Returns hashCode for enum KeySource - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private KeySource(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for KeySource - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to KeySource - /// the value to convert to an instance of . - - public static implicit operator KeySource(string value) - { - return new KeySource(value); - } - - /// Implicit operator to convert KeySource to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeySource e) - { - return e._value; - } - - /// Overriding != operator for enum KeySource - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeySource e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeySource e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum KeySource - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeySource e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeySource e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/KeyType.Completer.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/KeyType.Completer.cs deleted file mode 100644 index cc3bbd3e1829..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/KeyType.Completer.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// The access key to regenerate. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeyTypeTypeConverter))] - public partial struct KeyType : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "PrimaryKey".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'PrimaryKey'", "PrimaryKey", global::System.Management.Automation.CompletionResultType.ParameterValue, "PrimaryKey"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "SecondaryKey".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'SecondaryKey'", "SecondaryKey", global::System.Management.Automation.CompletionResultType.ParameterValue, "SecondaryKey"); - } - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/KeyType.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/KeyType.TypeConverter.cs deleted file mode 100644 index 75d131f2530f..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/KeyType.TypeConverter.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// The access key to regenerate. - public partial class KeyTypeTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => KeyType.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/KeyType.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/KeyType.cs deleted file mode 100644 index 4ad45ea33af8..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/KeyType.cs +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// The access key to regenerate. - public partial struct KeyType : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeyType PrimaryKey = @"PrimaryKey"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeyType SecondaryKey = @"SecondaryKey"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to KeyType - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new KeyType(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type KeyType - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeyType e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type KeyType (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is KeyType && Equals((KeyType)obj); - } - - /// Returns hashCode for enum KeyType - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private KeyType(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for KeyType - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to KeyType - /// the value to convert to an instance of . - - public static implicit operator KeyType(string value) - { - return new KeyType(value); - } - - /// Implicit operator to convert KeyType to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeyType e) - { - return e._value; - } - - /// Overriding != operator for enum KeyType - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeyType e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeyType e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum KeyType - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeyType e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeyType e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/ManagedServiceIdentityType.Completer.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/ManagedServiceIdentityType.Completer.cs deleted file mode 100644 index 94287209e593..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/ManagedServiceIdentityType.Completer.cs +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// Type of managed service identity. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityTypeTypeConverter))] - public partial struct ManagedServiceIdentityType : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "SystemAssigned".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'SystemAssigned'", "SystemAssigned", global::System.Management.Automation.CompletionResultType.ParameterValue, "SystemAssigned"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "UserAssigned".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'UserAssigned'", "UserAssigned", global::System.Management.Automation.CompletionResultType.ParameterValue, "UserAssigned"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "SystemAssigned, UserAssigned".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'SystemAssigned, UserAssigned'", "SystemAssigned, UserAssigned", global::System.Management.Automation.CompletionResultType.ParameterValue, "SystemAssigned, UserAssigned"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "None".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'None'", "None", global::System.Management.Automation.CompletionResultType.ParameterValue, "None"); - } - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/ManagedServiceIdentityType.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/ManagedServiceIdentityType.TypeConverter.cs deleted file mode 100644 index 0a233c9be548..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/ManagedServiceIdentityType.TypeConverter.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// Type of managed service identity. - public partial class ManagedServiceIdentityTypeTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ManagedServiceIdentityType.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/ManagedServiceIdentityType.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/ManagedServiceIdentityType.cs deleted file mode 100644 index 6586034ce0b2..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/ManagedServiceIdentityType.cs +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// Type of managed service identity. - public partial struct ManagedServiceIdentityType : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType None = @"None"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType SystemAssigned = @"SystemAssigned"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType SystemAssignedUserAssigned = @"SystemAssigned, UserAssigned"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType UserAssigned = @"UserAssigned"; - - /// - /// the value for an instance of the Enum. - /// - private string _value { get; set; } - - /// Conversion from arbitrary object to ManagedServiceIdentityType - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new ManagedServiceIdentityType(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type ManagedServiceIdentityType - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type ManagedServiceIdentityType (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is ManagedServiceIdentityType && Equals((ManagedServiceIdentityType)obj); - } - - /// Returns hashCode for enum ManagedServiceIdentityType - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private ManagedServiceIdentityType(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for ManagedServiceIdentityType - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to ManagedServiceIdentityType - /// the value to convert to an instance of . - - public static implicit operator ManagedServiceIdentityType(string value) - { - return new ManagedServiceIdentityType(value); - } - - /// Implicit operator to convert ManagedServiceIdentityType to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType e) - { - return e._value; - } - - /// Overriding != operator for enum ManagedServiceIdentityType - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum ManagedServiceIdentityType - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/MetricId.Completer.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/MetricId.Completer.cs deleted file mode 100644 index 4d5190350d57..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/MetricId.Completer.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// - /// Metric Id on which the throttle limit should be set, MetricId can be discovered by hovering over Metric in the Metrics - /// section of Event Hub Namespace inside Azure Portal - /// - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.MetricIdTypeConverter))] - public partial struct MetricId : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "IncomingBytes".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'IncomingBytes'", "IncomingBytes", global::System.Management.Automation.CompletionResultType.ParameterValue, "IncomingBytes"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "OutgoingBytes".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'OutgoingBytes'", "OutgoingBytes", global::System.Management.Automation.CompletionResultType.ParameterValue, "OutgoingBytes"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "IncomingMessages".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'IncomingMessages'", "IncomingMessages", global::System.Management.Automation.CompletionResultType.ParameterValue, "IncomingMessages"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "OutgoingMessages".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'OutgoingMessages'", "OutgoingMessages", global::System.Management.Automation.CompletionResultType.ParameterValue, "OutgoingMessages"); - } - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/MetricId.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/MetricId.TypeConverter.cs deleted file mode 100644 index 9f89ef2e2d62..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/MetricId.TypeConverter.cs +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// - /// Metric Id on which the throttle limit should be set, MetricId can be discovered by hovering over Metric in the Metrics - /// section of Event Hub Namespace inside Azure Portal - /// - public partial class MetricIdTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => MetricId.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/MetricId.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/MetricId.cs deleted file mode 100644 index d132d60e86d3..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/MetricId.cs +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// - /// Metric Id on which the throttle limit should be set, MetricId can be discovered by hovering over Metric in the Metrics - /// section of Event Hub Namespace inside Azure Portal - /// - public partial struct MetricId : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.MetricId IncomingBytes = @"IncomingBytes"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.MetricId IncomingMessages = @"IncomingMessages"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.MetricId OutgoingBytes = @"OutgoingBytes"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.MetricId OutgoingMessages = @"OutgoingMessages"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to MetricId - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new MetricId(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type MetricId - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.MetricId e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type MetricId (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is MetricId && Equals((MetricId)obj); - } - - /// Returns hashCode for enum MetricId - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private MetricId(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for MetricId - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to MetricId - /// the value to convert to an instance of . - - public static implicit operator MetricId(string value) - { - return new MetricId(value); - } - - /// Implicit operator to convert MetricId to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.MetricId e) - { - return e._value; - } - - /// Overriding != operator for enum MetricId - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.MetricId e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.MetricId e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum MetricId - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.MetricId e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.MetricId e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/NetworkRuleIPAction.Completer.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/NetworkRuleIPAction.Completer.cs deleted file mode 100644 index 14d61af53dab..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/NetworkRuleIPAction.Completer.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// The IP Filter Action - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkRuleIPActionTypeConverter))] - public partial struct NetworkRuleIPAction : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Allow".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Allow'", "Allow", global::System.Management.Automation.CompletionResultType.ParameterValue, "Allow"); - } - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/NetworkRuleIPAction.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/NetworkRuleIPAction.TypeConverter.cs deleted file mode 100644 index 0fa107a7ddb7..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/NetworkRuleIPAction.TypeConverter.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// The IP Filter Action - public partial class NetworkRuleIPActionTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => NetworkRuleIPAction.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/NetworkRuleIPAction.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/NetworkRuleIPAction.cs deleted file mode 100644 index 1427b5a35478..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/NetworkRuleIPAction.cs +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// The IP Filter Action - public partial struct NetworkRuleIPAction : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkRuleIPAction Allow = @"Allow"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to NetworkRuleIPAction - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new NetworkRuleIPAction(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type NetworkRuleIPAction - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkRuleIPAction e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type NetworkRuleIPAction (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is NetworkRuleIPAction && Equals((NetworkRuleIPAction)obj); - } - - /// Returns hashCode for enum NetworkRuleIPAction - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private NetworkRuleIPAction(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for NetworkRuleIPAction - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to NetworkRuleIPAction - /// the value to convert to an instance of . - - public static implicit operator NetworkRuleIPAction(string value) - { - return new NetworkRuleIPAction(value); - } - - /// Implicit operator to convert NetworkRuleIPAction to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkRuleIPAction e) - { - return e._value; - } - - /// Overriding != operator for enum NetworkRuleIPAction - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkRuleIPAction e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkRuleIPAction e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum NetworkRuleIPAction - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkRuleIPAction e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkRuleIPAction e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/NetworkSecurityPerimeterConfigurationProvisioningState.Completer.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/NetworkSecurityPerimeterConfigurationProvisioningState.Completer.cs deleted file mode 100644 index de0418543511..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/NetworkSecurityPerimeterConfigurationProvisioningState.Completer.cs +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// Provisioning state of NetworkSecurityPerimeter configuration propagation - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkSecurityPerimeterConfigurationProvisioningStateTypeConverter))] - public partial struct NetworkSecurityPerimeterConfigurationProvisioningState : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Unknown".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Unknown'", "Unknown", global::System.Management.Automation.CompletionResultType.ParameterValue, "Unknown"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Creating".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Creating'", "Creating", global::System.Management.Automation.CompletionResultType.ParameterValue, "Creating"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Updating".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Updating'", "Updating", global::System.Management.Automation.CompletionResultType.ParameterValue, "Updating"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Accepted".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Accepted'", "Accepted", global::System.Management.Automation.CompletionResultType.ParameterValue, "Accepted"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "InvalidResponse".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'InvalidResponse'", "InvalidResponse", global::System.Management.Automation.CompletionResultType.ParameterValue, "InvalidResponse"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Succeeded".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Succeeded'", "Succeeded", global::System.Management.Automation.CompletionResultType.ParameterValue, "Succeeded"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "SucceededWithIssues".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'SucceededWithIssues'", "SucceededWithIssues", global::System.Management.Automation.CompletionResultType.ParameterValue, "SucceededWithIssues"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Failed".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Failed'", "Failed", global::System.Management.Automation.CompletionResultType.ParameterValue, "Failed"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Deleting".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Deleting'", "Deleting", global::System.Management.Automation.CompletionResultType.ParameterValue, "Deleting"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Deleted".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Deleted'", "Deleted", global::System.Management.Automation.CompletionResultType.ParameterValue, "Deleted"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Canceled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Canceled'", "Canceled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Canceled"); - } - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/NetworkSecurityPerimeterConfigurationProvisioningState.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/NetworkSecurityPerimeterConfigurationProvisioningState.TypeConverter.cs deleted file mode 100644 index f09197407aac..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/NetworkSecurityPerimeterConfigurationProvisioningState.TypeConverter.cs +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// Provisioning state of NetworkSecurityPerimeter configuration propagation - public partial class NetworkSecurityPerimeterConfigurationProvisioningStateTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable - /// conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => NetworkSecurityPerimeterConfigurationProvisioningState.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/NetworkSecurityPerimeterConfigurationProvisioningState.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/NetworkSecurityPerimeterConfigurationProvisioningState.cs deleted file mode 100644 index 3d5e2e8f9356..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/NetworkSecurityPerimeterConfigurationProvisioningState.cs +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// Provisioning state of NetworkSecurityPerimeter configuration propagation - public partial struct NetworkSecurityPerimeterConfigurationProvisioningState : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkSecurityPerimeterConfigurationProvisioningState Accepted = @"Accepted"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkSecurityPerimeterConfigurationProvisioningState Canceled = @"Canceled"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkSecurityPerimeterConfigurationProvisioningState Creating = @"Creating"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkSecurityPerimeterConfigurationProvisioningState Deleted = @"Deleted"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkSecurityPerimeterConfigurationProvisioningState Deleting = @"Deleting"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkSecurityPerimeterConfigurationProvisioningState Failed = @"Failed"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkSecurityPerimeterConfigurationProvisioningState InvalidResponse = @"InvalidResponse"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkSecurityPerimeterConfigurationProvisioningState Succeeded = @"Succeeded"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkSecurityPerimeterConfigurationProvisioningState SucceededWithIssues = @"SucceededWithIssues"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkSecurityPerimeterConfigurationProvisioningState Unknown = @"Unknown"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkSecurityPerimeterConfigurationProvisioningState Updating = @"Updating"; - - /// - /// the value for an instance of the Enum. - /// - private string _value { get; set; } - - /// - /// Conversion from arbitrary object to NetworkSecurityPerimeterConfigurationProvisioningState - /// - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new NetworkSecurityPerimeterConfigurationProvisioningState(global::System.Convert.ToString(value)); - } - - /// - /// Compares values of enum type NetworkSecurityPerimeterConfigurationProvisioningState - /// - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkSecurityPerimeterConfigurationProvisioningState e) - { - return _value.Equals(e._value); - } - - /// - /// Compares values of enum type NetworkSecurityPerimeterConfigurationProvisioningState (override for Object) - /// - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is NetworkSecurityPerimeterConfigurationProvisioningState && Equals((NetworkSecurityPerimeterConfigurationProvisioningState)obj); - } - - /// - /// Returns hashCode for enum NetworkSecurityPerimeterConfigurationProvisioningState - /// - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// - /// Creates an instance of the Enum class. - /// - /// the value to create an instance for. - private NetworkSecurityPerimeterConfigurationProvisioningState(string underlyingValue) - { - this._value = underlyingValue; - } - - /// - /// Returns string representation for NetworkSecurityPerimeterConfigurationProvisioningState - /// - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// - /// Implicit operator to convert string to NetworkSecurityPerimeterConfigurationProvisioningState - /// - /// the value to convert to an instance of . - - public static implicit operator NetworkSecurityPerimeterConfigurationProvisioningState(string value) - { - return new NetworkSecurityPerimeterConfigurationProvisioningState(value); - } - - /// - /// Implicit operator to convert NetworkSecurityPerimeterConfigurationProvisioningState to string - /// - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkSecurityPerimeterConfigurationProvisioningState e) - { - return e._value; - } - - /// - /// Overriding != operator for enum NetworkSecurityPerimeterConfigurationProvisioningState - /// - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkSecurityPerimeterConfigurationProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkSecurityPerimeterConfigurationProvisioningState e2) - { - return !e2.Equals(e1); - } - - /// - /// Overriding == operator for enum NetworkSecurityPerimeterConfigurationProvisioningState - /// - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkSecurityPerimeterConfigurationProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkSecurityPerimeterConfigurationProvisioningState e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/NspAccessRuleDirection.Completer.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/NspAccessRuleDirection.Completer.cs deleted file mode 100644 index 6ab2b3cbd6b4..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/NspAccessRuleDirection.Completer.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// Direction of Access Rule - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NspAccessRuleDirectionTypeConverter))] - public partial struct NspAccessRuleDirection : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Inbound".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Inbound'", "Inbound", global::System.Management.Automation.CompletionResultType.ParameterValue, "Inbound"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Outbound".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Outbound'", "Outbound", global::System.Management.Automation.CompletionResultType.ParameterValue, "Outbound"); - } - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/NspAccessRuleDirection.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/NspAccessRuleDirection.TypeConverter.cs deleted file mode 100644 index 897391fb417a..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/NspAccessRuleDirection.TypeConverter.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// Direction of Access Rule - public partial class NspAccessRuleDirectionTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => NspAccessRuleDirection.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/NspAccessRuleDirection.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/NspAccessRuleDirection.cs deleted file mode 100644 index 8544ca7f6407..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/NspAccessRuleDirection.cs +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// Direction of Access Rule - public partial struct NspAccessRuleDirection : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NspAccessRuleDirection Inbound = @"Inbound"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NspAccessRuleDirection Outbound = @"Outbound"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to NspAccessRuleDirection - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new NspAccessRuleDirection(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type NspAccessRuleDirection - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NspAccessRuleDirection e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type NspAccessRuleDirection (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is NspAccessRuleDirection && Equals((NspAccessRuleDirection)obj); - } - - /// Returns hashCode for enum NspAccessRuleDirection - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private NspAccessRuleDirection(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for NspAccessRuleDirection - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to NspAccessRuleDirection - /// the value to convert to an instance of . - - public static implicit operator NspAccessRuleDirection(string value) - { - return new NspAccessRuleDirection(value); - } - - /// Implicit operator to convert NspAccessRuleDirection to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NspAccessRuleDirection e) - { - return e._value; - } - - /// Overriding != operator for enum NspAccessRuleDirection - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NspAccessRuleDirection e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NspAccessRuleDirection e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum NspAccessRuleDirection - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NspAccessRuleDirection e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NspAccessRuleDirection e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/PrivateLinkConnectionStatus.Completer.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/PrivateLinkConnectionStatus.Completer.cs deleted file mode 100644 index bd832dab5623..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/PrivateLinkConnectionStatus.Completer.cs +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// Status of the connection. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PrivateLinkConnectionStatusTypeConverter))] - public partial struct PrivateLinkConnectionStatus : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Pending".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Pending'", "Pending", global::System.Management.Automation.CompletionResultType.ParameterValue, "Pending"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Approved".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Approved'", "Approved", global::System.Management.Automation.CompletionResultType.ParameterValue, "Approved"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Rejected".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Rejected'", "Rejected", global::System.Management.Automation.CompletionResultType.ParameterValue, "Rejected"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Disconnected".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Disconnected'", "Disconnected", global::System.Management.Automation.CompletionResultType.ParameterValue, "Disconnected"); - } - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/PrivateLinkConnectionStatus.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/PrivateLinkConnectionStatus.TypeConverter.cs deleted file mode 100644 index 7eb57c4a76b8..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/PrivateLinkConnectionStatus.TypeConverter.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// Status of the connection. - public partial class PrivateLinkConnectionStatusTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => PrivateLinkConnectionStatus.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/PrivateLinkConnectionStatus.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/PrivateLinkConnectionStatus.cs deleted file mode 100644 index 3cc3ab67b999..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/PrivateLinkConnectionStatus.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// Status of the connection. - public partial struct PrivateLinkConnectionStatus : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PrivateLinkConnectionStatus Approved = @"Approved"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PrivateLinkConnectionStatus Disconnected = @"Disconnected"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PrivateLinkConnectionStatus Pending = @"Pending"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PrivateLinkConnectionStatus Rejected = @"Rejected"; - - /// - /// the value for an instance of the Enum. - /// - private string _value { get; set; } - - /// Conversion from arbitrary object to PrivateLinkConnectionStatus - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new PrivateLinkConnectionStatus(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type PrivateLinkConnectionStatus - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PrivateLinkConnectionStatus e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type PrivateLinkConnectionStatus (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is PrivateLinkConnectionStatus && Equals((PrivateLinkConnectionStatus)obj); - } - - /// Returns hashCode for enum PrivateLinkConnectionStatus - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// - /// Creates an instance of the Enum class. - /// - /// the value to create an instance for. - private PrivateLinkConnectionStatus(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for PrivateLinkConnectionStatus - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to PrivateLinkConnectionStatus - /// the value to convert to an instance of . - - public static implicit operator PrivateLinkConnectionStatus(string value) - { - return new PrivateLinkConnectionStatus(value); - } - - /// Implicit operator to convert PrivateLinkConnectionStatus to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PrivateLinkConnectionStatus e) - { - return e._value; - } - - /// Overriding != operator for enum PrivateLinkConnectionStatus - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PrivateLinkConnectionStatus e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PrivateLinkConnectionStatus e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum PrivateLinkConnectionStatus - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PrivateLinkConnectionStatus e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PrivateLinkConnectionStatus e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/ProvisioningState.Completer.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/ProvisioningState.Completer.cs deleted file mode 100644 index 898531ac8341..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/ProvisioningState.Completer.cs +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// Provisioning state of the Cluster. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningStateTypeConverter))] - public partial struct ProvisioningState : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Unknown".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Unknown'", "Unknown", global::System.Management.Automation.CompletionResultType.ParameterValue, "Unknown"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Creating".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Creating'", "Creating", global::System.Management.Automation.CompletionResultType.ParameterValue, "Creating"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Deleting".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Deleting'", "Deleting", global::System.Management.Automation.CompletionResultType.ParameterValue, "Deleting"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Scaling".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Scaling'", "Scaling", global::System.Management.Automation.CompletionResultType.ParameterValue, "Scaling"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Active".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Active'", "Active", global::System.Management.Automation.CompletionResultType.ParameterValue, "Active"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Failed".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Failed'", "Failed", global::System.Management.Automation.CompletionResultType.ParameterValue, "Failed"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Succeeded".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Succeeded'", "Succeeded", global::System.Management.Automation.CompletionResultType.ParameterValue, "Succeeded"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Canceled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Canceled'", "Canceled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Canceled"); - } - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/ProvisioningState.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/ProvisioningState.TypeConverter.cs deleted file mode 100644 index 35c1256b40a3..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/ProvisioningState.TypeConverter.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// Provisioning state of the Cluster. - public partial class ProvisioningStateTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ProvisioningState.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/ProvisioningState.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/ProvisioningState.cs deleted file mode 100644 index 14591117565c..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/ProvisioningState.cs +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// Provisioning state of the Cluster. - public partial struct ProvisioningState : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningState Active = @"Active"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningState Canceled = @"Canceled"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningState Creating = @"Creating"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningState Deleting = @"Deleting"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningState Failed = @"Failed"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningState Scaling = @"Scaling"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningState Succeeded = @"Succeeded"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningState Unknown = @"Unknown"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to ProvisioningState - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new ProvisioningState(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type ProvisioningState - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningState e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type ProvisioningState (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is ProvisioningState && Equals((ProvisioningState)obj); - } - - /// Returns hashCode for enum ProvisioningState - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private ProvisioningState(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for ProvisioningState - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to ProvisioningState - /// the value to convert to an instance of . - - public static implicit operator ProvisioningState(string value) - { - return new ProvisioningState(value); - } - - /// Implicit operator to convert ProvisioningState to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningState e) - { - return e._value; - } - - /// Overriding != operator for enum ProvisioningState - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningState e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum ProvisioningState - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningState e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/ProvisioningStateDr.Completer.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/ProvisioningStateDr.Completer.cs deleted file mode 100644 index 492ad4095964..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/ProvisioningStateDr.Completer.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// - /// Provisioning state of the Alias(Disaster Recovery configuration) - possible values 'Accepted' or 'Succeeded' or 'Failed' - /// - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningStateDrTypeConverter))] - public partial struct ProvisioningStateDr : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Accepted".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Accepted'", "Accepted", global::System.Management.Automation.CompletionResultType.ParameterValue, "Accepted"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Succeeded".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Succeeded'", "Succeeded", global::System.Management.Automation.CompletionResultType.ParameterValue, "Succeeded"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Failed".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Failed'", "Failed", global::System.Management.Automation.CompletionResultType.ParameterValue, "Failed"); - } - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/ProvisioningStateDr.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/ProvisioningStateDr.TypeConverter.cs deleted file mode 100644 index 0220b8fdf68c..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/ProvisioningStateDr.TypeConverter.cs +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// - /// Provisioning state of the Alias(Disaster Recovery configuration) - possible values 'Accepted' or 'Succeeded' or 'Failed' - /// - public partial class ProvisioningStateDrTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ProvisioningStateDr.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/ProvisioningStateDr.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/ProvisioningStateDr.cs deleted file mode 100644 index ebb9e9a519e0..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/ProvisioningStateDr.cs +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// - /// Provisioning state of the Alias(Disaster Recovery configuration) - possible values 'Accepted' or 'Succeeded' or 'Failed' - /// - public partial struct ProvisioningStateDr : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningStateDr Accepted = @"Accepted"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningStateDr Failed = @"Failed"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningStateDr Succeeded = @"Succeeded"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to ProvisioningStateDr - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new ProvisioningStateDr(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type ProvisioningStateDr - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningStateDr e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type ProvisioningStateDr (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is ProvisioningStateDr && Equals((ProvisioningStateDr)obj); - } - - /// Returns hashCode for enum ProvisioningStateDr - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private ProvisioningStateDr(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for ProvisioningStateDr - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to ProvisioningStateDr - /// the value to convert to an instance of . - - public static implicit operator ProvisioningStateDr(string value) - { - return new ProvisioningStateDr(value); - } - - /// Implicit operator to convert ProvisioningStateDr to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningStateDr e) - { - return e._value; - } - - /// Overriding != operator for enum ProvisioningStateDr - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningStateDr e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningStateDr e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum ProvisioningStateDr - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningStateDr e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningStateDr e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/PublicNetworkAccess.Completer.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/PublicNetworkAccess.Completer.cs deleted file mode 100644 index 9aea5a3c2602..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/PublicNetworkAccess.Completer.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// - /// This determines if traffic is allowed over public network. By default it is enabled. - /// - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccessTypeConverter))] - public partial struct PublicNetworkAccess : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Enabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Enabled'", "Enabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Enabled"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Disabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Disabled'", "Disabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Disabled"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "SecuredByPerimeter".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'SecuredByPerimeter'", "SecuredByPerimeter", global::System.Management.Automation.CompletionResultType.ParameterValue, "SecuredByPerimeter"); - } - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/PublicNetworkAccess.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/PublicNetworkAccess.TypeConverter.cs deleted file mode 100644 index 40a1fbae52d1..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/PublicNetworkAccess.TypeConverter.cs +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// - /// This determines if traffic is allowed over public network. By default it is enabled. - /// - public partial class PublicNetworkAccessTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => PublicNetworkAccess.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/PublicNetworkAccess.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/PublicNetworkAccess.cs deleted file mode 100644 index 7293d484000d..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/PublicNetworkAccess.cs +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// - /// This determines if traffic is allowed over public network. By default it is enabled. - /// - public partial struct PublicNetworkAccess : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess Disabled = @"Disabled"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess Enabled = @"Enabled"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess SecuredByPerimeter = @"SecuredByPerimeter"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to PublicNetworkAccess - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new PublicNetworkAccess(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type PublicNetworkAccess - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type PublicNetworkAccess (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is PublicNetworkAccess && Equals((PublicNetworkAccess)obj); - } - - /// Returns hashCode for enum PublicNetworkAccess - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private PublicNetworkAccess(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for PublicNetworkAccess - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to PublicNetworkAccess - /// the value to convert to an instance of . - - public static implicit operator PublicNetworkAccess(string value) - { - return new PublicNetworkAccess(value); - } - - /// Implicit operator to convert PublicNetworkAccess to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess e) - { - return e._value; - } - - /// Overriding != operator for enum PublicNetworkAccess - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum PublicNetworkAccess - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/PublicNetworkAccessFlag.Completer.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/PublicNetworkAccessFlag.Completer.cs deleted file mode 100644 index dbfda807dedd..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/PublicNetworkAccessFlag.Completer.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// - /// This determines if traffic is allowed over public network. By default it is enabled. If value is SecuredByPerimeter then - /// Inbound and Outbound communication is controlled by the network security perimeter and profile's access rules. - /// - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccessFlagTypeConverter))] - public partial struct PublicNetworkAccessFlag : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Enabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Enabled'", "Enabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Enabled"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Disabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Disabled'", "Disabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Disabled"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "SecuredByPerimeter".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'SecuredByPerimeter'", "SecuredByPerimeter", global::System.Management.Automation.CompletionResultType.ParameterValue, "SecuredByPerimeter"); - } - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/PublicNetworkAccessFlag.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/PublicNetworkAccessFlag.TypeConverter.cs deleted file mode 100644 index 01bcb5ac0f07..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/PublicNetworkAccessFlag.TypeConverter.cs +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// - /// This determines if traffic is allowed over public network. By default it is enabled. If value is SecuredByPerimeter then - /// Inbound and Outbound communication is controlled by the network security perimeter and profile's access rules. - /// - public partial class PublicNetworkAccessFlagTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => PublicNetworkAccessFlag.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/PublicNetworkAccessFlag.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/PublicNetworkAccessFlag.cs deleted file mode 100644 index cf8c58234e3f..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/PublicNetworkAccessFlag.cs +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// - /// This determines if traffic is allowed over public network. By default it is enabled. If value is SecuredByPerimeter then - /// Inbound and Outbound communication is controlled by the network security perimeter and profile's access rules. - /// - public partial struct PublicNetworkAccessFlag : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccessFlag Disabled = @"Disabled"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccessFlag Enabled = @"Enabled"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccessFlag SecuredByPerimeter = @"SecuredByPerimeter"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to PublicNetworkAccessFlag - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new PublicNetworkAccessFlag(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type PublicNetworkAccessFlag - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccessFlag e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type PublicNetworkAccessFlag (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is PublicNetworkAccessFlag && Equals((PublicNetworkAccessFlag)obj); - } - - /// Returns hashCode for enum PublicNetworkAccessFlag - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private PublicNetworkAccessFlag(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for PublicNetworkAccessFlag - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to PublicNetworkAccessFlag - /// the value to convert to an instance of . - - public static implicit operator PublicNetworkAccessFlag(string value) - { - return new PublicNetworkAccessFlag(value); - } - - /// Implicit operator to convert PublicNetworkAccessFlag to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccessFlag e) - { - return e._value; - } - - /// Overriding != operator for enum PublicNetworkAccessFlag - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccessFlag e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccessFlag e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum PublicNetworkAccessFlag - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccessFlag e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccessFlag e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/ResourceAssociationAccessMode.Completer.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/ResourceAssociationAccessMode.Completer.cs deleted file mode 100644 index 1e868f48c219..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/ResourceAssociationAccessMode.Completer.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// Access Mode of the resource association - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ResourceAssociationAccessModeTypeConverter))] - public partial struct ResourceAssociationAccessMode : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "NoAssociationMode".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'NoAssociationMode'", "NoAssociationMode", global::System.Management.Automation.CompletionResultType.ParameterValue, "NoAssociationMode"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "EnforcedMode".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'EnforcedMode'", "EnforcedMode", global::System.Management.Automation.CompletionResultType.ParameterValue, "EnforcedMode"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "LearningMode".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'LearningMode'", "LearningMode", global::System.Management.Automation.CompletionResultType.ParameterValue, "LearningMode"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "AuditMode".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'AuditMode'", "AuditMode", global::System.Management.Automation.CompletionResultType.ParameterValue, "AuditMode"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "UnspecifiedMode".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'UnspecifiedMode'", "UnspecifiedMode", global::System.Management.Automation.CompletionResultType.ParameterValue, "UnspecifiedMode"); - } - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/ResourceAssociationAccessMode.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/ResourceAssociationAccessMode.TypeConverter.cs deleted file mode 100644 index 987c005a53ef..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/ResourceAssociationAccessMode.TypeConverter.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// Access Mode of the resource association - public partial class ResourceAssociationAccessModeTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ResourceAssociationAccessMode.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/ResourceAssociationAccessMode.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/ResourceAssociationAccessMode.cs deleted file mode 100644 index 96ca4f1120d4..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/ResourceAssociationAccessMode.cs +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// Access Mode of the resource association - public partial struct ResourceAssociationAccessMode : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ResourceAssociationAccessMode AuditMode = @"AuditMode"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ResourceAssociationAccessMode EnforcedMode = @"EnforcedMode"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ResourceAssociationAccessMode LearningMode = @"LearningMode"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ResourceAssociationAccessMode NoAssociationMode = @"NoAssociationMode"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ResourceAssociationAccessMode UnspecifiedMode = @"UnspecifiedMode"; - - /// - /// the value for an instance of the Enum. - /// - private string _value { get; set; } - - /// Conversion from arbitrary object to ResourceAssociationAccessMode - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new ResourceAssociationAccessMode(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type ResourceAssociationAccessMode - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ResourceAssociationAccessMode e) - { - return _value.Equals(e._value); - } - - /// - /// Compares values of enum type ResourceAssociationAccessMode (override for Object) - /// - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is ResourceAssociationAccessMode && Equals((ResourceAssociationAccessMode)obj); - } - - /// Returns hashCode for enum ResourceAssociationAccessMode - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// - /// Creates an instance of the Enum class. - /// - /// the value to create an instance for. - private ResourceAssociationAccessMode(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for ResourceAssociationAccessMode - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to ResourceAssociationAccessMode - /// the value to convert to an instance of . - - public static implicit operator ResourceAssociationAccessMode(string value) - { - return new ResourceAssociationAccessMode(value); - } - - /// Implicit operator to convert ResourceAssociationAccessMode to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ResourceAssociationAccessMode e) - { - return e._value; - } - - /// Overriding != operator for enum ResourceAssociationAccessMode - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ResourceAssociationAccessMode e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ResourceAssociationAccessMode e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum ResourceAssociationAccessMode - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ResourceAssociationAccessMode e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ResourceAssociationAccessMode e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/RoleDisasterRecovery.Completer.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/RoleDisasterRecovery.Completer.cs deleted file mode 100644 index 3f7ff3730594..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/RoleDisasterRecovery.Completer.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// - /// role of namespace in GEO DR - possible values 'Primary' or 'PrimaryNotReplicating' or 'Secondary' - /// - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.RoleDisasterRecoveryTypeConverter))] - public partial struct RoleDisasterRecovery : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Primary".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Primary'", "Primary", global::System.Management.Automation.CompletionResultType.ParameterValue, "Primary"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "PrimaryNotReplicating".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'PrimaryNotReplicating'", "PrimaryNotReplicating", global::System.Management.Automation.CompletionResultType.ParameterValue, "PrimaryNotReplicating"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Secondary".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Secondary'", "Secondary", global::System.Management.Automation.CompletionResultType.ParameterValue, "Secondary"); - } - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/RoleDisasterRecovery.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/RoleDisasterRecovery.TypeConverter.cs deleted file mode 100644 index 64554b2dd627..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/RoleDisasterRecovery.TypeConverter.cs +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// - /// role of namespace in GEO DR - possible values 'Primary' or 'PrimaryNotReplicating' or 'Secondary' - /// - public partial class RoleDisasterRecoveryTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => RoleDisasterRecovery.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/RoleDisasterRecovery.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/RoleDisasterRecovery.cs deleted file mode 100644 index 45cbb63061f1..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/RoleDisasterRecovery.cs +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// - /// role of namespace in GEO DR - possible values 'Primary' or 'PrimaryNotReplicating' or 'Secondary' - /// - public partial struct RoleDisasterRecovery : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.RoleDisasterRecovery Primary = @"Primary"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.RoleDisasterRecovery PrimaryNotReplicating = @"PrimaryNotReplicating"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.RoleDisasterRecovery Secondary = @"Secondary"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to RoleDisasterRecovery - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new RoleDisasterRecovery(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type RoleDisasterRecovery - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.RoleDisasterRecovery e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type RoleDisasterRecovery (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is RoleDisasterRecovery && Equals((RoleDisasterRecovery)obj); - } - - /// Returns hashCode for enum RoleDisasterRecovery - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private RoleDisasterRecovery(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for RoleDisasterRecovery - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to RoleDisasterRecovery - /// the value to convert to an instance of . - - public static implicit operator RoleDisasterRecovery(string value) - { - return new RoleDisasterRecovery(value); - } - - /// Implicit operator to convert RoleDisasterRecovery to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.RoleDisasterRecovery e) - { - return e._value; - } - - /// Overriding != operator for enum RoleDisasterRecovery - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.RoleDisasterRecovery e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.RoleDisasterRecovery e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum RoleDisasterRecovery - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.RoleDisasterRecovery e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.RoleDisasterRecovery e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/SchemaCompatibility.Completer.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/SchemaCompatibility.Completer.cs deleted file mode 100644 index 7b87c41657e1..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/SchemaCompatibility.Completer.cs +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// Argument completer implementation for SchemaCompatibility. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaCompatibilityTypeConverter))] - public partial struct SchemaCompatibility : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "None".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'None'", "None", global::System.Management.Automation.CompletionResultType.ParameterValue, "None"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Backward".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Backward'", "Backward", global::System.Management.Automation.CompletionResultType.ParameterValue, "Backward"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Forward".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Forward'", "Forward", global::System.Management.Automation.CompletionResultType.ParameterValue, "Forward"); - } - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/SchemaCompatibility.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/SchemaCompatibility.TypeConverter.cs deleted file mode 100644 index 3f08b4fb95e1..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/SchemaCompatibility.TypeConverter.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// TypeConverter implementation for SchemaCompatibility. - public partial class SchemaCompatibilityTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => SchemaCompatibility.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/SchemaCompatibility.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/SchemaCompatibility.cs deleted file mode 100644 index 34aa70c5e447..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/SchemaCompatibility.cs +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - public partial struct SchemaCompatibility : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaCompatibility Backward = @"Backward"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaCompatibility Forward = @"Forward"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaCompatibility None = @"None"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to SchemaCompatibility - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new SchemaCompatibility(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type SchemaCompatibility - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaCompatibility e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type SchemaCompatibility (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is SchemaCompatibility && Equals((SchemaCompatibility)obj); - } - - /// Returns hashCode for enum SchemaCompatibility - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private SchemaCompatibility(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for SchemaCompatibility - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to SchemaCompatibility - /// the value to convert to an instance of . - - public static implicit operator SchemaCompatibility(string value) - { - return new SchemaCompatibility(value); - } - - /// Implicit operator to convert SchemaCompatibility to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaCompatibility e) - { - return e._value; - } - - /// Overriding != operator for enum SchemaCompatibility - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaCompatibility e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaCompatibility e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum SchemaCompatibility - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaCompatibility e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaCompatibility e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/SchemaType.Completer.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/SchemaType.Completer.cs deleted file mode 100644 index 0321591b6f3c..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/SchemaType.Completer.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// Argument completer implementation for SchemaType. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaTypeTypeConverter))] - public partial struct SchemaType : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Unknown".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Unknown'", "Unknown", global::System.Management.Automation.CompletionResultType.ParameterValue, "Unknown"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Avro".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Avro'", "Avro", global::System.Management.Automation.CompletionResultType.ParameterValue, "Avro"); - } - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/SchemaType.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/SchemaType.TypeConverter.cs deleted file mode 100644 index 304b782b7191..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/SchemaType.TypeConverter.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// TypeConverter implementation for SchemaType. - public partial class SchemaTypeTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => SchemaType.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/SchemaType.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/SchemaType.cs deleted file mode 100644 index 59e60c5b42c9..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/SchemaType.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - public partial struct SchemaType : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaType Avro = @"Avro"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaType Unknown = @"Unknown"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to SchemaType - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new SchemaType(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type SchemaType - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaType e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type SchemaType (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is SchemaType && Equals((SchemaType)obj); - } - - /// Returns hashCode for enum SchemaType - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private SchemaType(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for SchemaType - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to SchemaType - /// the value to convert to an instance of . - - public static implicit operator SchemaType(string value) - { - return new SchemaType(value); - } - - /// Implicit operator to convert SchemaType to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaType e) - { - return e._value; - } - - /// Overriding != operator for enum SchemaType - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaType e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaType e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum SchemaType - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaType e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaType e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/SkuName.Completer.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/SkuName.Completer.cs deleted file mode 100644 index 005b39b04a1c..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/SkuName.Completer.cs +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// Name of this SKU. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuNameTypeConverter))] - public partial struct SkuName : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Basic".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Basic'", "Basic", global::System.Management.Automation.CompletionResultType.ParameterValue, "Basic"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard'", "Standard", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Premium".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Premium'", "Premium", global::System.Management.Automation.CompletionResultType.ParameterValue, "Premium"); - } - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/SkuName.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/SkuName.TypeConverter.cs deleted file mode 100644 index e20c4ab488c7..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/SkuName.TypeConverter.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// Name of this SKU. - public partial class SkuNameTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => SkuName.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/SkuName.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/SkuName.cs deleted file mode 100644 index 83e578411e74..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/SkuName.cs +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// Name of this SKU. - public partial struct SkuName : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuName Basic = @"Basic"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuName Premium = @"Premium"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuName Standard = @"Standard"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to SkuName - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new SkuName(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type SkuName - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuName e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type SkuName (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is SkuName && Equals((SkuName)obj); - } - - /// Returns hashCode for enum SkuName - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private SkuName(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for SkuName - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to SkuName - /// the value to convert to an instance of . - - public static implicit operator SkuName(string value) - { - return new SkuName(value); - } - - /// Implicit operator to convert SkuName to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuName e) - { - return e._value; - } - - /// Overriding != operator for enum SkuName - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuName e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuName e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum SkuName - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuName e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuName e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/SkuTier.Completer.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/SkuTier.Completer.cs deleted file mode 100644 index 46add4ffbdd0..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/SkuTier.Completer.cs +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// The billing tier of this particular SKU. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuTierTypeConverter))] - public partial struct SkuTier : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Basic".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Basic'", "Basic", global::System.Management.Automation.CompletionResultType.ParameterValue, "Basic"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard'", "Standard", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Premium".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Premium'", "Premium", global::System.Management.Automation.CompletionResultType.ParameterValue, "Premium"); - } - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/SkuTier.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/SkuTier.TypeConverter.cs deleted file mode 100644 index d02cb3762d26..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/SkuTier.TypeConverter.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// The billing tier of this particular SKU. - public partial class SkuTierTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => SkuTier.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/SkuTier.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/SkuTier.cs deleted file mode 100644 index 4a75dfdc4806..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/SkuTier.cs +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// The billing tier of this particular SKU. - public partial struct SkuTier : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuTier Basic = @"Basic"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuTier Premium = @"Premium"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuTier Standard = @"Standard"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to SkuTier - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new SkuTier(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type SkuTier - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuTier e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type SkuTier (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is SkuTier && Equals((SkuTier)obj); - } - - /// Returns hashCode for enum SkuTier - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private SkuTier(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for SkuTier - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to SkuTier - /// the value to convert to an instance of . - - public static implicit operator SkuTier(string value) - { - return new SkuTier(value); - } - - /// Implicit operator to convert SkuTier to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuTier e) - { - return e._value; - } - - /// Overriding != operator for enum SkuTier - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuTier e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuTier e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum SkuTier - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuTier e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuTier e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/TlsVersion.Completer.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/TlsVersion.Completer.cs deleted file mode 100644 index ef23c275daa8..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/TlsVersion.Completer.cs +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// The minimum TLS version for the cluster to support, e.g. '1.2' - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.TlsVersionTypeConverter))] - public partial struct TlsVersion : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "1.0".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'1.0'", "1.0", global::System.Management.Automation.CompletionResultType.ParameterValue, "1.0"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "1.1".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'1.1'", "1.1", global::System.Management.Automation.CompletionResultType.ParameterValue, "1.1"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "1.2".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'1.2'", "1.2", global::System.Management.Automation.CompletionResultType.ParameterValue, "1.2"); - } - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/TlsVersion.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/TlsVersion.TypeConverter.cs deleted file mode 100644 index d78c8d0b5e3c..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/TlsVersion.TypeConverter.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// The minimum TLS version for the cluster to support, e.g. '1.2' - public partial class TlsVersionTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => TlsVersion.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/TlsVersion.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/TlsVersion.cs deleted file mode 100644 index 0a23139c45a8..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/TlsVersion.cs +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// The minimum TLS version for the cluster to support, e.g. '1.2' - public partial struct TlsVersion : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.TlsVersion One0 = @"1.0"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.TlsVersion One1 = @"1.1"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.TlsVersion One2 = @"1.2"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to TlsVersion - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new TlsVersion(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type TlsVersion - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.TlsVersion e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type TlsVersion (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is TlsVersion && Equals((TlsVersion)obj); - } - - /// Returns hashCode for enum TlsVersion - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private TlsVersion(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for TlsVersion - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to TlsVersion - /// the value to convert to an instance of . - - public static implicit operator TlsVersion(string value) - { - return new TlsVersion(value); - } - - /// Implicit operator to convert TlsVersion to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.TlsVersion e) - { - return e._value; - } - - /// Overriding != operator for enum TlsVersion - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.TlsVersion e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.TlsVersion e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum TlsVersion - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.TlsVersion e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.TlsVersion e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/UnavailableReason.Completer.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/UnavailableReason.Completer.cs deleted file mode 100644 index c0f754a91312..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/UnavailableReason.Completer.cs +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// Specifies the reason for the unavailability of the service. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.UnavailableReasonTypeConverter))] - public partial struct UnavailableReason : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "None".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'None'", "None", global::System.Management.Automation.CompletionResultType.ParameterValue, "None"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "InvalidName".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'InvalidName'", "InvalidName", global::System.Management.Automation.CompletionResultType.ParameterValue, "InvalidName"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "SubscriptionIsDisabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'SubscriptionIsDisabled'", "SubscriptionIsDisabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "SubscriptionIsDisabled"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "NameInUse".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'NameInUse'", "NameInUse", global::System.Management.Automation.CompletionResultType.ParameterValue, "NameInUse"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "NameInLockdown".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'NameInLockdown'", "NameInLockdown", global::System.Management.Automation.CompletionResultType.ParameterValue, "NameInLockdown"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "TooManyNamespaceInCurrentSubscription".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'TooManyNamespaceInCurrentSubscription'", "TooManyNamespaceInCurrentSubscription", global::System.Management.Automation.CompletionResultType.ParameterValue, "TooManyNamespaceInCurrentSubscription"); - } - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/UnavailableReason.TypeConverter.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/UnavailableReason.TypeConverter.cs deleted file mode 100644 index c570efc371f0..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/UnavailableReason.TypeConverter.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// Specifies the reason for the unavailability of the service. - public partial class UnavailableReasonTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => UnavailableReason.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/api/Support/UnavailableReason.cs b/src/EventHub/EventHub.Autorest/generated/api/Support/UnavailableReason.cs deleted file mode 100644 index a54e10ed4bae..000000000000 --- a/src/EventHub/EventHub.Autorest/generated/api/Support/UnavailableReason.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support -{ - - /// Specifies the reason for the unavailability of the service. - public partial struct UnavailableReason : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.UnavailableReason InvalidName = @"InvalidName"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.UnavailableReason NameInLockdown = @"NameInLockdown"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.UnavailableReason NameInUse = @"NameInUse"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.UnavailableReason None = @"None"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.UnavailableReason SubscriptionIsDisabled = @"SubscriptionIsDisabled"; - - public static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.UnavailableReason TooManyNamespaceInCurrentSubscription = @"TooManyNamespaceInCurrentSubscription"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to UnavailableReason - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new UnavailableReason(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type UnavailableReason - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.UnavailableReason e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type UnavailableReason (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is UnavailableReason && Equals((UnavailableReason)obj); - } - - /// Returns hashCode for enum UnavailableReason - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Returns string representation for UnavailableReason - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private UnavailableReason(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Implicit operator to convert string to UnavailableReason - /// the value to convert to an instance of . - - public static implicit operator UnavailableReason(string value) - { - return new UnavailableReason(value); - } - - /// Implicit operator to convert UnavailableReason to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.UnavailableReason e) - { - return e._value; - } - - /// Overriding != operator for enum UnavailableReason - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.UnavailableReason e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.UnavailableReason e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum UnavailableReason - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.UnavailableReason e1, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.UnavailableReason e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubApplicationGroup_Get.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubApplicationGroup_Get.cs index a8810d7d5ac9..c6268e30a7a9 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubApplicationGroup_Get.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubApplicationGroup_Get.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Gets an ApplicationGroup for a Namespace. @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/applicationGroups/{applicationGroupName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHubApplicationGroup_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Gets an ApplicationGroup for a Namespace.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/applicationGroups/{applicationGroupName}", ApiVersion = "2023-01-01-preview")] public partial class GetAzEventHubApplicationGroup_Get : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class GetAzEventHubApplicationGroup_Get : global::System.Manageme /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class GetAzEventHubApplicationGroup_Get : global::System.Manageme [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -107,7 +128,7 @@ public partial class GetAzEventHubApplicationGroup_Get : global::System.Manageme /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -156,7 +177,8 @@ public partial class GetAzEventHubApplicationGroup_Get : global::System.Manageme [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -165,24 +187,24 @@ public partial class GetAzEventHubApplicationGroup_Get : global::System.Manageme /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -205,6 +227,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -226,7 +253,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzEventHubApplicationGroup_Get() { @@ -277,8 +304,33 @@ public GetAzEventHubApplicationGroup_Get() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -331,7 +383,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -346,13 +398,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.ApplicationGroupGet(ResourceGroupName, NamespaceName, Name, SubscriptionId, onOk, onDefault, this, Pipeline); + await this.Client.ApplicationGroupGet(SubscriptionId, ResourceGroupName, NamespaceName, Name, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -390,12 +442,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -412,15 +464,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -430,12 +482,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -447,8 +499,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubApplicationGroup_GetViaIdentity.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubApplicationGroup_GetViaIdentity.cs index 05ae8bb5d380..a2968ae18155 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubApplicationGroup_GetViaIdentity.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubApplicationGroup_GetViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Gets an ApplicationGroup for a Namespace. @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/applicationGroups/{applicationGroupName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHubApplicationGroup_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Gets an ApplicationGroup for a Namespace.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/applicationGroups/{applicationGroupName}", ApiVersion = "2023-01-01-preview")] public partial class GetAzEventHubApplicationGroup_GetViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class GetAzEventHubApplicationGroup_GetViaIdentity : global::Syst /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class GetAzEventHubApplicationGroup_GetViaIdentity : global::Syst [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -86,7 +107,7 @@ public partial class GetAzEventHubApplicationGroup_GetViaIdentity : global::Syst /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -109,24 +130,24 @@ public partial class GetAzEventHubApplicationGroup_GetViaIdentity : global::Syst /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -149,6 +170,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -170,7 +196,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzEventHubApplicationGroup_GetViaIdentity() { @@ -221,8 +247,33 @@ public GetAzEventHubApplicationGroup_GetViaIdentity() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -275,7 +326,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -295,6 +346,10 @@ protected override void ProcessRecord() else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -307,17 +362,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ApplicationGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.ApplicationGroupGet(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.ApplicationGroupName ?? null, InputObject.SubscriptionId ?? null, onOk, onDefault, this, Pipeline); + await this.Client.ApplicationGroupGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.ApplicationGroupName ?? null, onOk, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -355,12 +406,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -377,7 +428,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -395,12 +446,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -412,8 +463,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubApplicationGroup_GetViaIdentityNamespace.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubApplicationGroup_GetViaIdentityNamespace.cs new file mode 100644 index 000000000000..5a8d16238e4f --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubApplicationGroup_GetViaIdentityNamespace.cs @@ -0,0 +1,501 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// Gets an ApplicationGroup for a Namespace. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/applicationGroups/{applicationGroupName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHubApplicationGroup_GetViaIdentityNamespace")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Gets an ApplicationGroup for a Namespace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/applicationGroups/{applicationGroupName}", ApiVersion = "2023-01-01-preview")] + public partial class GetAzEventHubApplicationGroup_GetViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The Application Group name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Application Group name ")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Application Group name ", + SerializedName = @"applicationGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ApplicationGroupName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzEventHubApplicationGroup_GetViaIdentityNamespace() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/applicationGroups/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.ApplicationGroupGetViaIdentity(NamespaceInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.ApplicationGroupGet(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubApplicationGroup_List.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubApplicationGroup_List.cs index 81a85ddc4f29..6d430ac00f1e 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubApplicationGroup_List.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubApplicationGroup_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Gets a list of application groups for a Namespace. @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets /// [OpenAPI] ListByNamespace=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/applicationGroups" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHubApplicationGroup_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Gets a list of application groups for a Namespace.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/applicationGroups", ApiVersion = "2023-01-01-preview")] public partial class GetAzEventHubApplicationGroup_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,17 +37,32 @@ public partial class GetAzEventHubApplicationGroup_List : global::System.Managem /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// A flag to tell whether it is the first onOK call. private bool _isFirst = true; /// Link to retrieve next page. private string _nextLink; + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -58,6 +76,9 @@ public partial class GetAzEventHubApplicationGroup_List : global::System.Managem [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -98,7 +119,7 @@ public partial class GetAzEventHubApplicationGroup_List : global::System.Managem /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -147,7 +168,8 @@ public partial class GetAzEventHubApplicationGroup_List : global::System.Managem [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -156,24 +178,24 @@ public partial class GetAzEventHubApplicationGroup_List : global::System.Managem /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupListResult /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -196,6 +218,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -217,7 +244,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzEventHubApplicationGroup_List() { @@ -268,8 +295,33 @@ public GetAzEventHubApplicationGroup_List() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -322,7 +374,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -337,13 +389,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.ApplicationGroupListByNamespace(ResourceGroupName, NamespaceName, SubscriptionId, onOk, onDefault, this, Pipeline); + await this.Client.ApplicationGroupListByNamespace(SubscriptionId, ResourceGroupName, NamespaceName, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -381,12 +433,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -403,15 +455,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -421,12 +473,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupListResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -438,15 +490,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupListResult + var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } _nextLink = result.NextLink; if (_isFirst) { _isFirst = false; - while (_nextLink != null) + while (!String.IsNullOrEmpty(_nextLink)) { if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) { diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubAuthorizationRule_Get.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubAuthorizationRule_Get.cs index 80f01fa3592e..8fd3885d14df 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubAuthorizationRule_Get.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubAuthorizationRule_Get.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Gets an AuthorizationRule for an Event Hub by rule name. @@ -14,12 +16,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHubAuthorizationRule_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Gets an AuthorizationRule for an Event Hub by rule name.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}", ApiVersion = "2023-01-01-preview")] public partial class GetAzEventHubAuthorizationRule_Get : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +38,26 @@ public partial class GetAzEventHubAuthorizationRule_Get : global::System.Managem /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -67,6 +85,9 @@ public partial class GetAzEventHubAuthorizationRule_Get : global::System.Managem [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string EventHubName { get => this._eventHubName; set => this._eventHubName = value; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -121,7 +142,7 @@ public partial class GetAzEventHubAuthorizationRule_Get : global::System.Managem /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -170,7 +191,8 @@ public partial class GetAzEventHubAuthorizationRule_Get : global::System.Managem [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -179,24 +201,24 @@ public partial class GetAzEventHubAuthorizationRule_Get : global::System.Managem /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -219,6 +241,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -240,7 +267,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzEventHubAuthorizationRule_Get() { @@ -291,8 +318,33 @@ public GetAzEventHubAuthorizationRule_Get() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -345,7 +397,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -360,13 +412,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.EventHubsGetAuthorizationRule(ResourceGroupName, NamespaceName, EventHubName, Name, SubscriptionId, onOk, onDefault, this, Pipeline); + await this.Client.EventHubsGetAuthorizationRule(SubscriptionId, ResourceGroupName, NamespaceName, EventHubName, Name, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,EventHubName=EventHubName,Name=Name,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,EventHubName=EventHubName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -404,12 +456,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -426,15 +478,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, EventHubName=EventHubName, Name=Name, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, EventHubName=EventHubName, Name=Name, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -444,12 +496,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -461,8 +513,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubAuthorizationRule_GetViaIdentity.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubAuthorizationRule_GetViaIdentity.cs index d75bdb1eb488..fa35f377fdb9 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubAuthorizationRule_GetViaIdentity.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubAuthorizationRule_GetViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Gets an AuthorizationRule for an Event Hub by rule name. @@ -14,12 +16,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHubAuthorizationRule_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Gets an AuthorizationRule for an Event Hub by rule name.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}", ApiVersion = "2023-01-01-preview")] public partial class GetAzEventHubAuthorizationRule_GetViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +38,26 @@ public partial class GetAzEventHubAuthorizationRule_GetViaIdentity : global::Sys /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -53,6 +71,9 @@ public partial class GetAzEventHubAuthorizationRule_GetViaIdentity : global::Sys [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -87,7 +108,7 @@ public partial class GetAzEventHubAuthorizationRule_GetViaIdentity : global::Sys /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -110,24 +131,24 @@ public partial class GetAzEventHubAuthorizationRule_GetViaIdentity : global::Sys /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -150,6 +171,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -171,7 +197,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzEventHubAuthorizationRule_GetViaIdentity() { @@ -222,8 +248,33 @@ public GetAzEventHubAuthorizationRule_GetViaIdentity() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -276,7 +327,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -296,6 +347,10 @@ protected override void ProcessRecord() else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -312,17 +367,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.AuthorizationRuleName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.EventHubsGetAuthorizationRule(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.EventHubName ?? null, InputObject.AuthorizationRuleName ?? null, InputObject.SubscriptionId ?? null, onOk, onDefault, this, Pipeline); + await this.Client.EventHubsGetAuthorizationRule(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.EventHubName ?? null, InputObject.AuthorizationRuleName ?? null, onOk, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -360,12 +411,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -382,7 +433,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -400,12 +451,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -417,8 +468,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubAuthorizationRule_GetViaIdentityEventhub.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubAuthorizationRule_GetViaIdentityEventhub.cs new file mode 100644 index 000000000000..6b07f0a2e3af --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubAuthorizationRule_GetViaIdentityEventhub.cs @@ -0,0 +1,505 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// Gets an AuthorizationRule for an Event Hub by rule name. + /// + /// [OpenAPI] GetAuthorizationRule=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHubAuthorizationRule_GetViaIdentityEventhub")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Gets an AuthorizationRule for an Event Hub by rule name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}", ApiVersion = "2023-01-01-preview")] + public partial class GetAzEventHubAuthorizationRule_GetViaIdentityEventhub : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity _eventhubInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity EventhubInputObject { get => this._eventhubInputObject; set => this._eventhubInputObject = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzEventHubAuthorizationRule_GetViaIdentityEventhub() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (EventhubInputObject?.Id != null) + { + this.EventhubInputObject.Id += $"/authorizationRules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.EventHubsGetAuthorizationRuleViaIdentity(EventhubInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == EventhubInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("EventhubInputObject has null value for EventhubInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, EventhubInputObject) ); + } + if (null == EventhubInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("EventhubInputObject has null value for EventhubInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, EventhubInputObject) ); + } + if (null == EventhubInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("EventhubInputObject has null value for EventhubInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, EventhubInputObject) ); + } + if (null == EventhubInputObject.EventHubName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("EventhubInputObject has null value for EventhubInputObject.EventHubName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, EventhubInputObject) ); + } + await this.Client.EventHubsGetAuthorizationRule(EventhubInputObject.SubscriptionId ?? null, EventhubInputObject.ResourceGroupName ?? null, EventhubInputObject.NamespaceName ?? null, EventhubInputObject.EventHubName ?? null, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubAuthorizationRule_GetViaIdentityNamespace.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubAuthorizationRule_GetViaIdentityNamespace.cs new file mode 100644 index 000000000000..e7a1f5fa8e57 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubAuthorizationRule_GetViaIdentityNamespace.cs @@ -0,0 +1,515 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// Gets an AuthorizationRule for an Event Hub by rule name. + /// + /// [OpenAPI] GetAuthorizationRule=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHubAuthorizationRule_GetViaIdentityNamespace")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Gets an AuthorizationRule for an Event Hub by rule name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}", ApiVersion = "2023-01-01-preview")] + public partial class GetAzEventHubAuthorizationRule_GetViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _eventHubName; + + /// The Event Hub name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Event Hub name")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Event Hub name", + SerializedName = @"eventHubName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string EventHubName { get => this._eventHubName; set => this._eventHubName = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzEventHubAuthorizationRule_GetViaIdentityNamespace() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/eventhubs/{(global::System.Uri.EscapeDataString(this.EventHubName.ToString()))}/authorizationRules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.EventHubsGetAuthorizationRuleViaIdentity(NamespaceInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.EventHubsGetAuthorizationRule(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, EventHubName, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { EventHubName=EventHubName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubAuthorizationRule_List.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubAuthorizationRule_List.cs index 81c2e17e7874..d7709e70bb31 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubAuthorizationRule_List.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubAuthorizationRule_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Gets the authorization rules for an Event Hub. @@ -14,12 +16,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHubAuthorizationRule_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Gets the authorization rules for an Event Hub.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules", ApiVersion = "2023-01-01-preview")] public partial class GetAzEventHubAuthorizationRule_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,17 +38,32 @@ public partial class GetAzEventHubAuthorizationRule_List : global::System.Manage /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// A flag to tell whether it is the first onOK call. private bool _isFirst = true; /// Link to retrieve next page. private string _nextLink; + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -73,6 +91,9 @@ public partial class GetAzEventHubAuthorizationRule_List : global::System.Manage [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string EventHubName { get => this._eventHubName; set => this._eventHubName = value; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -113,7 +134,7 @@ public partial class GetAzEventHubAuthorizationRule_List : global::System.Manage /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -162,7 +183,8 @@ public partial class GetAzEventHubAuthorizationRule_List : global::System.Manage [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -171,24 +193,24 @@ public partial class GetAzEventHubAuthorizationRule_List : global::System.Manage /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleListResult /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -211,6 +233,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -232,7 +259,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzEventHubAuthorizationRule_List() { @@ -283,8 +310,33 @@ public GetAzEventHubAuthorizationRule_List() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -337,7 +389,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -352,13 +404,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.EventHubsListAuthorizationRules(ResourceGroupName, NamespaceName, EventHubName, SubscriptionId, onOk, onDefault, this, Pipeline); + await this.Client.EventHubsListAuthorizationRules(SubscriptionId, ResourceGroupName, NamespaceName, EventHubName, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,EventHubName=EventHubName,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,EventHubName=EventHubName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -396,12 +448,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -418,15 +470,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, EventHubName=EventHubName, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, EventHubName=EventHubName, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -436,12 +488,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleListResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -453,15 +505,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleListResult + var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } _nextLink = result.NextLink; if (_isFirst) { _isFirst = false; - while (_nextLink != null) + while (!String.IsNullOrEmpty(_nextLink)) { if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) { diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubClusterNamespace_List.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubClusterNamespace_List.cs index e9489ec694d8..3c0529ababb5 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubClusterNamespace_List.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubClusterNamespace_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// List all Event Hubs Namespace IDs in an Event Hubs Dedicated Cluster. @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets /// [OpenAPI] ListNamespaces=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}/namespaces" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHubClusterNamespace_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceIdContainer))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceIdListResult))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"List all Event Hubs Namespace IDs in an Event Hubs Dedicated Cluster.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}/namespaces", ApiVersion = "2023-01-01-preview")] public partial class GetAzEventHubClusterNamespace_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class GetAzEventHubClusterNamespace_List : global::System.Managem /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -66,6 +84,9 @@ public partial class GetAzEventHubClusterNamespace_List : global::System.Managem [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -92,7 +113,7 @@ public partial class GetAzEventHubClusterNamespace_List : global::System.Managem /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -141,7 +162,8 @@ public partial class GetAzEventHubClusterNamespace_List : global::System.Managem [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -150,24 +172,24 @@ public partial class GetAzEventHubClusterNamespace_List : global::System.Managem /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceIdListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceIdListResult /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -190,6 +212,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -211,7 +238,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzEventHubClusterNamespace_List() { @@ -262,8 +289,33 @@ public GetAzEventHubClusterNamespace_List() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -316,7 +368,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -337,7 +389,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterName=ClusterName}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterName=ClusterName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -375,12 +427,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -397,15 +449,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ClusterName=ClusterName }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ClusterName=ClusterName }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -415,12 +467,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceIdListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceIdListResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -432,9 +484,33 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceIdListResult + var result = (await response); // response should be returning an array of some kind. +Pageable // nested-array / value / - WriteObject((await response).Value, true); + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubCluster_Get.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubCluster_Get.cs index 1311ac8858cd..3bc9dfcee701 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubCluster_Get.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubCluster_Get.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Gets the resource description of the specified Event Hubs Cluster. @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHubCluster_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Gets the resource description of the specified Event Hubs Cluster.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}", ApiVersion = "2023-01-01-preview")] public partial class GetAzEventHubCluster_Get : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class GetAzEventHubCluster_Get : global::System.Management.Automa /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class GetAzEventHubCluster_Get : global::System.Management.Automa [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -93,7 +114,7 @@ public partial class GetAzEventHubCluster_Get : global::System.Management.Automa /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -142,7 +163,8 @@ public partial class GetAzEventHubCluster_Get : global::System.Management.Automa [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -151,24 +173,24 @@ public partial class GetAzEventHubCluster_Get : global::System.Management.Automa /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -191,6 +213,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -212,7 +239,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzEventHubCluster_Get() { @@ -263,8 +290,33 @@ public GetAzEventHubCluster_Get() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -317,7 +369,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -338,7 +390,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -376,12 +428,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -398,15 +450,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -416,12 +468,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -433,8 +485,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubCluster_GetViaIdentity.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubCluster_GetViaIdentity.cs index c957369716f5..692e3ab8a5fa 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubCluster_GetViaIdentity.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubCluster_GetViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Gets the resource description of the specified Event Hubs Cluster. @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHubCluster_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Gets the resource description of the specified Event Hubs Cluster.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}", ApiVersion = "2023-01-01-preview")] public partial class GetAzEventHubCluster_GetViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class GetAzEventHubCluster_GetViaIdentity : global::System.Manage /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class GetAzEventHubCluster_GetViaIdentity : global::System.Manage [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -86,7 +107,7 @@ public partial class GetAzEventHubCluster_GetViaIdentity : global::System.Manage /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -109,24 +130,24 @@ public partial class GetAzEventHubCluster_GetViaIdentity : global::System.Manage /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -149,6 +170,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -170,7 +196,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzEventHubCluster_GetViaIdentity() { @@ -221,8 +247,33 @@ public GetAzEventHubCluster_GetViaIdentity() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -275,7 +326,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -313,7 +364,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -351,12 +402,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -373,7 +424,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -391,12 +442,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -408,8 +459,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubCluster_List.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubCluster_List.cs index a2af734fd92d..e314099dd6ad 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubCluster_List.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubCluster_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Lists the available Event Hubs Clusters within an ARM resource group @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets /// [OpenAPI] ListBySubscription=>GET:"/subscriptions/{subscriptionId}/providers/Microsoft.EventHub/clusters" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHubCluster_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Lists the available Event Hubs Clusters within an ARM resource group")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.EventHub/clusters", ApiVersion = "2023-01-01-preview")] public partial class GetAzEventHubCluster_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,17 +37,32 @@ public partial class GetAzEventHubCluster_List : global::System.Management.Autom /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// A flag to tell whether it is the first onOK call. private bool _isFirst = true; /// Link to retrieve next page. private string _nextLink; + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -58,6 +76,9 @@ public partial class GetAzEventHubCluster_List : global::System.Management.Autom [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -84,7 +105,7 @@ public partial class GetAzEventHubCluster_List : global::System.Management.Autom /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -119,7 +140,8 @@ public partial class GetAzEventHubCluster_List : global::System.Management.Autom [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -128,24 +150,24 @@ public partial class GetAzEventHubCluster_List : global::System.Management.Autom /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterListResult /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -168,6 +190,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -189,7 +216,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzEventHubCluster_List() { @@ -240,8 +267,33 @@ public GetAzEventHubCluster_List() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -294,7 +346,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -315,7 +367,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -353,12 +405,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -375,15 +427,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -393,12 +445,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterListResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -410,15 +462,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterListResult + var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } _nextLink = result.NextLink; if (_isFirst) { _isFirst = false; - while (_nextLink != null) + while (!String.IsNullOrEmpty(_nextLink)) { if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) { diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubCluster_List1.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubCluster_List1.cs index 9c7f77fbde20..2dc861384e46 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubCluster_List1.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubCluster_List1.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Lists the available Event Hubs Clusters within an ARM resource group @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets /// [OpenAPI] ListByResourceGroup=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHubCluster_List1")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Lists the available Event Hubs Clusters within an ARM resource group")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters", ApiVersion = "2023-01-01-preview")] public partial class GetAzEventHubCluster_List1 : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,17 +37,32 @@ public partial class GetAzEventHubCluster_List1 : global::System.Management.Auto /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// A flag to tell whether it is the first onOK call. private bool _isFirst = true; /// Link to retrieve next page. private string _nextLink; + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -58,6 +76,9 @@ public partial class GetAzEventHubCluster_List1 : global::System.Management.Auto [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -84,7 +105,7 @@ public partial class GetAzEventHubCluster_List1 : global::System.Management.Auto /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -133,7 +154,8 @@ public partial class GetAzEventHubCluster_List1 : global::System.Management.Auto [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -142,24 +164,24 @@ public partial class GetAzEventHubCluster_List1 : global::System.Management.Auto /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterListResult /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -182,6 +204,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -203,7 +230,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzEventHubCluster_List1() { @@ -254,8 +281,33 @@ public GetAzEventHubCluster_List1() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -308,7 +360,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -329,7 +381,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -367,12 +419,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -389,15 +441,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -407,12 +459,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IClusterListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterListResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -424,15 +476,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IClusterListResult + var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } _nextLink = result.NextLink; if (_isFirst) { _isFirst = false; - while (_nextLink != null) + while (!String.IsNullOrEmpty(_nextLink)) { if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) { diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubClustersAvailableRegion_List.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubClustersAvailableRegion_List.cs index 38d810b63f05..6955132e59a8 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubClustersAvailableRegion_List.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubClustersAvailableRegion_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// @@ -15,12 +17,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets /// [OpenAPI] ListAvailableClusterRegion=>GET:"/subscriptions/{subscriptionId}/providers/Microsoft.EventHub/availableClusterRegions" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHubClustersAvailableRegion_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAvailableCluster))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAvailableClustersList))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"List the quantity of available pre-provisioned Event Hubs Clusters, indexed by Azure region.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.EventHub/availableClusterRegions", ApiVersion = "2023-01-01-preview")] public partial class GetAzEventHubClustersAvailableRegion_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -36,11 +39,26 @@ public partial class GetAzEventHubClustersAvailableRegion_List : global::System. /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -54,6 +72,9 @@ public partial class GetAzEventHubClustersAvailableRegion_List : global::System. [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -80,7 +101,7 @@ public partial class GetAzEventHubClustersAvailableRegion_List : global::System. /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -115,7 +136,8 @@ public partial class GetAzEventHubClustersAvailableRegion_List : global::System. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -124,24 +146,24 @@ public partial class GetAzEventHubClustersAvailableRegion_List : global::System. /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAvailableClustersList + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAvailableClustersList /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -164,6 +186,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -185,7 +212,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzEventHubClustersAvailableRegion_List() { @@ -236,8 +263,33 @@ public GetAzEventHubClustersAvailableRegion_List() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -290,7 +342,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -311,7 +363,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -349,12 +401,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -371,15 +423,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -389,12 +441,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAvailableClustersList + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAvailableClustersList /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -406,9 +458,33 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAvailableClustersList + var result = (await response); // response should be returning an array of some kind. +Pageable // nested-array / value / - WriteObject((await response).Value, true); + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubConsumerGroup_Get.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubConsumerGroup_Get.cs index 1ecc4d8c6542..999d16688635 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubConsumerGroup_Get.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubConsumerGroup_Get.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Gets a description for the specified consumer group. @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHubConsumerGroup_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Gets a description for the specified consumer group.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}", ApiVersion = "2023-01-01-preview")] public partial class GetAzEventHubConsumerGroup_Get : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class GetAzEventHubConsumerGroup_Get : global::System.Management. /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -66,6 +84,9 @@ public partial class GetAzEventHubConsumerGroup_Get : global::System.Management. [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string EventHubName { get => this._eventHubName; set => this._eventHubName = value; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -121,7 +142,7 @@ public partial class GetAzEventHubConsumerGroup_Get : global::System.Management. /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -170,7 +191,8 @@ public partial class GetAzEventHubConsumerGroup_Get : global::System.Management. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -179,24 +201,24 @@ public partial class GetAzEventHubConsumerGroup_Get : global::System.Management. /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -219,6 +241,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -240,7 +267,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzEventHubConsumerGroup_Get() { @@ -291,8 +318,33 @@ public GetAzEventHubConsumerGroup_Get() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -345,7 +397,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -360,13 +412,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.ConsumerGroupsGet(ResourceGroupName, NamespaceName, EventHubName, Name, SubscriptionId, onOk, onDefault, this, Pipeline); + await this.Client.ConsumerGroupsGet(SubscriptionId, ResourceGroupName, NamespaceName, EventHubName, Name, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,EventHubName=EventHubName,Name=Name,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,EventHubName=EventHubName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -404,12 +456,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -426,15 +478,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, EventHubName=EventHubName, Name=Name, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, EventHubName=EventHubName, Name=Name, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -444,12 +496,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -461,8 +513,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubConsumerGroup_GetViaIdentity.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubConsumerGroup_GetViaIdentity.cs index fd24fe99860c..99b1a46e2ed3 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubConsumerGroup_GetViaIdentity.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubConsumerGroup_GetViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Gets a description for the specified consumer group. @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHubConsumerGroup_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Gets a description for the specified consumer group.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}", ApiVersion = "2023-01-01-preview")] public partial class GetAzEventHubConsumerGroup_GetViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class GetAzEventHubConsumerGroup_GetViaIdentity : global::System. /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class GetAzEventHubConsumerGroup_GetViaIdentity : global::System. [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -86,7 +107,7 @@ public partial class GetAzEventHubConsumerGroup_GetViaIdentity : global::System. /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -109,24 +130,24 @@ public partial class GetAzEventHubConsumerGroup_GetViaIdentity : global::System. /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -149,6 +170,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -170,7 +196,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzEventHubConsumerGroup_GetViaIdentity() { @@ -221,8 +247,33 @@ public GetAzEventHubConsumerGroup_GetViaIdentity() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -275,7 +326,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -295,6 +346,10 @@ protected override void ProcessRecord() else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -311,17 +366,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ConsumerGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.ConsumerGroupsGet(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.EventHubName ?? null, InputObject.ConsumerGroupName ?? null, InputObject.SubscriptionId ?? null, onOk, onDefault, this, Pipeline); + await this.Client.ConsumerGroupsGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.EventHubName ?? null, InputObject.ConsumerGroupName ?? null, onOk, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -359,12 +410,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -381,7 +432,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -399,12 +450,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -416,8 +467,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubConsumerGroup_GetViaIdentityEventhub.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubConsumerGroup_GetViaIdentityEventhub.cs new file mode 100644 index 000000000000..60bd06e4e574 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubConsumerGroup_GetViaIdentityEventhub.cs @@ -0,0 +1,505 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// Gets a description for the specified consumer group. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHubConsumerGroup_GetViaIdentityEventhub")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Gets a description for the specified consumer group.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}", ApiVersion = "2023-01-01-preview")] + public partial class GetAzEventHubConsumerGroup_GetViaIdentityEventhub : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity _eventhubInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity EventhubInputObject { get => this._eventhubInputObject; set => this._eventhubInputObject = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The consumer group name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The consumer group name")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The consumer group name", + SerializedName = @"consumerGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ConsumerGroupName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzEventHubConsumerGroup_GetViaIdentityEventhub() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (EventhubInputObject?.Id != null) + { + this.EventhubInputObject.Id += $"/consumergroups/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.ConsumerGroupsGetViaIdentity(EventhubInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == EventhubInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("EventhubInputObject has null value for EventhubInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, EventhubInputObject) ); + } + if (null == EventhubInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("EventhubInputObject has null value for EventhubInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, EventhubInputObject) ); + } + if (null == EventhubInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("EventhubInputObject has null value for EventhubInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, EventhubInputObject) ); + } + if (null == EventhubInputObject.EventHubName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("EventhubInputObject has null value for EventhubInputObject.EventHubName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, EventhubInputObject) ); + } + await this.Client.ConsumerGroupsGet(EventhubInputObject.SubscriptionId ?? null, EventhubInputObject.ResourceGroupName ?? null, EventhubInputObject.NamespaceName ?? null, EventhubInputObject.EventHubName ?? null, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubConsumerGroup_GetViaIdentityNamespace.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubConsumerGroup_GetViaIdentityNamespace.cs new file mode 100644 index 000000000000..3e6581e751fd --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubConsumerGroup_GetViaIdentityNamespace.cs @@ -0,0 +1,515 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// Gets a description for the specified consumer group. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHubConsumerGroup_GetViaIdentityNamespace")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Gets a description for the specified consumer group.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}", ApiVersion = "2023-01-01-preview")] + public partial class GetAzEventHubConsumerGroup_GetViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _eventHubName; + + /// The Event Hub name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Event Hub name")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Event Hub name", + SerializedName = @"eventHubName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string EventHubName { get => this._eventHubName; set => this._eventHubName = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The consumer group name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The consumer group name")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The consumer group name", + SerializedName = @"consumerGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ConsumerGroupName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzEventHubConsumerGroup_GetViaIdentityNamespace() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/eventhubs/{(global::System.Uri.EscapeDataString(this.EventHubName.ToString()))}/consumergroups/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.ConsumerGroupsGetViaIdentity(NamespaceInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.ConsumerGroupsGet(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, EventHubName, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { EventHubName=EventHubName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubConsumerGroup_List.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubConsumerGroup_List.cs index 2d983c616aef..eba90db8d016 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubConsumerGroup_List.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubConsumerGroup_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// @@ -15,12 +17,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets /// [OpenAPI] ListByEventHub=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHubConsumerGroup_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the Namespace.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups", ApiVersion = "2023-01-01-preview")] public partial class GetAzEventHubConsumerGroup_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -36,17 +39,32 @@ public partial class GetAzEventHubConsumerGroup_List : global::System.Management /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// A flag to tell whether it is the first onOK call. private bool _isFirst = true; /// Link to retrieve next page. private string _nextLink; + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -74,6 +92,9 @@ public partial class GetAzEventHubConsumerGroup_List : global::System.Management [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string EventHubName { get => this._eventHubName; set => this._eventHubName = value; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -114,7 +135,7 @@ public partial class GetAzEventHubConsumerGroup_List : global::System.Management /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -181,7 +202,8 @@ public partial class GetAzEventHubConsumerGroup_List : global::System.Management [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -204,24 +226,24 @@ public partial class GetAzEventHubConsumerGroup_List : global::System.Management /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupListResult /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -244,6 +266,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -265,7 +292,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzEventHubConsumerGroup_List() { @@ -316,8 +343,33 @@ public GetAzEventHubConsumerGroup_List() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -370,7 +422,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -385,13 +437,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.ConsumerGroupsListByEventHub(ResourceGroupName, NamespaceName, EventHubName, SubscriptionId, this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?), this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?), onOk, onDefault, this, Pipeline); + await this.Client.ConsumerGroupsListByEventHub(SubscriptionId, ResourceGroupName, NamespaceName, EventHubName, this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?), this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?), onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,EventHubName=EventHubName,SubscriptionId=SubscriptionId,Skip=this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?),Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?)}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,EventHubName=EventHubName,Skip=this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?),Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?)}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -429,12 +481,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -451,15 +503,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, EventHubName=EventHubName, SubscriptionId=SubscriptionId, Skip=this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?), Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, EventHubName=EventHubName, SubscriptionId=SubscriptionId, Skip=this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?), Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -469,12 +521,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroupListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupListResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -486,15 +538,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroupListResult + var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } _nextLink = result.NextLink; if (_isFirst) { _isFirst = false; - while (_nextLink != null) + while (!String.IsNullOrEmpty(_nextLink)) { if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) { diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubDisasterRecoveryConfigAuthorizationRule_Get.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubDisasterRecoveryConfigAuthorizationRule_Get.cs index 4feabb9941b9..8d807fa14a88 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubDisasterRecoveryConfigAuthorizationRule_Get.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubDisasterRecoveryConfigAuthorizationRule_Get.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Gets an AuthorizationRule for a Namespace by rule name. @@ -14,12 +16,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHubDisasterRecoveryConfigAuthorizationRule_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Gets an AuthorizationRule for a Namespace by rule name.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules/{authorizationRuleName}", ApiVersion = "2023-01-01-preview")] public partial class GetAzEventHubDisasterRecoveryConfigAuthorizationRule_Get : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,6 +38,18 @@ public partial class GetAzEventHubDisasterRecoveryConfigAuthorizationRule_Get : /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Backing field for property. private string _alias; @@ -54,6 +69,9 @@ public partial class GetAzEventHubDisasterRecoveryConfigAuthorizationRule_Get : [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -67,6 +85,9 @@ public partial class GetAzEventHubDisasterRecoveryConfigAuthorizationRule_Get : [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -121,7 +142,7 @@ public partial class GetAzEventHubDisasterRecoveryConfigAuthorizationRule_Get : /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -170,7 +191,8 @@ public partial class GetAzEventHubDisasterRecoveryConfigAuthorizationRule_Get : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -179,24 +201,24 @@ public partial class GetAzEventHubDisasterRecoveryConfigAuthorizationRule_Get : /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -219,6 +241,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -240,7 +267,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzEventHubDisasterRecoveryConfigAuthorizationRule_Get() { @@ -291,8 +318,33 @@ public GetAzEventHubDisasterRecoveryConfigAuthorizationRule_Get() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -345,7 +397,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -360,13 +412,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.DisasterRecoveryConfigsGetAuthorizationRule(ResourceGroupName, NamespaceName, Alias, Name, SubscriptionId, onOk, onDefault, this, Pipeline); + await this.Client.DisasterRecoveryConfigsGetAuthorizationRule(SubscriptionId, ResourceGroupName, NamespaceName, Alias, Name, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Alias=Alias,Name=Name,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Alias=Alias,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -404,12 +456,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -426,15 +478,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Alias=Alias, Name=Name, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Alias=Alias, Name=Name, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -444,12 +496,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -461,8 +513,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubDisasterRecoveryConfigAuthorizationRule_GetViaIdentity.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubDisasterRecoveryConfigAuthorizationRule_GetViaIdentity.cs index 675df52b6a26..0a581742303b 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubDisasterRecoveryConfigAuthorizationRule_GetViaIdentity.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubDisasterRecoveryConfigAuthorizationRule_GetViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Gets an AuthorizationRule for a Namespace by rule name. @@ -14,12 +16,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHubDisasterRecoveryConfigAuthorizationRule_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Gets an AuthorizationRule for a Namespace by rule name.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules/{authorizationRuleName}", ApiVersion = "2023-01-01-preview")] public partial class GetAzEventHubDisasterRecoveryConfigAuthorizationRule_GetViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +38,26 @@ public partial class GetAzEventHubDisasterRecoveryConfigAuthorizationRule_GetVia /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -53,6 +71,9 @@ public partial class GetAzEventHubDisasterRecoveryConfigAuthorizationRule_GetVia [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -87,7 +108,7 @@ public partial class GetAzEventHubDisasterRecoveryConfigAuthorizationRule_GetVia /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -110,24 +131,24 @@ public partial class GetAzEventHubDisasterRecoveryConfigAuthorizationRule_GetVia /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -150,6 +171,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -171,7 +197,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet + /// Initializes a new instance of the cmdlet /// class. /// public GetAzEventHubDisasterRecoveryConfigAuthorizationRule_GetViaIdentity() @@ -223,8 +249,33 @@ public GetAzEventHubDisasterRecoveryConfigAuthorizationRule_GetViaIdentity() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -277,7 +328,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -297,6 +348,10 @@ protected override void ProcessRecord() else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -313,17 +368,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.AuthorizationRuleName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.DisasterRecoveryConfigsGetAuthorizationRule(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.Alias ?? null, InputObject.AuthorizationRuleName ?? null, InputObject.SubscriptionId ?? null, onOk, onDefault, this, Pipeline); + await this.Client.DisasterRecoveryConfigsGetAuthorizationRule(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.Alias ?? null, InputObject.AuthorizationRuleName ?? null, onOk, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -361,12 +412,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -383,7 +434,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -401,12 +452,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -418,8 +469,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubDisasterRecoveryConfigAuthorizationRule_GetViaIdentityDisasterRecoveryConfig.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubDisasterRecoveryConfigAuthorizationRule_GetViaIdentityDisasterRecoveryConfig.cs new file mode 100644 index 000000000000..2247d1db9b25 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubDisasterRecoveryConfigAuthorizationRule_GetViaIdentityDisasterRecoveryConfig.cs @@ -0,0 +1,506 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// Gets an AuthorizationRule for a Namespace by rule name. + /// + /// [OpenAPI] GetAuthorizationRule=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules/{authorizationRuleName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHubDisasterRecoveryConfigAuthorizationRule_GetViaIdentityDisasterRecoveryConfig")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Gets an AuthorizationRule for a Namespace by rule name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules/{authorizationRuleName}", ApiVersion = "2023-01-01-preview")] + public partial class GetAzEventHubDisasterRecoveryConfigAuthorizationRule_GetViaIdentityDisasterRecoveryConfig : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity _disasterRecoveryConfigInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity DisasterRecoveryConfigInputObject { get => this._disasterRecoveryConfigInputObject; set => this._disasterRecoveryConfigInputObject = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzEventHubDisasterRecoveryConfigAuthorizationRule_GetViaIdentityDisasterRecoveryConfig() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (DisasterRecoveryConfigInputObject?.Id != null) + { + this.DisasterRecoveryConfigInputObject.Id += $"/authorizationRules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.DisasterRecoveryConfigsGetAuthorizationRuleViaIdentity(DisasterRecoveryConfigInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == DisasterRecoveryConfigInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("DisasterRecoveryConfigInputObject has null value for DisasterRecoveryConfigInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, DisasterRecoveryConfigInputObject) ); + } + if (null == DisasterRecoveryConfigInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("DisasterRecoveryConfigInputObject has null value for DisasterRecoveryConfigInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, DisasterRecoveryConfigInputObject) ); + } + if (null == DisasterRecoveryConfigInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("DisasterRecoveryConfigInputObject has null value for DisasterRecoveryConfigInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, DisasterRecoveryConfigInputObject) ); + } + if (null == DisasterRecoveryConfigInputObject.Alias) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("DisasterRecoveryConfigInputObject has null value for DisasterRecoveryConfigInputObject.Alias"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, DisasterRecoveryConfigInputObject) ); + } + await this.Client.DisasterRecoveryConfigsGetAuthorizationRule(DisasterRecoveryConfigInputObject.SubscriptionId ?? null, DisasterRecoveryConfigInputObject.ResourceGroupName ?? null, DisasterRecoveryConfigInputObject.NamespaceName ?? null, DisasterRecoveryConfigInputObject.Alias ?? null, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubDisasterRecoveryConfigAuthorizationRule_GetViaIdentityNamespace.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubDisasterRecoveryConfigAuthorizationRule_GetViaIdentityNamespace.cs new file mode 100644 index 000000000000..2953624d54e1 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubDisasterRecoveryConfigAuthorizationRule_GetViaIdentityNamespace.cs @@ -0,0 +1,516 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// Gets an AuthorizationRule for a Namespace by rule name. + /// + /// [OpenAPI] GetAuthorizationRule=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules/{authorizationRuleName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHubDisasterRecoveryConfigAuthorizationRule_GetViaIdentityNamespace")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Gets an AuthorizationRule for a Namespace by rule name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules/{authorizationRuleName}", ApiVersion = "2023-01-01-preview")] + public partial class GetAzEventHubDisasterRecoveryConfigAuthorizationRule_GetViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Backing field for property. + private string _alias; + + /// The Disaster Recovery configuration name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Disaster Recovery configuration name")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Disaster Recovery configuration name", + SerializedName = @"alias", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string Alias { get => this._alias; set => this._alias = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzEventHubDisasterRecoveryConfigAuthorizationRule_GetViaIdentityNamespace() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/disasterRecoveryConfigs/{(global::System.Uri.EscapeDataString(this.Alias.ToString()))}/authorizationRules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.DisasterRecoveryConfigsGetAuthorizationRuleViaIdentity(NamespaceInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.DisasterRecoveryConfigsGetAuthorizationRule(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, Alias, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Alias=Alias,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubDisasterRecoveryConfigAuthorizationRule_List.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubDisasterRecoveryConfigAuthorizationRule_List.cs index e2cc4a31d0d3..a312393edfe4 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubDisasterRecoveryConfigAuthorizationRule_List.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubDisasterRecoveryConfigAuthorizationRule_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Gets a list of authorization rules for a Namespace. @@ -14,12 +16,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHubDisasterRecoveryConfigAuthorizationRule_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Gets a list of authorization rules for a Namespace.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules", ApiVersion = "2023-01-01-preview")] public partial class GetAzEventHubDisasterRecoveryConfigAuthorizationRule_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,12 +38,24 @@ public partial class GetAzEventHubDisasterRecoveryConfigAuthorizationRule_List : /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// A flag to tell whether it is the first onOK call. private bool _isFirst = true; /// Link to retrieve next page. private string _nextLink; + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Backing field for property. private string _alias; @@ -60,6 +75,9 @@ public partial class GetAzEventHubDisasterRecoveryConfigAuthorizationRule_List : [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -73,6 +91,9 @@ public partial class GetAzEventHubDisasterRecoveryConfigAuthorizationRule_List : [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -113,7 +134,7 @@ public partial class GetAzEventHubDisasterRecoveryConfigAuthorizationRule_List : /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -162,7 +183,8 @@ public partial class GetAzEventHubDisasterRecoveryConfigAuthorizationRule_List : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -171,24 +193,24 @@ public partial class GetAzEventHubDisasterRecoveryConfigAuthorizationRule_List : /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleListResult /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -211,6 +233,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -232,7 +259,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzEventHubDisasterRecoveryConfigAuthorizationRule_List() { @@ -283,8 +310,33 @@ public GetAzEventHubDisasterRecoveryConfigAuthorizationRule_List() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -337,7 +389,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -352,13 +404,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.DisasterRecoveryConfigsListAuthorizationRules(ResourceGroupName, NamespaceName, Alias, SubscriptionId, onOk, onDefault, this, Pipeline); + await this.Client.DisasterRecoveryConfigsListAuthorizationRules(SubscriptionId, ResourceGroupName, NamespaceName, Alias, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Alias=Alias,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Alias=Alias}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -396,12 +448,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -418,15 +470,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Alias=Alias, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Alias=Alias, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -436,12 +488,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleListResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -453,15 +505,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleListResult + var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } _nextLink = result.NextLink; if (_isFirst) { _isFirst = false; - while (_nextLink != null) + while (!String.IsNullOrEmpty(_nextLink)) { if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) { diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubDisasterRecoveryConfigKey_List.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubDisasterRecoveryConfigKey_List.cs index d64b95938c38..7ae05510d4e0 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubDisasterRecoveryConfigKey_List.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubDisasterRecoveryConfigKey_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Gets the primary and secondary connection strings for the Namespace. @@ -14,12 +16,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHubDisasterRecoveryConfigKey_List", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Gets the primary and secondary connection strings for the Namespace.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules/{authorizationRuleName}/listKeys", ApiVersion = "2023-01-01-preview")] public partial class GetAzEventHubDisasterRecoveryConfigKey_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,6 +38,18 @@ public partial class GetAzEventHubDisasterRecoveryConfigKey_List : global::Syste /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Backing field for property. private string _alias; @@ -54,6 +69,9 @@ public partial class GetAzEventHubDisasterRecoveryConfigKey_List : global::Syste [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -67,6 +85,9 @@ public partial class GetAzEventHubDisasterRecoveryConfigKey_List : global::Syste [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -121,7 +142,7 @@ public partial class GetAzEventHubDisasterRecoveryConfigKey_List : global::Syste /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -170,7 +191,8 @@ public partial class GetAzEventHubDisasterRecoveryConfigKey_List : global::Syste [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -179,24 +201,24 @@ public partial class GetAzEventHubDisasterRecoveryConfigKey_List : global::Syste /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -219,6 +241,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -240,7 +267,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzEventHubDisasterRecoveryConfigKey_List() { @@ -291,8 +318,33 @@ public GetAzEventHubDisasterRecoveryConfigKey_List() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -348,7 +400,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -363,13 +415,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.DisasterRecoveryConfigsListKeys(ResourceGroupName, NamespaceName, Alias, Name, SubscriptionId, onOk, onDefault, this, Pipeline); + await this.Client.DisasterRecoveryConfigsListKeys(SubscriptionId, ResourceGroupName, NamespaceName, Alias, Name, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Alias=Alias,Name=Name,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Alias=Alias,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -407,12 +459,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -429,15 +481,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Alias=Alias, Name=Name, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Alias=Alias, Name=Name, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -447,12 +499,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -464,8 +516,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubGeoDRConfiguration_Get.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubGeoDRConfiguration_Get.cs index d58269b24c69..22c36aafc51c 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubGeoDRConfiguration_Get.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubGeoDRConfiguration_Get.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// @@ -15,12 +17,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHubGeoDRConfiguration_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}", ApiVersion = "2023-01-01-preview")] public partial class GetAzEventHubGeoDRConfiguration_Get : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -36,11 +39,26 @@ public partial class GetAzEventHubGeoDRConfiguration_Get : global::System.Manage /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -54,6 +72,9 @@ public partial class GetAzEventHubGeoDRConfiguration_Get : global::System.Manage [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -108,7 +129,7 @@ public partial class GetAzEventHubGeoDRConfiguration_Get : global::System.Manage /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -157,7 +178,8 @@ public partial class GetAzEventHubGeoDRConfiguration_Get : global::System.Manage [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -166,24 +188,24 @@ public partial class GetAzEventHubGeoDRConfiguration_Get : global::System.Manage /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -206,6 +228,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -227,7 +254,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzEventHubGeoDRConfiguration_Get() { @@ -278,8 +305,33 @@ public GetAzEventHubGeoDRConfiguration_Get() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -332,7 +384,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -347,13 +399,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.DisasterRecoveryConfigsGet(ResourceGroupName, NamespaceName, Name, SubscriptionId, onOk, onDefault, this, Pipeline); + await this.Client.DisasterRecoveryConfigsGet(SubscriptionId, ResourceGroupName, NamespaceName, Name, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -391,12 +443,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -413,15 +465,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -431,12 +483,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -448,8 +500,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubGeoDRConfiguration_GetViaIdentity.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubGeoDRConfiguration_GetViaIdentity.cs index e3a0ff92df51..1d258ac162b2 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubGeoDRConfiguration_GetViaIdentity.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubGeoDRConfiguration_GetViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// @@ -15,12 +17,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHubGeoDRConfiguration_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}", ApiVersion = "2023-01-01-preview")] public partial class GetAzEventHubGeoDRConfiguration_GetViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -36,11 +39,26 @@ public partial class GetAzEventHubGeoDRConfiguration_GetViaIdentity : global::Sy /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -54,6 +72,9 @@ public partial class GetAzEventHubGeoDRConfiguration_GetViaIdentity : global::Sy [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -88,7 +109,7 @@ public partial class GetAzEventHubGeoDRConfiguration_GetViaIdentity : global::Sy /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -111,24 +132,24 @@ public partial class GetAzEventHubGeoDRConfiguration_GetViaIdentity : global::Sy /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -151,6 +172,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -172,7 +198,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzEventHubGeoDRConfiguration_GetViaIdentity() { @@ -223,8 +249,33 @@ public GetAzEventHubGeoDRConfiguration_GetViaIdentity() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -277,7 +328,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -297,6 +348,10 @@ protected override void ProcessRecord() else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -309,17 +364,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Alias"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.DisasterRecoveryConfigsGet(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.Alias ?? null, InputObject.SubscriptionId ?? null, onOk, onDefault, this, Pipeline); + await this.Client.DisasterRecoveryConfigsGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.Alias ?? null, onOk, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -357,12 +408,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -379,7 +430,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -397,12 +448,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -414,8 +465,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubGeoDRConfiguration_GetViaIdentityNamespace.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubGeoDRConfiguration_GetViaIdentityNamespace.cs new file mode 100644 index 000000000000..cd9d21e50eb5 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubGeoDRConfiguration_GetViaIdentityNamespace.cs @@ -0,0 +1,502 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// + /// Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace + /// + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHubGeoDRConfiguration_GetViaIdentityNamespace")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}", ApiVersion = "2023-01-01-preview")] + public partial class GetAzEventHubGeoDRConfiguration_GetViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The Disaster Recovery configuration name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Disaster Recovery configuration name")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Disaster Recovery configuration name", + SerializedName = @"alias", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzEventHubGeoDRConfiguration_GetViaIdentityNamespace() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/disasterRecoveryConfigs/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.DisasterRecoveryConfigsGetViaIdentity(NamespaceInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.DisasterRecoveryConfigsGet(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubGeoDRConfiguration_List.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubGeoDRConfiguration_List.cs index 3772da5ed68d..0546faacfeef 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubGeoDRConfiguration_List.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubGeoDRConfiguration_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Gets all Alias(Disaster Recovery configurations) @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets /// [OpenAPI] List=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHubGeoDRConfiguration_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Gets all Alias(Disaster Recovery configurations)")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs", ApiVersion = "2023-01-01-preview")] public partial class GetAzEventHubGeoDRConfiguration_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,17 +37,32 @@ public partial class GetAzEventHubGeoDRConfiguration_List : global::System.Manag /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// A flag to tell whether it is the first onOK call. private bool _isFirst = true; /// Link to retrieve next page. private string _nextLink; + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -58,6 +76,9 @@ public partial class GetAzEventHubGeoDRConfiguration_List : global::System.Manag [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -98,7 +119,7 @@ public partial class GetAzEventHubGeoDRConfiguration_List : global::System.Manag /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -147,7 +168,8 @@ public partial class GetAzEventHubGeoDRConfiguration_List : global::System.Manag [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -156,24 +178,24 @@ public partial class GetAzEventHubGeoDRConfiguration_List : global::System.Manag /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryListResult /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -196,6 +218,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -217,7 +244,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzEventHubGeoDRConfiguration_List() { @@ -268,8 +295,33 @@ public GetAzEventHubGeoDRConfiguration_List() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -322,7 +374,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -337,13 +389,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.DisasterRecoveryConfigsList(ResourceGroupName, NamespaceName, SubscriptionId, onOk, onDefault, this, Pipeline); + await this.Client.DisasterRecoveryConfigsList(SubscriptionId, ResourceGroupName, NamespaceName, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -381,12 +433,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -403,15 +455,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -421,12 +473,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecoveryListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryListResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -438,15 +490,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecoveryListResult + var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } _nextLink = result.NextLink; if (_isFirst) { _isFirst = false; - while (_nextLink != null) + while (!String.IsNullOrEmpty(_nextLink)) { if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) { diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubKey_List.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubKey_List.cs index 306b499705b4..63de285d42a9 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubKey_List.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubKey_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Gets the ACS and SAS connection strings for the Event Hub. @@ -14,12 +16,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHubKey_List", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Gets the ACS and SAS connection strings for the Event Hub.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}/listKeys", ApiVersion = "2023-01-01-preview")] public partial class GetAzEventHubKey_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +38,26 @@ public partial class GetAzEventHubKey_List : global::System.Management.Automatio /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -67,6 +85,9 @@ public partial class GetAzEventHubKey_List : global::System.Management.Automatio [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string EventHubName { get => this._eventHubName; set => this._eventHubName = value; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -121,7 +142,7 @@ public partial class GetAzEventHubKey_List : global::System.Management.Automatio /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -170,7 +191,8 @@ public partial class GetAzEventHubKey_List : global::System.Management.Automatio [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -179,24 +201,24 @@ public partial class GetAzEventHubKey_List : global::System.Management.Automatio /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -219,6 +241,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -240,7 +267,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzEventHubKey_List() { @@ -291,8 +318,33 @@ public GetAzEventHubKey_List() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -348,7 +400,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -363,13 +415,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.EventHubsListKeys(ResourceGroupName, NamespaceName, EventHubName, Name, SubscriptionId, onOk, onDefault, this, Pipeline); + await this.Client.EventHubsListKeys(SubscriptionId, ResourceGroupName, NamespaceName, EventHubName, Name, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,EventHubName=EventHubName,Name=Name,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,EventHubName=EventHubName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -407,12 +459,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -429,15 +481,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, EventHubName=EventHubName, Name=Name, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, EventHubName=EventHubName, Name=Name, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -447,12 +499,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -464,8 +516,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubNamespaceAuthorizationRule_Get.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubNamespaceAuthorizationRule_Get.cs index f92cb85d02a6..2d70085f7949 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubNamespaceAuthorizationRule_Get.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubNamespaceAuthorizationRule_Get.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Gets an AuthorizationRule for a Namespace by rule name. @@ -14,12 +16,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHubNamespaceAuthorizationRule_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Gets an AuthorizationRule for a Namespace by rule name.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}", ApiVersion = "2023-01-01-preview")] public partial class GetAzEventHubNamespaceAuthorizationRule_Get : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +38,26 @@ public partial class GetAzEventHubNamespaceAuthorizationRule_Get : global::Syste /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -53,6 +71,9 @@ public partial class GetAzEventHubNamespaceAuthorizationRule_Get : global::Syste [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -107,7 +128,7 @@ public partial class GetAzEventHubNamespaceAuthorizationRule_Get : global::Syste /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -156,7 +177,8 @@ public partial class GetAzEventHubNamespaceAuthorizationRule_Get : global::Syste [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -165,24 +187,24 @@ public partial class GetAzEventHubNamespaceAuthorizationRule_Get : global::Syste /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -205,6 +227,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -226,7 +253,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzEventHubNamespaceAuthorizationRule_Get() { @@ -277,8 +304,33 @@ public GetAzEventHubNamespaceAuthorizationRule_Get() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -331,7 +383,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -346,13 +398,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.NamespacesGetAuthorizationRule(ResourceGroupName, NamespaceName, Name, SubscriptionId, onOk, onDefault, this, Pipeline); + await this.Client.NamespacesGetAuthorizationRule(SubscriptionId, ResourceGroupName, NamespaceName, Name, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -390,12 +442,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -412,15 +464,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -430,12 +482,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -447,8 +499,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubNamespaceAuthorizationRule_GetViaIdentity.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubNamespaceAuthorizationRule_GetViaIdentity.cs index fd0be415a4ec..000903a6fc0d 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubNamespaceAuthorizationRule_GetViaIdentity.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubNamespaceAuthorizationRule_GetViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Gets an AuthorizationRule for a Namespace by rule name. @@ -14,12 +16,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHubNamespaceAuthorizationRule_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Gets an AuthorizationRule for a Namespace by rule name.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}", ApiVersion = "2023-01-01-preview")] public partial class GetAzEventHubNamespaceAuthorizationRule_GetViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +38,26 @@ public partial class GetAzEventHubNamespaceAuthorizationRule_GetViaIdentity : gl /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -53,6 +71,9 @@ public partial class GetAzEventHubNamespaceAuthorizationRule_GetViaIdentity : gl [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -87,7 +108,7 @@ public partial class GetAzEventHubNamespaceAuthorizationRule_GetViaIdentity : gl /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -110,24 +131,24 @@ public partial class GetAzEventHubNamespaceAuthorizationRule_GetViaIdentity : gl /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -150,6 +171,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -171,7 +197,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzEventHubNamespaceAuthorizationRule_GetViaIdentity() { @@ -222,8 +248,33 @@ public GetAzEventHubNamespaceAuthorizationRule_GetViaIdentity() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -276,7 +327,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -296,6 +347,10 @@ protected override void ProcessRecord() else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -308,17 +363,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.AuthorizationRuleName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.NamespacesGetAuthorizationRule(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.AuthorizationRuleName ?? null, InputObject.SubscriptionId ?? null, onOk, onDefault, this, Pipeline); + await this.Client.NamespacesGetAuthorizationRule(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.AuthorizationRuleName ?? null, onOk, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -356,12 +407,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -378,7 +429,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -396,12 +447,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -413,8 +464,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubNamespaceAuthorizationRule_GetViaIdentityNamespace.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubNamespaceAuthorizationRule_GetViaIdentityNamespace.cs new file mode 100644 index 000000000000..2bf7ad1afe84 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubNamespaceAuthorizationRule_GetViaIdentityNamespace.cs @@ -0,0 +1,502 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// Gets an AuthorizationRule for a Namespace by rule name. + /// + /// [OpenAPI] GetAuthorizationRule=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHubNamespaceAuthorizationRule_GetViaIdentityNamespace")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Gets an AuthorizationRule for a Namespace by rule name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}", ApiVersion = "2023-01-01-preview")] + public partial class GetAzEventHubNamespaceAuthorizationRule_GetViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public GetAzEventHubNamespaceAuthorizationRule_GetViaIdentityNamespace() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/authorizationRules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.NamespacesGetAuthorizationRuleViaIdentity(NamespaceInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.NamespacesGetAuthorizationRule(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubNamespaceAuthorizationRule_List.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubNamespaceAuthorizationRule_List.cs index 2b0357bf69f0..94d75fcc7bb9 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubNamespaceAuthorizationRule_List.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubNamespaceAuthorizationRule_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Gets a list of authorization rules for a Namespace. @@ -14,12 +16,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHubNamespaceAuthorizationRule_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Gets a list of authorization rules for a Namespace.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules", ApiVersion = "2023-01-01-preview")] public partial class GetAzEventHubNamespaceAuthorizationRule_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,17 +38,32 @@ public partial class GetAzEventHubNamespaceAuthorizationRule_List : global::Syst /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// A flag to tell whether it is the first onOK call. private bool _isFirst = true; /// Link to retrieve next page. private string _nextLink; + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -59,6 +77,9 @@ public partial class GetAzEventHubNamespaceAuthorizationRule_List : global::Syst [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -99,7 +120,7 @@ public partial class GetAzEventHubNamespaceAuthorizationRule_List : global::Syst /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -148,7 +169,8 @@ public partial class GetAzEventHubNamespaceAuthorizationRule_List : global::Syst [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -157,24 +179,24 @@ public partial class GetAzEventHubNamespaceAuthorizationRule_List : global::Syst /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleListResult /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -197,6 +219,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -218,7 +245,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzEventHubNamespaceAuthorizationRule_List() { @@ -269,8 +296,33 @@ public GetAzEventHubNamespaceAuthorizationRule_List() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -323,7 +375,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -338,13 +390,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.NamespacesListAuthorizationRules(ResourceGroupName, NamespaceName, SubscriptionId, onOk, onDefault, this, Pipeline); + await this.Client.NamespacesListAuthorizationRules(SubscriptionId, ResourceGroupName, NamespaceName, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -382,12 +434,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -404,15 +456,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -422,12 +474,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRuleListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleListResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -439,15 +491,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRuleListResult + var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } _nextLink = result.NextLink; if (_isFirst) { _isFirst = false; - while (_nextLink != null) + while (!String.IsNullOrEmpty(_nextLink)) { if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) { diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubNamespaceKey_List.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubNamespaceKey_List.cs index cf77f2a291fa..862be08cc23b 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubNamespaceKey_List.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubNamespaceKey_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Gets the primary and secondary connection strings for the Namespace. @@ -14,12 +16,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHubNamespaceKey_List", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Gets the primary and secondary connection strings for the Namespace.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}/listKeys", ApiVersion = "2023-01-01-preview")] public partial class GetAzEventHubNamespaceKey_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +38,26 @@ public partial class GetAzEventHubNamespaceKey_List : global::System.Management. /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -53,6 +71,9 @@ public partial class GetAzEventHubNamespaceKey_List : global::System.Management. [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -107,7 +128,7 @@ public partial class GetAzEventHubNamespaceKey_List : global::System.Management. /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -156,7 +177,8 @@ public partial class GetAzEventHubNamespaceKey_List : global::System.Management. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -165,24 +187,24 @@ public partial class GetAzEventHubNamespaceKey_List : global::System.Management. /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -205,6 +227,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -226,7 +253,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzEventHubNamespaceKey_List() { @@ -277,8 +304,33 @@ public GetAzEventHubNamespaceKey_List() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -334,7 +386,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -349,13 +401,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.NamespacesListKeys(ResourceGroupName, NamespaceName, Name, SubscriptionId, onOk, onDefault, this, Pipeline); + await this.Client.NamespacesListKeys(SubscriptionId, ResourceGroupName, NamespaceName, Name, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -393,12 +445,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -415,15 +467,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -433,12 +485,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -450,8 +502,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubNamespace_Get.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubNamespace_Get.cs index 5d53a988470c..53c7936c2a3b 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubNamespace_Get.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubNamespace_Get.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Gets the description of the specified namespace. @@ -14,12 +16,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHubNamespace_Get")] [global::System.Management.Automation.Alias("Get-AzEventHubNamespaceV2")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Gets the description of the specified namespace.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}", ApiVersion = "2023-01-01-preview")] public partial class GetAzEventHubNamespace_Get : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +38,26 @@ public partial class GetAzEventHubNamespace_Get : global::System.Management.Auto /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -53,6 +71,9 @@ public partial class GetAzEventHubNamespace_Get : global::System.Management.Auto [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -94,7 +115,7 @@ public partial class GetAzEventHubNamespace_Get : global::System.Management.Auto /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -143,7 +164,8 @@ public partial class GetAzEventHubNamespace_Get : global::System.Management.Auto [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -152,24 +174,24 @@ public partial class GetAzEventHubNamespace_Get : global::System.Management.Auto /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -192,6 +214,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -213,7 +240,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzEventHubNamespace_Get() { @@ -264,8 +291,33 @@ public GetAzEventHubNamespace_Get() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -318,7 +370,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -333,13 +385,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.NamespacesGet(ResourceGroupName, Name, SubscriptionId, onOk, onDefault, this, Pipeline); + await this.Client.NamespacesGet(SubscriptionId, ResourceGroupName, Name, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,Name=Name,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -377,12 +429,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -399,15 +451,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, Name=Name, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, Name=Name, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -417,12 +469,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -434,8 +486,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubNamespace_GetViaIdentity.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubNamespace_GetViaIdentity.cs index 6738ddfa8f80..26958f8aa8dd 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubNamespace_GetViaIdentity.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubNamespace_GetViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Gets the description of the specified namespace. @@ -14,12 +16,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHubNamespace_GetViaIdentity")] [global::System.Management.Automation.Alias("Get-AzEventHubNamespaceV2")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Gets the description of the specified namespace.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}", ApiVersion = "2023-01-01-preview")] public partial class GetAzEventHubNamespace_GetViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +38,26 @@ public partial class GetAzEventHubNamespace_GetViaIdentity : global::System.Mana /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -53,6 +71,9 @@ public partial class GetAzEventHubNamespace_GetViaIdentity : global::System.Mana [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -87,7 +108,7 @@ public partial class GetAzEventHubNamespace_GetViaIdentity : global::System.Mana /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -110,24 +131,24 @@ public partial class GetAzEventHubNamespace_GetViaIdentity : global::System.Mana /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -150,6 +171,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -171,7 +197,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzEventHubNamespace_GetViaIdentity() { @@ -222,8 +248,33 @@ public GetAzEventHubNamespace_GetViaIdentity() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -276,7 +327,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -296,6 +347,10 @@ protected override void ProcessRecord() else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -304,17 +359,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.NamespacesGet(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.SubscriptionId ?? null, onOk, onDefault, this, Pipeline); + await this.Client.NamespacesGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, onOk, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -352,12 +403,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -374,7 +425,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -392,12 +443,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -409,8 +460,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubNamespace_List.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubNamespace_List.cs index f063420628c9..9082948dd26a 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubNamespace_List.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubNamespace_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// @@ -16,12 +18,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHubNamespace_List")] [global::System.Management.Automation.Alias("Get-AzEventHubNamespaceV2")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Lists all the available Namespaces within a subscription, irrespective of the resource groups.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.EventHub/namespaces", ApiVersion = "2023-01-01-preview")] public partial class GetAzEventHubNamespace_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -37,17 +40,32 @@ public partial class GetAzEventHubNamespace_List : global::System.Management.Aut /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// A flag to tell whether it is the first onOK call. private bool _isFirst = true; /// Link to retrieve next page. private string _nextLink; + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -61,6 +79,9 @@ public partial class GetAzEventHubNamespace_List : global::System.Management.Aut [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -87,7 +108,7 @@ public partial class GetAzEventHubNamespace_List : global::System.Management.Aut /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -122,7 +143,8 @@ public partial class GetAzEventHubNamespace_List : global::System.Management.Aut [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -131,24 +153,24 @@ public partial class GetAzEventHubNamespace_List : global::System.Management.Aut /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceListResult /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -171,6 +193,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -192,7 +219,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzEventHubNamespace_List() { @@ -243,8 +270,33 @@ public GetAzEventHubNamespace_List() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -297,7 +349,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -318,7 +370,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -356,12 +408,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -378,15 +430,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -396,12 +448,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceListResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -413,15 +465,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceListResult + var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } _nextLink = result.NextLink; if (_isFirst) { _isFirst = false; - while (_nextLink != null) + while (!String.IsNullOrEmpty(_nextLink)) { if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) { diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubNamespace_List1.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubNamespace_List1.cs index 53be300607ac..89ca73ee38db 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubNamespace_List1.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubNamespace_List1.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Lists the available Namespaces within a resource group. @@ -14,12 +16,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHubNamespace_List1")] [global::System.Management.Automation.Alias("Get-AzEventHubNamespaceV2")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Lists the available Namespaces within a resource group.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces", ApiVersion = "2023-01-01-preview")] public partial class GetAzEventHubNamespace_List1 : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,17 +38,32 @@ public partial class GetAzEventHubNamespace_List1 : global::System.Management.Au /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// A flag to tell whether it is the first onOK call. private bool _isFirst = true; /// Link to retrieve next page. private string _nextLink; + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -59,6 +77,9 @@ public partial class GetAzEventHubNamespace_List1 : global::System.Management.Au [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -85,7 +106,7 @@ public partial class GetAzEventHubNamespace_List1 : global::System.Management.Au /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -134,7 +155,8 @@ public partial class GetAzEventHubNamespace_List1 : global::System.Management.Au [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -143,24 +165,24 @@ public partial class GetAzEventHubNamespace_List1 : global::System.Management.Au /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceListResult /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -183,6 +205,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -204,7 +231,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzEventHubNamespace_List1() { @@ -255,8 +282,33 @@ public GetAzEventHubNamespace_List1() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -309,7 +361,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -324,13 +376,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.NamespacesListByResourceGroup(ResourceGroupName, SubscriptionId, onOk, onDefault, this, Pipeline); + await this.Client.NamespacesListByResourceGroup(SubscriptionId, ResourceGroupName, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -368,12 +420,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -390,15 +442,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -408,12 +460,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceListResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -425,15 +477,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceListResult + var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } _nextLink = result.NextLink; if (_isFirst) { _isFirst = false; - while (_nextLink != null) + while (!String.IsNullOrEmpty(_nextLink)) { if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) { diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubNetworkRuleSet_Get.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubNetworkRuleSet_Get.cs index 1468619d072e..de64a55aa1ee 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubNetworkRuleSet_Get.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubNetworkRuleSet_Get.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Gets NetworkRuleSet for a Namespace. @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets /// [OpenAPI] GetNetworkRuleSet=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkRuleSets/default" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHubNetworkRuleSet_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Gets NetworkRuleSet for a Namespace.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkRuleSets/default", ApiVersion = "2023-01-01-preview")] public partial class GetAzEventHubNetworkRuleSet_Get : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class GetAzEventHubNetworkRuleSet_Get : global::System.Management /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class GetAzEventHubNetworkRuleSet_Get : global::System.Management [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -92,7 +113,7 @@ public partial class GetAzEventHubNetworkRuleSet_Get : global::System.Management /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -141,7 +162,8 @@ public partial class GetAzEventHubNetworkRuleSet_Get : global::System.Management [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -150,24 +172,24 @@ public partial class GetAzEventHubNetworkRuleSet_Get : global::System.Management /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -190,6 +212,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -211,7 +238,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzEventHubNetworkRuleSet_Get() { @@ -262,8 +289,33 @@ public GetAzEventHubNetworkRuleSet_Get() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -316,7 +368,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -331,13 +383,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.NamespacesGetNetworkRuleSet(ResourceGroupName, NamespaceName, SubscriptionId, onOk, onDefault, this, Pipeline); + await this.Client.NamespacesGetNetworkRuleSet(SubscriptionId, ResourceGroupName, NamespaceName, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -375,12 +427,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -397,15 +449,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -415,12 +467,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -432,8 +484,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubNetworkRuleSet_GetViaIdentity.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubNetworkRuleSet_GetViaIdentity.cs index b0002d66a184..6049876aa27e 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubNetworkRuleSet_GetViaIdentity.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubNetworkRuleSet_GetViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Gets NetworkRuleSet for a Namespace. @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets /// [OpenAPI] GetNetworkRuleSet=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkRuleSets/default" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHubNetworkRuleSet_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Gets NetworkRuleSet for a Namespace.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkRuleSets/default", ApiVersion = "2023-01-01-preview")] public partial class GetAzEventHubNetworkRuleSet_GetViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class GetAzEventHubNetworkRuleSet_GetViaIdentity : global::System /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class GetAzEventHubNetworkRuleSet_GetViaIdentity : global::System [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -86,7 +107,7 @@ public partial class GetAzEventHubNetworkRuleSet_GetViaIdentity : global::System /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -109,24 +130,24 @@ public partial class GetAzEventHubNetworkRuleSet_GetViaIdentity : global::System /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -149,6 +170,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -170,7 +196,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzEventHubNetworkRuleSet_GetViaIdentity() { @@ -221,8 +247,33 @@ public GetAzEventHubNetworkRuleSet_GetViaIdentity() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -275,7 +326,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -295,6 +346,10 @@ protected override void ProcessRecord() else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -303,17 +358,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.NamespacesGetNetworkRuleSet(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.SubscriptionId ?? null, onOk, onDefault, this, Pipeline); + await this.Client.NamespacesGetNetworkRuleSet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, onOk, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -351,12 +402,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -373,7 +424,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -391,12 +442,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -408,8 +459,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubNetworkRuleSet_List.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubNetworkRuleSet_List.cs index ef85f950d16c..cdf015e4a772 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubNetworkRuleSet_List.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubNetworkRuleSet_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Gets NetworkRuleSet for a Namespace. @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets /// [OpenAPI] ListNetworkRuleSet=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkRuleSets" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHubNetworkRuleSet_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetListResult))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetListResult))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Gets NetworkRuleSet for a Namespace.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkRuleSets", ApiVersion = "2023-01-01-preview")] public partial class GetAzEventHubNetworkRuleSet_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,17 +37,32 @@ public partial class GetAzEventHubNetworkRuleSet_List : global::System.Managemen /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// A flag to tell whether it is the first onOK call. private bool _isFirst = true; /// Link to retrieve next page. private string _nextLink; + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -58,6 +76,9 @@ public partial class GetAzEventHubNetworkRuleSet_List : global::System.Managemen [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -98,7 +119,7 @@ public partial class GetAzEventHubNetworkRuleSet_List : global::System.Managemen /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -147,7 +168,8 @@ public partial class GetAzEventHubNetworkRuleSet_List : global::System.Managemen [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -156,24 +178,24 @@ public partial class GetAzEventHubNetworkRuleSet_List : global::System.Managemen /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetListResult /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -196,6 +218,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -217,7 +244,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzEventHubNetworkRuleSet_List() { @@ -268,8 +295,33 @@ public GetAzEventHubNetworkRuleSet_List() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -322,7 +374,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -337,13 +389,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.NamespacesListNetworkRuleSet(ResourceGroupName, NamespaceName, SubscriptionId, onOk, onDefault, this, Pipeline); + await this.Client.NamespacesListNetworkRuleSet(SubscriptionId, ResourceGroupName, NamespaceName, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -381,12 +433,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -403,15 +455,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -421,12 +473,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetListResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -438,15 +490,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetListResult + var result = (await response); // response should be returning an array of some kind. +Pageable // nested-array / value / nextLink - var result = await response; - WriteObject(result.Value,true); + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } _nextLink = result.NextLink; if (_isFirst) { _isFirst = false; - while (_nextLink != null) + while (!String.IsNullOrEmpty(_nextLink)) { if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) { diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubOperation_List.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubOperation_List.cs index 3818ed0307f6..b8010291b001 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubOperation_List.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubOperation_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Lists all of the available Event Hub REST API operations. @@ -14,12 +16,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHubOperation_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperation))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperation))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Lists all of the available Event Hub REST API operations.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/providers/Microsoft.EventHub/operations", ApiVersion = "2023-01-01-preview")] public partial class GetAzEventHubOperation_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,17 +38,32 @@ public partial class GetAzEventHubOperation_List : global::System.Management.Aut /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// A flag to tell whether it is the first onOK call. private bool _isFirst = true; /// Link to retrieve next page. private string _nextLink; + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -59,6 +77,9 @@ public partial class GetAzEventHubOperation_List : global::System.Management.Aut [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -85,7 +106,7 @@ public partial class GetAzEventHubOperation_List : global::System.Management.Aut /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -108,24 +129,24 @@ public partial class GetAzEventHubOperation_List : global::System.Management.Aut /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationListResult /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -148,6 +169,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -169,7 +195,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzEventHubOperation_List() { @@ -220,8 +246,33 @@ public GetAzEventHubOperation_List() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -274,7 +325,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -292,7 +343,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -330,12 +381,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -352,7 +403,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -370,12 +421,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperationListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationListResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -387,15 +438,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperationListResult + var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } _nextLink = result.NextLink; if (_isFirst) { _isFirst = false; - while (_nextLink != null) + while (!String.IsNullOrEmpty(_nextLink)) { if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) { diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubPrivateEndpointConnection_Get.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubPrivateEndpointConnection_Get.cs index 1c035f02ff9f..28a861e95736 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubPrivateEndpointConnection_Get.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubPrivateEndpointConnection_Get.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Gets a description for the specified Private Endpoint Connection name. @@ -13,12 +15,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHubPrivateEndpointConnection_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Gets a description for the specified Private Endpoint Connection name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639379.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}", ApiVersion = "2023-01-01-preview")] public partial class GetAzEventHubPrivateEndpointConnection_Get : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +38,26 @@ public partial class GetAzEventHubPrivateEndpointConnection_Get : global::System /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -52,6 +71,9 @@ public partial class GetAzEventHubPrivateEndpointConnection_Get : global::System [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -107,7 +129,7 @@ public partial class GetAzEventHubPrivateEndpointConnection_Get : global::System /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -156,7 +178,8 @@ public partial class GetAzEventHubPrivateEndpointConnection_Get : global::System [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -165,24 +188,24 @@ public partial class GetAzEventHubPrivateEndpointConnection_Get : global::System /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -205,6 +228,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -226,7 +254,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzEventHubPrivateEndpointConnection_Get() { @@ -277,8 +305,33 @@ public GetAzEventHubPrivateEndpointConnection_Get() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -331,7 +384,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -346,13 +399,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.PrivateEndpointConnectionsGet(ResourceGroupName, NamespaceName, Name, SubscriptionId, onOk, onDefault, this, Pipeline); + await this.Client.PrivateEndpointConnectionsGet(SubscriptionId, ResourceGroupName, NamespaceName, Name, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -390,12 +443,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -412,15 +465,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -430,12 +483,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -447,8 +500,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubPrivateEndpointConnection_GetViaIdentity.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubPrivateEndpointConnection_GetViaIdentity.cs index 941ba2588d78..64624e1b97c9 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubPrivateEndpointConnection_GetViaIdentity.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubPrivateEndpointConnection_GetViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Gets a description for the specified Private Endpoint Connection name. @@ -13,12 +15,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHubPrivateEndpointConnection_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Gets a description for the specified Private Endpoint Connection name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639379.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}", ApiVersion = "2023-01-01-preview")] public partial class GetAzEventHubPrivateEndpointConnection_GetViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +38,26 @@ public partial class GetAzEventHubPrivateEndpointConnection_GetViaIdentity : glo /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -52,6 +71,9 @@ public partial class GetAzEventHubPrivateEndpointConnection_GetViaIdentity : glo [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -86,7 +108,7 @@ public partial class GetAzEventHubPrivateEndpointConnection_GetViaIdentity : glo /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -109,24 +131,24 @@ public partial class GetAzEventHubPrivateEndpointConnection_GetViaIdentity : glo /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -149,6 +171,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -170,7 +197,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzEventHubPrivateEndpointConnection_GetViaIdentity() { @@ -221,8 +248,33 @@ public GetAzEventHubPrivateEndpointConnection_GetViaIdentity() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -275,7 +327,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -295,6 +347,10 @@ protected override void ProcessRecord() else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -307,17 +363,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.PrivateEndpointConnectionName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.PrivateEndpointConnectionsGet(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.PrivateEndpointConnectionName ?? null, InputObject.SubscriptionId ?? null, onOk, onDefault, this, Pipeline); + await this.Client.PrivateEndpointConnectionsGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.PrivateEndpointConnectionName ?? null, onOk, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -355,12 +407,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -377,7 +429,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -395,12 +447,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -412,8 +464,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubPrivateEndpointConnection_GetViaIdentityNamespace.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubPrivateEndpointConnection_GetViaIdentityNamespace.cs new file mode 100644 index 000000000000..a375d9f72653 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubPrivateEndpointConnection_GetViaIdentityNamespace.cs @@ -0,0 +1,503 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// Gets a description for the specified Private Endpoint Connection name. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHubPrivateEndpointConnection_GetViaIdentityNamespace")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Gets a description for the specified Private Endpoint Connection name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639379.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}", ApiVersion = "2023-01-01-preview")] + public partial class GetAzEventHubPrivateEndpointConnection_GetViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The PrivateEndpointConnection name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The PrivateEndpointConnection name")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The PrivateEndpointConnection name", + SerializedName = @"privateEndpointConnectionName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("PrivateEndpointConnectionName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public GetAzEventHubPrivateEndpointConnection_GetViaIdentityNamespace() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/privateEndpointConnections/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.PrivateEndpointConnectionsGetViaIdentity(NamespaceInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.PrivateEndpointConnectionsGet(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubPrivateEndpointConnection_List.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubPrivateEndpointConnection_List.cs index 9084ea73ef58..9734a6bd2e84 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubPrivateEndpointConnection_List.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubPrivateEndpointConnection_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Gets the available PrivateEndpointConnections within a namespace. @@ -13,12 +15,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets /// [OpenAPI] List=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHubPrivateEndpointConnection_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Gets the available PrivateEndpointConnections within a namespace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639412.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections", ApiVersion = "2023-01-01-preview")] public partial class GetAzEventHubPrivateEndpointConnection_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,17 +38,32 @@ public partial class GetAzEventHubPrivateEndpointConnection_List : global::Syste /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// A flag to tell whether it is the first onOK call. private bool _isFirst = true; /// Link to retrieve next page. private string _nextLink; + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -58,6 +77,9 @@ public partial class GetAzEventHubPrivateEndpointConnection_List : global::Syste [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -98,7 +120,7 @@ public partial class GetAzEventHubPrivateEndpointConnection_List : global::Syste /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -147,7 +169,8 @@ public partial class GetAzEventHubPrivateEndpointConnection_List : global::Syste [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -156,24 +179,24 @@ public partial class GetAzEventHubPrivateEndpointConnection_List : global::Syste /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionListResult /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -196,6 +219,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -217,7 +245,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzEventHubPrivateEndpointConnection_List() { @@ -268,8 +296,33 @@ public GetAzEventHubPrivateEndpointConnection_List() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -322,7 +375,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -337,13 +390,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.PrivateEndpointConnectionsList(ResourceGroupName, NamespaceName, SubscriptionId, onOk, onDefault, this, Pipeline); + await this.Client.PrivateEndpointConnectionsList(SubscriptionId, ResourceGroupName, NamespaceName, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -381,12 +434,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -403,15 +456,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -421,12 +474,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnectionListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionListResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -438,15 +491,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnectionListResult + var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } _nextLink = result.NextLink; if (_isFirst) { _isFirst = false; - while (_nextLink != null) + while (!String.IsNullOrEmpty(_nextLink)) { if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) { diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubPrivateLink_Get.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubPrivateLink_Get.cs index 8a65f95dc183..1039385a96fd 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubPrivateLink_Get.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubPrivateLink_Get.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Gets lists of resources that supports Privatelinks. @@ -13,12 +15,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateLinkResources" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHubPrivateLink_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourcesListResult))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourcesListResult))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Gets lists of resources that supports Privatelinks.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639379.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateLinkResources", ApiVersion = "2023-01-01-preview")] public partial class GetAzEventHubPrivateLink_Get : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,17 +38,32 @@ public partial class GetAzEventHubPrivateLink_Get : global::System.Management.Au /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// A flag to tell whether it is the first onOK call. private bool _isFirst = true; /// Link to retrieve next page. private string _nextLink; + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -58,6 +77,9 @@ public partial class GetAzEventHubPrivateLink_Get : global::System.Management.Au [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -98,7 +120,7 @@ public partial class GetAzEventHubPrivateLink_Get : global::System.Management.Au /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -147,7 +169,8 @@ public partial class GetAzEventHubPrivateLink_Get : global::System.Management.Au [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -156,24 +179,24 @@ public partial class GetAzEventHubPrivateLink_Get : global::System.Management.Au /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourcesListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourcesListResult /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -196,6 +219,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -217,7 +245,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzEventHubPrivateLink_Get() { @@ -268,8 +296,33 @@ public GetAzEventHubPrivateLink_Get() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -322,7 +375,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -337,13 +390,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.PrivateLinkResourcesGet(ResourceGroupName, NamespaceName, SubscriptionId, onOk, onDefault, this, Pipeline); + await this.Client.PrivateLinkResourcesGet(SubscriptionId, ResourceGroupName, NamespaceName, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -381,12 +434,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -403,15 +456,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -421,12 +474,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourcesListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourcesListResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -438,15 +491,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourcesListResult + var result = (await response); // response should be returning an array of some kind. +Pageable // nested-array / value / nextLink - var result = await response; - WriteObject(result.Value,true); + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } _nextLink = result.NextLink; if (_isFirst) { _isFirst = false; - while (_nextLink != null) + while (!String.IsNullOrEmpty(_nextLink)) { if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) { diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubSchemaGroup_Get.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubSchemaGroup_Get.cs index 2b5f38c81cb7..a7a416c430b7 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubSchemaGroup_Get.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubSchemaGroup_Get.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Gets the details of an EventHub schema group. @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/schemagroups/{schemaGroupName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHubSchemaGroup_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Gets the details of an EventHub schema group.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/schemagroups/{schemaGroupName}", ApiVersion = "2023-01-01-preview")] public partial class GetAzEventHubSchemaGroup_Get : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class GetAzEventHubSchemaGroup_Get : global::System.Management.Au /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class GetAzEventHubSchemaGroup_Get : global::System.Management.Au [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -107,7 +128,7 @@ public partial class GetAzEventHubSchemaGroup_Get : global::System.Management.Au /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -156,7 +177,8 @@ public partial class GetAzEventHubSchemaGroup_Get : global::System.Management.Au [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -165,24 +187,24 @@ public partial class GetAzEventHubSchemaGroup_Get : global::System.Management.Au /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -205,6 +227,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -226,7 +253,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzEventHubSchemaGroup_Get() { @@ -277,8 +304,33 @@ public GetAzEventHubSchemaGroup_Get() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -331,7 +383,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -346,13 +398,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.SchemaRegistryGet(ResourceGroupName, NamespaceName, Name, SubscriptionId, onOk, onDefault, this, Pipeline); + await this.Client.SchemaRegistryGet(SubscriptionId, ResourceGroupName, NamespaceName, Name, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -390,12 +442,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -412,15 +464,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -430,12 +482,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -447,8 +499,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubSchemaGroup_GetViaIdentity.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubSchemaGroup_GetViaIdentity.cs index 08a55b0f3ada..e6eb1846fb8c 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubSchemaGroup_GetViaIdentity.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubSchemaGroup_GetViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Gets the details of an EventHub schema group. @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/schemagroups/{schemaGroupName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHubSchemaGroup_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Gets the details of an EventHub schema group.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/schemagroups/{schemaGroupName}", ApiVersion = "2023-01-01-preview")] public partial class GetAzEventHubSchemaGroup_GetViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class GetAzEventHubSchemaGroup_GetViaIdentity : global::System.Ma /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class GetAzEventHubSchemaGroup_GetViaIdentity : global::System.Ma [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -86,7 +107,7 @@ public partial class GetAzEventHubSchemaGroup_GetViaIdentity : global::System.Ma /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -109,24 +130,24 @@ public partial class GetAzEventHubSchemaGroup_GetViaIdentity : global::System.Ma /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -149,6 +170,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -170,7 +196,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzEventHubSchemaGroup_GetViaIdentity() { @@ -221,8 +247,33 @@ public GetAzEventHubSchemaGroup_GetViaIdentity() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -275,7 +326,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -295,6 +346,10 @@ protected override void ProcessRecord() else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -307,17 +362,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SchemaGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.SchemaRegistryGet(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.SchemaGroupName ?? null, InputObject.SubscriptionId ?? null, onOk, onDefault, this, Pipeline); + await this.Client.SchemaRegistryGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.SchemaGroupName ?? null, onOk, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -355,12 +406,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -377,7 +428,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -395,12 +446,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -412,8 +463,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubSchemaGroup_GetViaIdentityNamespace.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubSchemaGroup_GetViaIdentityNamespace.cs new file mode 100644 index 000000000000..fb721d2ff395 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubSchemaGroup_GetViaIdentityNamespace.cs @@ -0,0 +1,501 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// Gets the details of an EventHub schema group. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/schemagroups/{schemaGroupName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHubSchemaGroup_GetViaIdentityNamespace")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Gets the details of an EventHub schema group.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/schemagroups/{schemaGroupName}", ApiVersion = "2023-01-01-preview")] + public partial class GetAzEventHubSchemaGroup_GetViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The Schema Group name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Schema Group name ")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Schema Group name ", + SerializedName = @"schemaGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("SchemaGroupName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzEventHubSchemaGroup_GetViaIdentityNamespace() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/schemagroups/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.SchemaRegistryGetViaIdentity(NamespaceInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.SchemaRegistryGet(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubSchemaGroup_List.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubSchemaGroup_List.cs index e10b3e5f5a29..8666936ade9d 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubSchemaGroup_List.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHubSchemaGroup_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Gets all the Schema Groups in a Namespace. @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets /// [OpenAPI] ListByNamespace=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/schemagroups" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHubSchemaGroup_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Gets all the Schema Groups in a Namespace.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/schemagroups", ApiVersion = "2023-01-01-preview")] public partial class GetAzEventHubSchemaGroup_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,17 +37,32 @@ public partial class GetAzEventHubSchemaGroup_List : global::System.Management.A /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// A flag to tell whether it is the first onOK call. private bool _isFirst = true; /// Link to retrieve next page. private string _nextLink; + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -58,6 +76,9 @@ public partial class GetAzEventHubSchemaGroup_List : global::System.Management.A [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -98,7 +119,7 @@ public partial class GetAzEventHubSchemaGroup_List : global::System.Management.A /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -165,7 +186,8 @@ public partial class GetAzEventHubSchemaGroup_List : global::System.Management.A [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -188,24 +210,24 @@ public partial class GetAzEventHubSchemaGroup_List : global::System.Management.A /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupListResult /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -228,6 +250,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -249,7 +276,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzEventHubSchemaGroup_List() { @@ -300,8 +327,33 @@ public GetAzEventHubSchemaGroup_List() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -354,7 +406,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -369,13 +421,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.SchemaRegistryListByNamespace(ResourceGroupName, NamespaceName, SubscriptionId, this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?), this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?), onOk, onDefault, this, Pipeline); + await this.Client.SchemaRegistryListByNamespace(SubscriptionId, ResourceGroupName, NamespaceName, this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?), this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?), onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,SubscriptionId=SubscriptionId,Skip=this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?),Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?)}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Skip=this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?),Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?)}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -413,12 +465,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -435,15 +487,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId, Skip=this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?), Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId, Skip=this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?), Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -453,12 +505,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupListResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -470,15 +522,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupListResult + var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } _nextLink = result.NextLink; if (_isFirst) { _isFirst = false; - while (_nextLink != null) + while (!String.IsNullOrEmpty(_nextLink)) { if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) { diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHub_Get.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHub_Get.cs index f8e4aefc0191..bf6c7826c6cb 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHub_Get.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHub_Get.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Gets an Event Hubs description for the specified Event Hub. @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHub_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Gets an Event Hubs description for the specified Event Hub.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}", ApiVersion = "2023-01-01-preview")] public partial class GetAzEventHub_Get : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class GetAzEventHub_Get : global::System.Management.Automation.PS /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class GetAzEventHub_Get : global::System.Management.Automation.PS [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -107,7 +128,7 @@ public partial class GetAzEventHub_Get : global::System.Management.Automation.PS /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -156,7 +177,8 @@ public partial class GetAzEventHub_Get : global::System.Management.Automation.PS [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -165,24 +187,24 @@ public partial class GetAzEventHub_Get : global::System.Management.Automation.PS /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -205,6 +227,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -225,7 +252,9 @@ protected override void EndProcessing() } } - /// Intializes a new instance of the cmdlet class. + /// + /// Initializes a new instance of the cmdlet class. + /// public GetAzEventHub_Get() { @@ -275,8 +304,33 @@ public GetAzEventHub_Get() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -329,7 +383,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -344,13 +398,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.EventHubsGet(ResourceGroupName, NamespaceName, Name, SubscriptionId, onOk, onDefault, this, Pipeline); + await this.Client.EventHubsGet(SubscriptionId, ResourceGroupName, NamespaceName, Name, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -388,12 +442,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -410,15 +464,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -428,12 +482,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -445,8 +499,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHub_GetViaIdentity.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHub_GetViaIdentity.cs index 3b2a1d056d0b..c94e543aae4a 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHub_GetViaIdentity.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHub_GetViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Gets an Event Hubs description for the specified Event Hub. @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHub_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Gets an Event Hubs description for the specified Event Hub.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}", ApiVersion = "2023-01-01-preview")] public partial class GetAzEventHub_GetViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class GetAzEventHub_GetViaIdentity : global::System.Management.Au /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class GetAzEventHub_GetViaIdentity : global::System.Management.Au [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -86,7 +107,7 @@ public partial class GetAzEventHub_GetViaIdentity : global::System.Management.Au /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -109,24 +130,24 @@ public partial class GetAzEventHub_GetViaIdentity : global::System.Management.Au /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -149,6 +170,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -170,7 +196,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzEventHub_GetViaIdentity() { @@ -221,8 +247,33 @@ public GetAzEventHub_GetViaIdentity() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -275,7 +326,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -295,6 +346,10 @@ protected override void ProcessRecord() else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -307,17 +362,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.EventHubName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.EventHubsGet(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.EventHubName ?? null, InputObject.SubscriptionId ?? null, onOk, onDefault, this, Pipeline); + await this.Client.EventHubsGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.EventHubName ?? null, onOk, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -355,12 +406,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -377,7 +428,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -395,12 +446,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -412,8 +463,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHub_GetViaIdentityNamespace.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHub_GetViaIdentityNamespace.cs new file mode 100644 index 000000000000..7ed5aa5807b3 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHub_GetViaIdentityNamespace.cs @@ -0,0 +1,501 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// Gets an Event Hubs description for the specified Event Hub. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHub_GetViaIdentityNamespace")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Gets an Event Hubs description for the specified Event Hub.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}", ApiVersion = "2023-01-01-preview")] + public partial class GetAzEventHub_GetViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The Event Hub name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Event Hub name")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Event Hub name", + SerializedName = @"eventHubName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("EventHubName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzEventHub_GetViaIdentityNamespace() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/eventhubs/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.EventHubsGetViaIdentity(NamespaceInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.EventHubsGet(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHub_List.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHub_List.cs index 7410dd6ea05b..2c06f01803d5 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHub_List.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/GetAzEventHub_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Gets all the Event Hubs in a Namespace. @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets /// [OpenAPI] ListByNamespace=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEventHub_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Gets all the Event Hubs in a Namespace.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs", ApiVersion = "2023-01-01-preview")] public partial class GetAzEventHub_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,17 +37,32 @@ public partial class GetAzEventHub_List : global::System.Management.Automation.P /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// A flag to tell whether it is the first onOK call. private bool _isFirst = true; /// Link to retrieve next page. private string _nextLink; + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -58,6 +76,9 @@ public partial class GetAzEventHub_List : global::System.Management.Automation.P [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -98,7 +119,7 @@ public partial class GetAzEventHub_List : global::System.Management.Automation.P /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -165,7 +186,8 @@ public partial class GetAzEventHub_List : global::System.Management.Automation.P [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -188,24 +210,24 @@ public partial class GetAzEventHub_List : global::System.Management.Automation.P /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventHubListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubListResult /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -228,6 +250,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -249,7 +276,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzEventHub_List() { @@ -300,8 +327,33 @@ public GetAzEventHub_List() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -354,7 +406,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -369,13 +421,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.EventHubsListByNamespace(ResourceGroupName, NamespaceName, SubscriptionId, this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?), this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?), onOk, onDefault, this, Pipeline); + await this.Client.EventHubsListByNamespace(SubscriptionId, ResourceGroupName, NamespaceName, this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?), this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?), onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,SubscriptionId=SubscriptionId,Skip=this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?),Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?)}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Skip=this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?),Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?)}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -413,12 +465,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -435,15 +487,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId, Skip=this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?), Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId, Skip=this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?), Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -453,12 +505,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventHubListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubListResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -470,15 +522,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubListResult + var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } _nextLink = result.NextLink; if (_isFirst) { _isFirst = false; - while (_nextLink != null) + while (!String.IsNullOrEmpty(_nextLink)) { if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) { diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/InvokeAzEventHubBreakDisasterRecoveryConfigPairing_Break.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/InvokeAzEventHubBreakDisasterRecoveryConfigPairing_Break.cs index 2ed7c5798c4b..1fbfc6126c44 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/InvokeAzEventHubBreakDisasterRecoveryConfigPairing_Break.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/InvokeAzEventHubBreakDisasterRecoveryConfigPairing_Break.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// @@ -21,7 +23,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/breakPairing", ApiVersion = "2023-01-01-preview")] public partial class InvokeAzEventHubBreakDisasterRecoveryConfigPairing_Break : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -37,11 +40,26 @@ public partial class InvokeAzEventHubBreakDisasterRecoveryConfigPairing_Break : /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -55,6 +73,9 @@ public partial class InvokeAzEventHubBreakDisasterRecoveryConfigPairing_Break : [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -116,7 +137,7 @@ public partial class InvokeAzEventHubBreakDisasterRecoveryConfigPairing_Break : /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -165,7 +186,8 @@ public partial class InvokeAzEventHubBreakDisasterRecoveryConfigPairing_Break : [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -174,12 +196,12 @@ public partial class InvokeAzEventHubBreakDisasterRecoveryConfigPairing_Break : /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens @@ -212,6 +234,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -233,7 +260,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public InvokeAzEventHubBreakDisasterRecoveryConfigPairing_Break() { @@ -284,8 +311,33 @@ public InvokeAzEventHubBreakDisasterRecoveryConfigPairing_Break() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -341,7 +393,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -354,12 +406,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.DisasterRecoveryConfigsBreakPairing(ResourceGroupName, NamespaceName, Name, SubscriptionId, onOk, onDefault, this, Pipeline); + await this.Client.DisasterRecoveryConfigsBreakPairing(SubscriptionId, ResourceGroupName, NamespaceName, Name, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -397,12 +449,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -419,15 +471,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/InvokeAzEventHubBreakDisasterRecoveryConfigPairing_BreakViaIdentity.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/InvokeAzEventHubBreakDisasterRecoveryConfigPairing_BreakViaIdentity.cs index e48a49f38638..a973f171bbe7 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/InvokeAzEventHubBreakDisasterRecoveryConfigPairing_BreakViaIdentity.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/InvokeAzEventHubBreakDisasterRecoveryConfigPairing_BreakViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// @@ -21,7 +23,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/breakPairing", ApiVersion = "2023-01-01-preview")] public partial class InvokeAzEventHubBreakDisasterRecoveryConfigPairing_BreakViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -37,11 +40,26 @@ public partial class InvokeAzEventHubBreakDisasterRecoveryConfigPairing_BreakVia /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -55,6 +73,9 @@ public partial class InvokeAzEventHubBreakDisasterRecoveryConfigPairing_BreakVia [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -96,7 +117,7 @@ public partial class InvokeAzEventHubBreakDisasterRecoveryConfigPairing_BreakVia /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -119,12 +140,12 @@ public partial class InvokeAzEventHubBreakDisasterRecoveryConfigPairing_BreakVia /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens @@ -157,6 +178,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -178,7 +204,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet + /// Initializes a new instance of the cmdlet /// class. /// public InvokeAzEventHubBreakDisasterRecoveryConfigPairing_BreakViaIdentity() @@ -230,8 +256,33 @@ public InvokeAzEventHubBreakDisasterRecoveryConfigPairing_BreakViaIdentity() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -287,7 +338,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -307,6 +358,10 @@ protected override void ProcessRecord() else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -319,17 +374,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Alias"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.DisasterRecoveryConfigsBreakPairing(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.Alias ?? null, InputObject.SubscriptionId ?? null, onOk, onDefault, this, Pipeline); + await this.Client.DisasterRecoveryConfigsBreakPairing(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.Alias ?? null, onOk, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -367,12 +418,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -389,7 +440,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/InvokeAzEventHubBreakDisasterRecoveryConfigPairing_BreakViaIdentityNamespace.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/InvokeAzEventHubBreakDisasterRecoveryConfigPairing_BreakViaIdentityNamespace.cs new file mode 100644 index 000000000000..b3e81508b869 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/InvokeAzEventHubBreakDisasterRecoveryConfigPairing_BreakViaIdentityNamespace.cs @@ -0,0 +1,494 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// + /// This operation disables the Disaster Recovery and stops replicating changes from primary to secondary namespaces + /// + /// + /// [OpenAPI] BreakPairing=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/breakPairing" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzEventHubBreakDisasterRecoveryConfigPairing_BreakViaIdentityNamespace", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"This operation disables the Disaster Recovery and stops replicating changes from primary to secondary namespaces")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/breakPairing", ApiVersion = "2023-01-01-preview")] + public partial class InvokeAzEventHubBreakDisasterRecoveryConfigPairing_BreakViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The Disaster Recovery configuration name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Disaster Recovery configuration name")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Disaster Recovery configuration name", + SerializedName = @"alias", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public InvokeAzEventHubBreakDisasterRecoveryConfigPairing_BreakViaIdentityNamespace() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DisasterRecoveryConfigsBreakPairing' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/disasterRecoveryConfigs/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.DisasterRecoveryConfigsBreakPairingViaIdentity(NamespaceInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.DisasterRecoveryConfigsBreakPairing(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/InvokeAzEventHubFailDisasterRecoveryConfigOver_Fail.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/InvokeAzEventHubFailDisasterRecoveryConfigOver_Fail.cs index 9ac962b3be7a..b09706a10cee 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/InvokeAzEventHubFailDisasterRecoveryConfigOver_Fail.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/InvokeAzEventHubFailDisasterRecoveryConfigOver_Fail.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// @@ -21,7 +23,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/failover", ApiVersion = "2023-01-01-preview")] public partial class InvokeAzEventHubFailDisasterRecoveryConfigOver_Fail : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -37,11 +40,26 @@ public partial class InvokeAzEventHubFailDisasterRecoveryConfigOver_Fail : globa /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -55,6 +73,9 @@ public partial class InvokeAzEventHubFailDisasterRecoveryConfigOver_Fail : globa [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -116,7 +137,7 @@ public partial class InvokeAzEventHubFailDisasterRecoveryConfigOver_Fail : globa /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -165,7 +186,8 @@ public partial class InvokeAzEventHubFailDisasterRecoveryConfigOver_Fail : globa [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -174,12 +196,12 @@ public partial class InvokeAzEventHubFailDisasterRecoveryConfigOver_Fail : globa /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens @@ -212,6 +234,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -233,7 +260,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public InvokeAzEventHubFailDisasterRecoveryConfigOver_Fail() { @@ -284,8 +311,33 @@ public InvokeAzEventHubFailDisasterRecoveryConfigOver_Fail() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -341,7 +393,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -354,12 +406,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.DisasterRecoveryConfigsFailOver(ResourceGroupName, NamespaceName, Name, SubscriptionId, onOk, onDefault, this, Pipeline); + await this.Client.DisasterRecoveryConfigsFailOver(SubscriptionId, ResourceGroupName, NamespaceName, Name, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -397,12 +449,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -419,15 +471,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/InvokeAzEventHubFailDisasterRecoveryConfigOver_FailViaIdentity.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/InvokeAzEventHubFailDisasterRecoveryConfigOver_FailViaIdentity.cs index fa0df6f56ea0..c0b9ca32e381 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/InvokeAzEventHubFailDisasterRecoveryConfigOver_FailViaIdentity.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/InvokeAzEventHubFailDisasterRecoveryConfigOver_FailViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// @@ -21,7 +23,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/failover", ApiVersion = "2023-01-01-preview")] public partial class InvokeAzEventHubFailDisasterRecoveryConfigOver_FailViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -37,11 +40,26 @@ public partial class InvokeAzEventHubFailDisasterRecoveryConfigOver_FailViaIdent /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -55,6 +73,9 @@ public partial class InvokeAzEventHubFailDisasterRecoveryConfigOver_FailViaIdent [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -96,7 +117,7 @@ public partial class InvokeAzEventHubFailDisasterRecoveryConfigOver_FailViaIdent /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -119,12 +140,12 @@ public partial class InvokeAzEventHubFailDisasterRecoveryConfigOver_FailViaIdent /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens @@ -157,6 +178,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -178,7 +204,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet + /// Initializes a new instance of the cmdlet /// class. /// public InvokeAzEventHubFailDisasterRecoveryConfigOver_FailViaIdentity() @@ -230,8 +256,33 @@ public InvokeAzEventHubFailDisasterRecoveryConfigOver_FailViaIdentity() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -287,7 +338,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -307,6 +358,10 @@ protected override void ProcessRecord() else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -319,17 +374,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Alias"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.DisasterRecoveryConfigsFailOver(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.Alias ?? null, InputObject.SubscriptionId ?? null, onOk, onDefault, this, Pipeline); + await this.Client.DisasterRecoveryConfigsFailOver(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.Alias ?? null, onOk, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -367,12 +418,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -389,7 +440,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/InvokeAzEventHubFailDisasterRecoveryConfigOver_FailViaIdentityNamespace.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/InvokeAzEventHubFailDisasterRecoveryConfigOver_FailViaIdentityNamespace.cs new file mode 100644 index 000000000000..8381ce2e3a5b --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/InvokeAzEventHubFailDisasterRecoveryConfigOver_FailViaIdentityNamespace.cs @@ -0,0 +1,494 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// + /// Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace + /// + /// + /// [OpenAPI] FailOver=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/failover" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzEventHubFailDisasterRecoveryConfigOver_FailViaIdentityNamespace", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/failover", ApiVersion = "2023-01-01-preview")] + public partial class InvokeAzEventHubFailDisasterRecoveryConfigOver_FailViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The Disaster Recovery configuration name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Disaster Recovery configuration name")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Disaster Recovery configuration name", + SerializedName = @"alias", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public InvokeAzEventHubFailDisasterRecoveryConfigOver_FailViaIdentityNamespace() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DisasterRecoveryConfigsFailOver' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/disasterRecoveryConfigs/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.DisasterRecoveryConfigsFailOverViaIdentity(NamespaceInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.DisasterRecoveryConfigsFailOver(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubApplicationGroup_CreateExpanded.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubApplicationGroup_CreateExpanded.cs index 9a01f4d8bc3a..9b3f3426ab88 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubApplicationGroup_CreateExpanded.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubApplicationGroup_CreateExpanded.cs @@ -6,19 +6,22 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; - /// Creates or updates an ApplicationGroup for a Namespace. + /// Create an ApplicationGroup for a Namespace. /// /// [OpenAPI] CreateOrUpdateApplicationGroup=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/applicationGroups/{applicationGroupName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzEventHubApplicationGroup_CreateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup))] - [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Creates or updates an ApplicationGroup for a Namespace.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Create an ApplicationGroup for a Namespace.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/applicationGroups/{applicationGroupName}", ApiVersion = "2023-01-01-preview")] public partial class NewAzEventHubApplicationGroup_CreateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,14 +37,29 @@ public partial class NewAzEventHubApplicationGroup_CreateExpanded : global::Syst /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// The Application Group object - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ApplicationGroup(); + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ApplicationGroup(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -68,6 +86,9 @@ public partial class NewAzEventHubApplicationGroup_CreateExpanded : global::Syst [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -137,7 +158,7 @@ public partial class NewAzEventHubApplicationGroup_CreateExpanded : global::Syst /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// /// List of group policies that define the behavior of application group. The policies can support resource governance scenarios @@ -151,8 +172,8 @@ public partial class NewAzEventHubApplicationGroup_CreateExpanded : global::Syst ReadOnly = false, Description = @"List of group policies that define the behavior of application group. The policies can support resource governance scenarios such as limiting ingress or egress traffic.", SerializedName = @"policies", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicy) })] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicy[] Policy { get => _parametersBody.Policy ?? null /* arrayOf */; set => _parametersBody.Policy = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicy) })] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicy[] Policy { get => _parametersBody.Policy?.ToArray() ?? null /* fixedArrayOf */; set => _parametersBody.Policy = (value != null ? new System.Collections.Generic.List(value) : null); } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -201,7 +222,8 @@ public partial class NewAzEventHubApplicationGroup_CreateExpanded : global::Syst [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -210,24 +232,24 @@ public partial class NewAzEventHubApplicationGroup_CreateExpanded : global::Syst /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -250,6 +272,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -314,8 +341,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -325,7 +377,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzEventHubApplicationGroup_CreateExpanded() { @@ -379,7 +431,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -392,12 +444,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.ApplicationGroupCreateOrUpdateApplicationGroup(ResourceGroupName, NamespaceName, Name, SubscriptionId, _parametersBody, onOk, onDefault, this, Pipeline); + await this.Client.ApplicationGroupCreateOrUpdateApplicationGroup(SubscriptionId, ResourceGroupName, NamespaceName, Name, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name,SubscriptionId=SubscriptionId,body=_parametersBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -435,12 +487,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -457,15 +509,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId, body=_parametersBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId, body=_parametersBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -475,12 +527,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -492,8 +544,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubApplicationGroup_CreateViaIdentity.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubApplicationGroup_CreateViaIdentity.cs index f82382b2af34..e853ec8c01e5 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubApplicationGroup_CreateViaIdentity.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubApplicationGroup_CreateViaIdentity.cs @@ -6,20 +6,23 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; - /// Creates or updates an ApplicationGroup for a Namespace. + /// Create an ApplicationGroup for a Namespace. /// /// [OpenAPI] CreateOrUpdateApplicationGroup=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/applicationGroups/{applicationGroupName}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzEventHubApplicationGroup_CreateViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup))] - [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Creates or updates an ApplicationGroup for a Namespace.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Create an ApplicationGroup for a Namespace.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/applicationGroups/{applicationGroupName}", ApiVersion = "2023-01-01-preview")] public partial class NewAzEventHubApplicationGroup_CreateViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +38,26 @@ public partial class NewAzEventHubApplicationGroup_CreateViaIdentity : global::S /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -53,6 +71,9 @@ public partial class NewAzEventHubApplicationGroup_CreateViaIdentity : global::S [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -85,7 +106,7 @@ public partial class NewAzEventHubApplicationGroup_CreateViaIdentity : global::S global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup _parameter; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup _parameter; /// The Application Group object [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Application Group object", ValueFromPipeline = true)] @@ -94,13 +115,14 @@ public partial class NewAzEventHubApplicationGroup_CreateViaIdentity : global::S ReadOnly = false, Description = @"The Application Group object", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup) })] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup Parameter { get => this._parameter; set => this._parameter = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup Parameter { get => this._parameter; set => this._parameter = value; } /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -123,24 +145,24 @@ public partial class NewAzEventHubApplicationGroup_CreateViaIdentity : global::S /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -163,6 +185,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -227,8 +254,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -238,7 +290,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzEventHubApplicationGroup_CreateViaIdentity() { @@ -292,7 +344,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -307,11 +359,15 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.ApplicationGroupCreateOrUpdateApplicationGroupViaIdentity(InputObject.Id, Parameter, onOk, onDefault, this, Pipeline); + await this.Client.ApplicationGroupCreateOrUpdateApplicationGroupViaIdentity(InputObject.Id, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); } else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -324,17 +380,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ApplicationGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.ApplicationGroupCreateOrUpdateApplicationGroup(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.ApplicationGroupName ?? null, InputObject.SubscriptionId ?? null, Parameter, onOk, onDefault, this, Pipeline); + await this.Client.ApplicationGroupCreateOrUpdateApplicationGroup(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.ApplicationGroupName ?? null, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); } await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -372,12 +424,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -394,15 +446,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -412,12 +464,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -429,8 +481,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubApplicationGroup_CreateViaIdentityNamespace.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubApplicationGroup_CreateViaIdentityNamespace.cs new file mode 100644 index 000000000000..0a603e5e7004 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubApplicationGroup_CreateViaIdentityNamespace.cs @@ -0,0 +1,518 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// Create an ApplicationGroup for a Namespace. + /// + /// [OpenAPI] CreateOrUpdateApplicationGroup=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/applicationGroups/{applicationGroupName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzEventHubApplicationGroup_CreateViaIdentityNamespace", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Create an ApplicationGroup for a Namespace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/applicationGroups/{applicationGroupName}", ApiVersion = "2023-01-01-preview")] + public partial class NewAzEventHubApplicationGroup_CreateViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The Application Group name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Application Group name ")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Application Group name ", + SerializedName = @"applicationGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ApplicationGroupName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup _parameter; + + /// The Application Group object + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Application Group object", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Application Group object", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup Parameter { get => this._parameter; set => this._parameter = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzEventHubApplicationGroup_CreateViaIdentityNamespace() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ApplicationGroupCreateOrUpdateApplicationGroup' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/applicationGroups/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.ApplicationGroupCreateOrUpdateApplicationGroupViaIdentity(NamespaceInputObject.Id, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.ApplicationGroupCreateOrUpdateApplicationGroup(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, Name, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubApplicationGroup_CreateViaIdentityNamespaceExpanded.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubApplicationGroup_CreateViaIdentityNamespaceExpanded.cs new file mode 100644 index 000000000000..b6678a1b2267 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubApplicationGroup_CreateViaIdentityNamespaceExpanded.cs @@ -0,0 +1,550 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// Create an ApplicationGroup for a Namespace. + /// + /// [OpenAPI] CreateOrUpdateApplicationGroup=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/applicationGroups/{applicationGroupName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzEventHubApplicationGroup_CreateViaIdentityNamespaceExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Create an ApplicationGroup for a Namespace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/applicationGroups/{applicationGroupName}", ApiVersion = "2023-01-01-preview")] + public partial class NewAzEventHubApplicationGroup_CreateViaIdentityNamespaceExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// The Application Group object + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ApplicationGroup(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// + /// The Unique identifier for application group.Supports SAS(SASKeyName=KeyName) or AAD(AADAppID=Guid) + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The Unique identifier for application group.Supports SAS(SASKeyName=KeyName) or AAD(AADAppID=Guid)")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Unique identifier for application group.Supports SAS(SASKeyName=KeyName) or AAD(AADAppID=Guid)", + SerializedName = @"clientAppGroupIdentifier", + PossibleTypes = new [] { typeof(string) })] + public string ClientAppGroupIdentifier { get => _parametersBody.ClientAppGroupIdentifier ?? null; set => _parametersBody.ClientAppGroupIdentifier = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// Determines if Application Group is allowed to create connection with namespace or not. Once the isEnabled is set to false, + /// all the existing connections of application group gets dropped and no new connections will be allowed + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Determines if Application Group is allowed to create connection with namespace or not. Once the isEnabled is set to false, all the existing connections of application group gets dropped and no new connections will be allowed")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Determines if Application Group is allowed to create connection with namespace or not. Once the isEnabled is set to false, all the existing connections of application group gets dropped and no new connections will be allowed", + SerializedName = @"isEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter IsEnabled { get => _parametersBody.IsEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _parametersBody.IsEnabled = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The Application Group name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Application Group name ")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Application Group name ", + SerializedName = @"applicationGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ApplicationGroupName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// + /// List of group policies that define the behavior of application group. The policies can support resource governance scenarios + /// such as limiting ingress or egress traffic. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "List of group policies that define the behavior of application group. The policies can support resource governance scenarios such as limiting ingress or egress traffic.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of group policies that define the behavior of application group. The policies can support resource governance scenarios such as limiting ingress or egress traffic.", + SerializedName = @"policies", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicy) })] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicy[] Policy { get => _parametersBody.Policy?.ToArray() ?? null /* fixedArrayOf */; set => _parametersBody.Policy = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public NewAzEventHubApplicationGroup_CreateViaIdentityNamespaceExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ApplicationGroupCreateOrUpdateApplicationGroup' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/applicationGroups/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.ApplicationGroupCreateOrUpdateApplicationGroupViaIdentity(NamespaceInputObject.Id, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.ApplicationGroupCreateOrUpdateApplicationGroup(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, Name, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubAuthorizationRule_CreateExpanded.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubAuthorizationRule_CreateExpanded.cs index 4780a685dd1a..6f293fb2363f 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubAuthorizationRule_CreateExpanded.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubAuthorizationRule_CreateExpanded.cs @@ -6,23 +6,26 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// - /// Creates or updates an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule will take - /// a few seconds to take effect. + /// Create an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule will take a few seconds + /// to take effect. /// /// /// [OpenAPI] CreateOrUpdateAuthorizationRule=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzEventHubAuthorizationRule_CreateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule))] - [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Creates or updates an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule will take a few seconds to take effect.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Create an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule will take a few seconds to take effect.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}", ApiVersion = "2023-01-01-preview")] public partial class NewAzEventHubAuthorizationRule_CreateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -38,14 +41,29 @@ public partial class NewAzEventHubAuthorizationRule_CreateExpanded : global::Sys /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// Single item in a List or Get AuthorizationRule operation - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.AuthorizationRule(); + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.AuthorizationRule(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -73,6 +91,9 @@ public partial class NewAzEventHubAuthorizationRule_CreateExpanded : global::Sys [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string EventHubName { get => this._eventHubName; set => this._eventHubName = value; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -127,7 +148,7 @@ public partial class NewAzEventHubAuthorizationRule_CreateExpanded : global::Sys /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -168,9 +189,9 @@ public partial class NewAzEventHubAuthorizationRule_CreateExpanded : global::Sys ReadOnly = false, Description = @"The rights associated with the rule.", SerializedName = @"rights", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights))] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights[] Rights { get => _parametersBody.Rights ?? null /* arrayOf */; set => _parametersBody.Rights = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Manage", "Send", "Listen")] + public string[] Rights { get => _parametersBody.Rights?.ToArray() ?? null /* fixedArrayOf */; set => _parametersBody.Rights = (value != null ? new System.Collections.Generic.List(value) : null); } /// Backing field for property. private string _subscriptionId; @@ -189,7 +210,8 @@ public partial class NewAzEventHubAuthorizationRule_CreateExpanded : global::Sys [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -198,24 +220,24 @@ public partial class NewAzEventHubAuthorizationRule_CreateExpanded : global::Sys /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -238,6 +260,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -302,8 +329,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -313,7 +365,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzEventHubAuthorizationRule_CreateExpanded() { @@ -367,7 +419,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -380,12 +432,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.EventHubsCreateOrUpdateAuthorizationRule(ResourceGroupName, NamespaceName, EventHubName, Name, SubscriptionId, _parametersBody, onOk, onDefault, this, Pipeline); + await this.Client.EventHubsCreateOrUpdateAuthorizationRule(SubscriptionId, ResourceGroupName, NamespaceName, EventHubName, Name, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,EventHubName=EventHubName,Name=Name,SubscriptionId=SubscriptionId,body=_parametersBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,EventHubName=EventHubName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -423,12 +475,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -445,15 +497,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, EventHubName=EventHubName, Name=Name, SubscriptionId=SubscriptionId, body=_parametersBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, EventHubName=EventHubName, Name=Name, SubscriptionId=SubscriptionId, body=_parametersBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -463,12 +515,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -480,8 +532,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubAuthorizationRule_CreateViaIdentity.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubAuthorizationRule_CreateViaIdentity.cs index a2b4acbc98c6..f0f51654a234 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubAuthorizationRule_CreateViaIdentity.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubAuthorizationRule_CreateViaIdentity.cs @@ -6,23 +6,26 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// - /// Creates or updates an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule will take - /// a few seconds to take effect. + /// Create an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule will take a few seconds + /// to take effect. /// /// /// [OpenAPI] CreateOrUpdateAuthorizationRule=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzEventHubAuthorizationRule_CreateViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule))] - [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Creates or updates an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule will take a few seconds to take effect.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Create an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule will take a few seconds to take effect.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}", ApiVersion = "2023-01-01-preview")] public partial class NewAzEventHubAuthorizationRule_CreateViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -38,11 +41,26 @@ public partial class NewAzEventHubAuthorizationRule_CreateViaIdentity : global:: /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -56,6 +74,9 @@ public partial class NewAzEventHubAuthorizationRule_CreateViaIdentity : global:: [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -88,7 +109,7 @@ public partial class NewAzEventHubAuthorizationRule_CreateViaIdentity : global:: global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule _parameter; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule _parameter; /// Single item in a List or Get AuthorizationRule operation [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Single item in a List or Get AuthorizationRule operation", ValueFromPipeline = true)] @@ -97,13 +118,14 @@ public partial class NewAzEventHubAuthorizationRule_CreateViaIdentity : global:: ReadOnly = false, Description = @"Single item in a List or Get AuthorizationRule operation", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule) })] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule Parameter { get => this._parameter; set => this._parameter = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule Parameter { get => this._parameter; set => this._parameter = value; } /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -126,24 +148,24 @@ public partial class NewAzEventHubAuthorizationRule_CreateViaIdentity : global:: /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -166,6 +188,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -230,8 +257,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -241,7 +293,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzEventHubAuthorizationRule_CreateViaIdentity() { @@ -295,7 +347,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -310,11 +362,15 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.EventHubsCreateOrUpdateAuthorizationRuleViaIdentity(InputObject.Id, Parameter, onOk, onDefault, this, Pipeline); + await this.Client.EventHubsCreateOrUpdateAuthorizationRuleViaIdentity(InputObject.Id, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); } else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -331,17 +387,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.AuthorizationRuleName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.EventHubsCreateOrUpdateAuthorizationRule(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.EventHubName ?? null, InputObject.AuthorizationRuleName ?? null, InputObject.SubscriptionId ?? null, Parameter, onOk, onDefault, this, Pipeline); + await this.Client.EventHubsCreateOrUpdateAuthorizationRule(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.EventHubName ?? null, InputObject.AuthorizationRuleName ?? null, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); } await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -379,12 +431,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -401,15 +453,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -419,12 +471,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -436,8 +488,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubAuthorizationRule_CreateViaIdentityEventhub.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubAuthorizationRule_CreateViaIdentityEventhub.cs new file mode 100644 index 000000000000..cc3c35b11722 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubAuthorizationRule_CreateViaIdentityEventhub.cs @@ -0,0 +1,525 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// + /// Create an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule will take a few seconds + /// to take effect. + /// + /// + /// [OpenAPI] CreateOrUpdateAuthorizationRule=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzEventHubAuthorizationRule_CreateViaIdentityEventhub", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Create an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule will take a few seconds to take effect.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}", ApiVersion = "2023-01-01-preview")] + public partial class NewAzEventHubAuthorizationRule_CreateViaIdentityEventhub : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity _eventhubInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity EventhubInputObject { get => this._eventhubInputObject; set => this._eventhubInputObject = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule _parameter; + + /// Single item in a List or Get AuthorizationRule operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Single item in a List or Get AuthorizationRule operation", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Single item in a List or Get AuthorizationRule operation", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule Parameter { get => this._parameter; set => this._parameter = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzEventHubAuthorizationRule_CreateViaIdentityEventhub() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'EventHubsCreateOrUpdateAuthorizationRule' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (EventhubInputObject?.Id != null) + { + this.EventhubInputObject.Id += $"/authorizationRules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.EventHubsCreateOrUpdateAuthorizationRuleViaIdentity(EventhubInputObject.Id, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == EventhubInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("EventhubInputObject has null value for EventhubInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, EventhubInputObject) ); + } + if (null == EventhubInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("EventhubInputObject has null value for EventhubInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, EventhubInputObject) ); + } + if (null == EventhubInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("EventhubInputObject has null value for EventhubInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, EventhubInputObject) ); + } + if (null == EventhubInputObject.EventHubName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("EventhubInputObject has null value for EventhubInputObject.EventHubName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, EventhubInputObject) ); + } + await this.Client.EventHubsCreateOrUpdateAuthorizationRule(EventhubInputObject.SubscriptionId ?? null, EventhubInputObject.ResourceGroupName ?? null, EventhubInputObject.NamespaceName ?? null, EventhubInputObject.EventHubName ?? null, Name, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubAuthorizationRule_CreateViaIdentityEventhubExpanded.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubAuthorizationRule_CreateViaIdentityEventhubExpanded.cs new file mode 100644 index 000000000000..bc03d3d89494 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubAuthorizationRule_CreateViaIdentityEventhubExpanded.cs @@ -0,0 +1,528 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// + /// Create an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule will take a few seconds + /// to take effect. + /// + /// + /// [OpenAPI] CreateOrUpdateAuthorizationRule=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzEventHubAuthorizationRule_CreateViaIdentityEventhubExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Create an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule will take a few seconds to take effect.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}", ApiVersion = "2023-01-01-preview")] + public partial class NewAzEventHubAuthorizationRule_CreateViaIdentityEventhubExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// Single item in a List or Get AuthorizationRule operation + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.AuthorizationRule(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity _eventhubInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity EventhubInputObject { get => this._eventhubInputObject; set => this._eventhubInputObject = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// The rights associated with the rule. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The rights associated with the rule.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The rights associated with the rule.", + SerializedName = @"rights", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Manage", "Send", "Listen")] + public string[] Rights { get => _parametersBody.Rights?.ToArray() ?? null /* fixedArrayOf */; set => _parametersBody.Rights = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public NewAzEventHubAuthorizationRule_CreateViaIdentityEventhubExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'EventHubsCreateOrUpdateAuthorizationRule' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (EventhubInputObject?.Id != null) + { + this.EventhubInputObject.Id += $"/authorizationRules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.EventHubsCreateOrUpdateAuthorizationRuleViaIdentity(EventhubInputObject.Id, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == EventhubInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("EventhubInputObject has null value for EventhubInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, EventhubInputObject) ); + } + if (null == EventhubInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("EventhubInputObject has null value for EventhubInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, EventhubInputObject) ); + } + if (null == EventhubInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("EventhubInputObject has null value for EventhubInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, EventhubInputObject) ); + } + if (null == EventhubInputObject.EventHubName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("EventhubInputObject has null value for EventhubInputObject.EventHubName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, EventhubInputObject) ); + } + await this.Client.EventHubsCreateOrUpdateAuthorizationRule(EventhubInputObject.SubscriptionId ?? null, EventhubInputObject.ResourceGroupName ?? null, EventhubInputObject.NamespaceName ?? null, EventhubInputObject.EventHubName ?? null, Name, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubAuthorizationRule_CreateViaIdentityNamespace.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubAuthorizationRule_CreateViaIdentityNamespace.cs new file mode 100644 index 000000000000..25a63f2e16d0 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubAuthorizationRule_CreateViaIdentityNamespace.cs @@ -0,0 +1,535 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// + /// Create an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule will take a few seconds + /// to take effect. + /// + /// + /// [OpenAPI] CreateOrUpdateAuthorizationRule=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzEventHubAuthorizationRule_CreateViaIdentityNamespace", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Create an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule will take a few seconds to take effect.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}", ApiVersion = "2023-01-01-preview")] + public partial class NewAzEventHubAuthorizationRule_CreateViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _eventHubName; + + /// The Event Hub name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Event Hub name")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Event Hub name", + SerializedName = @"eventHubName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string EventHubName { get => this._eventHubName; set => this._eventHubName = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule _parameter; + + /// Single item in a List or Get AuthorizationRule operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Single item in a List or Get AuthorizationRule operation", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Single item in a List or Get AuthorizationRule operation", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule Parameter { get => this._parameter; set => this._parameter = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzEventHubAuthorizationRule_CreateViaIdentityNamespace() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'EventHubsCreateOrUpdateAuthorizationRule' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/eventhubs/{(global::System.Uri.EscapeDataString(this.EventHubName.ToString()))}/authorizationRules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.EventHubsCreateOrUpdateAuthorizationRuleViaIdentity(NamespaceInputObject.Id, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.EventHubsCreateOrUpdateAuthorizationRule(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, EventHubName, Name, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { EventHubName=EventHubName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubAuthorizationRule_CreateViaIdentityNamespaceExpanded.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubAuthorizationRule_CreateViaIdentityNamespaceExpanded.cs new file mode 100644 index 000000000000..cbb80697cb9e --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubAuthorizationRule_CreateViaIdentityNamespaceExpanded.cs @@ -0,0 +1,538 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// + /// Create an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule will take a few seconds + /// to take effect. + /// + /// + /// [OpenAPI] CreateOrUpdateAuthorizationRule=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzEventHubAuthorizationRule_CreateViaIdentityNamespaceExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Create an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule will take a few seconds to take effect.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}", ApiVersion = "2023-01-01-preview")] + public partial class NewAzEventHubAuthorizationRule_CreateViaIdentityNamespaceExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// Single item in a List or Get AuthorizationRule operation + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.AuthorizationRule(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _eventHubName; + + /// The Event Hub name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Event Hub name")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Event Hub name", + SerializedName = @"eventHubName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string EventHubName { get => this._eventHubName; set => this._eventHubName = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// The rights associated with the rule. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The rights associated with the rule.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The rights associated with the rule.", + SerializedName = @"rights", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Manage", "Send", "Listen")] + public string[] Rights { get => _parametersBody.Rights?.ToArray() ?? null /* fixedArrayOf */; set => _parametersBody.Rights = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public NewAzEventHubAuthorizationRule_CreateViaIdentityNamespaceExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'EventHubsCreateOrUpdateAuthorizationRule' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/eventhubs/{(global::System.Uri.EscapeDataString(this.EventHubName.ToString()))}/authorizationRules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.EventHubsCreateOrUpdateAuthorizationRuleViaIdentity(NamespaceInputObject.Id, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.EventHubsCreateOrUpdateAuthorizationRule(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, EventHubName, Name, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { EventHubName=EventHubName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubCluster_CreateExpanded.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubCluster_CreateExpanded.cs index 32331989369b..5e8822a0af53 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubCluster_CreateExpanded.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubCluster_CreateExpanded.cs @@ -6,19 +6,22 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; - /// Creates or updates an instance of an Event Hubs Cluster. + /// Create an instance of an Event Hubs Cluster. /// /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzEventHubCluster_CreateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster))] - [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Creates or updates an instance of an Event Hubs Cluster.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Create an instance of an Event Hubs Cluster.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}", ApiVersion = "2023-01-01-preview")] public partial class NewAzEventHubCluster_CreateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,8 +37,20 @@ public partial class NewAzEventHubCluster_CreateExpanded : global::System.Manage /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// Single Event Hubs Cluster resource in List or Get operations. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.Cluster(); + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Cluster(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] @@ -47,6 +62,9 @@ public partial class NewAzEventHubCluster_CreateExpanded : global::System.Manage [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The quantity of Event Hubs Cluster Capacity Units contained in this cluster. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The quantity of Event Hubs Cluster Capacity Units contained in this cluster.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] @@ -59,7 +77,8 @@ public partial class NewAzEventHubCluster_CreateExpanded : global::System.Manage [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"1")] + Script = @"1", + SetCondition = @"")] public int Capacity { get => _parametersBody.Capacity ?? default(int); set => _parametersBody.Capacity = value; } /// The reference to the client API class. @@ -75,6 +94,9 @@ public partial class NewAzEventHubCluster_CreateExpanded : global::System.Manage [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -135,7 +157,7 @@ public partial class NewAzEventHubCluster_CreateExpanded : global::System.Manage /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -184,7 +206,8 @@ public partial class NewAzEventHubCluster_CreateExpanded : global::System.Manage [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -208,32 +231,32 @@ public partial class NewAzEventHubCluster_CreateExpanded : global::System.Manage ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceTags Tag { get => _parametersBody.Tag ?? null /* object */; set => _parametersBody.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceTags Tag { get => _parametersBody.Tag ?? null /* object */; set => _parametersBody.Tag = value; } /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -280,6 +303,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets.NewAzEventHubCluster_ /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -344,11 +372,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -360,10 +413,26 @@ protected override void EndProcessing() return; } } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } break; } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -373,7 +442,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzEventHubCluster_CreateExpanded() { @@ -439,7 +508,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -452,12 +521,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.ClustersCreateOrUpdate(SubscriptionId, ResourceGroupName, Name, _parametersBody, onOk, onDefault, this, Pipeline); + await this.Client.ClustersCreateOrUpdate(SubscriptionId, ResourceGroupName, Name, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name,body=_parametersBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -495,12 +564,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -517,15 +586,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name, body=_parametersBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name, body=_parametersBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -535,12 +604,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -552,8 +621,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubCluster_CreateViaIdentity.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubCluster_CreateViaIdentity.cs index e4c1454bad79..034455ea2358 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubCluster_CreateViaIdentity.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubCluster_CreateViaIdentity.cs @@ -6,20 +6,23 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; - /// Creates or updates an instance of an Event Hubs Cluster. + /// Create an instance of an Event Hubs Cluster. /// /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzEventHubCluster_CreateViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster))] - [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Creates or updates an instance of an Event Hubs Cluster.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Create an instance of an Event Hubs Cluster.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}", ApiVersion = "2023-01-01-preview")] public partial class NewAzEventHubCluster_CreateViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,6 +38,18 @@ public partial class NewAzEventHubCluster_CreateViaIdentity : global::System.Man /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] @@ -45,6 +60,9 @@ public partial class NewAzEventHubCluster_CreateViaIdentity : global::System.Man [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -58,6 +76,9 @@ public partial class NewAzEventHubCluster_CreateViaIdentity : global::System.Man [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -98,7 +119,7 @@ public partial class NewAzEventHubCluster_CreateViaIdentity : global::System.Man public global::System.Management.Automation.SwitchParameter NoWait { get; set; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster _parameter; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster _parameter; /// Single Event Hubs Cluster resource in List or Get operations. [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Single Event Hubs Cluster resource in List or Get operations.", ValueFromPipeline = true)] @@ -107,13 +128,14 @@ public partial class NewAzEventHubCluster_CreateViaIdentity : global::System.Man ReadOnly = false, Description = @"Single Event Hubs Cluster resource in List or Get operations.", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster) })] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster Parameter { get => this._parameter; set => this._parameter = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster Parameter { get => this._parameter; set => this._parameter = value; } /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -136,24 +158,24 @@ public partial class NewAzEventHubCluster_CreateViaIdentity : global::System.Man /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -197,6 +219,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets.NewAzEventHubCluster_ /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -261,11 +288,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -277,10 +329,26 @@ protected override void EndProcessing() return; } } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } break; } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -290,7 +358,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzEventHubCluster_CreateViaIdentity() { @@ -356,7 +424,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -371,7 +439,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.ClustersCreateOrUpdateViaIdentity(InputObject.Id, Parameter, onOk, onDefault, this, Pipeline); + await this.Client.ClustersCreateOrUpdateViaIdentity(InputObject.Id, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); } else { @@ -388,13 +456,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ClusterName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - await this.Client.ClustersCreateOrUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ClusterName ?? null, Parameter, onOk, onDefault, this, Pipeline); + await this.Client.ClustersCreateOrUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ClusterName ?? null, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); } await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -432,12 +500,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -454,15 +522,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -472,12 +540,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -489,8 +557,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubConsumerGroup_CreateExpanded.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubConsumerGroup_CreateExpanded.cs index 0746f0c224c5..ee5c945ed7c3 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubConsumerGroup_CreateExpanded.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubConsumerGroup_CreateExpanded.cs @@ -6,21 +6,22 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; - /// - /// Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. - /// + /// Create an Event Hubs consumer group as a nested resource within a Namespace. /// /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzEventHubConsumerGroup_CreateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup))] - [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Creates or updates an Event Hubs consumer group as a nested resource within a Namespace.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Create an Event Hubs consumer group as a nested resource within a Namespace.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}", ApiVersion = "2023-01-01-preview")] public partial class NewAzEventHubConsumerGroup_CreateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -36,14 +37,29 @@ public partial class NewAzEventHubConsumerGroup_CreateExpanded : global::System. /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// Single item in List or Get Consumer group operation - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ConsumerGroup(); + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ConsumerGroup(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -71,6 +87,9 @@ public partial class NewAzEventHubConsumerGroup_CreateExpanded : global::System. [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string EventHubName { get => this._eventHubName; set => this._eventHubName = value; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -126,7 +145,7 @@ public partial class NewAzEventHubConsumerGroup_CreateExpanded : global::System. /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -175,7 +194,8 @@ public partial class NewAzEventHubConsumerGroup_CreateExpanded : global::System. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -199,24 +219,24 @@ public partial class NewAzEventHubConsumerGroup_CreateExpanded : global::System. /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -239,6 +259,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -303,8 +328,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -314,7 +364,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzEventHubConsumerGroup_CreateExpanded() { @@ -368,7 +418,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -381,12 +431,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.ConsumerGroupsCreateOrUpdate(ResourceGroupName, NamespaceName, EventHubName, Name, SubscriptionId, _parametersBody, onOk, onDefault, this, Pipeline); + await this.Client.ConsumerGroupsCreateOrUpdate(SubscriptionId, ResourceGroupName, NamespaceName, EventHubName, Name, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,EventHubName=EventHubName,Name=Name,SubscriptionId=SubscriptionId,body=_parametersBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,EventHubName=EventHubName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -424,12 +474,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -446,15 +496,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, EventHubName=EventHubName, Name=Name, SubscriptionId=SubscriptionId, body=_parametersBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, EventHubName=EventHubName, Name=Name, SubscriptionId=SubscriptionId, body=_parametersBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -464,12 +514,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -481,8 +531,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubConsumerGroup_CreateViaIdentity.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubConsumerGroup_CreateViaIdentity.cs index 092d50b9bbab..0204da33b28c 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubConsumerGroup_CreateViaIdentity.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubConsumerGroup_CreateViaIdentity.cs @@ -6,22 +6,23 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; - /// - /// Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. - /// + /// Create an Event Hubs consumer group as a nested resource within a Namespace. /// /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzEventHubConsumerGroup_CreateViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup))] - [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Creates or updates an Event Hubs consumer group as a nested resource within a Namespace.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Create an Event Hubs consumer group as a nested resource within a Namespace.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}", ApiVersion = "2023-01-01-preview")] public partial class NewAzEventHubConsumerGroup_CreateViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -37,11 +38,26 @@ public partial class NewAzEventHubConsumerGroup_CreateViaIdentity : global::Syst /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -55,6 +71,9 @@ public partial class NewAzEventHubConsumerGroup_CreateViaIdentity : global::Syst [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -87,7 +106,7 @@ public partial class NewAzEventHubConsumerGroup_CreateViaIdentity : global::Syst global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup _parameter; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup _parameter; /// Single item in List or Get Consumer group operation [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Single item in List or Get Consumer group operation", ValueFromPipeline = true)] @@ -96,13 +115,14 @@ public partial class NewAzEventHubConsumerGroup_CreateViaIdentity : global::Syst ReadOnly = false, Description = @"Single item in List or Get Consumer group operation", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup) })] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup Parameter { get => this._parameter; set => this._parameter = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup Parameter { get => this._parameter; set => this._parameter = value; } /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -125,24 +145,24 @@ public partial class NewAzEventHubConsumerGroup_CreateViaIdentity : global::Syst /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -165,6 +185,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -229,8 +254,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -240,7 +290,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzEventHubConsumerGroup_CreateViaIdentity() { @@ -294,7 +344,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -309,11 +359,15 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.ConsumerGroupsCreateOrUpdateViaIdentity(InputObject.Id, Parameter, onOk, onDefault, this, Pipeline); + await this.Client.ConsumerGroupsCreateOrUpdateViaIdentity(InputObject.Id, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); } else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -330,17 +384,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ConsumerGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.ConsumerGroupsCreateOrUpdate(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.EventHubName ?? null, InputObject.ConsumerGroupName ?? null, InputObject.SubscriptionId ?? null, Parameter, onOk, onDefault, this, Pipeline); + await this.Client.ConsumerGroupsCreateOrUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.EventHubName ?? null, InputObject.ConsumerGroupName ?? null, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); } await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -378,12 +428,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -400,15 +450,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -418,12 +468,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -435,8 +485,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubConsumerGroup_CreateViaIdentityEventhub.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubConsumerGroup_CreateViaIdentityEventhub.cs new file mode 100644 index 000000000000..58f613453203 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubConsumerGroup_CreateViaIdentityEventhub.cs @@ -0,0 +1,522 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// Create an Event Hubs consumer group as a nested resource within a Namespace. + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzEventHubConsumerGroup_CreateViaIdentityEventhub", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Create an Event Hubs consumer group as a nested resource within a Namespace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}", ApiVersion = "2023-01-01-preview")] + public partial class NewAzEventHubConsumerGroup_CreateViaIdentityEventhub : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity _eventhubInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity EventhubInputObject { get => this._eventhubInputObject; set => this._eventhubInputObject = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The consumer group name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The consumer group name")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The consumer group name", + SerializedName = @"consumerGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ConsumerGroupName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup _parameter; + + /// Single item in List or Get Consumer group operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Single item in List or Get Consumer group operation", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Single item in List or Get Consumer group operation", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup Parameter { get => this._parameter; set => this._parameter = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzEventHubConsumerGroup_CreateViaIdentityEventhub() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ConsumerGroupsCreateOrUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (EventhubInputObject?.Id != null) + { + this.EventhubInputObject.Id += $"/consumergroups/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.ConsumerGroupsCreateOrUpdateViaIdentity(EventhubInputObject.Id, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == EventhubInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("EventhubInputObject has null value for EventhubInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, EventhubInputObject) ); + } + if (null == EventhubInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("EventhubInputObject has null value for EventhubInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, EventhubInputObject) ); + } + if (null == EventhubInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("EventhubInputObject has null value for EventhubInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, EventhubInputObject) ); + } + if (null == EventhubInputObject.EventHubName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("EventhubInputObject has null value for EventhubInputObject.EventHubName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, EventhubInputObject) ); + } + await this.Client.ConsumerGroupsCreateOrUpdate(EventhubInputObject.SubscriptionId ?? null, EventhubInputObject.ResourceGroupName ?? null, EventhubInputObject.NamespaceName ?? null, EventhubInputObject.EventHubName ?? null, Name, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubConsumerGroup_CreateViaIdentityEventhubExpanded.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubConsumerGroup_CreateViaIdentityEventhubExpanded.cs new file mode 100644 index 000000000000..c18b99cb434b --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubConsumerGroup_CreateViaIdentityEventhubExpanded.cs @@ -0,0 +1,526 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// Create an Event Hubs consumer group as a nested resource within a Namespace. + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzEventHubConsumerGroup_CreateViaIdentityEventhubExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Create an Event Hubs consumer group as a nested resource within a Namespace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}", ApiVersion = "2023-01-01-preview")] + public partial class NewAzEventHubConsumerGroup_CreateViaIdentityEventhubExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// Single item in List or Get Consumer group operation + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ConsumerGroup(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity _eventhubInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity EventhubInputObject { get => this._eventhubInputObject; set => this._eventhubInputObject = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The consumer group name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The consumer group name")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The consumer group name", + SerializedName = @"consumerGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ConsumerGroupName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// User Metadata is a placeholder to store user-defined string data with maximum length 1024. e.g. it can be used to store + /// descriptive data, such as list of teams and their contact information also user-defined configuration settings can be + /// stored. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "User Metadata is a placeholder to store user-defined string data with maximum length 1024. e.g. it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"User Metadata is a placeholder to store user-defined string data with maximum length 1024. e.g. it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored.", + SerializedName = @"userMetadata", + PossibleTypes = new [] { typeof(string) })] + public string UserMetadata { get => _parametersBody.UserMetadata ?? null; set => _parametersBody.UserMetadata = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzEventHubConsumerGroup_CreateViaIdentityEventhubExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ConsumerGroupsCreateOrUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (EventhubInputObject?.Id != null) + { + this.EventhubInputObject.Id += $"/consumergroups/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.ConsumerGroupsCreateOrUpdateViaIdentity(EventhubInputObject.Id, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == EventhubInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("EventhubInputObject has null value for EventhubInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, EventhubInputObject) ); + } + if (null == EventhubInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("EventhubInputObject has null value for EventhubInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, EventhubInputObject) ); + } + if (null == EventhubInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("EventhubInputObject has null value for EventhubInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, EventhubInputObject) ); + } + if (null == EventhubInputObject.EventHubName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("EventhubInputObject has null value for EventhubInputObject.EventHubName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, EventhubInputObject) ); + } + await this.Client.ConsumerGroupsCreateOrUpdate(EventhubInputObject.SubscriptionId ?? null, EventhubInputObject.ResourceGroupName ?? null, EventhubInputObject.NamespaceName ?? null, EventhubInputObject.EventHubName ?? null, Name, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubConsumerGroup_CreateViaIdentityNamespace.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubConsumerGroup_CreateViaIdentityNamespace.cs new file mode 100644 index 000000000000..43fa5377ef95 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubConsumerGroup_CreateViaIdentityNamespace.cs @@ -0,0 +1,532 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// Create an Event Hubs consumer group as a nested resource within a Namespace. + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzEventHubConsumerGroup_CreateViaIdentityNamespace", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Create an Event Hubs consumer group as a nested resource within a Namespace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}", ApiVersion = "2023-01-01-preview")] + public partial class NewAzEventHubConsumerGroup_CreateViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _eventHubName; + + /// The Event Hub name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Event Hub name")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Event Hub name", + SerializedName = @"eventHubName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string EventHubName { get => this._eventHubName; set => this._eventHubName = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The consumer group name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The consumer group name")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The consumer group name", + SerializedName = @"consumerGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ConsumerGroupName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup _parameter; + + /// Single item in List or Get Consumer group operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Single item in List or Get Consumer group operation", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Single item in List or Get Consumer group operation", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup Parameter { get => this._parameter; set => this._parameter = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzEventHubConsumerGroup_CreateViaIdentityNamespace() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ConsumerGroupsCreateOrUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/eventhubs/{(global::System.Uri.EscapeDataString(this.EventHubName.ToString()))}/consumergroups/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.ConsumerGroupsCreateOrUpdateViaIdentity(NamespaceInputObject.Id, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.ConsumerGroupsCreateOrUpdate(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, EventHubName, Name, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { EventHubName=EventHubName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubConsumerGroup_CreateViaIdentityNamespaceExpanded.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubConsumerGroup_CreateViaIdentityNamespaceExpanded.cs new file mode 100644 index 000000000000..fff404554726 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubConsumerGroup_CreateViaIdentityNamespaceExpanded.cs @@ -0,0 +1,537 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// Create an Event Hubs consumer group as a nested resource within a Namespace. + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzEventHubConsumerGroup_CreateViaIdentityNamespaceExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Create an Event Hubs consumer group as a nested resource within a Namespace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}", ApiVersion = "2023-01-01-preview")] + public partial class NewAzEventHubConsumerGroup_CreateViaIdentityNamespaceExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// Single item in List or Get Consumer group operation + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ConsumerGroup(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _eventHubName; + + /// The Event Hub name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Event Hub name")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Event Hub name", + SerializedName = @"eventHubName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string EventHubName { get => this._eventHubName; set => this._eventHubName = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The consumer group name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The consumer group name")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The consumer group name", + SerializedName = @"consumerGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ConsumerGroupName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// User Metadata is a placeholder to store user-defined string data with maximum length 1024. e.g. it can be used to store + /// descriptive data, such as list of teams and their contact information also user-defined configuration settings can be + /// stored. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "User Metadata is a placeholder to store user-defined string data with maximum length 1024. e.g. it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"User Metadata is a placeholder to store user-defined string data with maximum length 1024. e.g. it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored.", + SerializedName = @"userMetadata", + PossibleTypes = new [] { typeof(string) })] + public string UserMetadata { get => _parametersBody.UserMetadata ?? null; set => _parametersBody.UserMetadata = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public NewAzEventHubConsumerGroup_CreateViaIdentityNamespaceExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ConsumerGroupsCreateOrUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/eventhubs/{(global::System.Uri.EscapeDataString(this.EventHubName.ToString()))}/consumergroups/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.ConsumerGroupsCreateOrUpdateViaIdentity(NamespaceInputObject.Id, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.ConsumerGroupsCreateOrUpdate(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, EventHubName, Name, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { EventHubName=EventHubName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubGeoDRConfiguration_CreateExpanded.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubGeoDRConfiguration_CreateExpanded.cs index de44d89e094f..5e50a11e0cf0 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubGeoDRConfiguration_CreateExpanded.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubGeoDRConfiguration_CreateExpanded.cs @@ -6,19 +6,22 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; - /// Creates or updates a new Alias(Disaster Recovery configuration) + /// Create a new Alias(Disaster Recovery configuration) /// /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzEventHubGeoDRConfiguration_CreateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery))] - [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Creates or updates a new Alias(Disaster Recovery configuration)")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Create a new Alias(Disaster Recovery configuration)")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}", ApiVersion = "2023-01-01-preview")] public partial class NewAzEventHubGeoDRConfiguration_CreateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,8 +37,20 @@ public partial class NewAzEventHubGeoDRConfiguration_CreateExpanded : global::Sy /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// Single item in List or Get Alias(Disaster Recovery configuration) operation - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ArmDisasterRecovery(); + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ArmDisasterRecovery(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; /// Alternate name specified when alias and namespace names are same. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Alternate name specified when alias and namespace names are same.")] @@ -53,6 +68,9 @@ public partial class NewAzEventHubGeoDRConfiguration_CreateExpanded : global::Sy [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -66,6 +84,9 @@ public partial class NewAzEventHubGeoDRConfiguration_CreateExpanded : global::Sy [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -133,7 +154,7 @@ public partial class NewAzEventHubGeoDRConfiguration_CreateExpanded : global::Sy /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -182,7 +203,8 @@ public partial class NewAzEventHubGeoDRConfiguration_CreateExpanded : global::Sy [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -191,36 +213,36 @@ public partial class NewAzEventHubGeoDRConfiguration_CreateExpanded : global::Sy /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery /// from the remote call /// /// Determines if the rest of the onCreated method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -243,6 +265,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -307,8 +334,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -318,7 +370,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzEventHubGeoDRConfiguration_CreateExpanded() { @@ -372,7 +424,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -385,12 +437,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.DisasterRecoveryConfigsCreateOrUpdate(ResourceGroupName, NamespaceName, Name, SubscriptionId, _parametersBody, onOk, onCreated, onDefault, this, Pipeline); + await this.Client.DisasterRecoveryConfigsCreateOrUpdate(SubscriptionId, ResourceGroupName, NamespaceName, Name, _parametersBody, onOk, onCreated, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name,SubscriptionId=SubscriptionId,body=_parametersBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -426,12 +478,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 201 (Created). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -443,8 +495,26 @@ protected override void StopProcessing() return ; } // onCreated - response for 201 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } @@ -452,12 +522,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -474,15 +544,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId, body=_parametersBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId, body=_parametersBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -492,12 +562,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -509,8 +579,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubGeoDRConfiguration_CreateViaIdentity.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubGeoDRConfiguration_CreateViaIdentity.cs index b9cf33dfea7b..895d96015189 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubGeoDRConfiguration_CreateViaIdentity.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubGeoDRConfiguration_CreateViaIdentity.cs @@ -6,20 +6,23 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; - /// Creates or updates a new Alias(Disaster Recovery configuration) + /// Create a new Alias(Disaster Recovery configuration) /// /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzEventHubGeoDRConfiguration_CreateViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery))] - [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Creates or updates a new Alias(Disaster Recovery configuration)")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Create a new Alias(Disaster Recovery configuration)")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}", ApiVersion = "2023-01-01-preview")] public partial class NewAzEventHubGeoDRConfiguration_CreateViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +38,26 @@ public partial class NewAzEventHubGeoDRConfiguration_CreateViaIdentity : global: /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -53,6 +71,9 @@ public partial class NewAzEventHubGeoDRConfiguration_CreateViaIdentity : global: [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -85,7 +106,7 @@ public partial class NewAzEventHubGeoDRConfiguration_CreateViaIdentity : global: global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery _parameter; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery _parameter; /// Single item in List or Get Alias(Disaster Recovery configuration) operation [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Single item in List or Get Alias(Disaster Recovery configuration) operation", ValueFromPipeline = true)] @@ -94,13 +115,14 @@ public partial class NewAzEventHubGeoDRConfiguration_CreateViaIdentity : global: ReadOnly = false, Description = @"Single item in List or Get Alias(Disaster Recovery configuration) operation", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery) })] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery Parameter { get => this._parameter; set => this._parameter = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery Parameter { get => this._parameter; set => this._parameter = value; } /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -123,36 +145,36 @@ public partial class NewAzEventHubGeoDRConfiguration_CreateViaIdentity : global: /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery /// from the remote call /// /// Determines if the rest of the onCreated method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -175,6 +197,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -239,8 +266,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -250,7 +302,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzEventHubGeoDRConfiguration_CreateViaIdentity() { @@ -304,7 +356,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -319,11 +371,15 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.DisasterRecoveryConfigsCreateOrUpdateViaIdentity(InputObject.Id, Parameter, onOk, onCreated, onDefault, this, Pipeline); + await this.Client.DisasterRecoveryConfigsCreateOrUpdateViaIdentity(InputObject.Id, Parameter, onOk, onCreated, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); } else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -336,17 +392,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Alias"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.DisasterRecoveryConfigsCreateOrUpdate(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.Alias ?? null, InputObject.SubscriptionId ?? null, Parameter, onOk, onCreated, onDefault, this, Pipeline); + await this.Client.DisasterRecoveryConfigsCreateOrUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.Alias ?? null, Parameter, onOk, onCreated, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); } await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -382,12 +434,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 201 (Created). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -399,8 +451,26 @@ protected override void StopProcessing() return ; } // onCreated - response for 201 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } @@ -408,12 +478,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -430,15 +500,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -448,12 +518,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -465,8 +535,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubGeoDRConfiguration_CreateViaIdentityNamespace.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubGeoDRConfiguration_CreateViaIdentityNamespace.cs new file mode 100644 index 000000000000..0073e48a2201 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubGeoDRConfiguration_CreateViaIdentityNamespace.cs @@ -0,0 +1,571 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// Create a new Alias(Disaster Recovery configuration) + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzEventHubGeoDRConfiguration_CreateViaIdentityNamespace", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Create a new Alias(Disaster Recovery configuration)")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}", ApiVersion = "2023-01-01-preview")] + public partial class NewAzEventHubGeoDRConfiguration_CreateViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The Disaster Recovery configuration name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Disaster Recovery configuration name")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Disaster Recovery configuration name", + SerializedName = @"alias", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery _parameter; + + /// Single item in List or Get Alias(Disaster Recovery configuration) operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Single item in List or Get Alias(Disaster Recovery configuration) operation", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Single item in List or Get Alias(Disaster Recovery configuration) operation", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery Parameter { get => this._parameter; set => this._parameter = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnCreated will be called before the regular onCreated has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery + /// from the remote call + /// /// Determines if the rest of the onCreated method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzEventHubGeoDRConfiguration_CreateViaIdentityNamespace() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DisasterRecoveryConfigsCreateOrUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/disasterRecoveryConfigs/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.DisasterRecoveryConfigsCreateOrUpdateViaIdentity(NamespaceInputObject.Id, Parameter, onOk, onCreated, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.DisasterRecoveryConfigsCreateOrUpdate(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, Name, Parameter, onOk, onCreated, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// a delegate that is called when the remote service returns 201 (Created). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnCreated(responseMessage, response, ref _returnNow); + // if overrideOnCreated has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onCreated - response for 201 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubGeoDRConfiguration_CreateViaIdentityNamespaceExpanded.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubGeoDRConfiguration_CreateViaIdentityNamespaceExpanded.cs new file mode 100644 index 000000000000..fcc9c56dc6e1 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubGeoDRConfiguration_CreateViaIdentityNamespaceExpanded.cs @@ -0,0 +1,585 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// Create a new Alias(Disaster Recovery configuration) + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzEventHubGeoDRConfiguration_CreateViaIdentityNamespaceExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Create a new Alias(Disaster Recovery configuration)")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}", ApiVersion = "2023-01-01-preview")] + public partial class NewAzEventHubGeoDRConfiguration_CreateViaIdentityNamespaceExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// Single item in List or Get Alias(Disaster Recovery configuration) operation + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ArmDisasterRecovery(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Alternate name specified when alias and namespace names are same. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Alternate name specified when alias and namespace names are same.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Alternate name specified when alias and namespace names are same.", + SerializedName = @"alternateName", + PossibleTypes = new [] { typeof(string) })] + public string AlternateName { get => _parametersBody.AlternateName ?? null; set => _parametersBody.AlternateName = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The Disaster Recovery configuration name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Disaster Recovery configuration name")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Disaster Recovery configuration name", + SerializedName = @"alias", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// ARM Id of the Primary/Secondary eventhub namespace name, which is part of GEO DR pairing + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "ARM Id of the Primary/Secondary eventhub namespace name, which is part of GEO DR pairing")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ARM Id of the Primary/Secondary eventhub namespace name, which is part of GEO DR pairing", + SerializedName = @"partnerNamespace", + PossibleTypes = new [] { typeof(string) })] + public string PartnerNamespace { get => _parametersBody.PartnerNamespace ?? null; set => _parametersBody.PartnerNamespace = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnCreated will be called before the regular onCreated has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery + /// from the remote call + /// /// Determines if the rest of the onCreated method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public NewAzEventHubGeoDRConfiguration_CreateViaIdentityNamespaceExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DisasterRecoveryConfigsCreateOrUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/disasterRecoveryConfigs/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.DisasterRecoveryConfigsCreateOrUpdateViaIdentity(NamespaceInputObject.Id, _parametersBody, onOk, onCreated, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.DisasterRecoveryConfigsCreateOrUpdate(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, Name, _parametersBody, onOk, onCreated, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// a delegate that is called when the remote service returns 201 (Created). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnCreated(responseMessage, response, ref _returnNow); + // if overrideOnCreated has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onCreated - response for 201 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubKey_Regenerate.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubKey_Regenerate.cs index da7a734bb66f..bf93119e3d18 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubKey_Regenerate.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubKey_Regenerate.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Regenerates the ACS and SAS connection strings for the Event Hub. @@ -14,12 +16,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzEventHubKey_Regenerate", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Regenerates the ACS and SAS connection strings for the Event Hub.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}/regenerateKeys", ApiVersion = "2023-01-01-preview")] public partial class NewAzEventHubKey_Regenerate : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +38,26 @@ public partial class NewAzEventHubKey_Regenerate : global::System.Management.Aut /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -67,6 +85,9 @@ public partial class NewAzEventHubKey_Regenerate : global::System.Management.Aut [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string EventHubName { get => this._eventHubName; set => this._eventHubName = value; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -119,7 +140,7 @@ public partial class NewAzEventHubKey_Regenerate : global::System.Management.Aut public string NamespaceName { get => this._namespaceName; set => this._namespaceName = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRegenerateAccessKeyParameters _parameter; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRegenerateAccessKeyParameters _parameter; /// /// Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset. @@ -130,13 +151,14 @@ public partial class NewAzEventHubKey_Regenerate : global::System.Management.Aut ReadOnly = false, Description = @"Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset.", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRegenerateAccessKeyParameters) })] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRegenerateAccessKeyParameters Parameter { get => this._parameter; set => this._parameter = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRegenerateAccessKeyParameters) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRegenerateAccessKeyParameters Parameter { get => this._parameter; set => this._parameter = value; } /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -185,7 +207,8 @@ public partial class NewAzEventHubKey_Regenerate : global::System.Management.Aut [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -194,24 +217,24 @@ public partial class NewAzEventHubKey_Regenerate : global::System.Management.Aut /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -234,6 +257,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -298,8 +326,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -309,7 +362,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzEventHubKey_Regenerate() { @@ -363,7 +416,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -376,12 +429,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.EventHubsRegenerateKeys(ResourceGroupName, NamespaceName, EventHubName, Name, SubscriptionId, Parameter, onOk, onDefault, this, Pipeline); + await this.Client.EventHubsRegenerateKeys(SubscriptionId, ResourceGroupName, NamespaceName, EventHubName, Name, Parameter, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,EventHubName=EventHubName,Name=Name,SubscriptionId=SubscriptionId,body=Parameter}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,EventHubName=EventHubName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -419,12 +472,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -441,15 +494,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, EventHubName=EventHubName, Name=Name, SubscriptionId=SubscriptionId, body=Parameter }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, EventHubName=EventHubName, Name=Name, SubscriptionId=SubscriptionId, body=Parameter }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -459,12 +512,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -476,8 +529,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubKey_RegenerateViaIdentityEventhub.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubKey_RegenerateViaIdentityEventhub.cs new file mode 100644 index 000000000000..a363291a3720 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubKey_RegenerateViaIdentityEventhub.cs @@ -0,0 +1,524 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// Regenerates the ACS and SAS connection strings for the Event Hub. + /// + /// [OpenAPI] RegenerateKeys=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}/regenerateKeys" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzEventHubKey_RegenerateViaIdentityEventhub", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Regenerates the ACS and SAS connection strings for the Event Hub.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}/regenerateKeys", ApiVersion = "2023-01-01-preview")] + public partial class NewAzEventHubKey_RegenerateViaIdentityEventhub : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity _eventhubInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity EventhubInputObject { get => this._eventhubInputObject; set => this._eventhubInputObject = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRegenerateAccessKeyParameters _parameter; + + /// + /// Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset.", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRegenerateAccessKeyParameters) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRegenerateAccessKeyParameters Parameter { get => this._parameter; set => this._parameter = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzEventHubKey_RegenerateViaIdentityEventhub() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'EventHubsRegenerateKeys' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (EventhubInputObject?.Id != null) + { + this.EventhubInputObject.Id += $"/authorizationRules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.EventHubsRegenerateKeysViaIdentity(EventhubInputObject.Id, Parameter, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == EventhubInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("EventhubInputObject has null value for EventhubInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, EventhubInputObject) ); + } + if (null == EventhubInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("EventhubInputObject has null value for EventhubInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, EventhubInputObject) ); + } + if (null == EventhubInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("EventhubInputObject has null value for EventhubInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, EventhubInputObject) ); + } + if (null == EventhubInputObject.EventHubName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("EventhubInputObject has null value for EventhubInputObject.EventHubName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, EventhubInputObject) ); + } + await this.Client.EventHubsRegenerateKeys(EventhubInputObject.SubscriptionId ?? null, EventhubInputObject.ResourceGroupName ?? null, EventhubInputObject.NamespaceName ?? null, EventhubInputObject.EventHubName ?? null, Name, Parameter, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubKey_RegenerateViaIdentityEventhubExpanded.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubKey_RegenerateViaIdentityEventhubExpanded.cs new file mode 100644 index 000000000000..dcfe7805d872 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubKey_RegenerateViaIdentityEventhubExpanded.cs @@ -0,0 +1,538 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// Regenerates the ACS and SAS connection strings for the Event Hub. + /// + /// [OpenAPI] RegenerateKeys=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}/regenerateKeys" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzEventHubKey_RegenerateViaIdentityEventhubExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Regenerates the ACS and SAS connection strings for the Event Hub.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}/regenerateKeys", ApiVersion = "2023-01-01-preview")] + public partial class NewAzEventHubKey_RegenerateViaIdentityEventhubExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset. + /// + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRegenerateAccessKeyParameters _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.RegenerateAccessKeyParameters(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity _eventhubInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity EventhubInputObject { get => this._eventhubInputObject; set => this._eventhubInputObject = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// Optional, if the key value provided, is set for KeyType or autogenerated Key value set for keyType + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional, if the key value provided, is set for KeyType or autogenerated Key value set for keyType")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional, if the key value provided, is set for KeyType or autogenerated Key value set for keyType", + SerializedName = @"key", + PossibleTypes = new [] { typeof(string) })] + public string Key { get => _parametersBody.Key ?? null; set => _parametersBody.Key = value; } + + /// The access key to regenerate. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The access key to regenerate.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The access key to regenerate.", + SerializedName = @"keyType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("PrimaryKey", "SecondaryKey")] + public string KeyType { get => _parametersBody.KeyType ?? null; set => _parametersBody.KeyType = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzEventHubKey_RegenerateViaIdentityEventhubExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'EventHubsRegenerateKeys' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (EventhubInputObject?.Id != null) + { + this.EventhubInputObject.Id += $"/authorizationRules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.EventHubsRegenerateKeysViaIdentity(EventhubInputObject.Id, _parametersBody, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == EventhubInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("EventhubInputObject has null value for EventhubInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, EventhubInputObject) ); + } + if (null == EventhubInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("EventhubInputObject has null value for EventhubInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, EventhubInputObject) ); + } + if (null == EventhubInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("EventhubInputObject has null value for EventhubInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, EventhubInputObject) ); + } + if (null == EventhubInputObject.EventHubName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("EventhubInputObject has null value for EventhubInputObject.EventHubName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, EventhubInputObject) ); + } + await this.Client.EventHubsRegenerateKeys(EventhubInputObject.SubscriptionId ?? null, EventhubInputObject.ResourceGroupName ?? null, EventhubInputObject.NamespaceName ?? null, EventhubInputObject.EventHubName ?? null, Name, _parametersBody, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubKey_RegenerateViaIdentityNamespace.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubKey_RegenerateViaIdentityNamespace.cs new file mode 100644 index 000000000000..73eabfbfca46 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubKey_RegenerateViaIdentityNamespace.cs @@ -0,0 +1,534 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// Regenerates the ACS and SAS connection strings for the Event Hub. + /// + /// [OpenAPI] RegenerateKeys=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}/regenerateKeys" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzEventHubKey_RegenerateViaIdentityNamespace", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Regenerates the ACS and SAS connection strings for the Event Hub.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}/regenerateKeys", ApiVersion = "2023-01-01-preview")] + public partial class NewAzEventHubKey_RegenerateViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _eventHubName; + + /// The Event Hub name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Event Hub name")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Event Hub name", + SerializedName = @"eventHubName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string EventHubName { get => this._eventHubName; set => this._eventHubName = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRegenerateAccessKeyParameters _parameter; + + /// + /// Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset.", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRegenerateAccessKeyParameters) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRegenerateAccessKeyParameters Parameter { get => this._parameter; set => this._parameter = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzEventHubKey_RegenerateViaIdentityNamespace() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'EventHubsRegenerateKeys' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/eventhubs/{(global::System.Uri.EscapeDataString(this.EventHubName.ToString()))}/authorizationRules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.EventHubsRegenerateKeysViaIdentity(NamespaceInputObject.Id, Parameter, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.EventHubsRegenerateKeys(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, EventHubName, Name, Parameter, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { EventHubName=EventHubName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubKey_RegenerateViaIdentityNamespaceExpanded.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubKey_RegenerateViaIdentityNamespaceExpanded.cs new file mode 100644 index 000000000000..99b93513d396 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubKey_RegenerateViaIdentityNamespaceExpanded.cs @@ -0,0 +1,548 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// Regenerates the ACS and SAS connection strings for the Event Hub. + /// + /// [OpenAPI] RegenerateKeys=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}/regenerateKeys" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzEventHubKey_RegenerateViaIdentityNamespaceExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Regenerates the ACS and SAS connection strings for the Event Hub.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}/regenerateKeys", ApiVersion = "2023-01-01-preview")] + public partial class NewAzEventHubKey_RegenerateViaIdentityNamespaceExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset. + /// + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRegenerateAccessKeyParameters _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.RegenerateAccessKeyParameters(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _eventHubName; + + /// The Event Hub name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Event Hub name")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Event Hub name", + SerializedName = @"eventHubName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string EventHubName { get => this._eventHubName; set => this._eventHubName = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// Optional, if the key value provided, is set for KeyType or autogenerated Key value set for keyType + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional, if the key value provided, is set for KeyType or autogenerated Key value set for keyType")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional, if the key value provided, is set for KeyType or autogenerated Key value set for keyType", + SerializedName = @"key", + PossibleTypes = new [] { typeof(string) })] + public string Key { get => _parametersBody.Key ?? null; set => _parametersBody.Key = value; } + + /// The access key to regenerate. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The access key to regenerate.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The access key to regenerate.", + SerializedName = @"keyType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("PrimaryKey", "SecondaryKey")] + public string KeyType { get => _parametersBody.KeyType ?? null; set => _parametersBody.KeyType = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzEventHubKey_RegenerateViaIdentityNamespaceExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'EventHubsRegenerateKeys' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/eventhubs/{(global::System.Uri.EscapeDataString(this.EventHubName.ToString()))}/authorizationRules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.EventHubsRegenerateKeysViaIdentity(NamespaceInputObject.Id, _parametersBody, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.EventHubsRegenerateKeys(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, EventHubName, Name, _parametersBody, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { EventHubName=EventHubName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubKey_RegenerateViaJsonFilePath.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubKey_RegenerateViaJsonFilePath.cs new file mode 100644 index 000000000000..208e19771277 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubKey_RegenerateViaJsonFilePath.cs @@ -0,0 +1,555 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// Regenerates the ACS and SAS connection strings for the Event Hub. + /// + /// [OpenAPI] RegenerateKeys=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}/regenerateKeys" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzEventHubKey_RegenerateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Regenerates the ACS and SAS connection strings for the Event Hub.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}/regenerateKeys", ApiVersion = "2023-01-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.NotSuggestDefaultParameterSet] + public partial class NewAzEventHubKey_RegenerateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + public global::System.String _jsonString; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _eventHubName; + + /// The Event Hub name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Event Hub name")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Event Hub name", + SerializedName = @"eventHubName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string EventHubName { get => this._eventHubName; set => this._eventHubName = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Regenerate operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Regenerate operation")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Regenerate operation", + SerializedName = @"JsonFilePath", + PossibleTypes = new [] { typeof(string) })] + public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private string _namespaceName; + + /// The Namespace name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Namespace name")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Namespace name", + SerializedName = @"namespaceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string NamespaceName { get => this._namespaceName; set => this._namespaceName = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the resource group within the azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the resource group within the azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the resource group within the azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the + /// URI for every service call. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzEventHubKey_RegenerateViaJsonFilePath() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'EventHubsRegenerateKeys' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.EventHubsRegenerateKeysViaJsonString(SubscriptionId, ResourceGroupName, NamespaceName, EventHubName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,EventHubName=EventHubName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubKey_RegenerateViaJsonString.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubKey_RegenerateViaJsonString.cs new file mode 100644 index 000000000000..5806d1db1d62 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubKey_RegenerateViaJsonString.cs @@ -0,0 +1,553 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// Regenerates the ACS and SAS connection strings for the Event Hub. + /// + /// [OpenAPI] RegenerateKeys=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}/regenerateKeys" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzEventHubKey_RegenerateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Regenerates the ACS and SAS connection strings for the Event Hub.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}/regenerateKeys", ApiVersion = "2023-01-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.NotSuggestDefaultParameterSet] + public partial class NewAzEventHubKey_RegenerateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _eventHubName; + + /// The Event Hub name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Event Hub name")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Event Hub name", + SerializedName = @"eventHubName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string EventHubName { get => this._eventHubName; set => this._eventHubName = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Regenerate operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Regenerate operation")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Regenerate operation", + SerializedName = @"JsonString", + PossibleTypes = new [] { typeof(string) })] + public string JsonString { get => this._jsonString; set => this._jsonString = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private string _namespaceName; + + /// The Namespace name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Namespace name")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Namespace name", + SerializedName = @"namespaceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string NamespaceName { get => this._namespaceName; set => this._namespaceName = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the resource group within the azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the resource group within the azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the resource group within the azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the + /// URI for every service call. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzEventHubKey_RegenerateViaJsonString() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'EventHubsRegenerateKeys' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.EventHubsRegenerateKeysViaJsonString(SubscriptionId, ResourceGroupName, NamespaceName, EventHubName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,EventHubName=EventHubName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNamespaceAuthorizationRule_CreateExpanded.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNamespaceAuthorizationRule_CreateExpanded.cs index fa09b35e26ed..4bc7bf901adc 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNamespaceAuthorizationRule_CreateExpanded.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNamespaceAuthorizationRule_CreateExpanded.cs @@ -6,20 +6,23 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; - /// Creates or updates an AuthorizationRule for a Namespace. + /// Create an AuthorizationRule for a Namespace. /// /// [OpenAPI] CreateOrUpdateAuthorizationRule=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzEventHubNamespaceAuthorizationRule_CreateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule))] - [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Creates or updates an AuthorizationRule for a Namespace.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Create an AuthorizationRule for a Namespace.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}", ApiVersion = "2023-01-01-preview")] public partial class NewAzEventHubNamespaceAuthorizationRule_CreateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,14 +38,29 @@ public partial class NewAzEventHubNamespaceAuthorizationRule_CreateExpanded : gl /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// Single item in a List or Get AuthorizationRule operation - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.AuthorizationRule(); + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.AuthorizationRule(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -56,6 +74,9 @@ public partial class NewAzEventHubNamespaceAuthorizationRule_CreateExpanded : gl [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -110,7 +131,7 @@ public partial class NewAzEventHubNamespaceAuthorizationRule_CreateExpanded : gl /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -151,9 +172,9 @@ public partial class NewAzEventHubNamespaceAuthorizationRule_CreateExpanded : gl ReadOnly = false, Description = @"The rights associated with the rule.", SerializedName = @"rights", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights))] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights[] Rights { get => _parametersBody.Rights ?? null /* arrayOf */; set => _parametersBody.Rights = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Manage", "Send", "Listen")] + public string[] Rights { get => _parametersBody.Rights?.ToArray() ?? null /* fixedArrayOf */; set => _parametersBody.Rights = (value != null ? new System.Collections.Generic.List(value) : null); } /// Backing field for property. private string _subscriptionId; @@ -172,7 +193,8 @@ public partial class NewAzEventHubNamespaceAuthorizationRule_CreateExpanded : gl [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -181,24 +203,24 @@ public partial class NewAzEventHubNamespaceAuthorizationRule_CreateExpanded : gl /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -221,6 +243,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -285,8 +312,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -296,7 +348,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzEventHubNamespaceAuthorizationRule_CreateExpanded() { @@ -350,7 +402,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -363,12 +415,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.NamespacesCreateOrUpdateAuthorizationRule(ResourceGroupName, NamespaceName, Name, SubscriptionId, _parametersBody, onOk, onDefault, this, Pipeline); + await this.Client.NamespacesCreateOrUpdateAuthorizationRule(SubscriptionId, ResourceGroupName, NamespaceName, Name, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name,SubscriptionId=SubscriptionId,body=_parametersBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -406,12 +458,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -428,15 +480,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId, body=_parametersBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId, body=_parametersBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -446,12 +498,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -463,8 +515,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNamespaceAuthorizationRule_CreateViaIdentity.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNamespaceAuthorizationRule_CreateViaIdentity.cs index c89a12699150..2f29cfca9a4f 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNamespaceAuthorizationRule_CreateViaIdentity.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNamespaceAuthorizationRule_CreateViaIdentity.cs @@ -6,20 +6,23 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; - /// Creates or updates an AuthorizationRule for a Namespace. + /// Create an AuthorizationRule for a Namespace. /// /// [OpenAPI] CreateOrUpdateAuthorizationRule=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzEventHubNamespaceAuthorizationRule_CreateViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule))] - [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Creates or updates an AuthorizationRule for a Namespace.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Create an AuthorizationRule for a Namespace.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}", ApiVersion = "2023-01-01-preview")] public partial class NewAzEventHubNamespaceAuthorizationRule_CreateViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +38,26 @@ public partial class NewAzEventHubNamespaceAuthorizationRule_CreateViaIdentity : /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -53,6 +71,9 @@ public partial class NewAzEventHubNamespaceAuthorizationRule_CreateViaIdentity : [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -85,7 +106,7 @@ public partial class NewAzEventHubNamespaceAuthorizationRule_CreateViaIdentity : global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule _parameter; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule _parameter; /// Single item in a List or Get AuthorizationRule operation [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Single item in a List or Get AuthorizationRule operation", ValueFromPipeline = true)] @@ -94,13 +115,14 @@ public partial class NewAzEventHubNamespaceAuthorizationRule_CreateViaIdentity : ReadOnly = false, Description = @"Single item in a List or Get AuthorizationRule operation", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule) })] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule Parameter { get => this._parameter; set => this._parameter = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule Parameter { get => this._parameter; set => this._parameter = value; } /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -123,24 +145,24 @@ public partial class NewAzEventHubNamespaceAuthorizationRule_CreateViaIdentity : /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -163,6 +185,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -227,8 +254,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -238,7 +290,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzEventHubNamespaceAuthorizationRule_CreateViaIdentity() { @@ -292,7 +344,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -307,11 +359,15 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.NamespacesCreateOrUpdateAuthorizationRuleViaIdentity(InputObject.Id, Parameter, onOk, onDefault, this, Pipeline); + await this.Client.NamespacesCreateOrUpdateAuthorizationRuleViaIdentity(InputObject.Id, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); } else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -324,17 +380,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.AuthorizationRuleName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.NamespacesCreateOrUpdateAuthorizationRule(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.AuthorizationRuleName ?? null, InputObject.SubscriptionId ?? null, Parameter, onOk, onDefault, this, Pipeline); + await this.Client.NamespacesCreateOrUpdateAuthorizationRule(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.AuthorizationRuleName ?? null, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); } await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -372,12 +424,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -394,15 +446,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -412,12 +464,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -429,8 +481,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNamespaceAuthorizationRule_CreateViaIdentityNamespace.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNamespaceAuthorizationRule_CreateViaIdentityNamespace.cs new file mode 100644 index 000000000000..691e3354261b --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNamespaceAuthorizationRule_CreateViaIdentityNamespace.cs @@ -0,0 +1,519 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// Create an AuthorizationRule for a Namespace. + /// + /// [OpenAPI] CreateOrUpdateAuthorizationRule=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzEventHubNamespaceAuthorizationRule_CreateViaIdentityNamespace", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Create an AuthorizationRule for a Namespace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}", ApiVersion = "2023-01-01-preview")] + public partial class NewAzEventHubNamespaceAuthorizationRule_CreateViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule _parameter; + + /// Single item in a List or Get AuthorizationRule operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Single item in a List or Get AuthorizationRule operation", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Single item in a List or Get AuthorizationRule operation", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule Parameter { get => this._parameter; set => this._parameter = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public NewAzEventHubNamespaceAuthorizationRule_CreateViaIdentityNamespace() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'NamespacesCreateOrUpdateAuthorizationRule' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/authorizationRules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.NamespacesCreateOrUpdateAuthorizationRuleViaIdentity(NamespaceInputObject.Id, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.NamespacesCreateOrUpdateAuthorizationRule(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, Name, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNamespaceAuthorizationRule_CreateViaIdentityNamespaceExpanded.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNamespaceAuthorizationRule_CreateViaIdentityNamespaceExpanded.cs new file mode 100644 index 000000000000..2023cfb6cc4b --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNamespaceAuthorizationRule_CreateViaIdentityNamespaceExpanded.cs @@ -0,0 +1,521 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// Create an AuthorizationRule for a Namespace. + /// + /// [OpenAPI] CreateOrUpdateAuthorizationRule=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzEventHubNamespaceAuthorizationRule_CreateViaIdentityNamespaceExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Create an AuthorizationRule for a Namespace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}", ApiVersion = "2023-01-01-preview")] + public partial class NewAzEventHubNamespaceAuthorizationRule_CreateViaIdentityNamespaceExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// Single item in a List or Get AuthorizationRule operation + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.AuthorizationRule(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// The rights associated with the rule. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The rights associated with the rule.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The rights associated with the rule.", + SerializedName = @"rights", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Manage", "Send", "Listen")] + public string[] Rights { get => _parametersBody.Rights?.ToArray() ?? null /* fixedArrayOf */; set => _parametersBody.Rights = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzEventHubNamespaceAuthorizationRule_CreateViaIdentityNamespaceExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'NamespacesCreateOrUpdateAuthorizationRule' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/authorizationRules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.NamespacesCreateOrUpdateAuthorizationRuleViaIdentity(NamespaceInputObject.Id, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.NamespacesCreateOrUpdateAuthorizationRule(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, Name, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNamespaceKey_Regenerate.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNamespaceKey_Regenerate.cs index 0ebfba2d4477..97effbe73396 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNamespaceKey_Regenerate.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNamespaceKey_Regenerate.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// @@ -16,12 +18,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzEventHubNamespaceKey_Regenerate", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Regenerates the primary or secondary connection strings for the specified Namespace.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}/regenerateKeys", ApiVersion = "2023-01-01-preview")] public partial class NewAzEventHubNamespaceKey_Regenerate : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -37,11 +40,26 @@ public partial class NewAzEventHubNamespaceKey_Regenerate : global::System.Manag /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -55,6 +73,9 @@ public partial class NewAzEventHubNamespaceKey_Regenerate : global::System.Manag [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -107,7 +128,7 @@ public partial class NewAzEventHubNamespaceKey_Regenerate : global::System.Manag public string NamespaceName { get => this._namespaceName; set => this._namespaceName = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRegenerateAccessKeyParameters _parameter; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRegenerateAccessKeyParameters _parameter; /// /// Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset. @@ -118,13 +139,14 @@ public partial class NewAzEventHubNamespaceKey_Regenerate : global::System.Manag ReadOnly = false, Description = @"Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset.", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRegenerateAccessKeyParameters) })] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRegenerateAccessKeyParameters Parameter { get => this._parameter; set => this._parameter = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRegenerateAccessKeyParameters) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRegenerateAccessKeyParameters Parameter { get => this._parameter; set => this._parameter = value; } /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -173,7 +195,8 @@ public partial class NewAzEventHubNamespaceKey_Regenerate : global::System.Manag [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -182,24 +205,24 @@ public partial class NewAzEventHubNamespaceKey_Regenerate : global::System.Manag /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -222,6 +245,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -286,8 +314,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -297,7 +350,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzEventHubNamespaceKey_Regenerate() { @@ -351,7 +404,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -364,12 +417,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.NamespacesRegenerateKeys(ResourceGroupName, NamespaceName, Name, SubscriptionId, Parameter, onOk, onDefault, this, Pipeline); + await this.Client.NamespacesRegenerateKeys(SubscriptionId, ResourceGroupName, NamespaceName, Name, Parameter, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name,SubscriptionId=SubscriptionId,body=Parameter}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -407,12 +460,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -429,15 +482,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId, body=Parameter }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId, body=Parameter }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -447,12 +500,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -464,8 +517,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNamespaceKey_RegenerateViaIdentityNamespace.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNamespaceKey_RegenerateViaIdentityNamespace.cs new file mode 100644 index 000000000000..7a4808cfe0fa --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNamespaceKey_RegenerateViaIdentityNamespace.cs @@ -0,0 +1,522 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// + /// Regenerates the primary or secondary connection strings for the specified Namespace. + /// + /// + /// [OpenAPI] RegenerateKeys=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}/regenerateKeys" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzEventHubNamespaceKey_RegenerateViaIdentityNamespace", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Regenerates the primary or secondary connection strings for the specified Namespace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}/regenerateKeys", ApiVersion = "2023-01-01-preview")] + public partial class NewAzEventHubNamespaceKey_RegenerateViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRegenerateAccessKeyParameters _parameter; + + /// + /// Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset.", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRegenerateAccessKeyParameters) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRegenerateAccessKeyParameters Parameter { get => this._parameter; set => this._parameter = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzEventHubNamespaceKey_RegenerateViaIdentityNamespace() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'NamespacesRegenerateKeys' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/authorizationRules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.NamespacesRegenerateKeysViaIdentity(NamespaceInputObject.Id, Parameter, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.NamespacesRegenerateKeys(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, Name, Parameter, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNamespaceKey_RegenerateViaIdentityNamespaceExpanded.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNamespaceKey_RegenerateViaIdentityNamespaceExpanded.cs new file mode 100644 index 000000000000..9c2d528f4ff3 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNamespaceKey_RegenerateViaIdentityNamespaceExpanded.cs @@ -0,0 +1,537 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// + /// Regenerates the primary or secondary connection strings for the specified Namespace. + /// + /// + /// [OpenAPI] RegenerateKeys=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}/regenerateKeys" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzEventHubNamespaceKey_RegenerateViaIdentityNamespaceExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Regenerates the primary or secondary connection strings for the specified Namespace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}/regenerateKeys", ApiVersion = "2023-01-01-preview")] + public partial class NewAzEventHubNamespaceKey_RegenerateViaIdentityNamespaceExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset. + /// + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRegenerateAccessKeyParameters _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.RegenerateAccessKeyParameters(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// Optional, if the key value provided, is set for KeyType or autogenerated Key value set for keyType + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional, if the key value provided, is set for KeyType or autogenerated Key value set for keyType")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional, if the key value provided, is set for KeyType or autogenerated Key value set for keyType", + SerializedName = @"key", + PossibleTypes = new [] { typeof(string) })] + public string Key { get => _parametersBody.Key ?? null; set => _parametersBody.Key = value; } + + /// The access key to regenerate. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The access key to regenerate.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The access key to regenerate.", + SerializedName = @"keyType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("PrimaryKey", "SecondaryKey")] + public string KeyType { get => _parametersBody.KeyType ?? null; set => _parametersBody.KeyType = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public NewAzEventHubNamespaceKey_RegenerateViaIdentityNamespaceExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'NamespacesRegenerateKeys' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/authorizationRules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.NamespacesRegenerateKeysViaIdentity(NamespaceInputObject.Id, _parametersBody, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.NamespacesRegenerateKeys(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, Name, _parametersBody, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNamespaceKey_RegenerateViaJsonFilePath.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNamespaceKey_RegenerateViaJsonFilePath.cs new file mode 100644 index 000000000000..82849dc3fedd --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNamespaceKey_RegenerateViaJsonFilePath.cs @@ -0,0 +1,543 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// + /// Regenerates the primary or secondary connection strings for the specified Namespace. + /// + /// + /// [OpenAPI] RegenerateKeys=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}/regenerateKeys" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzEventHubNamespaceKey_RegenerateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Regenerates the primary or secondary connection strings for the specified Namespace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}/regenerateKeys", ApiVersion = "2023-01-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.NotSuggestDefaultParameterSet] + public partial class NewAzEventHubNamespaceKey_RegenerateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + public global::System.String _jsonString; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Regenerate operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Regenerate operation")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Regenerate operation", + SerializedName = @"JsonFilePath", + PossibleTypes = new [] { typeof(string) })] + public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private string _namespaceName; + + /// The Namespace name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Namespace name")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Namespace name", + SerializedName = @"namespaceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string NamespaceName { get => this._namespaceName; set => this._namespaceName = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the resource group within the azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the resource group within the azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the resource group within the azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the + /// URI for every service call. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzEventHubNamespaceKey_RegenerateViaJsonFilePath() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'NamespacesRegenerateKeys' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.NamespacesRegenerateKeysViaJsonString(SubscriptionId, ResourceGroupName, NamespaceName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNamespaceKey_RegenerateViaJsonString.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNamespaceKey_RegenerateViaJsonString.cs new file mode 100644 index 000000000000..c66901d19a19 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNamespaceKey_RegenerateViaJsonString.cs @@ -0,0 +1,541 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// + /// Regenerates the primary or secondary connection strings for the specified Namespace. + /// + /// + /// [OpenAPI] RegenerateKeys=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}/regenerateKeys" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzEventHubNamespaceKey_RegenerateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Regenerates the primary or secondary connection strings for the specified Namespace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}/regenerateKeys", ApiVersion = "2023-01-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.NotSuggestDefaultParameterSet] + public partial class NewAzEventHubNamespaceKey_RegenerateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Regenerate operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Regenerate operation")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Regenerate operation", + SerializedName = @"JsonString", + PossibleTypes = new [] { typeof(string) })] + public string JsonString { get => this._jsonString; set => this._jsonString = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private string _namespaceName; + + /// The Namespace name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Namespace name")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Namespace name", + SerializedName = @"namespaceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string NamespaceName { get => this._namespaceName; set => this._namespaceName = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the resource group within the azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the resource group within the azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the resource group within the azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the + /// URI for every service call. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzEventHubNamespaceKey_RegenerateViaJsonString() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'NamespacesRegenerateKeys' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.NamespacesRegenerateKeysViaJsonString(SubscriptionId, ResourceGroupName, NamespaceName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNamespace_CreateExpanded.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNamespace_CreateExpanded.cs index 8aae6d180d54..1e671bd2e538 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNamespace_CreateExpanded.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNamespace_CreateExpanded.cs @@ -6,22 +6,25 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// - /// Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. + /// Create a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. /// /// /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzEventHubNamespace_CreateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace))] - [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Create a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}", ApiVersion = "2023-01-01-preview")] public partial class NewAzEventHubNamespace_CreateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -37,8 +40,20 @@ public partial class NewAzEventHubNamespace_CreateExpanded : global::System.Mana /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// Single Namespace item in List or Get Operation - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.EhNamespace(); + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.EhNamespace(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; /// Alternate name specified when alias and namespace names are same. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Alternate name specified when alias and namespace names are same.")] @@ -61,6 +76,9 @@ public partial class NewAzEventHubNamespace_CreateExpanded : global::System.Mana [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -107,6 +125,9 @@ public partial class NewAzEventHubNamespace_CreateExpanded : global::System.Mana PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] public global::System.Management.Automation.SwitchParameter EnableAutoInflate { get => _parametersBody.EnableAutoInflate ?? default(global::System.Management.Automation.SwitchParameter); set => _parametersBody.EnableAutoInflate = value; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// A list of regions where replicas of the namespace are maintained. [global::System.Management.Automation.AllowEmptyCollection] [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A list of regions where replicas of the namespace are maintained.")] @@ -116,8 +137,8 @@ public partial class NewAzEventHubNamespace_CreateExpanded : global::System.Mana ReadOnly = false, Description = @"A list of regions where replicas of the namespace are maintained.", SerializedName = @"locations", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INamespaceReplicaLocation) })] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INamespaceReplicaLocation[] GeoDataReplicationLocation { get => _parametersBody.GeoDataReplicationLocation ?? null /* arrayOf */; set => _parametersBody.GeoDataReplicationLocation = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INamespaceReplicaLocation) })] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INamespaceReplicaLocation[] GeoDataReplicationLocation { get => _parametersBody.GeoDataReplicationLocation?.ToArray() ?? null /* fixedArrayOf */; set => _parametersBody.GeoDataReplicationLocation = (value != null ? new System.Collections.Generic.List(value) : null); } /// /// The maximum acceptable lag for data replication operations from the primary replica to a quorum of secondary replicas. @@ -154,10 +175,9 @@ public partial class NewAzEventHubNamespace_CreateExpanded : global::System.Mana ReadOnly = false, Description = @"Type of managed service identity.", SerializedName = @"type", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType) })] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ParameterBreakingChange("IdentityType", "12.0.0", "5.0.0", "2024/05/21", OldParamaterType="CaptureIdentityType", NewParameterType="String")] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType))] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType IdentityType { get => _parametersBody.IdentityType ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType)""); set => _parametersBody.IdentityType = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned", "None")] + public string IdentityType { get => _parametersBody.IdentityType ?? null; set => _parametersBody.IdentityType = value; } /// Accessor for our copy of the InvocationInfo. public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } @@ -181,9 +201,9 @@ public partial class NewAzEventHubNamespace_CreateExpanded : global::System.Mana ReadOnly = false, Description = @"Enumerates the possible value of keySource for Encryption", SerializedName = @"keySource", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeySource) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeySource))] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeySource KeySource { get => _parametersBody.KeySource ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeySource)""); set => _parametersBody.KeySource = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Microsoft.KeyVault")] + public string KeySource { get => _parametersBody.KeySource ?? null; set => _parametersBody.KeySource = value; } /// Properties of KeyVault [global::System.Management.Automation.AllowEmptyCollection] @@ -194,8 +214,8 @@ public partial class NewAzEventHubNamespace_CreateExpanded : global::System.Mana ReadOnly = false, Description = @"Properties of KeyVault", SerializedName = @"keyVaultProperties", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultProperties) })] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultProperties[] KeyVaultProperty { get => _parametersBody.KeyVaultProperty ?? null /* arrayOf */; set => _parametersBody.KeyVaultProperty = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultProperties) })] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultProperties[] KeyVaultProperty { get => _parametersBody.KeyVaultProperty?.ToArray() ?? null /* fixedArrayOf */; set => _parametersBody.KeyVaultProperty = (value != null ? new System.Collections.Generic.List(value) : null); } /// Resource location. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource location.")] @@ -238,9 +258,9 @@ public partial class NewAzEventHubNamespace_CreateExpanded : global::System.Mana ReadOnly = false, Description = @"The minimum TLS version for the cluster to support, e.g. '1.2'", SerializedName = @"minimumTlsVersion", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.TlsVersion) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.TlsVersion))] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.TlsVersion MinimumTlsVersion { get => _parametersBody.MinimumTlsVersion ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.TlsVersion)""); set => _parametersBody.MinimumTlsVersion = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("1.0", "1.1", "1.2")] + public string MinimumTlsVersion { get => _parametersBody.MinimumTlsVersion ?? null; set => _parametersBody.MinimumTlsVersion = value; } /// Backing field for property. private string _name; @@ -268,7 +288,7 @@ public partial class NewAzEventHubNamespace_CreateExpanded : global::System.Mana /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// List of private endpoint connections. [global::System.Management.Automation.AllowEmptyCollection] @@ -279,8 +299,8 @@ public partial class NewAzEventHubNamespace_CreateExpanded : global::System.Mana ReadOnly = false, Description = @"List of private endpoint connections.", SerializedName = @"privateEndpointConnections", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection) })] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection[] PrivateEndpointConnection { get => _parametersBody.PrivateEndpointConnection ?? null /* arrayOf */; set => _parametersBody.PrivateEndpointConnection = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection) })] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection[] PrivateEndpointConnection { get => _parametersBody.PrivateEndpointConnection?.ToArray() ?? null /* fixedArrayOf */; set => _parametersBody.PrivateEndpointConnection = (value != null ? new System.Collections.Generic.List(value) : null); } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -308,9 +328,9 @@ public partial class NewAzEventHubNamespace_CreateExpanded : global::System.Mana ReadOnly = false, Description = @"This determines if traffic is allowed over public network. By default it is enabled.", SerializedName = @"publicNetworkAccess", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess))] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess PublicNetworkAccess { get => _parametersBody.PublicNetworkAccess ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess)""); set => _parametersBody.PublicNetworkAccess = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Enabled", "Disabled", "SecuredByPerimeter")] + public string PublicNetworkAccess { get => _parametersBody.PublicNetworkAccess ?? null; set => _parametersBody.PublicNetworkAccess = value; } /// Enable Infrastructure Encryption (Double Encryption) [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Enable Infrastructure Encryption (Double Encryption)")] @@ -359,9 +379,9 @@ public partial class NewAzEventHubNamespace_CreateExpanded : global::System.Mana ReadOnly = false, Description = @"Name of this SKU.", SerializedName = @"name", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuName) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuName))] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuName SkuName { get => _parametersBody.SkuName ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuName)""); set => _parametersBody.SkuName = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Basic", "Standard", "Premium")] + public string SkuName { get => _parametersBody.SkuName ?? null; set => _parametersBody.SkuName = value; } /// The billing tier of this particular SKU. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The billing tier of this particular SKU.")] @@ -371,9 +391,9 @@ public partial class NewAzEventHubNamespace_CreateExpanded : global::System.Mana ReadOnly = false, Description = @"The billing tier of this particular SKU.", SerializedName = @"tier", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuTier) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuTier))] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuTier SkuTier { get => _parametersBody.SkuTier ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuTier)""); set => _parametersBody.SkuTier = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Basic", "Standard", "Premium")] + public string SkuTier { get => _parametersBody.SkuTier ?? null; set => _parametersBody.SkuTier = value; } /// Backing field for property. private string _subscriptionId; @@ -392,7 +412,8 @@ public partial class NewAzEventHubNamespace_CreateExpanded : global::System.Mana [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -405,8 +426,8 @@ public partial class NewAzEventHubNamespace_CreateExpanded : global::System.Mana ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceTags Tag { get => _parametersBody.Tag ?? null /* object */; set => _parametersBody.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceTags Tag { get => _parametersBody.Tag ?? null /* object */; set => _parametersBody.Tag = value; } /// Properties for User Assigned Identities [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ExportAs(typeof(global::System.Collections.Hashtable))] @@ -417,8 +438,8 @@ public partial class NewAzEventHubNamespace_CreateExpanded : global::System.Mana ReadOnly = false, Description = @"Properties for User Assigned Identities", SerializedName = @"userAssignedIdentities", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityUserAssignedIdentities) })] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityUserAssignedIdentities UserAssignedIdentity { get => _parametersBody.UserAssignedIdentity ?? null /* object */; set => _parametersBody.UserAssignedIdentity = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityUserAssignedIdentities) })] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityUserAssignedIdentities UserAssignedIdentity { get => _parametersBody.UserAssignedIdentity ?? null /* object */; set => _parametersBody.UserAssignedIdentity = value; } /// /// Enabling this property creates a Standard Event Hubs Namespace in regions supported availability zones. @@ -438,24 +459,24 @@ public partial class NewAzEventHubNamespace_CreateExpanded : global::System.Mana /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -493,15 +514,20 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets.NewAzEventHubNamespac clone.HttpPipelinePrepend = this.HttpPipelinePrepend; clone.HttpPipelineAppend = this.HttpPipelineAppend; clone._parametersBody = this._parametersBody; + clone.SubscriptionId = this.SubscriptionId; clone.ResourceGroupName = this.ResourceGroupName; clone.Name = this.Name; - clone.SubscriptionId = this.SubscriptionId; return clone; } /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -566,11 +592,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -582,10 +633,26 @@ protected override void EndProcessing() return; } } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } break; } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -595,7 +662,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzEventHubNamespace_CreateExpanded() { @@ -661,7 +728,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -674,12 +741,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.NamespacesCreateOrUpdate(ResourceGroupName, Name, SubscriptionId, _parametersBody, onOk, onDefault, this, Pipeline); + await this.Client.NamespacesCreateOrUpdate(SubscriptionId, ResourceGroupName, Name, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,Name=Name,SubscriptionId=SubscriptionId,body=_parametersBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -717,12 +784,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -739,15 +806,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, Name=Name, SubscriptionId=SubscriptionId, body=_parametersBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, Name=Name, SubscriptionId=SubscriptionId, body=_parametersBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -757,12 +824,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -774,8 +841,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNamespace_CreateViaIdentity.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNamespace_CreateViaIdentity.cs index 438d4e83bc28..c342d45d0d77 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNamespace_CreateViaIdentity.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNamespace_CreateViaIdentity.cs @@ -6,22 +6,25 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// - /// Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. + /// Create a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. /// /// /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzEventHubNamespace_CreateViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace))] - [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Create a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}", ApiVersion = "2023-01-01-preview")] public partial class NewAzEventHubNamespace_CreateViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -37,6 +40,18 @@ public partial class NewAzEventHubNamespace_CreateViaIdentity : global::System.M /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] @@ -47,6 +62,9 @@ public partial class NewAzEventHubNamespace_CreateViaIdentity : global::System.M [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -60,6 +78,9 @@ public partial class NewAzEventHubNamespace_CreateViaIdentity : global::System.M [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -100,7 +121,7 @@ public partial class NewAzEventHubNamespace_CreateViaIdentity : global::System.M public global::System.Management.Automation.SwitchParameter NoWait { get; set; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace _parameter; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace _parameter; /// Single Namespace item in List or Get Operation [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Single Namespace item in List or Get Operation", ValueFromPipeline = true)] @@ -109,13 +130,14 @@ public partial class NewAzEventHubNamespace_CreateViaIdentity : global::System.M ReadOnly = false, Description = @"Single Namespace item in List or Get Operation", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace) })] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace Parameter { get => this._parameter; set => this._parameter = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace Parameter { get => this._parameter; set => this._parameter = value; } /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -138,24 +160,24 @@ public partial class NewAzEventHubNamespace_CreateViaIdentity : global::System.M /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -199,6 +221,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets.NewAzEventHubNamespac /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -263,11 +290,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -279,10 +331,26 @@ protected override void EndProcessing() return; } } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } break; } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -292,7 +360,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzEventHubNamespace_CreateViaIdentity() { @@ -358,7 +426,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -373,11 +441,15 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.NamespacesCreateOrUpdateViaIdentity(InputObject.Id, Parameter, onOk, onDefault, this, Pipeline); + await this.Client.NamespacesCreateOrUpdateViaIdentity(InputObject.Id, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); } else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -386,17 +458,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.NamespacesCreateOrUpdate(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.SubscriptionId ?? null, Parameter, onOk, onDefault, this, Pipeline); + await this.Client.NamespacesCreateOrUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); } await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -434,12 +502,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -456,15 +524,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -474,12 +542,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -491,8 +559,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNetworkRuleSet_CreateExpanded.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNetworkRuleSet_CreateExpanded.cs index fe210f0b0e90..6686b92aa778 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNetworkRuleSet_CreateExpanded.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNetworkRuleSet_CreateExpanded.cs @@ -6,20 +6,23 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; - /// Create or update NetworkRuleSet for a Namespace. + /// Create NetworkRuleSet for a Namespace. /// /// [OpenAPI] CreateOrUpdateNetworkRuleSet=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkRuleSets/default" /// [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzEventHubNetworkRuleSet_CreateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet))] - [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Create or update NetworkRuleSet for a Namespace.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Create NetworkRuleSet for a Namespace.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkRuleSets/default", ApiVersion = "2023-01-01-preview")] public partial class NewAzEventHubNetworkRuleSet_CreateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,14 +38,29 @@ public partial class NewAzEventHubNetworkRuleSet_CreateExpanded : global::System /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// Description of topic resource. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.NetworkRuleSet(); + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.NetworkRuleSet(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -54,9 +72,9 @@ public partial class NewAzEventHubNetworkRuleSet_CreateExpanded : global::System ReadOnly = false, Description = @"Default Action for Network Rule Set", SerializedName = @"defaultAction", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.DefaultAction) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.DefaultAction))] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.DefaultAction DefaultAction { get => _parametersBody.DefaultAction ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.DefaultAction)""); set => _parametersBody.DefaultAction = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Allow", "Deny")] + public string DefaultAction { get => _parametersBody.DefaultAction ?? null; set => _parametersBody.DefaultAction = value; } /// /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet @@ -68,6 +86,9 @@ public partial class NewAzEventHubNetworkRuleSet_CreateExpanded : global::System [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -89,8 +110,8 @@ public partial class NewAzEventHubNetworkRuleSet_CreateExpanded : global::System ReadOnly = false, Description = @"List of IpRules", SerializedName = @"ipRules", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetIPRules) })] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetIPRules[] IPRule { get => _parametersBody.IPRule ?? null /* arrayOf */; set => _parametersBody.IPRule = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetIPRules) })] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetIPRules[] IPRule { get => _parametersBody.IPRule?.ToArray() ?? null /* fixedArrayOf */; set => _parametersBody.IPRule = (value != null ? new System.Collections.Generic.List(value) : null); } /// Accessor for our copy of the InvocationInfo. public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } @@ -120,7 +141,7 @@ public partial class NewAzEventHubNetworkRuleSet_CreateExpanded : global::System /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -149,9 +170,9 @@ public partial class NewAzEventHubNetworkRuleSet_CreateExpanded : global::System ReadOnly = false, Description = @"This determines if traffic is allowed over public network. By default it is enabled. If value is SecuredByPerimeter then Inbound and Outbound communication is controlled by the network security perimeter and profile's access rules. ", SerializedName = @"publicNetworkAccess", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccessFlag) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccessFlag))] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccessFlag PublicNetworkAccess { get => _parametersBody.PublicNetworkAccess ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccessFlag)""); set => _parametersBody.PublicNetworkAccess = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Enabled", "Disabled", "SecuredByPerimeter")] + public string PublicNetworkAccess { get => _parametersBody.PublicNetworkAccess ?? null; set => _parametersBody.PublicNetworkAccess = value; } /// Backing field for property. private string _resourceGroupName; @@ -184,7 +205,8 @@ public partial class NewAzEventHubNetworkRuleSet_CreateExpanded : global::System [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -208,32 +230,32 @@ public partial class NewAzEventHubNetworkRuleSet_CreateExpanded : global::System ReadOnly = false, Description = @"List VirtualNetwork Rules", SerializedName = @"virtualNetworkRules", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetVirtualNetworkRules) })] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetVirtualNetworkRules[] VirtualNetworkRule { get => _parametersBody.VirtualNetworkRule ?? null /* arrayOf */; set => _parametersBody.VirtualNetworkRule = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetVirtualNetworkRules) })] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetVirtualNetworkRules[] VirtualNetworkRule { get => _parametersBody.VirtualNetworkRule?.ToArray() ?? null /* fixedArrayOf */; set => _parametersBody.VirtualNetworkRule = (value != null ? new System.Collections.Generic.List(value) : null); } /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -256,6 +278,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -320,8 +347,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -331,7 +383,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzEventHubNetworkRuleSet_CreateExpanded() { @@ -385,7 +437,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -398,12 +450,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.NamespacesCreateOrUpdateNetworkRuleSet(ResourceGroupName, NamespaceName, SubscriptionId, _parametersBody, onOk, onDefault, this, Pipeline); + await this.Client.NamespacesCreateOrUpdateNetworkRuleSet(SubscriptionId, ResourceGroupName, NamespaceName, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,SubscriptionId=SubscriptionId,body=_parametersBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -441,12 +493,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -463,15 +515,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId, body=_parametersBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId, body=_parametersBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -481,12 +533,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -498,8 +550,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNetworkRuleSet_CreateViaIdentity.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNetworkRuleSet_CreateViaIdentity.cs index fc154dc45f53..8a35f18dc447 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNetworkRuleSet_CreateViaIdentity.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubNetworkRuleSet_CreateViaIdentity.cs @@ -6,20 +6,23 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; - /// Create or update NetworkRuleSet for a Namespace. + /// Create NetworkRuleSet for a Namespace. /// /// [OpenAPI] CreateOrUpdateNetworkRuleSet=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkRuleSets/default" /// [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzEventHubNetworkRuleSet_CreateViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet))] - [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Create or update NetworkRuleSet for a Namespace.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Create NetworkRuleSet for a Namespace.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkRuleSets/default", ApiVersion = "2023-01-01-preview")] public partial class NewAzEventHubNetworkRuleSet_CreateViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +38,26 @@ public partial class NewAzEventHubNetworkRuleSet_CreateViaIdentity : global::Sys /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -53,6 +71,9 @@ public partial class NewAzEventHubNetworkRuleSet_CreateViaIdentity : global::Sys [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -85,7 +106,7 @@ public partial class NewAzEventHubNetworkRuleSet_CreateViaIdentity : global::Sys global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet _parameter; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet _parameter; /// Description of topic resource. [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Description of topic resource.", ValueFromPipeline = true)] @@ -94,13 +115,14 @@ public partial class NewAzEventHubNetworkRuleSet_CreateViaIdentity : global::Sys ReadOnly = false, Description = @"Description of topic resource.", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet) })] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet Parameter { get => this._parameter; set => this._parameter = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet Parameter { get => this._parameter; set => this._parameter = value; } /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -123,24 +145,24 @@ public partial class NewAzEventHubNetworkRuleSet_CreateViaIdentity : global::Sys /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -163,6 +185,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -227,8 +254,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -238,7 +290,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzEventHubNetworkRuleSet_CreateViaIdentity() { @@ -292,7 +344,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -307,11 +359,15 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.NamespacesCreateOrUpdateNetworkRuleSetViaIdentity(InputObject.Id, Parameter, onOk, onDefault, this, Pipeline); + await this.Client.NamespacesCreateOrUpdateNetworkRuleSetViaIdentity(InputObject.Id, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); } else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -320,17 +376,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.NamespacesCreateOrUpdateNetworkRuleSet(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.SubscriptionId ?? null, Parameter, onOk, onDefault, this, Pipeline); + await this.Client.NamespacesCreateOrUpdateNetworkRuleSet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); } await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -368,12 +420,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -390,15 +442,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -408,12 +460,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -425,8 +477,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubPrivateEndpointConnection_CreateExpanded.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubPrivateEndpointConnection_CreateExpanded.cs index 9792495038e8..5744b76e004b 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubPrivateEndpointConnection_CreateExpanded.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubPrivateEndpointConnection_CreateExpanded.cs @@ -6,20 +6,24 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; - /// Creates or updates PrivateEndpointConnections of service namespace. + /// Create PrivateEndpointConnections of service namespace. /// /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzEventHubPrivateEndpointConnection_CreateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection))] - [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Creates or updates PrivateEndpointConnections of service namespace.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Create PrivateEndpointConnections of service namespace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639408.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}", ApiVersion = "2023-01-01-preview")] public partial class NewAzEventHubPrivateEndpointConnection_CreateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,14 +39,29 @@ public partial class NewAzEventHubPrivateEndpointConnection_CreateExpanded : glo /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// Properties of the PrivateEndpointConnection. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.PrivateEndpointConnection(); + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.PrivateEndpointConnection(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -56,6 +75,9 @@ public partial class NewAzEventHubPrivateEndpointConnection_CreateExpanded : glo [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -111,7 +133,7 @@ public partial class NewAzEventHubPrivateEndpointConnection_CreateExpanded : glo /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The ARM identifier for Private Endpoint. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The ARM identifier for Private Endpoint.")] @@ -143,9 +165,9 @@ public partial class NewAzEventHubPrivateEndpointConnection_CreateExpanded : glo ReadOnly = false, Description = @"Status of the connection.", SerializedName = @"status", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PrivateLinkConnectionStatus) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PrivateLinkConnectionStatus))] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PrivateLinkConnectionStatus PrivateLinkServiceConnectionStateStatus { get => _parametersBody.ConnectionState ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PrivateLinkConnectionStatus)""); set => _parametersBody.ConnectionState = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Pending", "Approved", "Rejected", "Disconnected")] + public string PrivateLinkServiceConnectionStateStatus { get => _parametersBody.ConnectionState ?? null; set => _parametersBody.ConnectionState = value; } /// Provisioning state of the Private Endpoint Connection. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Provisioning state of the Private Endpoint Connection.")] @@ -155,9 +177,9 @@ public partial class NewAzEventHubPrivateEndpointConnection_CreateExpanded : glo ReadOnly = false, Description = @"Provisioning state of the Private Endpoint Connection.", SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EndPointProvisioningState) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EndPointProvisioningState))] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EndPointProvisioningState ProvisioningState { get => _parametersBody.ProvisioningState ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EndPointProvisioningState)""); set => _parametersBody.ProvisioningState = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Creating", "Updating", "Deleting", "Succeeded", "Canceled", "Failed")] + public string ProvisioningState { get => _parametersBody.ProvisioningState ?? null; set => _parametersBody.ProvisioningState = value; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -206,7 +228,8 @@ public partial class NewAzEventHubPrivateEndpointConnection_CreateExpanded : glo [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -215,48 +238,48 @@ public partial class NewAzEventHubPrivateEndpointConnection_CreateExpanded : glo /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection /// from the remote call /// /// Determines if the rest of the onAccepted method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnCreated will be called before the regular onCreated has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection /// from the remote call /// /// Determines if the rest of the onCreated method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -279,6 +302,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -343,8 +371,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -354,7 +407,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzEventHubPrivateEndpointConnection_CreateExpanded() { @@ -408,7 +461,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -421,12 +474,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.PrivateEndpointConnectionsCreateOrUpdate(SubscriptionId, ResourceGroupName, NamespaceName, Name, _parametersBody, onOk, onCreated, onAccepted, onDefault, this, Pipeline); + await this.Client.PrivateEndpointConnectionsCreateOrUpdate(SubscriptionId, ResourceGroupName, NamespaceName, Name, _parametersBody, onOk, onCreated, onAccepted, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name,body=_parametersBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -462,12 +515,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 202 (Accepted). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -479,19 +532,37 @@ protected override void StopProcessing() return ; } // onAccepted - response for 202 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } /// a delegate that is called when the remote service returns 201 (Created). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -503,8 +574,26 @@ protected override void StopProcessing() return ; } // onCreated - response for 201 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } @@ -512,12 +601,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -534,15 +623,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, body=_parametersBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, body=_parametersBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -552,12 +641,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -569,8 +658,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubPrivateEndpointConnection_CreateViaIdentity.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubPrivateEndpointConnection_CreateViaIdentity.cs index 62490172b1b5..c3c14606c743 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubPrivateEndpointConnection_CreateViaIdentity.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubPrivateEndpointConnection_CreateViaIdentity.cs @@ -6,20 +6,24 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; - /// Creates or updates PrivateEndpointConnections of service namespace. + /// Create PrivateEndpointConnections of service namespace. /// /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzEventHubPrivateEndpointConnection_CreateViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection))] - [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Creates or updates PrivateEndpointConnections of service namespace.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Create PrivateEndpointConnections of service namespace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639408.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}", ApiVersion = "2023-01-01-preview")] public partial class NewAzEventHubPrivateEndpointConnection_CreateViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +39,26 @@ public partial class NewAzEventHubPrivateEndpointConnection_CreateViaIdentity : /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -53,6 +72,9 @@ public partial class NewAzEventHubPrivateEndpointConnection_CreateViaIdentity : [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -85,7 +107,7 @@ public partial class NewAzEventHubPrivateEndpointConnection_CreateViaIdentity : global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection _parameter; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection _parameter; /// Properties of the PrivateEndpointConnection. [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Properties of the PrivateEndpointConnection.", ValueFromPipeline = true)] @@ -94,13 +116,14 @@ public partial class NewAzEventHubPrivateEndpointConnection_CreateViaIdentity : ReadOnly = false, Description = @"Properties of the PrivateEndpointConnection.", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection) })] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection Parameter { get => this._parameter; set => this._parameter = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection Parameter { get => this._parameter; set => this._parameter = value; } /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -123,48 +146,48 @@ public partial class NewAzEventHubPrivateEndpointConnection_CreateViaIdentity : /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection /// from the remote call /// /// Determines if the rest of the onAccepted method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnCreated will be called before the regular onCreated has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection /// from the remote call /// /// Determines if the rest of the onCreated method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -187,6 +210,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -251,8 +279,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -262,7 +315,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzEventHubPrivateEndpointConnection_CreateViaIdentity() { @@ -316,7 +369,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -331,7 +384,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.PrivateEndpointConnectionsCreateOrUpdateViaIdentity(InputObject.Id, Parameter, onOk, onCreated, onAccepted, onDefault, this, Pipeline); + await this.Client.PrivateEndpointConnectionsCreateOrUpdateViaIdentity(InputObject.Id, Parameter, onOk, onCreated, onAccepted, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); } else { @@ -352,13 +405,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.PrivateEndpointConnectionName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - await this.Client.PrivateEndpointConnectionsCreateOrUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.PrivateEndpointConnectionName ?? null, Parameter, onOk, onCreated, onAccepted, onDefault, this, Pipeline); + await this.Client.PrivateEndpointConnectionsCreateOrUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.PrivateEndpointConnectionName ?? null, Parameter, onOk, onCreated, onAccepted, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); } await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -394,12 +447,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 202 (Accepted). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -411,19 +464,37 @@ protected override void StopProcessing() return ; } // onAccepted - response for 202 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } /// a delegate that is called when the remote service returns 201 (Created). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -435,8 +506,26 @@ protected override void StopProcessing() return ; } // onCreated - response for 201 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } @@ -444,12 +533,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -466,15 +555,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -484,12 +573,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -501,8 +590,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubPrivateEndpointConnection_CreateViaIdentityNamespace.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubPrivateEndpointConnection_CreateViaIdentityNamespace.cs new file mode 100644 index 000000000000..1c22015f6dfc --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubPrivateEndpointConnection_CreateViaIdentityNamespace.cs @@ -0,0 +1,629 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// Create PrivateEndpointConnections of service namespace. + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzEventHubPrivateEndpointConnection_CreateViaIdentityNamespace", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Create PrivateEndpointConnections of service namespace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639408.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}", ApiVersion = "2023-01-01-preview")] + public partial class NewAzEventHubPrivateEndpointConnection_CreateViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The PrivateEndpointConnection name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The PrivateEndpointConnection name")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The PrivateEndpointConnection name", + SerializedName = @"privateEndpointConnectionName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("PrivateEndpointConnectionName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection _parameter; + + /// Properties of the PrivateEndpointConnection. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Properties of the PrivateEndpointConnection.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Properties of the PrivateEndpointConnection.", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection Parameter { get => this._parameter; set => this._parameter = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnAccepted will be called before the regular onAccepted has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection + /// from the remote call + /// /// Determines if the rest of the onAccepted method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnCreated will be called before the regular onCreated has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection + /// from the remote call + /// /// Determines if the rest of the onCreated method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public NewAzEventHubPrivateEndpointConnection_CreateViaIdentityNamespace() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'PrivateEndpointConnectionsCreateOrUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/privateEndpointConnections/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.PrivateEndpointConnectionsCreateOrUpdateViaIdentity(NamespaceInputObject.Id, Parameter, onOk, onCreated, onAccepted, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.PrivateEndpointConnectionsCreateOrUpdate(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, Name, Parameter, onOk, onCreated, onAccepted, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// a delegate that is called when the remote service returns 202 (Accepted). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnAccepted(responseMessage, response, ref _returnNow); + // if overrideOnAccepted has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onAccepted - response for 202 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + + /// a delegate that is called when the remote service returns 201 (Created). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnCreated(responseMessage, response, ref _returnNow); + // if overrideOnCreated has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onCreated - response for 201 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubPrivateEndpointConnection_CreateViaIdentityNamespaceExpanded.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubPrivateEndpointConnection_CreateViaIdentityNamespaceExpanded.cs new file mode 100644 index 000000000000..e63a3ed51f9e --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubPrivateEndpointConnection_CreateViaIdentityNamespaceExpanded.cs @@ -0,0 +1,664 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// Create PrivateEndpointConnections of service namespace. + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzEventHubPrivateEndpointConnection_CreateViaIdentityNamespaceExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Create PrivateEndpointConnections of service namespace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639408.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}", ApiVersion = "2023-01-01-preview")] + public partial class NewAzEventHubPrivateEndpointConnection_CreateViaIdentityNamespaceExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// Properties of the PrivateEndpointConnection. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.PrivateEndpointConnection(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The PrivateEndpointConnection name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The PrivateEndpointConnection name")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The PrivateEndpointConnection name", + SerializedName = @"privateEndpointConnectionName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("PrivateEndpointConnectionName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// The ARM identifier for Private Endpoint. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The ARM identifier for Private Endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ARM identifier for Private Endpoint.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + public string PrivateEndpointId { get => _parametersBody.PrivateEndpointId ?? null; set => _parametersBody.PrivateEndpointId = value; } + + /// Description of the connection state. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Description of the connection state.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Description of the connection state.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + public string PrivateLinkServiceConnectionStateDescription { get => _parametersBody.Description ?? null; set => _parametersBody.Description = value; } + + /// Status of the connection. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Status of the connection.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Status of the connection.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Pending", "Approved", "Rejected", "Disconnected")] + public string PrivateLinkServiceConnectionStateStatus { get => _parametersBody.ConnectionState ?? null; set => _parametersBody.ConnectionState = value; } + + /// Provisioning state of the Private Endpoint Connection. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Provisioning state of the Private Endpoint Connection.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Provisioning state of the Private Endpoint Connection.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Creating", "Updating", "Deleting", "Succeeded", "Canceled", "Failed")] + public string ProvisioningState { get => _parametersBody.ProvisioningState ?? null; set => _parametersBody.ProvisioningState = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnAccepted will be called before the regular onAccepted has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection + /// from the remote call + /// /// Determines if the rest of the onAccepted method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnCreated will be called before the regular onCreated has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection + /// from the remote call + /// /// Determines if the rest of the onCreated method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzEventHubPrivateEndpointConnection_CreateViaIdentityNamespaceExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'PrivateEndpointConnectionsCreateOrUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/privateEndpointConnections/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.PrivateEndpointConnectionsCreateOrUpdateViaIdentity(NamespaceInputObject.Id, _parametersBody, onOk, onCreated, onAccepted, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.PrivateEndpointConnectionsCreateOrUpdate(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, Name, _parametersBody, onOk, onCreated, onAccepted, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// a delegate that is called when the remote service returns 202 (Accepted). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnAccepted(responseMessage, response, ref _returnNow); + // if overrideOnAccepted has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onAccepted - response for 202 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + + /// a delegate that is called when the remote service returns 201 (Created). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnCreated(responseMessage, response, ref _returnNow); + // if overrideOnCreated has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onCreated - response for 201 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubSchemaGroup_CreateExpanded.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubSchemaGroup_CreateExpanded.cs index 1ab0d917c18f..7adfac5473b2 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubSchemaGroup_CreateExpanded.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubSchemaGroup_CreateExpanded.cs @@ -6,19 +6,22 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; - /// Creates or Updates an EventHub schema group. + /// Create an EventHub schema group. /// /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/schemagroups/{schemaGroupName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzEventHubSchemaGroup_CreateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup))] - [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Creates or Updates an EventHub schema group.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Create an EventHub schema group.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/schemagroups/{schemaGroupName}", ApiVersion = "2023-01-01-preview")] public partial class NewAzEventHubSchemaGroup_CreateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,14 +37,29 @@ public partial class NewAzEventHubSchemaGroup_CreateExpanded : global::System.Ma /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// Single item in List or Get Schema Group operation - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.SchemaGroup(); + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SchemaGroup(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -55,6 +73,9 @@ public partial class NewAzEventHubSchemaGroup_CreateExpanded : global::System.Ma [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// dictionary object for SchemaGroup group properties [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ExportAs(typeof(global::System.Collections.Hashtable))] [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "dictionary object for SchemaGroup group properties")] @@ -64,8 +85,8 @@ public partial class NewAzEventHubSchemaGroup_CreateExpanded : global::System.Ma ReadOnly = false, Description = @"dictionary object for SchemaGroup group properties", SerializedName = @"groupProperties", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties) })] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroupProperties GroupProperty { get => _parametersBody.GroupProperty ?? null /* object */; set => _parametersBody.GroupProperty = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties) })] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties GroupProperty { get => _parametersBody.GroupProperty ?? null /* object */; set => _parametersBody.GroupProperty = value; } /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] @@ -122,7 +143,7 @@ public partial class NewAzEventHubSchemaGroup_CreateExpanded : global::System.Ma /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -162,10 +183,9 @@ public partial class NewAzEventHubSchemaGroup_CreateExpanded : global::System.Ma ReadOnly = false, Description = @".", SerializedName = @"schemaCompatibility", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaCompatibility) })] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ParameterBreakingChange("SchemaCompatibility", "12.0.0", "5.0.0", "2024/05/21", OldParamaterType="SchemaCompatibility", NewParameterType="String")] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaCompatibility))] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaCompatibility SchemaCompatibility { get => _parametersBody.SchemaCompatibility ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaCompatibility)""); set => _parametersBody.SchemaCompatibility = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("None", "Backward", "Forward")] + public string SchemaCompatibility { get => _parametersBody.SchemaCompatibility ?? null; set => _parametersBody.SchemaCompatibility = value; } /// . [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")] @@ -175,10 +195,9 @@ public partial class NewAzEventHubSchemaGroup_CreateExpanded : global::System.Ma ReadOnly = false, Description = @".", SerializedName = @"schemaType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaType) })] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ParameterBreakingChange("SchemaType", "12.0.0", "5.0.0", "2024/05/21", OldParamaterType="SchemaType", NewParameterType="String")] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaType))] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaType SchemaType { get => _parametersBody.SchemaType ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaType)""); set => _parametersBody.SchemaType = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Unknown", "Avro")] + public string SchemaType { get => _parametersBody.SchemaType ?? null; set => _parametersBody.SchemaType = value; } /// Backing field for property. private string _subscriptionId; @@ -197,7 +216,8 @@ public partial class NewAzEventHubSchemaGroup_CreateExpanded : global::System.Ma [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -206,24 +226,24 @@ public partial class NewAzEventHubSchemaGroup_CreateExpanded : global::System.Ma /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -246,6 +266,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -310,8 +335,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -321,7 +371,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzEventHubSchemaGroup_CreateExpanded() { @@ -375,7 +425,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -388,12 +438,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.SchemaRegistryCreateOrUpdate(ResourceGroupName, NamespaceName, Name, SubscriptionId, _parametersBody, onOk, onDefault, this, Pipeline); + await this.Client.SchemaRegistryCreateOrUpdate(SubscriptionId, ResourceGroupName, NamespaceName, Name, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name,SubscriptionId=SubscriptionId,body=_parametersBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -431,12 +481,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -453,15 +503,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId, body=_parametersBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId, body=_parametersBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -471,12 +521,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -488,8 +538,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubSchemaGroup_CreateViaIdentity.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubSchemaGroup_CreateViaIdentity.cs index 69e0a092a44d..494156fb15e3 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubSchemaGroup_CreateViaIdentity.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubSchemaGroup_CreateViaIdentity.cs @@ -6,20 +6,23 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; - /// Creates or Updates an EventHub schema group. + /// Create an EventHub schema group. /// /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/schemagroups/{schemaGroupName}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzEventHubSchemaGroup_CreateViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup))] - [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Creates or Updates an EventHub schema group.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Create an EventHub schema group.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/schemagroups/{schemaGroupName}", ApiVersion = "2023-01-01-preview")] public partial class NewAzEventHubSchemaGroup_CreateViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +38,26 @@ public partial class NewAzEventHubSchemaGroup_CreateViaIdentity : global::System /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -53,6 +71,9 @@ public partial class NewAzEventHubSchemaGroup_CreateViaIdentity : global::System [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -85,7 +106,7 @@ public partial class NewAzEventHubSchemaGroup_CreateViaIdentity : global::System global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup _parameter; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup _parameter; /// Single item in List or Get Schema Group operation [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Single item in List or Get Schema Group operation", ValueFromPipeline = true)] @@ -94,13 +115,14 @@ public partial class NewAzEventHubSchemaGroup_CreateViaIdentity : global::System ReadOnly = false, Description = @"Single item in List or Get Schema Group operation", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup) })] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup Parameter { get => this._parameter; set => this._parameter = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup Parameter { get => this._parameter; set => this._parameter = value; } /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -123,24 +145,24 @@ public partial class NewAzEventHubSchemaGroup_CreateViaIdentity : global::System /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -163,6 +185,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -227,8 +254,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -238,7 +290,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzEventHubSchemaGroup_CreateViaIdentity() { @@ -292,7 +344,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -307,11 +359,15 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.SchemaRegistryCreateOrUpdateViaIdentity(InputObject.Id, Parameter, onOk, onDefault, this, Pipeline); + await this.Client.SchemaRegistryCreateOrUpdateViaIdentity(InputObject.Id, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); } else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -324,17 +380,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SchemaGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.SchemaRegistryCreateOrUpdate(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.SchemaGroupName ?? null, InputObject.SubscriptionId ?? null, Parameter, onOk, onDefault, this, Pipeline); + await this.Client.SchemaRegistryCreateOrUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.SchemaGroupName ?? null, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); } await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -372,12 +424,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -394,15 +446,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -412,12 +464,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -429,8 +481,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubSchemaGroup_CreateViaIdentityNamespace.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubSchemaGroup_CreateViaIdentityNamespace.cs new file mode 100644 index 000000000000..f8a3fb76a777 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubSchemaGroup_CreateViaIdentityNamespace.cs @@ -0,0 +1,518 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// Create an EventHub schema group. + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/schemagroups/{schemaGroupName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzEventHubSchemaGroup_CreateViaIdentityNamespace", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Create an EventHub schema group.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/schemagroups/{schemaGroupName}", ApiVersion = "2023-01-01-preview")] + public partial class NewAzEventHubSchemaGroup_CreateViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The Schema Group name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Schema Group name ")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Schema Group name ", + SerializedName = @"schemaGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("SchemaGroupName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup _parameter; + + /// Single item in List or Get Schema Group operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Single item in List or Get Schema Group operation", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Single item in List or Get Schema Group operation", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup Parameter { get => this._parameter; set => this._parameter = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzEventHubSchemaGroup_CreateViaIdentityNamespace() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'SchemaRegistryCreateOrUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/schemagroups/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.SchemaRegistryCreateOrUpdateViaIdentity(NamespaceInputObject.Id, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.SchemaRegistryCreateOrUpdate(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, Name, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubSchemaGroup_CreateViaIdentityNamespaceExpanded.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubSchemaGroup_CreateViaIdentityNamespaceExpanded.cs new file mode 100644 index 000000000000..c6c9ff4c1a06 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHubSchemaGroup_CreateViaIdentityNamespaceExpanded.cs @@ -0,0 +1,543 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// Create an EventHub schema group. + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/schemagroups/{schemaGroupName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzEventHubSchemaGroup_CreateViaIdentityNamespaceExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Create an EventHub schema group.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/schemagroups/{schemaGroupName}", ApiVersion = "2023-01-01-preview")] + public partial class NewAzEventHubSchemaGroup_CreateViaIdentityNamespaceExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// Single item in List or Get Schema Group operation + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.SchemaGroup(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// dictionary object for SchemaGroup group properties + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "dictionary object for SchemaGroup group properties")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"dictionary object for SchemaGroup group properties", + SerializedName = @"groupProperties", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties) })] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroupProperties GroupProperty { get => _parametersBody.GroupProperty ?? null /* object */; set => _parametersBody.GroupProperty = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The Schema Group name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Schema Group name ")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Schema Group name ", + SerializedName = @"schemaGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("SchemaGroupName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// . + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @".", + SerializedName = @"schemaCompatibility", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("None", "Backward", "Forward")] + public string SchemaCompatibility { get => _parametersBody.SchemaCompatibility ?? null; set => _parametersBody.SchemaCompatibility = value; } + + /// . + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @".", + SerializedName = @"schemaType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Unknown", "Avro")] + public string SchemaType { get => _parametersBody.SchemaType ?? null; set => _parametersBody.SchemaType = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzEventHubSchemaGroup_CreateViaIdentityNamespaceExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'SchemaRegistryCreateOrUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/schemagroups/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.SchemaRegistryCreateOrUpdateViaIdentity(NamespaceInputObject.Id, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.SchemaRegistryCreateOrUpdate(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, Name, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHub_CreateExpanded.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHub_CreateExpanded.cs index d5802c067aad..ae3d036f9db8 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHub_CreateExpanded.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHub_CreateExpanded.cs @@ -6,19 +6,22 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; - /// Creates or updates a new Event Hub as a nested resource within a Namespace. + /// Create a new Event Hub as a nested resource within a Namespace. /// /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzEventHub_CreateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub))] - [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Creates or updates a new Event Hub as a nested resource within a Namespace.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Create a new Event Hub as a nested resource within a Namespace.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}", ApiVersion = "2023-01-01-preview")] public partial class NewAzEventHub_CreateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,8 +37,20 @@ public partial class NewAzEventHub_CreateExpanded : global::System.Management.Au /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// Single item in List or Get Event Hub operation - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.Eventhub(); + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Eventhub(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; /// /// Blob naming convention for archive, e.g. {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}. @@ -67,6 +82,9 @@ public partial class NewAzEventHub_CreateExpanded : global::System.Management.Au [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// A value that indicates whether capture description is enabled. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A value that indicates whether capture description is enabled. ")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] @@ -86,10 +104,9 @@ public partial class NewAzEventHub_CreateExpanded : global::System.Management.Au ReadOnly = false, Description = @"Enumerates the possible values for cleanup policy", SerializedName = @"cleanupPolicy", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CleanupPolicyRetentionDescription) })] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ParameterBreakingChange("CleanupPolicy", "12.0.0", "5.0.0", "2024/05/21", OldParamaterType="CleanupPolicyRetentionDescription", NewParameterType="String")] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CleanupPolicyRetentionDescription))] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CleanupPolicyRetentionDescription CleanupPolicy { get => _parametersBody.CleanupPolicy ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CleanupPolicyRetentionDescription)""); set => _parametersBody.CleanupPolicy = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Delete", "Compact")] + public string CleanupPolicy { get => _parametersBody.CleanupPolicy ?? null; set => _parametersBody.CleanupPolicy = value; } /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -162,10 +179,12 @@ public partial class NewAzEventHub_CreateExpanded : global::System.Management.Au ReadOnly = false, Description = @"Enumerates the possible values for the encoding format of capture description. Note: 'AvroDeflate' will be deprecated in New API Version", SerializedName = @"encoding", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription) })] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ParameterBreakingChange("Encoding", "12.0.0", "5.0.0", "2024/05/21", OldParamaterType="EncodingCaptureDescription", NewParameterType="String")] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription))] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription Encoding { get => _parametersBody.Encoding ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription)""); set => _parametersBody.Encoding = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Avro", "AvroDeflate")] + public string Encoding { get => _parametersBody.Encoding ?? null; set => _parametersBody.Encoding = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] @@ -187,10 +206,9 @@ public partial class NewAzEventHub_CreateExpanded : global::System.Management.Au ReadOnly = false, Description = @"Type of Azure Active Directory Managed Identity.", SerializedName = @"type", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType) })] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ParameterBreakingChange("IdentityType", "12.0.0", "5.0.0", "2024/05/21", OldParamaterType="CaptureIdentityType", NewParameterType="String")] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType))] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType IdentityType { get => _parametersBody.IdentityType ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType)""); set => _parametersBody.IdentityType = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("SystemAssigned", "UserAssigned")] + public string IdentityType { get => _parametersBody.IdentityType ?? null; set => _parametersBody.IdentityType = value; } /// /// The time window allows you to set the frequency with which the capture to Azure Blobs will happen, value should between @@ -276,7 +294,7 @@ public partial class NewAzEventHub_CreateExpanded : global::System.Management.Au /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -355,10 +373,9 @@ public partial class NewAzEventHub_CreateExpanded : global::System.Management.Au ReadOnly = false, Description = @"Enumerates the possible values for the status of the Event Hub.", SerializedName = @"status", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus) })] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.ParameterBreakingChange("Status", "12.0.0", "5.0.0", "2024/05/21", OldParamaterType="EntityStatus", NewParameterType="String")] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus))] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus Status { get => _parametersBody.Status ?? ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus)""); set => _parametersBody.Status = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Active", "Disabled", "Restoring", "SendDisabled", "ReceiveDisabled", "Creating", "Deleting", "Renaming", "Unknown")] + public string Status { get => _parametersBody.Status ?? null; set => _parametersBody.Status = value; } /// Resource id of the storage account to be used to create the blobs [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource id of the storage account to be used to create the blobs")] @@ -388,7 +405,8 @@ public partial class NewAzEventHub_CreateExpanded : global::System.Management.Au [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -427,24 +445,24 @@ public partial class NewAzEventHub_CreateExpanded : global::System.Management.Au /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -467,6 +485,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -531,8 +554,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -542,7 +590,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzEventHub_CreateExpanded() { @@ -596,7 +644,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -606,15 +654,31 @@ protected override void ProcessRecord() Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); } // get the client instance + if (true == this.MyInvocation?.BoundParameters?.ContainsKey("MessageRetentionInDay")) + { + MessageRetentionInDay = (long)this.MyInvocation.BoundParameters["MessageRetentionInDay"]; + } + if (true == this.MyInvocation?.BoundParameters?.ContainsKey("DataLakeSubscriptionId")) + { + DataLakeSubscriptionId = (string)this.MyInvocation.BoundParameters["DataLakeSubscriptionId"]; + } + if (true == this.MyInvocation?.BoundParameters?.ContainsKey("DataLakeAccountName")) + { + DataLakeAccountName = (string)this.MyInvocation.BoundParameters["DataLakeAccountName"]; + } + if (true == this.MyInvocation?.BoundParameters?.ContainsKey("DataLakeFolderPath")) + { + DataLakeFolderPath = (string)this.MyInvocation.BoundParameters["DataLakeFolderPath"]; + } try { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.EventHubsCreateOrUpdate(ResourceGroupName, NamespaceName, Name, SubscriptionId, _parametersBody, onOk, onDefault, this, Pipeline); + await this.Client.EventHubsCreateOrUpdate(SubscriptionId, ResourceGroupName, NamespaceName, Name, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name,SubscriptionId=SubscriptionId,body=_parametersBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -652,12 +716,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -674,15 +738,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId, body=_parametersBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId, body=_parametersBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -692,12 +756,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -709,8 +773,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHub_CreateViaIdentity.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHub_CreateViaIdentity.cs index 74638835532b..e60ba3768cd6 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHub_CreateViaIdentity.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHub_CreateViaIdentity.cs @@ -6,20 +6,23 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; - /// Creates or updates a new Event Hub as a nested resource within a Namespace. + /// Create a new Event Hub as a nested resource within a Namespace. /// /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzEventHub_CreateViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub))] - [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Creates or updates a new Event Hub as a nested resource within a Namespace.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Create a new Event Hub as a nested resource within a Namespace.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}", ApiVersion = "2023-01-01-preview")] public partial class NewAzEventHub_CreateViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +38,26 @@ public partial class NewAzEventHub_CreateViaIdentity : global::System.Management /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -53,6 +71,9 @@ public partial class NewAzEventHub_CreateViaIdentity : global::System.Management [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -85,7 +106,7 @@ public partial class NewAzEventHub_CreateViaIdentity : global::System.Management global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub _parameter; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub _parameter; /// Single item in List or Get Event Hub operation [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Single item in List or Get Event Hub operation", ValueFromPipeline = true)] @@ -94,13 +115,14 @@ public partial class NewAzEventHub_CreateViaIdentity : global::System.Management ReadOnly = false, Description = @"Single item in List or Get Event Hub operation", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub) })] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub Parameter { get => this._parameter; set => this._parameter = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub Parameter { get => this._parameter; set => this._parameter = value; } /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -123,24 +145,24 @@ public partial class NewAzEventHub_CreateViaIdentity : global::System.Management /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -163,6 +185,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -227,8 +254,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -238,7 +290,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzEventHub_CreateViaIdentity() { @@ -292,7 +344,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -307,11 +359,15 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.EventHubsCreateOrUpdateViaIdentity(InputObject.Id, Parameter, onOk, onDefault, this, Pipeline); + await this.Client.EventHubsCreateOrUpdateViaIdentity(InputObject.Id, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); } else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -324,17 +380,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.EventHubName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.EventHubsCreateOrUpdate(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.EventHubName ?? null, InputObject.SubscriptionId ?? null, Parameter, onOk, onDefault, this, Pipeline); + await this.Client.EventHubsCreateOrUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.EventHubName ?? null, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); } await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -372,12 +424,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -394,15 +446,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -412,12 +464,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -429,8 +481,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHub_CreateViaIdentityNamespace.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHub_CreateViaIdentityNamespace.cs new file mode 100644 index 000000000000..b0940686b589 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHub_CreateViaIdentityNamespace.cs @@ -0,0 +1,518 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// Create a new Event Hub as a nested resource within a Namespace. + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzEventHub_CreateViaIdentityNamespace", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Create a new Event Hub as a nested resource within a Namespace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}", ApiVersion = "2023-01-01-preview")] + public partial class NewAzEventHub_CreateViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The Event Hub name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Event Hub name")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Event Hub name", + SerializedName = @"eventHubName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("EventHubName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub _parameter; + + /// Single item in List or Get Event Hub operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Single item in List or Get Event Hub operation", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Single item in List or Get Event Hub operation", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub Parameter { get => this._parameter; set => this._parameter = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzEventHub_CreateViaIdentityNamespace() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'EventHubsCreateOrUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/eventhubs/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.EventHubsCreateOrUpdateViaIdentity(NamespaceInputObject.Id, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.EventHubsCreateOrUpdate(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, Name, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHub_CreateViaIdentityNamespaceExpanded.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHub_CreateViaIdentityNamespaceExpanded.cs new file mode 100644 index 000000000000..2221e6a67336 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/NewAzEventHub_CreateViaIdentityNamespaceExpanded.cs @@ -0,0 +1,778 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// Create a new Event Hub as a nested resource within a Namespace. + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzEventHub_CreateViaIdentityNamespaceExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Create a new Event Hub as a nested resource within a Namespace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}", ApiVersion = "2023-01-01-preview")] + public partial class NewAzEventHub_CreateViaIdentityNamespaceExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// Single item in List or Get Event Hub operation + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Eventhub(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// + /// Blob naming convention for archive, e.g. {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}. + /// Here all the parameters (Namespace,EventHub .. etc) are mandatory irrespective of order + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Blob naming convention for archive, e.g. {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}. Here all the parameters (Namespace,EventHub .. etc) are mandatory irrespective of order")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Blob naming convention for archive, e.g. {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}. Here all the parameters (Namespace,EventHub .. etc) are mandatory irrespective of order", + SerializedName = @"archiveNameFormat", + PossibleTypes = new [] { typeof(string) })] + public string ArchiveNameFormat { get => _parametersBody.ArchiveNameFormat ?? null; set => _parametersBody.ArchiveNameFormat = value; } + + /// Blob container Name + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Blob container Name")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Blob container Name", + SerializedName = @"blobContainer", + PossibleTypes = new [] { typeof(string) })] + public string BlobContainer { get => _parametersBody.BlobContainer ?? null; set => _parametersBody.BlobContainer = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// A value that indicates whether capture description is enabled. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A value that indicates whether capture description is enabled. ")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A value that indicates whether capture description is enabled. ", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter CaptureEnabled { get => _parametersBody.CaptureEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _parametersBody.CaptureEnabled = value; } + + /// Enumerates the possible values for cleanup policy + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Enumerates the possible values for cleanup policy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enumerates the possible values for cleanup policy", + SerializedName = @"cleanupPolicy", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Delete", "Compact")] + public string CleanupPolicy { get => _parametersBody.CleanupPolicy ?? null; set => _parametersBody.CleanupPolicy = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// The Azure Data Lake Store name for the captured events + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The Azure Data Lake Store name for the captured events")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Azure Data Lake Store name for the captured events", + SerializedName = @"dataLakeAccountName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotExport] + public string DataLakeAccountName { get => _parametersBody.DataLakeAccountName ?? null; set => _parametersBody.DataLakeAccountName = value; } + + /// The destination folder path for the captured events + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The destination folder path for the captured events")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The destination folder path for the captured events", + SerializedName = @"dataLakeFolderPath", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotExport] + public string DataLakeFolderPath { get => _parametersBody.DataLakeFolderPath ?? null; set => _parametersBody.DataLakeFolderPath = value; } + + /// Subscription Id of Azure Data Lake Store + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Subscription Id of Azure Data Lake Store")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Subscription Id of Azure Data Lake Store", + SerializedName = @"dataLakeSubscriptionId", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotExport] + public string DataLakeSubscriptionId { get => _parametersBody.DataLakeSubscriptionId ?? null; set => _parametersBody.DataLakeSubscriptionId = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Name for capture destination + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Name for capture destination")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name for capture destination", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + public string DestinationName { get => _parametersBody.DestinationName ?? null; set => _parametersBody.DestinationName = value; } + + /// + /// Enumerates the possible values for the encoding format of capture description. Note: 'AvroDeflate' will be deprecated + /// in New API Version + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Enumerates the possible values for the encoding format of capture description. Note: 'AvroDeflate' will be deprecated in New API Version")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enumerates the possible values for the encoding format of capture description. Note: 'AvroDeflate' will be deprecated in New API Version", + SerializedName = @"encoding", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Avro", "AvroDeflate")] + public string Encoding { get => _parametersBody.Encoding ?? null; set => _parametersBody.Encoding = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Type of Azure Active Directory Managed Identity. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Type of Azure Active Directory Managed Identity.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of Azure Active Directory Managed Identity.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("SystemAssigned", "UserAssigned")] + public string IdentityType { get => _parametersBody.IdentityType ?? null; set => _parametersBody.IdentityType = value; } + + /// + /// The time window allows you to set the frequency with which the capture to Azure Blobs will happen, value should between + /// 60 to 900 seconds + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The time window allows you to set the frequency with which the capture to Azure Blobs will happen, value should between 60 to 900 seconds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The time window allows you to set the frequency with which the capture to Azure Blobs will happen, value should between 60 to 900 seconds", + SerializedName = @"intervalInSeconds", + PossibleTypes = new [] { typeof(int) })] + public int IntervalInSeconds { get => _parametersBody.IntervalInSeconds ?? default(int); set => _parametersBody.IntervalInSeconds = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// Number of days to retain the events for this Event Hub, value should be 1 to 7 days + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Number of days to retain the events for this Event Hub, value should be 1 to 7 days")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Number of days to retain the events for this Event Hub, value should be 1 to 7 days", + SerializedName = @"messageRetentionInDays", + PossibleTypes = new [] { typeof(long) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotExport] + public long MessageRetentionInDay { get => _parametersBody.MessageRetentionInDay ?? default(long); set => _parametersBody.MessageRetentionInDay = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The Event Hub name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Event Hub name")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Event Hub name", + SerializedName = @"eventHubName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("EventHubName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// Number of partitions created for the Event Hub, allowed values are from 1 to 32 partitions. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Number of partitions created for the Event Hub, allowed values are from 1 to 32 partitions.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Number of partitions created for the Event Hub, allowed values are from 1 to 32 partitions.", + SerializedName = @"partitionCount", + PossibleTypes = new [] { typeof(long) })] + public long PartitionCount { get => _parametersBody.PartitionCount ?? default(long); set => _parametersBody.PartitionCount = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// Number of hours to retain the events for this Event Hub. This value is only used when cleanupPolicy is Delete. If cleanupPolicy + /// is Compact the returned value of this property is Long.MaxValue + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Number of hours to retain the events for this Event Hub. This value is only used when cleanupPolicy is Delete. If cleanupPolicy is Compact the returned value of this property is Long.MaxValue ")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Number of hours to retain the events for this Event Hub. This value is only used when cleanupPolicy is Delete. If cleanupPolicy is Compact the returned value of this property is Long.MaxValue ", + SerializedName = @"retentionTimeInHours", + PossibleTypes = new [] { typeof(long) })] + public long RetentionTimeInHour { get => _parametersBody.RetentionTimeInHour ?? default(long); set => _parametersBody.RetentionTimeInHour = value; } + + /// + /// The size window defines the amount of data built up in your Event Hub before an capture operation, value should be between + /// 10485760 to 524288000 bytes + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The size window defines the amount of data built up in your Event Hub before an capture operation, value should be between 10485760 to 524288000 bytes")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The size window defines the amount of data built up in your Event Hub before an capture operation, value should be between 10485760 to 524288000 bytes", + SerializedName = @"sizeLimitInBytes", + PossibleTypes = new [] { typeof(int) })] + public int SizeLimitInBytes { get => _parametersBody.SizeLimitInBytes ?? default(int); set => _parametersBody.SizeLimitInBytes = value; } + + /// A value that indicates whether to Skip Empty Archives + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A value that indicates whether to Skip Empty Archives")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A value that indicates whether to Skip Empty Archives", + SerializedName = @"skipEmptyArchives", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter SkipEmptyArchive { get => _parametersBody.SkipEmptyArchive ?? default(global::System.Management.Automation.SwitchParameter); set => _parametersBody.SkipEmptyArchive = value; } + + /// Enumerates the possible values for the status of the Event Hub. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Enumerates the possible values for the status of the Event Hub.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enumerates the possible values for the status of the Event Hub.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Active", "Disabled", "Restoring", "SendDisabled", "ReceiveDisabled", "Creating", "Deleting", "Renaming", "Unknown")] + public string Status { get => _parametersBody.Status ?? null; set => _parametersBody.Status = value; } + + /// Resource id of the storage account to be used to create the blobs + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource id of the storage account to be used to create the blobs")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource id of the storage account to be used to create the blobs", + SerializedName = @"storageAccountResourceId", + PossibleTypes = new [] { typeof(string) })] + public string StorageAccountResourceId { get => _parametersBody.StorageAccountResourceId ?? null; set => _parametersBody.StorageAccountResourceId = value; } + + /// + /// Number of hours to retain the tombstone markers of a compacted Event Hub. This value is only used when cleanupPolicy is + /// Compact. Consumer must complete reading the tombstone marker within this specified amount of time if consumer begins from + /// starting offset to ensure they get a valid snapshot for the specific key described by the tombstone marker within the + /// compacted Event Hub + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Number of hours to retain the tombstone markers of a compacted Event Hub. This value is only used when cleanupPolicy is Compact. Consumer must complete reading the tombstone marker within this specified amount of time if consumer begins from starting offset to ensure they get a valid snapshot for the specific key described by the tombstone marker within the compacted Event Hub")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Number of hours to retain the tombstone markers of a compacted Event Hub. This value is only used when cleanupPolicy is Compact. Consumer must complete reading the tombstone marker within this specified amount of time if consumer begins from starting offset to ensure they get a valid snapshot for the specific key described by the tombstone marker within the compacted Event Hub", + SerializedName = @"tombstoneRetentionTimeInHours", + PossibleTypes = new [] { typeof(int) })] + public int TombstoneRetentionTimeInHour { get => _parametersBody.TombstoneRetentionTimeInHour ?? default(int); set => _parametersBody.TombstoneRetentionTimeInHour = value; } + + /// + /// ARM ID of Managed User Identity. This property is required is the type is UserAssignedIdentity. If type is SystemAssigned, + /// then the System Assigned Identity Associated with the namespace will be used. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "ARM ID of Managed User Identity. This property is required is the type is UserAssignedIdentity. If type is SystemAssigned, then the System Assigned Identity Associated with the namespace will be used.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ARM ID of Managed User Identity. This property is required is the type is UserAssignedIdentity. If type is SystemAssigned, then the System Assigned Identity Associated with the namespace will be used.", + SerializedName = @"userAssignedIdentity", + PossibleTypes = new [] { typeof(string) })] + public string UserAssignedIdentityId { get => _parametersBody.UserAssignedIdentityId ?? null; set => _parametersBody.UserAssignedIdentityId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzEventHub_CreateViaIdentityNamespaceExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'EventHubsCreateOrUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + if (true == this.MyInvocation?.BoundParameters?.ContainsKey("MessageRetentionInDay")) + { + MessageRetentionInDay = (long)this.MyInvocation.BoundParameters["MessageRetentionInDay"]; + } + if (true == this.MyInvocation?.BoundParameters?.ContainsKey("DataLakeSubscriptionId")) + { + DataLakeSubscriptionId = (string)this.MyInvocation.BoundParameters["DataLakeSubscriptionId"]; + } + if (true == this.MyInvocation?.BoundParameters?.ContainsKey("DataLakeAccountName")) + { + DataLakeAccountName = (string)this.MyInvocation.BoundParameters["DataLakeAccountName"]; + } + if (true == this.MyInvocation?.BoundParameters?.ContainsKey("DataLakeFolderPath")) + { + DataLakeFolderPath = (string)this.MyInvocation.BoundParameters["DataLakeFolderPath"]; + } + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/eventhubs/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.EventHubsCreateOrUpdateViaIdentity(NamespaceInputObject.Id, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.EventHubsCreateOrUpdate(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, Name, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubApplicationGroup_Delete.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubApplicationGroup_Delete.cs index 1925864d57a0..ccf8afb23859 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubApplicationGroup_Delete.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubApplicationGroup_Delete.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Deletes an ApplicationGroup for a Namespace. @@ -18,7 +20,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/applicationGroups/{applicationGroupName}", ApiVersion = "2023-01-01-preview")] public partial class RemoveAzEventHubApplicationGroup_Delete : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class RemoveAzEventHubApplicationGroup_Delete : global::System.Ma /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class RemoveAzEventHubApplicationGroup_Delete : global::System.Ma [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -114,7 +135,7 @@ public partial class RemoveAzEventHubApplicationGroup_Delete : global::System.Ma /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -163,7 +184,8 @@ public partial class RemoveAzEventHubApplicationGroup_Delete : global::System.Ma [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -172,12 +194,12 @@ public partial class RemoveAzEventHubApplicationGroup_Delete : global::System.Ma /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -220,6 +242,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -284,8 +311,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -341,7 +393,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -354,12 +406,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.ApplicationGroupDelete(ResourceGroupName, NamespaceName, Name, SubscriptionId, onOk, onNoContent, onDefault, this, Pipeline); + await this.Client.ApplicationGroupDelete(SubscriptionId, ResourceGroupName, NamespaceName, Name, onOk, onNoContent, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -372,7 +424,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzEventHubApplicationGroup_Delete() { @@ -405,12 +457,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -427,15 +479,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubApplicationGroup_DeleteViaIdentity.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubApplicationGroup_DeleteViaIdentity.cs index 37e19721c027..f578f06cdcf1 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubApplicationGroup_DeleteViaIdentity.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubApplicationGroup_DeleteViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Deletes an ApplicationGroup for a Namespace. @@ -18,7 +20,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/applicationGroups/{applicationGroupName}", ApiVersion = "2023-01-01-preview")] public partial class RemoveAzEventHubApplicationGroup_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class RemoveAzEventHubApplicationGroup_DeleteViaIdentity : global /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class RemoveAzEventHubApplicationGroup_DeleteViaIdentity : global [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -93,7 +114,7 @@ public partial class RemoveAzEventHubApplicationGroup_DeleteViaIdentity : global /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -116,12 +137,12 @@ public partial class RemoveAzEventHubApplicationGroup_DeleteViaIdentity : global /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -164,6 +185,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -228,8 +254,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -285,7 +336,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -305,6 +356,10 @@ protected override void ProcessRecord() else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -317,17 +372,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ApplicationGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.ApplicationGroupDelete(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.ApplicationGroupName ?? null, InputObject.SubscriptionId ?? null, onOk, onNoContent, onDefault, this, Pipeline); + await this.Client.ApplicationGroupDelete(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.ApplicationGroupName ?? null, onOk, onNoContent, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -340,7 +391,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzEventHubApplicationGroup_DeleteViaIdentity() { @@ -373,12 +424,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -395,7 +446,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubApplicationGroup_DeleteViaIdentityNamespace.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubApplicationGroup_DeleteViaIdentityNamespace.cs new file mode 100644 index 000000000000..f24f35311962 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubApplicationGroup_DeleteViaIdentityNamespace.cs @@ -0,0 +1,525 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// Deletes an ApplicationGroup for a Namespace. + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/applicationGroups/{applicationGroupName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzEventHubApplicationGroup_DeleteViaIdentityNamespace", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Deletes an ApplicationGroup for a Namespace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/applicationGroups/{applicationGroupName}", ApiVersion = "2023-01-01-preview")] + public partial class RemoveAzEventHubApplicationGroup_DeleteViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The Application Group name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Application Group name ")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Application Group name ", + SerializedName = @"applicationGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ApplicationGroupName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ApplicationGroupDelete' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/applicationGroups/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.ApplicationGroupDeleteViaIdentity(NamespaceInputObject.Id, onOk, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.ApplicationGroupDelete(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, Name, onOk, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzEventHubApplicationGroup_DeleteViaIdentityNamespace() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubAuthorizationRule_Delete.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubAuthorizationRule_Delete.cs index 087f467efe66..c75a9455ad12 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubAuthorizationRule_Delete.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubAuthorizationRule_Delete.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Deletes an Event Hub AuthorizationRule. @@ -19,7 +21,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}", ApiVersion = "2023-01-01-preview")] public partial class RemoveAzEventHubAuthorizationRule_Delete : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +38,26 @@ public partial class RemoveAzEventHubAuthorizationRule_Delete : global::System.M /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -67,6 +85,9 @@ public partial class RemoveAzEventHubAuthorizationRule_Delete : global::System.M [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string EventHubName { get => this._eventHubName; set => this._eventHubName = value; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -128,7 +149,7 @@ public partial class RemoveAzEventHubAuthorizationRule_Delete : global::System.M /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -177,7 +198,8 @@ public partial class RemoveAzEventHubAuthorizationRule_Delete : global::System.M [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -186,12 +208,12 @@ public partial class RemoveAzEventHubAuthorizationRule_Delete : global::System.M /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -234,6 +256,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -298,8 +325,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -355,7 +407,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -368,12 +420,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.EventHubsDeleteAuthorizationRule(ResourceGroupName, NamespaceName, EventHubName, Name, SubscriptionId, onOk, onNoContent, onDefault, this, Pipeline); + await this.Client.EventHubsDeleteAuthorizationRule(SubscriptionId, ResourceGroupName, NamespaceName, EventHubName, Name, onOk, onNoContent, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,EventHubName=EventHubName,Name=Name,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,EventHubName=EventHubName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -386,7 +438,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzEventHubAuthorizationRule_Delete() { @@ -419,12 +471,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -441,15 +493,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, EventHubName=EventHubName, Name=Name, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, EventHubName=EventHubName, Name=Name, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubAuthorizationRule_DeleteViaIdentity.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubAuthorizationRule_DeleteViaIdentity.cs index 0485060c5c39..3867e82b8394 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubAuthorizationRule_DeleteViaIdentity.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubAuthorizationRule_DeleteViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Deletes an Event Hub AuthorizationRule. @@ -19,7 +21,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}", ApiVersion = "2023-01-01-preview")] public partial class RemoveAzEventHubAuthorizationRule_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +38,26 @@ public partial class RemoveAzEventHubAuthorizationRule_DeleteViaIdentity : globa /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -53,6 +71,9 @@ public partial class RemoveAzEventHubAuthorizationRule_DeleteViaIdentity : globa [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -94,7 +115,7 @@ public partial class RemoveAzEventHubAuthorizationRule_DeleteViaIdentity : globa /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -117,12 +138,12 @@ public partial class RemoveAzEventHubAuthorizationRule_DeleteViaIdentity : globa /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -165,6 +186,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -229,8 +255,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -286,7 +337,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -306,6 +357,10 @@ protected override void ProcessRecord() else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -322,17 +377,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.AuthorizationRuleName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.EventHubsDeleteAuthorizationRule(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.EventHubName ?? null, InputObject.AuthorizationRuleName ?? null, InputObject.SubscriptionId ?? null, onOk, onNoContent, onDefault, this, Pipeline); + await this.Client.EventHubsDeleteAuthorizationRule(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.EventHubName ?? null, InputObject.AuthorizationRuleName ?? null, onOk, onNoContent, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -345,7 +396,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzEventHubAuthorizationRule_DeleteViaIdentity() { @@ -378,12 +429,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -400,7 +451,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubAuthorizationRule_DeleteViaIdentityEventhub.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubAuthorizationRule_DeleteViaIdentityEventhub.cs new file mode 100644 index 000000000000..4b4e205142a5 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubAuthorizationRule_DeleteViaIdentityEventhub.cs @@ -0,0 +1,529 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// Deletes an Event Hub AuthorizationRule. + /// + /// [OpenAPI] DeleteAuthorizationRule=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzEventHubAuthorizationRule_DeleteViaIdentityEventhub", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Deletes an Event Hub AuthorizationRule.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}", ApiVersion = "2023-01-01-preview")] + public partial class RemoveAzEventHubAuthorizationRule_DeleteViaIdentityEventhub : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity _eventhubInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity EventhubInputObject { get => this._eventhubInputObject; set => this._eventhubInputObject = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'EventHubsDeleteAuthorizationRule' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (EventhubInputObject?.Id != null) + { + this.EventhubInputObject.Id += $"/authorizationRules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.EventHubsDeleteAuthorizationRuleViaIdentity(EventhubInputObject.Id, onOk, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == EventhubInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("EventhubInputObject has null value for EventhubInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, EventhubInputObject) ); + } + if (null == EventhubInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("EventhubInputObject has null value for EventhubInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, EventhubInputObject) ); + } + if (null == EventhubInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("EventhubInputObject has null value for EventhubInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, EventhubInputObject) ); + } + if (null == EventhubInputObject.EventHubName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("EventhubInputObject has null value for EventhubInputObject.EventHubName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, EventhubInputObject) ); + } + await this.Client.EventHubsDeleteAuthorizationRule(EventhubInputObject.SubscriptionId ?? null, EventhubInputObject.ResourceGroupName ?? null, EventhubInputObject.NamespaceName ?? null, EventhubInputObject.EventHubName ?? null, Name, onOk, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzEventHubAuthorizationRule_DeleteViaIdentityEventhub() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubAuthorizationRule_DeleteViaIdentityNamespace.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubAuthorizationRule_DeleteViaIdentityNamespace.cs new file mode 100644 index 000000000000..d5dcb841f7a7 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubAuthorizationRule_DeleteViaIdentityNamespace.cs @@ -0,0 +1,539 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// Deletes an Event Hub AuthorizationRule. + /// + /// [OpenAPI] DeleteAuthorizationRule=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzEventHubAuthorizationRule_DeleteViaIdentityNamespace", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Deletes an Event Hub AuthorizationRule.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}", ApiVersion = "2023-01-01-preview")] + public partial class RemoveAzEventHubAuthorizationRule_DeleteViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _eventHubName; + + /// The Event Hub name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Event Hub name")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Event Hub name", + SerializedName = @"eventHubName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string EventHubName { get => this._eventHubName; set => this._eventHubName = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'EventHubsDeleteAuthorizationRule' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/eventhubs/{(global::System.Uri.EscapeDataString(this.EventHubName.ToString()))}/authorizationRules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.EventHubsDeleteAuthorizationRuleViaIdentity(NamespaceInputObject.Id, onOk, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.EventHubsDeleteAuthorizationRule(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, EventHubName, Name, onOk, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { EventHubName=EventHubName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzEventHubAuthorizationRule_DeleteViaIdentityNamespace() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubCluster_Delete.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubCluster_Delete.cs index b3a79811d9b1..0e8b72fa2e28 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubCluster_Delete.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubCluster_Delete.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Deletes an existing Event Hubs Cluster. This operation is idempotent. @@ -18,7 +20,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}", ApiVersion = "2023-01-01-preview")] public partial class RemoveAzEventHubCluster_Delete : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,6 +37,18 @@ public partial class RemoveAzEventHubCluster_Delete : global::System.Management. /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] @@ -44,6 +59,9 @@ public partial class RemoveAzEventHubCluster_Delete : global::System.Management. [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -57,6 +75,9 @@ public partial class RemoveAzEventHubCluster_Delete : global::System.Management. [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -113,7 +134,7 @@ public partial class RemoveAzEventHubCluster_Delete : global::System.Management. /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -162,7 +183,8 @@ public partial class RemoveAzEventHubCluster_Delete : global::System.Management. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -171,12 +193,12 @@ public partial class RemoveAzEventHubCluster_Delete : global::System.Management. /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -242,6 +264,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets.RemoveAzEventHubClust /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -306,11 +333,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -322,10 +374,26 @@ protected override void EndProcessing() return; } } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } break; } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -393,7 +461,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -411,7 +479,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -424,7 +492,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzEventHubCluster_Delete() { @@ -457,12 +525,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -479,15 +547,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubCluster_DeleteViaIdentity.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubCluster_DeleteViaIdentity.cs index 64fd34e41c32..f016e2d3c8ca 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubCluster_DeleteViaIdentity.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubCluster_DeleteViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Deletes an existing Event Hubs Cluster. This operation is idempotent. @@ -18,7 +20,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}", ApiVersion = "2023-01-01-preview")] public partial class RemoveAzEventHubCluster_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,6 +37,18 @@ public partial class RemoveAzEventHubCluster_DeleteViaIdentity : global::System. /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] @@ -44,6 +59,9 @@ public partial class RemoveAzEventHubCluster_DeleteViaIdentity : global::System. [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -57,6 +75,9 @@ public partial class RemoveAzEventHubCluster_DeleteViaIdentity : global::System. [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -106,7 +127,7 @@ public partial class RemoveAzEventHubCluster_DeleteViaIdentity : global::System. /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -129,12 +150,12 @@ public partial class RemoveAzEventHubCluster_DeleteViaIdentity : global::System. /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -197,6 +218,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets.RemoveAzEventHubClust /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -261,11 +287,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -277,10 +328,26 @@ protected override void EndProcessing() return; } } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } break; } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -348,7 +415,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -386,7 +453,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -399,7 +466,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzEventHubCluster_DeleteViaIdentity() { @@ -432,12 +499,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -454,7 +521,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubConsumerGroup_Delete.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubConsumerGroup_Delete.cs index 0d0d934380dd..b72c7a10e807 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubConsumerGroup_Delete.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubConsumerGroup_Delete.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Deletes a consumer group from the specified Event Hub and resource group. @@ -18,7 +20,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}", ApiVersion = "2023-01-01-preview")] public partial class RemoveAzEventHubConsumerGroup_Delete : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class RemoveAzEventHubConsumerGroup_Delete : global::System.Manag /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -66,6 +84,9 @@ public partial class RemoveAzEventHubConsumerGroup_Delete : global::System.Manag [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string EventHubName { get => this._eventHubName; set => this._eventHubName = value; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -128,7 +149,7 @@ public partial class RemoveAzEventHubConsumerGroup_Delete : global::System.Manag /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -177,7 +198,8 @@ public partial class RemoveAzEventHubConsumerGroup_Delete : global::System.Manag [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -186,12 +208,12 @@ public partial class RemoveAzEventHubConsumerGroup_Delete : global::System.Manag /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -234,6 +256,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -298,8 +325,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -355,7 +407,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -368,12 +420,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.ConsumerGroupsDelete(ResourceGroupName, NamespaceName, EventHubName, Name, SubscriptionId, onOk, onNoContent, onDefault, this, Pipeline); + await this.Client.ConsumerGroupsDelete(SubscriptionId, ResourceGroupName, NamespaceName, EventHubName, Name, onOk, onNoContent, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,EventHubName=EventHubName,Name=Name,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,EventHubName=EventHubName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -386,7 +438,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzEventHubConsumerGroup_Delete() { @@ -419,12 +471,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -441,15 +493,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, EventHubName=EventHubName, Name=Name, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, EventHubName=EventHubName, Name=Name, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubConsumerGroup_DeleteViaIdentity.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubConsumerGroup_DeleteViaIdentity.cs index 4e451d794e9b..7b7cfeb87c7a 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubConsumerGroup_DeleteViaIdentity.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubConsumerGroup_DeleteViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Deletes a consumer group from the specified Event Hub and resource group. @@ -18,7 +20,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}", ApiVersion = "2023-01-01-preview")] public partial class RemoveAzEventHubConsumerGroup_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class RemoveAzEventHubConsumerGroup_DeleteViaIdentity : global::S /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class RemoveAzEventHubConsumerGroup_DeleteViaIdentity : global::S [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -93,7 +114,7 @@ public partial class RemoveAzEventHubConsumerGroup_DeleteViaIdentity : global::S /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -116,12 +137,12 @@ public partial class RemoveAzEventHubConsumerGroup_DeleteViaIdentity : global::S /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -164,6 +185,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -228,8 +254,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -285,7 +336,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -305,6 +356,10 @@ protected override void ProcessRecord() else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -321,17 +376,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ConsumerGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.ConsumerGroupsDelete(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.EventHubName ?? null, InputObject.ConsumerGroupName ?? null, InputObject.SubscriptionId ?? null, onOk, onNoContent, onDefault, this, Pipeline); + await this.Client.ConsumerGroupsDelete(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.EventHubName ?? null, InputObject.ConsumerGroupName ?? null, onOk, onNoContent, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -344,7 +395,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzEventHubConsumerGroup_DeleteViaIdentity() { @@ -377,12 +428,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -399,7 +450,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubConsumerGroup_DeleteViaIdentityEventhub.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubConsumerGroup_DeleteViaIdentityEventhub.cs new file mode 100644 index 000000000000..a5b36a01860e --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubConsumerGroup_DeleteViaIdentityEventhub.cs @@ -0,0 +1,529 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// Deletes a consumer group from the specified Event Hub and resource group. + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzEventHubConsumerGroup_DeleteViaIdentityEventhub", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Deletes a consumer group from the specified Event Hub and resource group.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}", ApiVersion = "2023-01-01-preview")] + public partial class RemoveAzEventHubConsumerGroup_DeleteViaIdentityEventhub : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity _eventhubInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity EventhubInputObject { get => this._eventhubInputObject; set => this._eventhubInputObject = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The consumer group name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The consumer group name")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The consumer group name", + SerializedName = @"consumerGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ConsumerGroupName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ConsumerGroupsDelete' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (EventhubInputObject?.Id != null) + { + this.EventhubInputObject.Id += $"/consumergroups/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.ConsumerGroupsDeleteViaIdentity(EventhubInputObject.Id, onOk, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == EventhubInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("EventhubInputObject has null value for EventhubInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, EventhubInputObject) ); + } + if (null == EventhubInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("EventhubInputObject has null value for EventhubInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, EventhubInputObject) ); + } + if (null == EventhubInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("EventhubInputObject has null value for EventhubInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, EventhubInputObject) ); + } + if (null == EventhubInputObject.EventHubName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("EventhubInputObject has null value for EventhubInputObject.EventHubName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, EventhubInputObject) ); + } + await this.Client.ConsumerGroupsDelete(EventhubInputObject.SubscriptionId ?? null, EventhubInputObject.ResourceGroupName ?? null, EventhubInputObject.NamespaceName ?? null, EventhubInputObject.EventHubName ?? null, Name, onOk, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzEventHubConsumerGroup_DeleteViaIdentityEventhub() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubConsumerGroup_DeleteViaIdentityNamespace.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubConsumerGroup_DeleteViaIdentityNamespace.cs new file mode 100644 index 000000000000..7d2734ab27d0 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubConsumerGroup_DeleteViaIdentityNamespace.cs @@ -0,0 +1,539 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// Deletes a consumer group from the specified Event Hub and resource group. + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzEventHubConsumerGroup_DeleteViaIdentityNamespace", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Deletes a consumer group from the specified Event Hub and resource group.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}", ApiVersion = "2023-01-01-preview")] + public partial class RemoveAzEventHubConsumerGroup_DeleteViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _eventHubName; + + /// The Event Hub name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Event Hub name")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Event Hub name", + SerializedName = @"eventHubName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string EventHubName { get => this._eventHubName; set => this._eventHubName = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The consumer group name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The consumer group name")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The consumer group name", + SerializedName = @"consumerGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ConsumerGroupName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ConsumerGroupsDelete' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/eventhubs/{(global::System.Uri.EscapeDataString(this.EventHubName.ToString()))}/consumergroups/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.ConsumerGroupsDeleteViaIdentity(NamespaceInputObject.Id, onOk, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.ConsumerGroupsDelete(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, EventHubName, Name, onOk, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { EventHubName=EventHubName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzEventHubConsumerGroup_DeleteViaIdentityNamespace() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubGeoDRConfiguration_Delete.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubGeoDRConfiguration_Delete.cs index 3bb2057f5ade..3c019de32ffd 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubGeoDRConfiguration_Delete.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubGeoDRConfiguration_Delete.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Deletes an Alias(Disaster Recovery configuration) @@ -18,7 +20,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}", ApiVersion = "2023-01-01-preview")] public partial class RemoveAzEventHubGeoDRConfiguration_Delete : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class RemoveAzEventHubGeoDRConfiguration_Delete : global::System. /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class RemoveAzEventHubGeoDRConfiguration_Delete : global::System. [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -113,7 +134,7 @@ public partial class RemoveAzEventHubGeoDRConfiguration_Delete : global::System. /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -162,7 +183,8 @@ public partial class RemoveAzEventHubGeoDRConfiguration_Delete : global::System. [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -171,12 +193,12 @@ public partial class RemoveAzEventHubGeoDRConfiguration_Delete : global::System. /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -219,6 +241,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -283,8 +310,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -340,7 +392,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -353,12 +405,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.DisasterRecoveryConfigsDelete(ResourceGroupName, NamespaceName, Name, SubscriptionId, onOk, onNoContent, onDefault, this, Pipeline); + await this.Client.DisasterRecoveryConfigsDelete(SubscriptionId, ResourceGroupName, NamespaceName, Name, onOk, onNoContent, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -371,7 +423,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzEventHubGeoDRConfiguration_Delete() { @@ -404,12 +456,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -426,15 +478,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubGeoDRConfiguration_DeleteViaIdentity.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubGeoDRConfiguration_DeleteViaIdentity.cs index 8dcf0400963a..314839b8d1dc 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubGeoDRConfiguration_DeleteViaIdentity.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubGeoDRConfiguration_DeleteViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Deletes an Alias(Disaster Recovery configuration) @@ -18,7 +20,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}", ApiVersion = "2023-01-01-preview")] public partial class RemoveAzEventHubGeoDRConfiguration_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class RemoveAzEventHubGeoDRConfiguration_DeleteViaIdentity : glob /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class RemoveAzEventHubGeoDRConfiguration_DeleteViaIdentity : glob [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -93,7 +114,7 @@ public partial class RemoveAzEventHubGeoDRConfiguration_DeleteViaIdentity : glob /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -116,12 +137,12 @@ public partial class RemoveAzEventHubGeoDRConfiguration_DeleteViaIdentity : glob /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -164,6 +185,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -228,8 +254,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -285,7 +336,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -305,6 +356,10 @@ protected override void ProcessRecord() else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -317,17 +372,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Alias"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.DisasterRecoveryConfigsDelete(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.Alias ?? null, InputObject.SubscriptionId ?? null, onOk, onNoContent, onDefault, this, Pipeline); + await this.Client.DisasterRecoveryConfigsDelete(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.Alias ?? null, onOk, onNoContent, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -340,7 +391,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzEventHubGeoDRConfiguration_DeleteViaIdentity() { @@ -373,12 +424,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -395,7 +446,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubGeoDRConfiguration_DeleteViaIdentityNamespace.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubGeoDRConfiguration_DeleteViaIdentityNamespace.cs new file mode 100644 index 000000000000..2ac96e698140 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubGeoDRConfiguration_DeleteViaIdentityNamespace.cs @@ -0,0 +1,525 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// Deletes an Alias(Disaster Recovery configuration) + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzEventHubGeoDRConfiguration_DeleteViaIdentityNamespace", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Deletes an Alias(Disaster Recovery configuration)")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}", ApiVersion = "2023-01-01-preview")] + public partial class RemoveAzEventHubGeoDRConfiguration_DeleteViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The Disaster Recovery configuration name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Disaster Recovery configuration name")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Disaster Recovery configuration name", + SerializedName = @"alias", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DisasterRecoveryConfigsDelete' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/disasterRecoveryConfigs/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.DisasterRecoveryConfigsDeleteViaIdentity(NamespaceInputObject.Id, onOk, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.DisasterRecoveryConfigsDelete(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, Name, onOk, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public RemoveAzEventHubGeoDRConfiguration_DeleteViaIdentityNamespace() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubNamespaceAuthorizationRule_Delete.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubNamespaceAuthorizationRule_Delete.cs index f53fd32014f7..d4ddb24cb2fe 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubNamespaceAuthorizationRule_Delete.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubNamespaceAuthorizationRule_Delete.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Deletes an AuthorizationRule for a Namespace. @@ -19,7 +21,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}", ApiVersion = "2023-01-01-preview")] public partial class RemoveAzEventHubNamespaceAuthorizationRule_Delete : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +38,26 @@ public partial class RemoveAzEventHubNamespaceAuthorizationRule_Delete : global: /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -53,6 +71,9 @@ public partial class RemoveAzEventHubNamespaceAuthorizationRule_Delete : global: [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -114,7 +135,7 @@ public partial class RemoveAzEventHubNamespaceAuthorizationRule_Delete : global: /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -163,7 +184,8 @@ public partial class RemoveAzEventHubNamespaceAuthorizationRule_Delete : global: [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -172,12 +194,12 @@ public partial class RemoveAzEventHubNamespaceAuthorizationRule_Delete : global: /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -220,6 +242,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -284,8 +311,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -341,7 +393,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -354,12 +406,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.NamespacesDeleteAuthorizationRule(ResourceGroupName, NamespaceName, Name, SubscriptionId, onOk, onNoContent, onDefault, this, Pipeline); + await this.Client.NamespacesDeleteAuthorizationRule(SubscriptionId, ResourceGroupName, NamespaceName, Name, onOk, onNoContent, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -372,7 +424,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzEventHubNamespaceAuthorizationRule_Delete() { @@ -405,12 +457,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -427,15 +479,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubNamespaceAuthorizationRule_DeleteViaIdentity.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubNamespaceAuthorizationRule_DeleteViaIdentity.cs index 6d9ac818d01b..e5df2f26254a 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubNamespaceAuthorizationRule_DeleteViaIdentity.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubNamespaceAuthorizationRule_DeleteViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Deletes an AuthorizationRule for a Namespace. @@ -19,7 +21,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}", ApiVersion = "2023-01-01-preview")] public partial class RemoveAzEventHubNamespaceAuthorizationRule_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +38,26 @@ public partial class RemoveAzEventHubNamespaceAuthorizationRule_DeleteViaIdentit /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -53,6 +71,9 @@ public partial class RemoveAzEventHubNamespaceAuthorizationRule_DeleteViaIdentit [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -94,7 +115,7 @@ public partial class RemoveAzEventHubNamespaceAuthorizationRule_DeleteViaIdentit /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -117,12 +138,12 @@ public partial class RemoveAzEventHubNamespaceAuthorizationRule_DeleteViaIdentit /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -165,6 +186,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -229,8 +255,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -286,7 +337,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -306,6 +357,10 @@ protected override void ProcessRecord() else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -318,17 +373,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.AuthorizationRuleName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.NamespacesDeleteAuthorizationRule(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.AuthorizationRuleName ?? null, InputObject.SubscriptionId ?? null, onOk, onNoContent, onDefault, this, Pipeline); + await this.Client.NamespacesDeleteAuthorizationRule(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.AuthorizationRuleName ?? null, onOk, onNoContent, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -341,7 +392,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzEventHubNamespaceAuthorizationRule_DeleteViaIdentity() { @@ -374,12 +425,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -396,7 +447,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubNamespaceAuthorizationRule_DeleteViaIdentityNamespace.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubNamespaceAuthorizationRule_DeleteViaIdentityNamespace.cs new file mode 100644 index 000000000000..555062ce0331 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubNamespaceAuthorizationRule_DeleteViaIdentityNamespace.cs @@ -0,0 +1,526 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// Deletes an AuthorizationRule for a Namespace. + /// + /// [OpenAPI] DeleteAuthorizationRule=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzEventHubNamespaceAuthorizationRule_DeleteViaIdentityNamespace", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Deletes an AuthorizationRule for a Namespace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}", ApiVersion = "2023-01-01-preview")] + public partial class RemoveAzEventHubNamespaceAuthorizationRule_DeleteViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The authorization rule name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The authorization rule name.")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The authorization rule name.", + SerializedName = @"authorizationRuleName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'NamespacesDeleteAuthorizationRule' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/authorizationRules/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.NamespacesDeleteAuthorizationRuleViaIdentity(NamespaceInputObject.Id, onOk, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.NamespacesDeleteAuthorizationRule(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, Name, onOk, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the + /// cmdlet class. + /// + public RemoveAzEventHubNamespaceAuthorizationRule_DeleteViaIdentityNamespace() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubNamespace_Delete.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubNamespace_Delete.cs index 8fce79546b8a..e57223db6c26 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubNamespace_Delete.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubNamespace_Delete.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// @@ -21,7 +23,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}", ApiVersion = "2023-01-01-preview")] public partial class RemoveAzEventHubNamespace_Delete : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -37,6 +40,18 @@ public partial class RemoveAzEventHubNamespace_Delete : global::System.Managemen /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] @@ -47,6 +62,9 @@ public partial class RemoveAzEventHubNamespace_Delete : global::System.Managemen [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -60,6 +78,9 @@ public partial class RemoveAzEventHubNamespace_Delete : global::System.Managemen [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -116,7 +137,7 @@ public partial class RemoveAzEventHubNamespace_Delete : global::System.Managemen /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -165,7 +186,8 @@ public partial class RemoveAzEventHubNamespace_Delete : global::System.Managemen [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -174,12 +196,12 @@ public partial class RemoveAzEventHubNamespace_Delete : global::System.Managemen /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -236,15 +258,20 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets.RemoveAzEventHubNames clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; clone.HttpPipelinePrepend = this.HttpPipelinePrepend; clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; clone.ResourceGroupName = this.ResourceGroupName; clone.Name = this.Name; - clone.SubscriptionId = this.SubscriptionId; return clone; } /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -309,11 +336,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -325,10 +377,26 @@ protected override void EndProcessing() return; } } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } break; } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -396,7 +464,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -409,12 +477,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.NamespacesDelete(ResourceGroupName, Name, SubscriptionId, onOk, onNoContent, onDefault, this, Pipeline); + await this.Client.NamespacesDelete(SubscriptionId, ResourceGroupName, Name, onOk, onNoContent, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,Name=Name,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -427,7 +495,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzEventHubNamespace_Delete() { @@ -460,12 +528,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -482,15 +550,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, Name=Name, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, Name=Name, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubNamespace_DeleteViaIdentity.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubNamespace_DeleteViaIdentity.cs index 4b1580800f8b..4b8f633cc1db 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubNamespace_DeleteViaIdentity.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubNamespace_DeleteViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// @@ -21,7 +23,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}", ApiVersion = "2023-01-01-preview")] public partial class RemoveAzEventHubNamespace_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -37,6 +40,18 @@ public partial class RemoveAzEventHubNamespace_DeleteViaIdentity : global::Syste /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] @@ -47,6 +62,9 @@ public partial class RemoveAzEventHubNamespace_DeleteViaIdentity : global::Syste [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -60,6 +78,9 @@ public partial class RemoveAzEventHubNamespace_DeleteViaIdentity : global::Syste [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -109,7 +130,7 @@ public partial class RemoveAzEventHubNamespace_DeleteViaIdentity : global::Syste /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -132,12 +153,12 @@ public partial class RemoveAzEventHubNamespace_DeleteViaIdentity : global::Syste /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -200,6 +221,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets.RemoveAzEventHubNames /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -264,11 +290,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -280,10 +331,26 @@ protected override void EndProcessing() return; } } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } break; } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -351,7 +418,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -371,6 +438,10 @@ protected override void ProcessRecord() else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -379,17 +450,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.NamespacesDelete(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.SubscriptionId ?? null, onOk, onNoContent, onDefault, this, Pipeline); + await this.Client.NamespacesDelete(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, onOk, onNoContent, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -402,7 +469,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzEventHubNamespace_DeleteViaIdentity() { @@ -435,12 +502,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -457,7 +524,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubPrivateEndpointConnection_Delete.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubPrivateEndpointConnection_Delete.cs index 10efcd75fc04..13df91c50f1d 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubPrivateEndpointConnection_Delete.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubPrivateEndpointConnection_Delete.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// @@ -17,10 +19,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzEventHubPrivateEndpointConnection_Delete", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Deletes an existing namespace. This operation also removes all associated resources under the namespace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639389.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}", ApiVersion = "2023-01-01-preview")] public partial class RemoveAzEventHubPrivateEndpointConnection_Delete : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -36,6 +40,18 @@ public partial class RemoveAzEventHubPrivateEndpointConnection_Delete : global:: /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] @@ -46,6 +62,9 @@ public partial class RemoveAzEventHubPrivateEndpointConnection_Delete : global:: [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -59,6 +78,9 @@ public partial class RemoveAzEventHubPrivateEndpointConnection_Delete : global:: [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -129,7 +151,7 @@ public partial class RemoveAzEventHubPrivateEndpointConnection_Delete : global:: /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -178,7 +200,8 @@ public partial class RemoveAzEventHubPrivateEndpointConnection_Delete : global:: [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -187,12 +210,12 @@ public partial class RemoveAzEventHubPrivateEndpointConnection_Delete : global:: /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -249,9 +272,9 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets.RemoveAzEventHubPriva clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; clone.HttpPipelinePrepend = this.HttpPipelinePrepend; clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; clone.ResourceGroupName = this.ResourceGroupName; clone.NamespaceName = this.NamespaceName; - clone.SubscriptionId = this.SubscriptionId; clone.Name = this.Name; return clone; } @@ -259,6 +282,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets.RemoveAzEventHubPriva /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -323,11 +351,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -339,10 +392,26 @@ protected override void EndProcessing() return; } } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } break; } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -410,7 +479,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -423,12 +492,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.PrivateEndpointConnectionsDelete(ResourceGroupName, NamespaceName, SubscriptionId, Name, onOk, onNoContent, onDefault, this, Pipeline); + await this.Client.PrivateEndpointConnectionsDelete(SubscriptionId, ResourceGroupName, NamespaceName, Name, onOk, onNoContent, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,SubscriptionId=SubscriptionId,Name=Name}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -441,7 +510,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzEventHubPrivateEndpointConnection_Delete() { @@ -474,12 +543,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -496,15 +565,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId, Name=Name }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, SubscriptionId=SubscriptionId, Name=Name }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubPrivateEndpointConnection_DeleteViaIdentity.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubPrivateEndpointConnection_DeleteViaIdentity.cs index 74891c86fb31..b351558a3d7f 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubPrivateEndpointConnection_DeleteViaIdentity.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubPrivateEndpointConnection_DeleteViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// @@ -17,10 +19,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzEventHubPrivateEndpointConnection_DeleteViaIdentity", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Deletes an existing namespace. This operation also removes all associated resources under the namespace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639389.aspx", @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}", ApiVersion = "2023-01-01-preview")] public partial class RemoveAzEventHubPrivateEndpointConnection_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -36,6 +40,18 @@ public partial class RemoveAzEventHubPrivateEndpointConnection_DeleteViaIdentity /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] @@ -46,6 +62,9 @@ public partial class RemoveAzEventHubPrivateEndpointConnection_DeleteViaIdentity [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -59,6 +78,9 @@ public partial class RemoveAzEventHubPrivateEndpointConnection_DeleteViaIdentity [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -108,7 +130,7 @@ public partial class RemoveAzEventHubPrivateEndpointConnection_DeleteViaIdentity /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -131,12 +153,12 @@ public partial class RemoveAzEventHubPrivateEndpointConnection_DeleteViaIdentity /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -201,6 +223,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets.RemoveAzEventHubPriva /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -265,11 +292,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -281,10 +333,26 @@ protected override void EndProcessing() return; } } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } break; } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -352,7 +420,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -372,6 +440,10 @@ protected override void ProcessRecord() else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -380,21 +452,17 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } if (null == InputObject.PrivateEndpointConnectionName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.PrivateEndpointConnectionName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - await this.Client.PrivateEndpointConnectionsDelete(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.SubscriptionId ?? null, InputObject.PrivateEndpointConnectionName ?? null, onOk, onNoContent, onDefault, this, Pipeline); + await this.Client.PrivateEndpointConnectionsDelete(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.PrivateEndpointConnectionName ?? null, onOk, onNoContent, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -407,7 +475,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzEventHubPrivateEndpointConnection_DeleteViaIdentity() { @@ -440,12 +508,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -462,7 +530,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubPrivateEndpointConnection_DeleteViaIdentityNamespace.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubPrivateEndpointConnection_DeleteViaIdentityNamespace.cs new file mode 100644 index 000000000000..d831ea57dff2 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubPrivateEndpointConnection_DeleteViaIdentityNamespace.cs @@ -0,0 +1,611 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// + /// Deletes an existing namespace. This operation also removes all associated resources under the namespace. + /// + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzEventHubPrivateEndpointConnection_DeleteViaIdentityNamespace", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Deletes an existing namespace. This operation also removes all associated resources under the namespace.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ExternalDocs(@"https://msdn.microsoft.com/en-us/library/azure/mt639389.aspx", @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}", ApiVersion = "2023-01-01-preview")] + public partial class RemoveAzEventHubPrivateEndpointConnection_DeleteViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The PrivateEndpointConnection name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The PrivateEndpointConnection name")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The PrivateEndpointConnection name", + SerializedName = @"privateEndpointConnectionName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("PrivateEndpointConnectionName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of RemoveAzEventHubPrivateEndpointConnection_DeleteViaIdentityNamespace + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets.RemoveAzEventHubPrivateEndpointConnection_DeleteViaIdentityNamespace Clone() + { + var clone = new RemoveAzEventHubPrivateEndpointConnection_DeleteViaIdentityNamespace(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'PrivateEndpointConnectionsDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/privateEndpointConnections/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.PrivateEndpointConnectionsDeleteViaIdentity(NamespaceInputObject.Id, onOk, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.PrivateEndpointConnectionsDelete(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, Name, onOk, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the + /// cmdlet class. + /// + public RemoveAzEventHubPrivateEndpointConnection_DeleteViaIdentityNamespace() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubSchemaGroup_Delete.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubSchemaGroup_Delete.cs index 5c8297c2ac8e..f0e499aab50c 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubSchemaGroup_Delete.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubSchemaGroup_Delete.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Deletes an EventHub schema group. @@ -18,7 +20,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/schemagroups/{schemaGroupName}", ApiVersion = "2023-01-01-preview")] public partial class RemoveAzEventHubSchemaGroup_Delete : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class RemoveAzEventHubSchemaGroup_Delete : global::System.Managem /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class RemoveAzEventHubSchemaGroup_Delete : global::System.Managem [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -114,7 +135,7 @@ public partial class RemoveAzEventHubSchemaGroup_Delete : global::System.Managem /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -163,7 +184,8 @@ public partial class RemoveAzEventHubSchemaGroup_Delete : global::System.Managem [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -172,12 +194,12 @@ public partial class RemoveAzEventHubSchemaGroup_Delete : global::System.Managem /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -220,6 +242,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -284,8 +311,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -341,7 +393,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -354,12 +406,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.SchemaRegistryDelete(ResourceGroupName, NamespaceName, Name, SubscriptionId, onOk, onNoContent, onDefault, this, Pipeline); + await this.Client.SchemaRegistryDelete(SubscriptionId, ResourceGroupName, NamespaceName, Name, onOk, onNoContent, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -372,7 +424,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzEventHubSchemaGroup_Delete() { @@ -405,12 +457,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -427,15 +479,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubSchemaGroup_DeleteViaIdentity.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubSchemaGroup_DeleteViaIdentity.cs index 940c4834ded4..c622bca14f43 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubSchemaGroup_DeleteViaIdentity.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubSchemaGroup_DeleteViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Deletes an EventHub schema group. @@ -18,7 +20,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/schemagroups/{schemaGroupName}", ApiVersion = "2023-01-01-preview")] public partial class RemoveAzEventHubSchemaGroup_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class RemoveAzEventHubSchemaGroup_DeleteViaIdentity : global::Sys /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class RemoveAzEventHubSchemaGroup_DeleteViaIdentity : global::Sys [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -93,7 +114,7 @@ public partial class RemoveAzEventHubSchemaGroup_DeleteViaIdentity : global::Sys /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -116,12 +137,12 @@ public partial class RemoveAzEventHubSchemaGroup_DeleteViaIdentity : global::Sys /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -164,6 +185,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -228,8 +254,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -285,7 +336,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -305,6 +356,10 @@ protected override void ProcessRecord() else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -317,17 +372,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SchemaGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.SchemaRegistryDelete(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.SchemaGroupName ?? null, InputObject.SubscriptionId ?? null, onOk, onNoContent, onDefault, this, Pipeline); + await this.Client.SchemaRegistryDelete(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.SchemaGroupName ?? null, onOk, onNoContent, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -340,7 +391,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzEventHubSchemaGroup_DeleteViaIdentity() { @@ -373,12 +424,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -395,7 +446,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubSchemaGroup_DeleteViaIdentityNamespace.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubSchemaGroup_DeleteViaIdentityNamespace.cs new file mode 100644 index 000000000000..bdb80d44b553 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHubSchemaGroup_DeleteViaIdentityNamespace.cs @@ -0,0 +1,525 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// Deletes an EventHub schema group. + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/schemagroups/{schemaGroupName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzEventHubSchemaGroup_DeleteViaIdentityNamespace", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Deletes an EventHub schema group.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/schemagroups/{schemaGroupName}", ApiVersion = "2023-01-01-preview")] + public partial class RemoveAzEventHubSchemaGroup_DeleteViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The Schema Group name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Schema Group name ")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Schema Group name ", + SerializedName = @"schemaGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("SchemaGroupName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'SchemaRegistryDelete' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/schemagroups/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.SchemaRegistryDeleteViaIdentity(NamespaceInputObject.Id, onOk, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.SchemaRegistryDelete(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, Name, onOk, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzEventHubSchemaGroup_DeleteViaIdentityNamespace() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHub_Delete.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHub_Delete.cs index 1907bd3e6f29..097b4cca44b1 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHub_Delete.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHub_Delete.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Deletes an Event Hub from the specified Namespace and resource group. @@ -18,7 +20,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}", ApiVersion = "2023-01-01-preview")] public partial class RemoveAzEventHub_Delete : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class RemoveAzEventHub_Delete : global::System.Management.Automat /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class RemoveAzEventHub_Delete : global::System.Management.Automat [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -114,7 +135,7 @@ public partial class RemoveAzEventHub_Delete : global::System.Management.Automat /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -163,7 +184,8 @@ public partial class RemoveAzEventHub_Delete : global::System.Management.Automat [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -172,12 +194,12 @@ public partial class RemoveAzEventHub_Delete : global::System.Management.Automat /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -220,6 +242,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -284,8 +311,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -341,7 +393,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -354,12 +406,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.EventHubsDelete(ResourceGroupName, NamespaceName, Name, SubscriptionId, onOk, onNoContent, onDefault, this, Pipeline); + await this.Client.EventHubsDelete(SubscriptionId, ResourceGroupName, NamespaceName, Name, onOk, onNoContent, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -372,7 +424,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzEventHub_Delete() { @@ -405,12 +457,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -427,15 +479,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, Name=Name, SubscriptionId=SubscriptionId }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHub_DeleteViaIdentity.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHub_DeleteViaIdentity.cs index 69197db56dcb..dc04786f03c7 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHub_DeleteViaIdentity.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHub_DeleteViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Deletes an Event Hub from the specified Namespace and resource group. @@ -18,7 +20,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}", ApiVersion = "2023-01-01-preview")] public partial class RemoveAzEventHub_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class RemoveAzEventHub_DeleteViaIdentity : global::System.Managem /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class RemoveAzEventHub_DeleteViaIdentity : global::System.Managem [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -93,7 +114,7 @@ public partial class RemoveAzEventHub_DeleteViaIdentity : global::System.Managem /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -116,12 +137,12 @@ public partial class RemoveAzEventHub_DeleteViaIdentity : global::System.Managem /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -164,6 +185,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -228,8 +254,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -285,7 +336,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -305,6 +356,10 @@ protected override void ProcessRecord() else { // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } if (null == InputObject.ResourceGroupName) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); @@ -317,17 +372,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.EventHubName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.EventHubsDelete(InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.EventHubName ?? null, InputObject.SubscriptionId ?? null, onOk, onNoContent, onDefault, this, Pipeline); + await this.Client.EventHubsDelete(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.NamespaceName ?? null, InputObject.EventHubName ?? null, onOk, onNoContent, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -340,7 +391,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzEventHub_DeleteViaIdentity() { @@ -373,12 +424,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -395,7 +446,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHub_DeleteViaIdentityNamespace.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHub_DeleteViaIdentityNamespace.cs new file mode 100644 index 000000000000..e9f7ecbfcf07 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/RemoveAzEventHub_DeleteViaIdentityNamespace.cs @@ -0,0 +1,525 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// Deletes an Event Hub from the specified Namespace and resource group. + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzEventHub_DeleteViaIdentityNamespace", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Deletes an Event Hub from the specified Namespace and resource group.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}", ApiVersion = "2023-01-01-preview")] + public partial class RemoveAzEventHub_DeleteViaIdentityNamespace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The Event Hub name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Event Hub name")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Event Hub name", + SerializedName = @"eventHubName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("EventHubName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity _namespaceInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity NamespaceInputObject { get => this._namespaceInputObject; set => this._namespaceInputObject = value; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'EventHubsDelete' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (NamespaceInputObject?.Id != null) + { + this.NamespaceInputObject.Id += $"/eventhubs/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.EventHubsDeleteViaIdentity(NamespaceInputObject.Id, onOk, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == NamespaceInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + if (null == NamespaceInputObject.NamespaceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("NamespaceInputObject has null value for NamespaceInputObject.NamespaceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, NamespaceInputObject) ); + } + await this.Client.EventHubsDelete(NamespaceInputObject.SubscriptionId ?? null, NamespaceInputObject.ResourceGroupName ?? null, NamespaceInputObject.NamespaceName ?? null, Name, onOk, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzEventHub_DeleteViaIdentityNamespace() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/TestAzEventHubDisasterRecoveryConfigNameAvailability_Check.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/TestAzEventHubDisasterRecoveryConfigNameAvailability_Check.cs index 569c484ef501..bb631f59f6f0 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/TestAzEventHubDisasterRecoveryConfigNameAvailability_Check.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/TestAzEventHubDisasterRecoveryConfigNameAvailability_Check.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Check the give Namespace name availability. @@ -14,12 +16,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzEventHubDisasterRecoveryConfigNameAvailability_Check", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Check the give Namespace name availability.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/checkNameAvailability", ApiVersion = "2023-01-01-preview")] public partial class TestAzEventHubDisasterRecoveryConfigNameAvailability_Check : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +38,26 @@ public partial class TestAzEventHubDisasterRecoveryConfigNameAvailability_Check /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -53,6 +71,9 @@ public partial class TestAzEventHubDisasterRecoveryConfigNameAvailability_Check [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -91,7 +112,7 @@ public partial class TestAzEventHubDisasterRecoveryConfigNameAvailability_Check public string NamespaceName { get => this._namespaceName; set => this._namespaceName = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityParameter _parameter; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityParameter _parameter; /// Parameter supplied to check Namespace name availability operation [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Parameter supplied to check Namespace name availability operation ", ValueFromPipeline = true)] @@ -100,13 +121,14 @@ public partial class TestAzEventHubDisasterRecoveryConfigNameAvailability_Check ReadOnly = false, Description = @"Parameter supplied to check Namespace name availability operation ", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityParameter) })] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityParameter Parameter { get => this._parameter; set => this._parameter = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityParameter) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityParameter Parameter { get => this._parameter; set => this._parameter = value; } /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -155,7 +177,8 @@ public partial class TestAzEventHubDisasterRecoveryConfigNameAvailability_Check [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -164,24 +187,24 @@ public partial class TestAzEventHubDisasterRecoveryConfigNameAvailability_Check /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -204,6 +227,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -268,8 +296,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -325,7 +378,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -343,7 +396,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,body=Parameter}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -363,7 +416,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public TestAzEventHubDisasterRecoveryConfigNameAvailability_Check() { @@ -389,12 +442,12 @@ public TestAzEventHubDisasterRecoveryConfigNameAvailability_Check() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -411,15 +464,15 @@ public TestAzEventHubDisasterRecoveryConfigNameAvailability_Check() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, body=Parameter }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, body=Parameter }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -429,12 +482,12 @@ public TestAzEventHubDisasterRecoveryConfigNameAvailability_Check() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -446,8 +499,26 @@ public TestAzEventHubDisasterRecoveryConfigNameAvailability_Check() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckExpanded.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckExpanded.cs index 7082688ba2a2..79ecca61e600 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckExpanded.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckExpanded.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Check the give Namespace name availability. @@ -14,12 +16,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzEventHubDisasterRecoveryConfigNameAvailability_CheckExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Check the give Namespace name availability.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/checkNameAvailability", ApiVersion = "2023-01-01-preview")] public partial class TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,14 +38,29 @@ public partial class TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckE /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// Parameter supplied to check Namespace name availability operation - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityParameter _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.CheckNameAvailabilityParameter(); + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityParameter _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.CheckNameAvailabilityParameter(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -56,6 +74,9 @@ public partial class TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckE [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -107,7 +128,7 @@ public partial class TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckE /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -156,7 +177,8 @@ public partial class TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckE [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -165,24 +187,24 @@ public partial class TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckE /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -205,6 +227,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -269,8 +296,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -326,7 +378,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -344,7 +396,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName,body=_parametersBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -364,7 +416,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet + /// Initializes a new instance of the cmdlet /// class. /// public TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckExpanded() @@ -391,12 +443,12 @@ public TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckExpanded() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -413,15 +465,15 @@ public TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, body=_parametersBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, NamespaceName=NamespaceName, body=_parametersBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -431,12 +483,12 @@ public TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckExpanded() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -448,8 +500,26 @@ public TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckViaIdentity.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckViaIdentity.cs index 64fb46f5a4d7..bead607f4cfc 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckViaIdentity.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Check the give Namespace name availability. @@ -14,12 +16,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzEventHubDisasterRecoveryConfigNameAvailability_CheckViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Check the give Namespace name availability.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/checkNameAvailability", ApiVersion = "2023-01-01-preview")] public partial class TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +38,26 @@ public partial class TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckV /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -53,6 +71,9 @@ public partial class TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckV [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -85,7 +106,7 @@ public partial class TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckV global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityParameter _parameter; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityParameter _parameter; /// Parameter supplied to check Namespace name availability operation [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Parameter supplied to check Namespace name availability operation ", ValueFromPipeline = true)] @@ -94,13 +115,14 @@ public partial class TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckV ReadOnly = false, Description = @"Parameter supplied to check Namespace name availability operation ", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityParameter) })] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityParameter Parameter { get => this._parameter; set => this._parameter = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityParameter) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityParameter Parameter { get => this._parameter; set => this._parameter = value; } /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -123,24 +145,24 @@ public partial class TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckV /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -163,6 +185,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -227,8 +254,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -284,7 +336,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -322,7 +374,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -342,7 +394,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the + /// Initializes a new instance of the /// cmdlet class. /// public TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckViaIdentity() @@ -369,12 +421,12 @@ public TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckViaIdentity() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -391,15 +443,15 @@ public TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckViaIdentity() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -409,12 +461,12 @@ public TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckViaIdentity() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -426,8 +478,26 @@ public TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckViaIdentity() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckViaIdentityExpanded.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckViaIdentityExpanded.cs index 623e93d63180..110c39ba3d09 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckViaIdentityExpanded.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckViaIdentityExpanded.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Check the give Namespace name availability. @@ -14,12 +16,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzEventHubDisasterRecoveryConfigNameAvailability_CheckViaIdentityExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Check the give Namespace name availability.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/checkNameAvailability", ApiVersion = "2023-01-01-preview")] public partial class TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,14 +38,29 @@ public partial class TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckV /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// Parameter supplied to check Namespace name availability operation - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityParameter _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.CheckNameAvailabilityParameter(); + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityParameter _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.CheckNameAvailabilityParameter(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -56,6 +74,9 @@ public partial class TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckV [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -101,7 +122,7 @@ public partial class TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckV /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -124,24 +145,24 @@ public partial class TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckV /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -164,6 +185,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -228,8 +254,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -285,7 +336,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -323,7 +374,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_parametersBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -343,7 +394,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. /// public TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckViaIdentityExpanded() @@ -370,12 +421,12 @@ public TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckViaIdentityExpa /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -392,15 +443,15 @@ public TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckViaIdentityExpa if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_parametersBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_parametersBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -410,12 +461,12 @@ public TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckViaIdentityExpa /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -427,8 +478,26 @@ public TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckViaIdentityExpa return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckViaJsonFilePath.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckViaJsonFilePath.cs new file mode 100644 index 000000000000..494b1d28fcb0 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckViaJsonFilePath.cs @@ -0,0 +1,528 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// Check the give Namespace name availability. + /// + /// [OpenAPI] CheckNameAvailability=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/checkNameAvailability" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzEventHubDisasterRecoveryConfigNameAvailability_CheckViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Check the give Namespace name availability.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/checkNameAvailability", ApiVersion = "2023-01-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.NotSuggestDefaultParameterSet] + public partial class TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + public global::System.String _jsonString; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Check operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Check operation")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Check operation", + SerializedName = @"JsonFilePath", + PossibleTypes = new [] { typeof(string) })] + public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _namespaceName; + + /// The Namespace name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Namespace name")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Namespace name", + SerializedName = @"namespaceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string NamespaceName { get => this._namespaceName; set => this._namespaceName = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the resource group within the azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the resource group within the azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the resource group within the azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the + /// URI for every service call. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DisasterRecoveryConfigsCheckNameAvailability' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DisasterRecoveryConfigsCheckNameAvailabilityViaJsonString(SubscriptionId, ResourceGroupName, NamespaceName, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckViaJsonFilePath() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckViaJsonString.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckViaJsonString.cs new file mode 100644 index 000000000000..6e2d07a318c4 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckViaJsonString.cs @@ -0,0 +1,526 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; + using System; + + /// Check the give Namespace name availability. + /// + /// [OpenAPI] CheckNameAvailability=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/checkNameAvailability" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzEventHubDisasterRecoveryConfigNameAvailability_CheckViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult))] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Check the give Namespace name availability.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/checkNameAvailability", ApiVersion = "2023-01-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.NotSuggestDefaultParameterSet] + public partial class TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Check operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Check operation")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Check operation", + SerializedName = @"JsonString", + PossibleTypes = new [] { typeof(string) })] + public string JsonString { get => this._jsonString; set => this._jsonString = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _namespaceName; + + /// The Namespace name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Namespace name")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Namespace name", + SerializedName = @"namespaceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string NamespaceName { get => this._namespaceName; set => this._namespaceName = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the resource group within the azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the resource group within the azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the resource group within the azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the + /// URI for every service call. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DisasterRecoveryConfigsCheckNameAvailability' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DisasterRecoveryConfigsCheckNameAvailabilityViaJsonString(SubscriptionId, ResourceGroupName, NamespaceName, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,NamespaceName=NamespaceName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public TestAzEventHubDisasterRecoveryConfigNameAvailability_CheckViaJsonString() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/TestAzEventHubNamespaceNameAvailability_Check.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/TestAzEventHubNamespaceNameAvailability_Check.cs index 926d0a16c307..e14e235a3849 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/TestAzEventHubNamespaceNameAvailability_Check.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/TestAzEventHubNamespaceNameAvailability_Check.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Check the give Namespace name availability. @@ -14,12 +16,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzEventHubNamespaceNameAvailability_Check", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Check the give Namespace name availability.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.EventHub/checkNameAvailability", ApiVersion = "2023-01-01-preview")] public partial class TestAzEventHubNamespaceNameAvailability_Check : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +38,26 @@ public partial class TestAzEventHubNamespaceNameAvailability_Check : global::Sys /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -53,6 +71,9 @@ public partial class TestAzEventHubNamespaceNameAvailability_Check : global::Sys [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -77,7 +98,7 @@ public partial class TestAzEventHubNamespaceNameAvailability_Check : global::Sys global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityParameter _parameter; + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityParameter _parameter; /// Parameter supplied to check Namespace name availability operation [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Parameter supplied to check Namespace name availability operation ", ValueFromPipeline = true)] @@ -86,13 +107,14 @@ public partial class TestAzEventHubNamespaceNameAvailability_Check : global::Sys ReadOnly = false, Description = @"Parameter supplied to check Namespace name availability operation ", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityParameter) })] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityParameter Parameter { get => this._parameter; set => this._parameter = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityParameter) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityParameter Parameter { get => this._parameter; set => this._parameter = value; } /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -127,7 +149,8 @@ public partial class TestAzEventHubNamespaceNameAvailability_Check : global::Sys [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -136,24 +159,24 @@ public partial class TestAzEventHubNamespaceNameAvailability_Check : global::Sys /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -176,6 +199,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -240,8 +268,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -297,7 +350,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -315,7 +368,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,body=Parameter}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -335,7 +388,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public TestAzEventHubNamespaceNameAvailability_Check() { @@ -361,12 +414,12 @@ public TestAzEventHubNamespaceNameAvailability_Check() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -383,15 +436,15 @@ public TestAzEventHubNamespaceNameAvailability_Check() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, body=Parameter }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, body=Parameter }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -401,12 +454,12 @@ public TestAzEventHubNamespaceNameAvailability_Check() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -418,8 +471,26 @@ public TestAzEventHubNamespaceNameAvailability_Check() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/TestAzEventHubNamespaceNameAvailability_CheckExpanded.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/TestAzEventHubNamespaceNameAvailability_CheckExpanded.cs index 593e441c9291..81f6b384c56c 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/TestAzEventHubNamespaceNameAvailability_CheckExpanded.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/TestAzEventHubNamespaceNameAvailability_CheckExpanded.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Check the give Namespace name availability. @@ -14,12 +16,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzEventHubNamespaceNameAvailability_CheckExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Check the give Namespace name availability.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.EventHub/checkNameAvailability", ApiVersion = "2023-01-01-preview")] public partial class TestAzEventHubNamespaceNameAvailability_CheckExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,14 +38,29 @@ public partial class TestAzEventHubNamespaceNameAvailability_CheckExpanded : glo /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + /// Parameter supplied to check Namespace name availability operation - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityParameter _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.CheckNameAvailabilityParameter(); + private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityParameter _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.CheckNameAvailabilityParameter(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -56,6 +74,9 @@ public partial class TestAzEventHubNamespaceNameAvailability_CheckExpanded : glo [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -93,7 +114,7 @@ public partial class TestAzEventHubNamespaceNameAvailability_CheckExpanded : glo /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -128,7 +149,8 @@ public partial class TestAzEventHubNamespaceNameAvailability_CheckExpanded : glo [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -137,24 +159,24 @@ public partial class TestAzEventHubNamespaceNameAvailability_CheckExpanded : glo /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -177,6 +199,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -241,8 +268,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -298,7 +350,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -316,7 +368,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,body=_parametersBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -336,7 +388,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public TestAzEventHubNamespaceNameAvailability_CheckExpanded() { @@ -362,12 +414,12 @@ public TestAzEventHubNamespaceNameAvailability_CheckExpanded() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -384,15 +436,15 @@ public TestAzEventHubNamespaceNameAvailability_CheckExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, body=_parametersBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, body=_parametersBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -402,12 +454,12 @@ public TestAzEventHubNamespaceNameAvailability_CheckExpanded() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -419,8 +471,26 @@ public TestAzEventHubNamespaceNameAvailability_CheckExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/TestAzEventHubNamespaceNameAvailability_CheckViaIdentity.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/TestAzEventHubNamespaceNameAvailability_CheckViaJsonFilePath.cs similarity index 76% rename from src/EventHub/EventHub.Autorest/generated/cmdlets/TestAzEventHubNamespaceNameAvailability_CheckViaIdentity.cs rename to src/EventHub/EventHub.Autorest/generated/cmdlets/TestAzEventHubNamespaceNameAvailability_CheckViaJsonFilePath.cs index 5d8692609167..c8e8aa212936 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/TestAzEventHubNamespaceNameAvailability_CheckViaIdentity.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/TestAzEventHubNamespaceNameAvailability_CheckViaJsonFilePath.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Check the give Namespace name availability. @@ -13,13 +15,15 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets /// [OpenAPI] CheckNameAvailability=>POST:"/subscriptions/{subscriptionId}/providers/Microsoft.EventHub/checkNameAvailability" /// [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzEventHubNamespaceNameAvailability_CheckViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult))] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzEventHubNamespaceNameAvailability_CheckViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Check the give Namespace name availability.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.EventHub/checkNameAvailability", ApiVersion = "2023-01-01-preview")] - public partial class TestAzEventHubNamespaceNameAvailability_CheckViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.NotSuggestDefaultParameterSet] + public partial class TestAzEventHubNamespaceNameAvailability_CheckViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +39,28 @@ public partial class TestAzEventHubNamespaceNameAvailability_CheckViaIdentity : /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + public global::System.String _jsonString; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -53,6 +74,9 @@ public partial class TestAzEventHubNamespaceNameAvailability_CheckViaIdentity : [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -65,17 +89,22 @@ public partial class TestAzEventHubNamespaceNameAvailability_CheckViaIdentity : [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity _inputObject; - - /// Identity Parameter - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] - [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } - /// Accessor for our copy of the InvocationInfo. public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Check operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Check operation")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Check operation", + SerializedName = @"JsonFilePath", + PossibleTypes = new [] { typeof(string) })] + public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } + /// /// cancellation delegate. Stops the cmdlet when called. /// @@ -84,23 +113,10 @@ public partial class TestAzEventHubNamespaceNameAvailability_CheckViaIdentity : /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityParameter _parameter; - - /// Parameter supplied to check Namespace name availability operation - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Parameter supplied to check Namespace name availability operation ", ValueFromPipeline = true)] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Parameter supplied to check Namespace name availability operation ", - SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityParameter) })] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityParameter Parameter { get => this._parameter; set => this._parameter = value; } - /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -118,29 +134,51 @@ public partial class TestAzEventHubNamespaceNameAvailability_CheckViaIdentity : [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + /// Backing field for property. + private string _subscriptionId; + + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the + /// URI for every service call. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -163,6 +201,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -227,8 +270,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -284,7 +352,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -297,24 +365,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - if (InputObject?.Id != null) - { - await this.Client.NamespacesCheckNameAvailabilityViaIdentity(InputObject.Id, Parameter, onOk, onDefault, this, Pipeline); - } - else - { - // try to call with PATH parameters from Input Object - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.NamespacesCheckNameAvailability(InputObject.SubscriptionId ?? null, Parameter, onOk, onDefault, this, Pipeline); - } + await this.Client.NamespacesCheckNameAvailabilityViaJsonString(SubscriptionId, _jsonString, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -334,9 +390,9 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// - public TestAzEventHubNamespaceNameAvailability_CheckViaIdentity() + public TestAzEventHubNamespaceNameAvailability_CheckViaJsonFilePath() { } @@ -360,12 +416,12 @@ public TestAzEventHubNamespaceNameAvailability_CheckViaIdentity() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -382,15 +438,15 @@ public TestAzEventHubNamespaceNameAvailability_CheckViaIdentity() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Parameter }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -400,12 +456,12 @@ public TestAzEventHubNamespaceNameAvailability_CheckViaIdentity() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -417,8 +473,26 @@ public TestAzEventHubNamespaceNameAvailability_CheckViaIdentity() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/cmdlets/TestAzEventHubNamespaceNameAvailability_CheckViaIdentityExpanded.cs b/src/EventHub/EventHub.Autorest/generated/cmdlets/TestAzEventHubNamespaceNameAvailability_CheckViaJsonString.cs similarity index 77% rename from src/EventHub/EventHub.Autorest/generated/cmdlets/TestAzEventHubNamespaceNameAvailability_CheckViaIdentityExpanded.cs rename to src/EventHub/EventHub.Autorest/generated/cmdlets/TestAzEventHubNamespaceNameAvailability_CheckViaJsonString.cs index fac9fcc85a9c..d58a666e4d49 100644 --- a/src/EventHub/EventHub.Autorest/generated/cmdlets/TestAzEventHubNamespaceNameAvailability_CheckViaIdentityExpanded.cs +++ b/src/EventHub/EventHub.Autorest/generated/cmdlets/TestAzEventHubNamespaceNameAvailability_CheckViaJsonString.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets; using System; /// Check the give Namespace name availability. @@ -13,13 +15,15 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Cmdlets /// [OpenAPI] CheckNameAvailability=>POST:"/subscriptions/{subscriptionId}/providers/Microsoft.EventHub/checkNameAvailability" /// [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.InternalExport] - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzEventHubNamespaceNameAvailability_CheckViaIdentityExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult))] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzEventHubNamespaceNameAvailability_CheckViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult))] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Description(@"Check the give Namespace name availability.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.EventHub/checkNameAvailability", ApiVersion = "2023-01-01-preview")] - public partial class TestAzEventHubNamespaceNameAvailability_CheckViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.NotSuggestDefaultParameterSet] + public partial class TestAzEventHubNamespaceNameAvailability_CheckViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,14 +39,26 @@ public partial class TestAzEventHubNamespaceNameAvailability_CheckViaIdentityExp /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); - /// Parameter supplied to check Namespace name availability operation - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityParameter _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.CheckNameAvailabilityParameter(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.ClientAPI; @@ -56,6 +72,9 @@ public partial class TestAzEventHubNamespaceNameAvailability_CheckViaIdentityExp [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] [global::System.Management.Automation.ValidateNotNull] @@ -68,17 +87,22 @@ public partial class TestAzEventHubNamespaceNameAvailability_CheckViaIdentityExp [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity _inputObject; - - /// Identity Parameter - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] - [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] - public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } - /// Accessor for our copy of the InvocationInfo. public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Check operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Check operation")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Check operation", + SerializedName = @"JsonString", + PossibleTypes = new [] { typeof(string) })] + public string JsonString { get => this._jsonString; set => this._jsonString = value; } + /// /// cancellation delegate. Stops the cmdlet when called. /// @@ -87,21 +111,10 @@ public partial class TestAzEventHubNamespaceNameAvailability_CheckViaIdentityExp /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - /// Name to check the namespace name availability - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name to check the namespace name availability")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Name to check the namespace name availability", - SerializedName = @"name", - PossibleTypes = new [] { typeof(string) })] - public string Name { get => _parametersBody.Name ?? null; set => _parametersBody.Name = value; } - /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -119,29 +132,51 @@ public partial class TestAzEventHubNamespaceNameAvailability_CheckViaIdentityExp [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + /// Backing field for property. + private string _subscriptionId; + + /// + /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the + /// URI for every service call. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EventHub.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -164,6 +199,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -228,8 +268,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } } - await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -285,7 +350,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EventHub.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -298,24 +363,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - if (InputObject?.Id != null) - { - await this.Client.NamespacesCheckNameAvailabilityViaIdentity(InputObject.Id, _parametersBody, onOk, onDefault, this, Pipeline); - } - else - { - // try to call with PATH parameters from Input Object - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.NamespacesCheckNameAvailability(InputObject.SubscriptionId ?? null, _parametersBody, onOk, onDefault, this, Pipeline); - } + await this.Client.NamespacesCheckNameAvailabilityViaJsonString(SubscriptionId, _jsonString, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_parametersBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -335,10 +388,9 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet - /// class. + /// Initializes a new instance of the cmdlet class. /// - public TestAzEventHubNamespaceNameAvailability_CheckViaIdentityExpanded() + public TestAzEventHubNamespaceNameAvailability_CheckViaJsonString() { } @@ -362,12 +414,12 @@ public TestAzEventHubNamespaceNameAvailability_CheckViaIdentityExpanded() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api20.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IErrorResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -384,15 +436,15 @@ public TestAzEventHubNamespaceNameAvailability_CheckViaIdentityExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_parametersBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_parametersBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -402,12 +454,12 @@ public TestAzEventHubNamespaceNameAvailability_CheckViaIdentityExpanded() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -419,8 +471,26 @@ public TestAzEventHubNamespaceNameAvailability_CheckViaIdentityExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } } } } diff --git a/src/EventHub/EventHub.Autorest/generated/runtime/Attributes/ExternalDocsAttribute.cs b/src/EventHub/EventHub.Autorest/generated/runtime/Attributes/ExternalDocsAttribute.cs new file mode 100644 index 000000000000..b8f6d20edec7 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/runtime/Attributes/ExternalDocsAttribute.cs @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub +{ + using System; + using System.Collections.Generic; + using System.Text; + + [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = true)] + public class ExternalDocsAttribute : Attribute + { + + public string Description { get; } + + public string Url { get; } + + public ExternalDocsAttribute(string url) + { + Url = url; + } + + public ExternalDocsAttribute(string url, string description) + { + Url = url; + Description = description; + } + } +} diff --git a/src/EventHub/EventHub.Autorest/generated/runtime/Attributes/PSArgumentCompleterAttribute.cs b/src/EventHub/EventHub.Autorest/generated/runtime/Attributes/PSArgumentCompleterAttribute.cs new file mode 100644 index 000000000000..5a05616dddc5 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/runtime/Attributes/PSArgumentCompleterAttribute.cs @@ -0,0 +1,52 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Management.Automation; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub +{ + public class PSArgumentCompleterAttribute : ArgumentCompleterAttribute + { + internal string[] ResourceTypes; + + public PSArgumentCompleterAttribute(params string[] argumentList) : base(CreateScriptBlock(argumentList)) + { + ResourceTypes = argumentList; + } + + public static ScriptBlock CreateScriptBlock(string[] resourceTypes) + { + List outputResourceTypes = new List(); + foreach (string resourceType in resourceTypes) + { + if (resourceType.Contains(" ")) + { + outputResourceTypes.Add("\'\'" + resourceType + "\'\'"); + } + else + { + outputResourceTypes.Add(resourceType); + } + } + string scriptResourceTypeList = "'" + String.Join("' , '", outputResourceTypes) + "'"; + string script = "param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)\n" + + String.Format("$values = {0}\n", scriptResourceTypeList) + + "$values | Where-Object { $_ -Like \"$wordToComplete*\" -or $_ -Like \"'$wordToComplete*\" } | Sort-Object | ForEach-Object { [System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_) }"; + ScriptBlock scriptBlock = ScriptBlock.Create(script); + return scriptBlock; + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/runtime/BuildTime/Cmdlets/ExportFormatPs1xml.cs b/src/EventHub/EventHub.Autorest/generated/runtime/BuildTime/Cmdlets/ExportFormatPs1xml.cs index 5eaafbb7c86c..cbd30e628b49 100644 --- a/src/EventHub/EventHub.Autorest/generated/runtime/BuildTime/Cmdlets/ExportFormatPs1xml.cs +++ b/src/EventHub/EventHub.Autorest/generated/runtime/BuildTime/Cmdlets/ExportFormatPs1xml.cs @@ -20,11 +20,13 @@ public class ExportFormatPs1xml : PSCmdlet public string FilePath { get; set; } private const string ModelNamespace = @"Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models"; - private const string SupportNamespace = @"Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support"; + private const string SupportNamespace = @"${$project.supportNamespace.fullName}"; private const string PropertiesExcludedForTableview = @"Id,Type"; private static readonly bool IsAzure = Convert.ToBoolean(@"true"); + private static string SelectedBySuffix = @"#Multiple"; + protected override void ProcessRecord() { try @@ -76,7 +78,7 @@ private static View CreateViewModel(ViewParameters viewParameters) Name = viewParameters.Type.FullName, ViewSelectedBy = new ViewSelectedBy { - TypeName = viewParameters.Type.FullName + TypeName = string.Concat(viewParameters.Type.FullName, SelectedBySuffix) }, TableControl = new TableControl { diff --git a/src/EventHub/EventHub.Autorest/generated/runtime/BuildTime/Cmdlets/ExportModelSurface.cs b/src/EventHub/EventHub.Autorest/generated/runtime/BuildTime/Cmdlets/ExportModelSurface.cs index 5e5e32a5d892..b61f31afb430 100644 --- a/src/EventHub/EventHub.Autorest/generated/runtime/BuildTime/Cmdlets/ExportModelSurface.cs +++ b/src/EventHub/EventHub.Autorest/generated/runtime/BuildTime/Cmdlets/ExportModelSurface.cs @@ -24,7 +24,7 @@ public class ExportModelSurface : PSCmdlet public bool UseExpandedFormat { get; set; } private const string ModelNamespace = @"Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models"; - private const string SupportNamespace = @"Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support"; + private const string SupportNamespace = @"${$project.supportNamespace.fullName}"; protected override void ProcessRecord() { diff --git a/src/EventHub/EventHub.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs b/src/EventHub/EventHub.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs index 5c70fe3d3e50..f92a00d110c4 100644 --- a/src/EventHub/EventHub.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs +++ b/src/EventHub/EventHub.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs @@ -70,9 +70,8 @@ protected override void ProcessRecord() var variantGroups = profileGroups.SelectMany(pg => pg.Variants .GroupBy(v => new { v.CmdletName, v.IsInternal }) .Select(vg => new VariantGroup(ModuleName, vg.Key.CmdletName, vg.Select(v => v).ToArray(), - Path.Combine(vg.Key.IsInternal ? InternalFolder : ExportsFolder, pg.ProfileFolder), pg.ProfileName, isInternal: vg.Key.IsInternal))) + Path.Combine(vg.Key.IsInternal ? InternalFolder : ExportsFolder, pg.ProfileFolder), pg.ProfileName, isInternal: vg.Key.IsInternal))) .ToArray(); - var license = new StringBuilder(); license.Append(@" # ---------------------------------------------------------------------------------- @@ -114,6 +113,7 @@ protected override void ProcessRecord() sb.Append("param("); sb.Append($"{(parameterGroups.Any() ? Environment.NewLine : String.Empty)}"); + foreach (var parameterGroup in parameterGroups) { var parameters = parameterGroup.HasAllVariants ? parameterGroup.Parameters.Take(1) : parameterGroup.Parameters; diff --git a/src/EventHub/EventHub.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs b/src/EventHub/EventHub.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs index d9081db50e56..f48d0ae69052 100644 --- a/src/EventHub/EventHub.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs +++ b/src/EventHub/EventHub.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs @@ -137,7 +137,7 @@ protected override void ProcessRecord() } else { - var cmdletsList = functionInfos.Select(fi => fi.Name).Distinct().Append("*").ToPsList(); + var cmdletsList = functionInfos.Select(fi => fi.Name).Distinct().ToPsList(); sb.AppendLine($@"{Indent}FunctionsToExport = {cmdletsList}"); } @@ -148,8 +148,10 @@ protected override void ProcessRecord() } else { - var aliasesList = functionInfos.SelectMany(fi => fi.ScriptBlock.Attributes).ToAliasNames().Append("*").ToPsList(); - sb.AppendLine($@"{Indent}AliasesToExport = {aliasesList}"); + var aliasesList = functionInfos.SelectMany(fi => fi.ScriptBlock.Attributes).ToAliasNames().ToPsList(); + if (!String.IsNullOrEmpty(aliasesList)) { + sb.AppendLine($@"{Indent}AliasesToExport = {aliasesList}"); + } } // CmdletsToExport diff --git a/src/EventHub/EventHub.Autorest/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs b/src/EventHub/EventHub.Autorest/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs index 21a7b0fb4d11..95ea9e475c66 100644 --- a/src/EventHub/EventHub.Autorest/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs +++ b/src/EventHub/EventHub.Autorest/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs @@ -12,50 +12,96 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell { - [Cmdlet(VerbsData.Export, "TestStub")] - [DoNotExport] - public class ExportTestStub : PSCmdlet - { - [Parameter(Mandatory = true)] - [ValidateNotNullOrEmpty] - public string ModuleName { get; set; } - - [Parameter(Mandatory = true)] - [ValidateNotNullOrEmpty] - public string ExportsFolder { get; set; } - - [Parameter(Mandatory = true)] - [ValidateNotNullOrEmpty] - public string OutputFolder { get; set; } - - [Parameter] - public SwitchParameter IncludeGenerated { get; set; } - - protected override void ProcessRecord() + [Cmdlet(VerbsData.Export, "TestStub")] + [DoNotExport] + public class ExportTestStub : PSCmdlet { - try - { - if (!Directory.Exists(ExportsFolder)) - { - throw new ArgumentException($"Exports folder '{ExportsFolder}' does not exist"); - } + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ModuleName { get; set; } - var exportDirectories = Directory.GetDirectories(ExportsFolder); - if (!exportDirectories.Any()) - { - exportDirectories = new[] { ExportsFolder }; - } - var utilFile = Path.Combine(OutputFolder, "utils.ps1"); - if (!File.Exists(utilFile)) + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ExportsFolder { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string OutputFolder { get; set; } + + [Parameter] + public SwitchParameter IncludeGenerated { get; set; } + + protected override void ProcessRecord() { - var sc = new StringBuilder(); - sc.AppendLine(@"function RandomString([bool]$allChars, [int32]$len) { + try + { + if (!Directory.Exists(ExportsFolder)) + { + throw new ArgumentException($"Exports folder '{ExportsFolder}' does not exist"); + } + + var exportDirectories = Directory.GetDirectories(ExportsFolder); + if (!exportDirectories.Any()) + { + exportDirectories = new[] { ExportsFolder }; + } + /*var loadEnvFile = Path.Combine(OutputFolder, "loadEnv.ps1"); + if (!File.Exists(loadEnvFile)) + { + var sc = new StringBuilder(); + sc.AppendLine(@" +$envFile = 'env.json' +if ($TestMode -eq 'live') { + $envFile = 'localEnv.json' +} + +if (Test-Path -Path (Join-Path $PSScriptRoot $envFile)) { + $envFilePath = Join-Path $PSScriptRoot $envFile +} else { + $envFilePath = Join-Path $PSScriptRoot '..\$envFile' +} +$env = @{} +if (Test-Path -Path $envFilePath) { + $env = Get-Content (Join-Path $PSScriptRoot $envFile) | ConvertFrom-Json +}"); + File.WriteAllText(loadEnvFile, sc.ToString()); + }*/ + var utilFile = Path.Combine(OutputFolder, "utils.ps1"); + if (!File.Exists(utilFile)) + { + var sc = new StringBuilder(); + sc.AppendLine(@"function RandomString([bool]$allChars, [int32]$len) { if ($allChars) { return -join ((33..126) | Get-Random -Count $len | % {[char]$_}) } else { return -join ((48..57) + (97..122) | Get-Random -Count $len | % {[char]$_}) } } +function Start-TestSleep { + [CmdletBinding(DefaultParameterSetName = 'SleepBySeconds')] + param( + [parameter(Mandatory = $true, Position = 0, ParameterSetName = 'SleepBySeconds')] + [ValidateRange(0.0, 2147483.0)] + [double] $Seconds, + + [parameter(Mandatory = $true, ParameterSetName = 'SleepByMilliseconds')] + [ValidateRange('NonNegative')] + [Alias('ms')] + [int] $Milliseconds + ) + + if ($TestMode -ne 'playback') { + switch ($PSCmdlet.ParameterSetName) { + 'SleepBySeconds' { + Start-Sleep -Seconds $Seconds + } + 'SleepByMilliseconds' { + Start-Sleep -Milliseconds $Milliseconds + } + } + } +} + $env = @{} if ($UsePreviousConfigForRecord) { $previousEnv = Get-Content (Join-Path $PSScriptRoot 'env.json') | ConvertFrom-Json @@ -80,37 +126,40 @@ function cleanupEnv() { # Clean resources you create for testing } "); - File.WriteAllText(utilFile, sc.ToString()); - } - foreach (var exportDirectory in exportDirectories) - { - var outputFolder = OutputFolder; - if (exportDirectory != ExportsFolder) - { - outputFolder = Path.Combine(OutputFolder, Path.GetFileName(exportDirectory)); - Directory.CreateDirectory(outputFolder); - } - - var variantGroups = GetScriptCmdlets(exportDirectory) - .SelectMany(fi => fi.ToVariants()) - .Where(v => !v.IsDoNotExport) - .GroupBy(v => v.CmdletName) - .Select(vg => new VariantGroup(ModuleName, vg.Key, vg.Select(v => v).ToArray(), outputFolder, isTest: true)) - .Where(vtg => !File.Exists(vtg.FilePath) && (IncludeGenerated || !vtg.IsGenerated)); - - foreach (var variantGroup in variantGroups) - { - var sb = new StringBuilder(); - sb.AppendLine($"if(($null -eq $TestName) -or ($TestName -contains '{variantGroup.CmdletName}'))"); - sb.AppendLine(@"{ + File.WriteAllText(utilFile, sc.ToString()); + } + + + + foreach (var exportDirectory in exportDirectories) + { + var outputFolder = OutputFolder; + if (exportDirectory != ExportsFolder) + { + outputFolder = Path.Combine(OutputFolder, Path.GetFileName(exportDirectory)); + Directory.CreateDirectory(outputFolder); + } + + var variantGroups = GetScriptCmdlets(exportDirectory) + .SelectMany(fi => fi.ToVariants()) + .Where(v => !v.IsDoNotExport) + .GroupBy(v => v.CmdletName) + .Select(vg => new VariantGroup(ModuleName, vg.Key, vg.Select(v => v).ToArray(), outputFolder, isTest: true)) + .Where(vtg => !File.Exists(vtg.FilePath) && (IncludeGenerated || !vtg.IsGenerated)); + + foreach (var variantGroup in variantGroups) + { + var sb = new StringBuilder(); + sb.AppendLine($"if(($null -eq $TestName) -or ($TestName -contains '{variantGroup.CmdletName}'))"); + sb.AppendLine(@"{ $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' if (-Not (Test-Path -Path $loadEnvPath)) { $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' } . ($loadEnvPath)" -); - sb.AppendLine($@" $TestRecordingFile = Join-Path $PSScriptRoot '{variantGroup.CmdletName}.Recording.json'"); - sb.AppendLine(@" $currentPath = $PSScriptRoot + ); + sb.AppendLine($@" $TestRecordingFile = Join-Path $PSScriptRoot '{variantGroup.CmdletName}.Recording.json'"); + sb.AppendLine(@" $currentPath = $PSScriptRoot while(-not $mockingPath) { $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File $currentPath = Split-Path -Path $currentPath -Parent @@ -120,29 +169,29 @@ function cleanupEnv() { "); - sb.AppendLine($"Describe '{variantGroup.CmdletName}' {{"); - var variants = variantGroup.Variants - .Where(v => IncludeGenerated || !v.Attributes.OfType().Any()) - .ToList(); + sb.AppendLine($"Describe '{variantGroup.CmdletName}' {{"); + var variants = variantGroup.Variants + .Where(v => IncludeGenerated || !v.Attributes.OfType().Any()) + .ToList(); - foreach (var variant in variants) + foreach (var variant in variants) + { + sb.AppendLine($"{Indent}It '{variant.VariantName}' -skip {{"); + sb.AppendLine($"{Indent}{Indent}{{ throw [System.NotImplementedException] }} | Should -Not -Throw"); + var variantSeparator = variants.IndexOf(variant) == variants.Count - 1 ? String.Empty : Environment.NewLine; + sb.AppendLine($"{Indent}}}{variantSeparator}"); + } + sb.AppendLine("}"); + + File.WriteAllText(variantGroup.FilePath, sb.ToString()); + } + } + } + catch (Exception ee) { - sb.AppendLine($"{Indent}It '{variant.VariantName}' -skip {{"); - sb.AppendLine($"{Indent}{Indent}{{ throw [System.NotImplementedException] }} | Should -Not -Throw"); - var variantSeparator = variants.IndexOf(variant) == variants.Count - 1 ? String.Empty : Environment.NewLine; - sb.AppendLine($"{Indent}}}{variantSeparator}"); + Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; } - sb.AppendLine("}"); - - File.WriteAllText(variantGroup.FilePath, sb.ToString()); - } } - } - catch (Exception ee) - { - Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); - throw ee; - } } - } } diff --git a/src/EventHub/EventHub.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs b/src/EventHub/EventHub.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs index 69efe0ca5d1f..4b48566e3839 100644 --- a/src/EventHub/EventHub.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs +++ b/src/EventHub/EventHub.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs @@ -94,7 +94,7 @@ public static void WriteMarkdowns(IEnumerable variantGroups, PsMod sb.Append($"## RELATED LINKS{Environment.NewLine}{Environment.NewLine}"); foreach (var relatedLink in markdownInfo.RelatedLinks) { - sb.Append($"{relatedLink}{Environment.NewLine}{Environment.NewLine}"); + sb.Append($"[{relatedLink}]({relatedLink}){Environment.NewLine}{Environment.NewLine}"); } File.WriteAllText(Path.Combine(docsFolder, $"{markdownInfo.CmdletName}.md"), sb.ToString()); diff --git a/src/EventHub/EventHub.Autorest/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs b/src/EventHub/EventHub.Autorest/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs index fd2ab3f4d970..5e0889aafd63 100644 --- a/src/EventHub/EventHub.Autorest/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs +++ b/src/EventHub/EventHub.Autorest/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs @@ -31,7 +31,7 @@ internal class MarkdownHelpInfo public string[] Inputs { get; } public string[] Outputs { get; } public ComplexInterfaceInfo[] ComplexInterfaceInfos { get; } - public string[] RelatedLinks { get; } + public MarkdownRelatedLinkInfo[] RelatedLinks { get; } public bool SupportsShouldProcess { get; } public bool SupportsPaging { get; } @@ -67,7 +67,11 @@ public MarkdownHelpInfo(VariantGroup variantGroup, string examplesFolder, string ComplexInterfaceInfos = variantGroup.ComplexInterfaceInfos; OnlineVersion = commentInfo.OnlineVersion; - RelatedLinks = commentInfo.RelatedLinks; + + var relatedLinkLists = new List(); + relatedLinkLists.AddRange(commentInfo.RelatedLinks?.Select(link => new MarkdownRelatedLinkInfo(link))); + relatedLinkLists.AddRange(variantGroup.Variants.SelectMany(v => v.Attributes).OfType()?.Distinct()?.Select(link => new MarkdownRelatedLinkInfo(link.Url, link.Description))); + RelatedLinks = relatedLinkLists?.ToArray(); SupportsShouldProcess = variantGroup.SupportsShouldProcess; SupportsPaging = variantGroup.SupportsPaging; @@ -218,14 +222,45 @@ public MarkdownParameterHelpInfo(PsParameterHelpInfo[] parameterHelpInfos, Param } } + internal class MarkdownRelatedLinkInfo + { + public string Url { get; } + public string Description { get; } + + public MarkdownRelatedLinkInfo(string url) + { + Url = url; + } + + public MarkdownRelatedLinkInfo(string url, string description) + { + Url = url; + Description = description; + } + + public override string ToString() + { + if (string.IsNullOrEmpty(Description)) + { + return Url; + } + else + { + return $@"[{Description}]({Url})"; + + } + + } + } + internal static class MarkdownTypesExtensions { public static MarkdownExampleHelpInfo ToExampleHelpInfo(this PsHelpExampleInfo exampleInfo) => new MarkdownExampleHelpInfo(exampleInfo.Title, exampleInfo.Code, exampleInfo.Output, exampleInfo.Remarks); public static MarkdownExampleHelpInfo[] DefaultExampleHelpInfos = { - new MarkdownExampleHelpInfo("Example 1: {{ Add title here }}", $@"{{{{ Add code here }}}}", $@"{{{{ Add output here }}}}", @"{{ Add description here }}"), - new MarkdownExampleHelpInfo("Example 2: {{ Add title here }}", $@"{{{{ Add code here }}}}", $@"{{{{ Add output here }}}}", @"{{ Add description here }}"), + new MarkdownExampleHelpInfo("Example 1: {{ Add title here }}", $@"{{{{ Add code here }}}}", $@"{{{{ Add output here (remove the output block if the example doesn't have an output) }}}}", @"{{ Add description here }}"), + new MarkdownExampleHelpInfo("Example 2: {{ Add title here }}", $@"{{{{ Add code here }}}}", $@"{{{{ Add output here (remove the output block if the example doesn't have an output) }}}}", @"{{ Add description here }}"), }; public static MarkdownParameterHelpInfo[] SupportsShouldProcessParameters = diff --git a/src/EventHub/EventHub.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs b/src/EventHub/EventHub.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs index 1af52ecdbd42..2b1ee57e94f5 100644 --- a/src/EventHub/EventHub.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs +++ b/src/EventHub/EventHub.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs @@ -121,6 +121,21 @@ public override string ToString() => CompleterInfo != null : String.Empty; } + internal class PSArgumentCompleterOutput : ArgumentCompleterOutput + { + public PSArgumentCompleterInfo PSArgumentCompleterInfo { get; } + + public PSArgumentCompleterOutput(PSArgumentCompleterInfo completerInfo) : base(completerInfo) + { + PSArgumentCompleterInfo = completerInfo; + } + + + public override string ToString() => PSArgumentCompleterInfo != null + ? $"{Indent}[{typeof(PSArgumentCompleterAttribute)}({(PSArgumentCompleterInfo.IsTypeCompleter ? $"[{PSArgumentCompleterInfo.Type.Unwrap().ToPsType()}]" : $"{PSArgumentCompleterInfo.ResourceTypes?.Select(r => $"\"{r}\"")?.JoinIgnoreEmpty(", ")}")})]{Environment.NewLine}" + : String.Empty; + } + internal class DefaultInfoOutput { public bool HasDefaultInfo { get; } @@ -173,6 +188,7 @@ internal class BaseOutput public VariantGroup VariantGroup { get; } protected static readonly bool IsAzure = Convert.ToBoolean(@"true"); + public BaseOutput(VariantGroup variantGroup) { VariantGroup = variantGroup; @@ -269,11 +285,16 @@ private string GetDefaultValuesStatements() var variantListString = defaultInfo.ParameterGroup.VariantNames.ToPsList(); var parameterName = defaultInfo.ParameterGroup.ParameterName; sb.AppendLine(); + var setCondition = " "; + if (!String.IsNullOrEmpty(defaultInfo.SetCondition)) + { + setCondition = $" -and {defaultInfo.SetCondition}"; + } //Yabo: this is bad to hard code the subscription id, but autorest load input README.md reversely (entry readme -> required readme), there are no other way to //override default value set in required readme if ("SubscriptionId".Equals(parameterName)) { - sb.AppendLine($"{Indent}{Indent}if (({variantListString}) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('{parameterName}')) {{"); + sb.AppendLine($"{Indent}{Indent}if (({variantListString}) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('{parameterName}'){setCondition}) {{"); sb.AppendLine($"{Indent}{Indent}{Indent}$testPlayback = $false"); sb.AppendLine($"{Indent}{Indent}{Indent}$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object {{ if ($_) {{ $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) }} }}"); sb.AppendLine($"{Indent}{Indent}{Indent}if ($testPlayback) {{"); @@ -285,13 +306,15 @@ private string GetDefaultValuesStatements() } else { - sb.AppendLine($"{Indent}{Indent}if (({variantListString}) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('{parameterName}')) {{"); + sb.AppendLine($"{Indent}{Indent}if (({variantListString}) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('{parameterName}'){setCondition}) {{"); sb.AppendLine($"{Indent}{Indent}{Indent}$PSBoundParameters['{parameterName}'] = {defaultInfo.Script}"); sb.Append($"{Indent}{Indent}}}"); } + } return sb.ToString(); } + } internal class ProcessOutput : BaseOutput @@ -381,6 +404,8 @@ public override string ToString() var notesText = !String.IsNullOrEmpty(notes) ? $"{Environment.NewLine}.Notes{Environment.NewLine}{ComplexParameterHeader}{notes}" : String.Empty; var relatedLinks = String.Join(Environment.NewLine, CommentInfo.RelatedLinks.Select(l => $".Link{Environment.NewLine}{l}")); var relatedLinksText = !String.IsNullOrEmpty(relatedLinks) ? $"{Environment.NewLine}{relatedLinks}" : String.Empty; + var externalUrls = String.Join(Environment.NewLine, CommentInfo.ExternalUrls.Select(l => $".Link{Environment.NewLine}{l}")); + var externalUrlsText = !String.IsNullOrEmpty(externalUrls) ? $"{Environment.NewLine}{externalUrls}" : String.Empty; var examples = ""; foreach (var example in VariantGroup.HelpInfo.Examples) { @@ -393,7 +418,7 @@ public override string ToString() {CommentInfo.Description.ToDescriptionFormat(false)} {examples}{inputsText}{outputsText}{notesText} .Link -{CommentInfo.OnlineVersion}{relatedLinksText} +{CommentInfo.OnlineVersion}{relatedLinksText}{externalUrlsText} #> "; } @@ -587,7 +612,9 @@ public static string ToSyntaxTypeName(this Type type) public static AllowEmptyArrayOutput ToAllowEmptyArray(this bool hasAllowEmptyArray) => new AllowEmptyArrayOutput(hasAllowEmptyArray); - public static ArgumentCompleterOutput ToArgumentCompleterOutput(this CompleterInfo completerInfo) => new ArgumentCompleterOutput(completerInfo); + public static ArgumentCompleterOutput ToArgumentCompleterOutput(this CompleterInfo completerInfo) => (completerInfo is PSArgumentCompleterInfo psArgumentCompleterInfo) ? psArgumentCompleterInfo.ToArgumentCompleterOutput() : new ArgumentCompleterOutput(completerInfo); + + public static PSArgumentCompleterOutput ToArgumentCompleterOutput(this PSArgumentCompleterInfo completerInfo) => new PSArgumentCompleterOutput(completerInfo); public static DefaultInfoOutput ToDefaultInfoOutput(this ParameterGroup parameterGroup) => new DefaultInfoOutput(parameterGroup); diff --git a/src/EventHub/EventHub.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs b/src/EventHub/EventHub.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs index 3060d85f486c..3fc02d0734dc 100644 --- a/src/EventHub/EventHub.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs +++ b/src/EventHub/EventHub.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs @@ -31,7 +31,7 @@ internal class VariantGroup { public string ModuleName { get; } - public string RootModuleName {get => @"";} + public string RootModuleName { get => @""; } public string CmdletName { get; } public string CmdletVerb { get; } public string CmdletNoun { get; } @@ -49,7 +49,6 @@ internal class VariantGroup public PsHelpInfo HelpInfo { get; } public bool IsGenerated { get; } public bool IsInternal { get; } - public string OutputFolder { get; } public string FileName { get; } public string FilePath { get; } @@ -84,7 +83,6 @@ public VariantGroup(string moduleName, string cmdletName, Variant[] variants, st HelpInfo = Variants.Select(v => v.HelpInfo).FirstOrDefault() ?? new PsHelpInfo(); IsGenerated = Variants.All(v => v.Attributes.OfType().Any()); IsInternal = isInternal; - OutputFolder = outputFolder; FileName = $"{CmdletName}{(isTest ? ".Tests" : String.Empty)}.ps1"; FilePath = Path.Combine(OutputFolder, FileName); @@ -101,12 +99,23 @@ private string DetermineDefaultParameterSetName() if (String.IsNullOrEmpty(defaultParameterSet)) { var variantParamCountGroups = Variants + .Where(v => !v.IsNotSuggestDefaultParameterSet) .Select(v => ( variant: v.VariantName, paramCount: v.CmdletOnlyParameters.Count(p => p.IsMandatory), isSimple: v.CmdletOnlyParameters.Where(p => p.IsMandatory).All(p => p.ParameterType.IsPsSimple()))) .GroupBy(vpc => vpc.isSimple) .ToArray(); + if (variantParamCountGroups.Length == 0) + { + variantParamCountGroups = Variants + .Select(v => ( + variant: v.VariantName, + paramCount: v.CmdletOnlyParameters.Count(p => p.IsMandatory), + isSimple: v.CmdletOnlyParameters.Where(p => p.IsMandatory).All(p => p.ParameterType.IsPsSimple()))) + .GroupBy(vpc => vpc.isSimple) + .ToArray(); + } var variantParameterCounts = (variantParamCountGroups.Any(g => g.Key) ? variantParamCountGroups.Where(g => g.Key) : variantParamCountGroups).SelectMany(g => g).ToArray(); var smallestParameterCount = variantParameterCounts.Min(vpc => vpc.paramCount); defaultParameterSet = variantParameterCounts.First(vpc => vpc.paramCount == smallestParameterCount).variant; @@ -135,6 +144,7 @@ internal class Variant public Parameter[] CmdletOnlyParameters { get; } public bool IsInternal { get; } public bool IsDoNotExport { get; } + public bool IsNotSuggestDefaultParameterSet { get; } public string[] Profiles { get; } public Variant(string cmdletName, string variantName, CommandInfo info, CommandMetadata metadata, bool hasParameterSets = false, PsHelpInfo helpInfo = null) @@ -155,6 +165,7 @@ public Variant(string cmdletName, string variantName, CommandInfo info, CommandM Parameters = this.ToParameters().OrderBy(p => p.OrderCategory).ThenByDescending(p => p.IsMandatory).ToArray(); IsInternal = Attributes.OfType().Any(); IsDoNotExport = Attributes.OfType().Any(); + IsNotSuggestDefaultParameterSet = Attributes.OfType().Any(); CmdletOnlyParameters = Parameters.Where(p => !p.Categories.Any(c => c == ParameterCategory.Azure || c == ParameterCategory.Runtime)).ToArray(); Profiles = Attributes.OfType().SelectMany(pa => pa.Profiles).ToArray(); } @@ -210,6 +221,7 @@ public ParameterGroup(string parameterName, Parameter[] parameters, string[] all HasValidateNotNull = Parameters.SelectMany(p => p.Attributes.OfType()).Any(); HasAllowEmptyArray = Parameters.SelectMany(p => p.Attributes.OfType()).Any(); CompleterInfo = Parameters.Select(p => p.CompleterInfoAttribute).FirstOrDefault()?.ToCompleterInfo() + ?? Parameters.Select(p => p.PSArgumentCompleterAttribute).FirstOrDefault()?.ToPSArgumentCompleterInfo() ?? Parameters.Select(p => p.ArgumentCompleterAttribute).FirstOrDefault()?.ToCompleterInfo(); DefaultInfo = Parameters.Select(p => p.DefaultInfoAttribute).FirstOrDefault()?.ToDefaultInfo(this) ?? Parameters.Select(p => p.DefaultValueAttribute).FirstOrDefault(dv => dv != null)?.ToDefaultInfo(this); @@ -244,7 +256,6 @@ internal class Parameter public ParameterMetadata Metadata { get; } public PsParameterHelpInfo HelpInfo { get; } public Type ParameterType { get; } - public Attribute[] Attributes { get; } public ParameterCategory[] Categories { get; } public ParameterCategory OrderCategory { get; } @@ -254,6 +265,7 @@ internal class Parameter public bool SupportsWildcards { get; } public CompleterInfoAttribute CompleterInfoAttribute { get; } public ArgumentCompleterAttribute ArgumentCompleterAttribute { get; } + public PSArgumentCompleterAttribute PSArgumentCompleterAttribute { get; } public bool ValueFromPipeline { get; } public bool ValueFromPipelineByPropertyName { get; } @@ -286,7 +298,8 @@ public Parameter(string variantName, string parameterName, ParameterMetadata met } SupportsWildcards = Attributes.OfType().Any(); CompleterInfoAttribute = Attributes.OfType().FirstOrDefault(); - ArgumentCompleterAttribute = Attributes.OfType().FirstOrDefault(); + PSArgumentCompleterAttribute = Attributes.OfType().FirstOrDefault(); + ArgumentCompleterAttribute = Attributes.OfType().FirstOrDefault(attr => !attr.GetType().Equals(typeof(PSArgumentCompleterAttribute))); ValueFromPipeline = ParameterAttribute.ValueFromPipeline; ValueFromPipelineByPropertyName = ParameterAttribute.ValueFromPipelineByPropertyName; @@ -295,10 +308,10 @@ public Parameter(string variantName, string parameterName, ParameterMetadata met IsMandatory = ParameterAttribute.Mandatory; var complexParameterName = ParameterName.ToUpperInvariant(); - var complexMessage = $"{Environment.NewLine}To construct, see NOTES section for {complexParameterName} properties and create a hash table."; + var complexMessage = $"{Environment.NewLine}"; var description = ParameterAttribute.HelpMessage.NullIfEmpty() ?? HelpInfo.Description.NullIfEmpty() ?? InfoAttribute?.Description.NullIfEmpty() ?? String.Empty; // Remove the complex type message as it will be reinserted if this is a complex type - description = description.NormalizeNewLines().Replace(complexMessage, String.Empty).Replace(complexMessage.ToPsSingleLine(), String.Empty); + description = description.NormalizeNewLines(); // Make an InfoAttribute for processing only if one isn't provided InfoAttribute = Attributes.OfType().FirstOrDefault() ?? new InfoAttribute { PossibleTypes = new[] { ParameterType.Unwrap() }, Required = IsMandatory }; // Set the description if the InfoAttribute does not have one since they are exported without a description @@ -318,7 +331,7 @@ internal class ComplexInterfaceInfo public bool Required { get; } public bool ReadOnly { get; } public string Description { get; } - + public ComplexInterfaceInfo[] NestedInfos { get; } public bool IsComplexInterface { get; } @@ -335,7 +348,7 @@ public ComplexInterfaceInfo(string name, Type type, InfoAttribute infoAttribute, var unwrappedType = Type.Unwrap(); var hasBeenSeen = seenTypes?.Contains(unwrappedType) ?? false; (seenTypes ?? (seenTypes = new List())).Add(unwrappedType); - NestedInfos = hasBeenSeen ? new ComplexInterfaceInfo[]{} : + NestedInfos = hasBeenSeen ? new ComplexInterfaceInfo[] { } : unwrappedType.GetInterfaces() .Concat(InfoAttribute.PossibleTypes) .SelectMany(pt => pt.GetProperties() @@ -366,6 +379,7 @@ internal class CommentInfo public string OnlineVersion { get; } public string[] RelatedLinks { get; } + public string[] ExternalUrls { get; } private const string HelpLinkPrefix = @"https://learn.microsoft.com/powershell/module/"; @@ -391,6 +405,9 @@ public CommentInfo(VariantGroup variantGroup) var moduleName = variantGroup.RootModuleName == "" ? variantGroup.ModuleName.ToLowerInvariant() : variantGroup.RootModuleName.ToLowerInvariant(); OnlineVersion = helpInfo.OnlineVersion?.Uri.NullIfEmpty() ?? $@"{HelpLinkPrefix}{moduleName}/{variantGroup.CmdletName.ToLowerInvariant()}"; RelatedLinks = helpInfo.RelatedLinks.Select(rl => rl.Text).ToArray(); + + // Get external urls from attribute + ExternalUrls = variantGroup.Variants.SelectMany(v => v.Attributes).OfType()?.Select(e => e.Url)?.Distinct()?.ToArray(); } } @@ -420,11 +437,22 @@ public CompleterInfo(ArgumentCompleterAttribute completerAttribute) } } + internal class PSArgumentCompleterInfo : CompleterInfo + { + public string[] ResourceTypes { get; } + + public PSArgumentCompleterInfo(PSArgumentCompleterAttribute completerAttribute) : base(completerAttribute) + { + ResourceTypes = completerAttribute.ResourceTypes; + } + } + internal class DefaultInfo { public string Name { get; } public string Description { get; } public string Script { get; } + public string SetCondition { get; } public ParameterGroup ParameterGroup { get; } public DefaultInfo(DefaultInfoAttribute infoAttribute, ParameterGroup parameterGroup) @@ -432,6 +460,7 @@ public DefaultInfo(DefaultInfoAttribute infoAttribute, ParameterGroup parameterG Name = infoAttribute.Name; Description = infoAttribute.Description; Script = infoAttribute.Script; + SetCondition = infoAttribute.SetCondition; ParameterGroup = parameterGroup; } @@ -479,7 +508,8 @@ public static Parameter[] ToParameters(this Variant variant) parameterHelp = parameterHelp.Where(ph => (!ph.ParameterSetNames.Any() || ph.ParameterSetNames.Any(psn => psn == variant.VariantName || psn == AllParameterSets)) && ph.Name != "IncludeTotalCount"); } var result = parameters.Select(p => new Parameter(variant.VariantName, p.Key, p.Value, parameterHelp.FirstOrDefault(ph => ph.Name == p.Key))); - if (variant.SupportsPaging) { + if (variant.SupportsPaging) + { // If supportsPaging is set, we will need to add First and Skip parameters since they are treated as common parameters which as not contained on Metadata>parameters variant.Info.Parameters["First"].Attributes.OfType().FirstOrDefault(pa => pa.ParameterSetName == variant.VariantName || pa.ParameterSetName == AllParameterSets).HelpMessage = "Gets only the first 'n' objects."; variant.Info.Parameters["Skip"].Attributes.OfType().FirstOrDefault(pa => pa.ParameterSetName == variant.VariantName || pa.ParameterSetName == AllParameterSets).HelpMessage = "Ignores the first 'n' objects and then gets the remaining objects."; @@ -507,7 +537,7 @@ public static ComplexInterfaceInfo ToComplexInterfaceInfo(this InfoAttribute inf public static CompleterInfo ToCompleterInfo(this CompleterInfoAttribute infoAttribute) => new CompleterInfo(infoAttribute); public static CompleterInfo ToCompleterInfo(this ArgumentCompleterAttribute completerAttribute) => new CompleterInfo(completerAttribute); - + public static PSArgumentCompleterInfo ToPSArgumentCompleterInfo(this PSArgumentCompleterAttribute completerAttribute) => new PSArgumentCompleterInfo(completerAttribute); public static DefaultInfo ToDefaultInfo(this DefaultInfoAttribute infoAttribute, ParameterGroup parameterGroup) => new DefaultInfo(infoAttribute, parameterGroup); public static DefaultInfo ToDefaultInfo(this PSDefaultValueAttribute defaultValueAttribute, ParameterGroup parameterGroup) => new DefaultInfo(defaultValueAttribute, parameterGroup); } diff --git a/src/EventHub/EventHub.Autorest/generated/runtime/BuildTime/PsAttributes.cs b/src/EventHub/EventHub.Autorest/generated/runtime/BuildTime/PsAttributes.cs index 6a11c1d1648d..fa54d2da1a72 100644 --- a/src/EventHub/EventHub.Autorest/generated/runtime/BuildTime/PsAttributes.cs +++ b/src/EventHub/EventHub.Autorest/generated/runtime/BuildTime/PsAttributes.cs @@ -55,6 +55,11 @@ public class HttpPathAttribute : Attribute public string ApiVersion { get; set; } } + [AttributeUsage(AttributeTargets.Class)] + public class NotSuggestDefaultParameterSetAttribute : Attribute + { + } + [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] public class CategoryAttribute : Attribute { @@ -109,6 +114,11 @@ public enum PropertyOrigin Inlined } + [AttributeUsage(AttributeTargets.Property)] + public class ConstantAttribute : Attribute + { + } + [AttributeUsage(AttributeTargets.Property)] public class FormatTableAttribute : Attribute { diff --git a/src/EventHub/EventHub.Autorest/generated/runtime/BuildTime/PsExtensions.cs b/src/EventHub/EventHub.Autorest/generated/runtime/BuildTime/PsExtensions.cs index c2d563dd2ae6..15817d2b259c 100644 --- a/src/EventHub/EventHub.Autorest/generated/runtime/BuildTime/PsExtensions.cs +++ b/src/EventHub/EventHub.Autorest/generated/runtime/BuildTime/PsExtensions.cs @@ -13,6 +13,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PowerShell { internal static class PsExtensions { + public static PSObject AddMultipleTypeNameIntoPSObject(this object obj, string multipleTag = "#Multiple") + { + var psObj = new PSObject(obj); + psObj.TypeNames.Insert(0, $"{psObj.TypeNames[0]}{multipleTag}"); + return psObj; + } + // https://stackoverflow.com/a/863944/294804 // https://stackoverflow.com/a/4452598/294804 // https://stackoverflow.com/a/28701974/294804 diff --git a/src/EventHub/EventHub.Autorest/generated/runtime/BuildTime/PsHelpers.cs b/src/EventHub/EventHub.Autorest/generated/runtime/BuildTime/PsHelpers.cs index a3c0b0ad1d47..c779d4a0abad 100644 --- a/src/EventHub/EventHub.Autorest/generated/runtime/BuildTime/PsHelpers.cs +++ b/src/EventHub/EventHub.Autorest/generated/runtime/BuildTime/PsHelpers.cs @@ -67,7 +67,7 @@ public static IEnumerable GetScriptHelpInfo(params string[] modulePath public static IEnumerable GetModuleCmdletsAndHelpInfo(PSCmdlet cmdlet, params string[] modulePaths) { - var getCmdletAndHelp = String.Join(" + ", modulePaths.Select(mp => + var getCmdletAndHelp = String.Join(" + ", modulePaths.Select(mp => $@"(Get-Command -Module (Import-Module '{mp}' -PassThru) | Where-Object {{ $_.CommandType -ne 'Alias' }} | ForEach-Object {{ @{{ CommandInfo = $_; HelpInfo = ( invoke-command {{ try {{ Get-Help -Name $_.Name -Full }} catch{{ '' }} }} ) }} }})" )); return (cmdlet?.RunScript(getCmdletAndHelp) ?? RunScript(getCmdletAndHelp)) @@ -88,7 +88,7 @@ public static Guid ReadGuidFromPsd1(string psd1Path) if (File.Exists(psd1Path)) { var currentGuid = File.ReadAllLines(psd1Path) - .FirstOrDefault(l => l.StartsWith(GuidStart))?.Split(new[] { " = " }, StringSplitOptions.RemoveEmptyEntries) + .FirstOrDefault(l => l.TrimStart().StartsWith(GuidStart.TrimStart()))?.Split(new[] { " = " }, StringSplitOptions.RemoveEmptyEntries) .LastOrDefault()?.Replace("'", String.Empty); guid = currentGuid != null ? Guid.Parse(currentGuid) : guid; } diff --git a/src/EventHub/EventHub.Autorest/generated/runtime/Context.cs b/src/EventHub/EventHub.Autorest/generated/runtime/Context.cs new file mode 100644 index 000000000000..5e796e931ea4 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/runtime/Context.cs @@ -0,0 +1,33 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime +{ + + using System; + using System.Linq; + using System.Collections; + using System.Collections.Generic; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + using GetEventData = System.Func; + using static Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Extensions; + + /// + /// The IContext Interface defines the communication mechanism for input customization. + /// + /// + /// In the context, we will have client, pipeline, PSBoundParamters, default EventListener, Cancellation. + /// + public interface IContext + { + System.Management.Automation.InvocationInfo InvocationInformation { get; set; } + System.Threading.CancellationTokenSource CancellationTokenSource { get; set; } + System.Collections.Generic.IDictionary ExtensibleParameters { get; } + HttpPipeline Pipeline { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.EventHub.EventHub Client { get; } + } +} diff --git a/src/EventHub/EventHub.Autorest/generated/runtime/Events.cs b/src/EventHub/EventHub.Autorest/generated/runtime/Events.cs index f759dd301aec..222ec47c5cd5 100644 --- a/src/EventHub/EventHub.Autorest/generated/runtime/Events.cs +++ b/src/EventHub/EventHub.Autorest/generated/runtime/Events.cs @@ -22,6 +22,6 @@ public static partial class Events public const string FollowingNextLink = nameof(FollowingNextLink); public const string DelayBeforePolling = nameof(DelayBeforePolling); public const string Polling = nameof(Polling); - + public const string Progress = nameof(Progress); } -} \ No newline at end of file +} diff --git a/src/EventHub/EventHub.Autorest/generated/runtime/ISendAsync.cs b/src/EventHub/EventHub.Autorest/generated/runtime/ISendAsync.cs index dc1cc0072af1..c5e82010505c 100644 --- a/src/EventHub/EventHub.Autorest/generated/runtime/ISendAsync.cs +++ b/src/EventHub/EventHub.Autorest/generated/runtime/ISendAsync.cs @@ -11,6 +11,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime using System.Threading.Tasks; using System.Collections; using System.Linq; + using System; + /// /// The interface for sending an HTTP request across the wire. @@ -70,6 +72,7 @@ public interface ISendAsyncTerminalFactory public partial class HttpPipeline : ISendAsync { + private const int DefaultMaxRetry = 3; private ISendAsync pipeline; private ISendAsyncTerminalFactory terminal; private List steps = new List(); @@ -92,6 +95,111 @@ public HttpPipeline(ISendAsyncTerminalFactory terminalStep) /// public HttpPipeline Clone() => new HttpPipeline(terminal) { steps = this.steps.ToList(), pipeline = this.pipeline }; + private bool shouldRetry429(HttpResponseMessage response) + { + if (response.StatusCode == (System.Net.HttpStatusCode)429) + { + var retryAfter = response.Headers.RetryAfter; + if (retryAfter != null && retryAfter.Delta.HasValue) + { + return true; + } + } + return false; + } + /// + /// The step to handle 429 response with retry-after header. + /// + public async Task Retry429(HttpRequestMessage request, IEventListener callback, ISendAsync next) + { + int retryCount = int.MaxValue; + + try + { + try + { + retryCount = int.Parse(System.Environment.GetEnvironmentVariable("PS_HTTP_MAX_RETRIES_FOR_429")); + } + finally + { + retryCount = int.Parse(System.Environment.GetEnvironmentVariable("AZURE_PS_HTTP_MAX_RETRIES_FOR_429")); + } + } + catch (System.Exception) + { + //no action + } + var cloneRequest = await request.CloneWithContent(); + var response = await next.SendAsync(request, callback); + int count = 0; + while (shouldRetry429(response) && count++ < retryCount) + { + request = await cloneRequest.CloneWithContent(); + var retryAfter = response.Headers.RetryAfter; + await Task.Delay(retryAfter.Delta.Value, callback.Token); + await callback.Signal("Debug", $"Start to retry {count} time(s) on status code 429 after waiting {retryAfter.Delta.Value.TotalSeconds} seconds."); + response = await next.SendAsync(request, callback); + } + return response; + } + + private bool shouldRetryError(HttpResponseMessage response) + { + if (response.StatusCode >= System.Net.HttpStatusCode.InternalServerError) + { + if (response.StatusCode != System.Net.HttpStatusCode.NotImplemented && + response.StatusCode != System.Net.HttpStatusCode.HttpVersionNotSupported) + { + return true; + } + } + else if (response.StatusCode == System.Net.HttpStatusCode.RequestTimeout) + { + return true; + } + else if (response.StatusCode == (System.Net.HttpStatusCode)429 && response.Headers.RetryAfter == null) + { + return true; + } + return false; + } + + /// + /// Returns true if status code in HttpRequestExceptionWithStatus exception is greater + /// than or equal to 500 and not NotImplemented (501) or HttpVersionNotSupported (505). + /// Or it's 429 (TOO MANY REQUESTS) without Retry-After header. + /// + public async Task RetryError(HttpRequestMessage request, IEventListener callback, ISendAsync next) + { + int retryCount = DefaultMaxRetry; + + try + { + try + { + retryCount = int.Parse(System.Environment.GetEnvironmentVariable("PS_HTTP_MAX_RETRIES")); + } + finally + { + retryCount = int.Parse(System.Environment.GetEnvironmentVariable("AZURE_PS_HTTP_MAX_RETRIES")); + } + } + catch (System.Exception) + { + //no action + } + var cloneRequest = await request.CloneWithContent(); + var response = await next.SendAsync(request, callback); + int count = 0; + while (shouldRetryError(response) && count++ < retryCount) + { + await callback.Signal("Debug", $"Start to retry {count} time(s) on status code {response.StatusCode}"); + request = await cloneRequest.CloneWithContent(); + response = await next.SendAsync(request, callback); + } + return response; + } + public ISendAsyncTerminalFactory TerminalFactory { get => terminal; @@ -117,6 +225,11 @@ public ISendAsync Pipeline // create the pipeline from scratch. var next = terminal.Create(); + if (Convert.ToBoolean(@"true")) + { + next = (new SendAsyncFactory(Retry429)).Create(next) ?? next; + next = (new SendAsyncFactory(RetryError)).Create(next) ?? next; + } foreach (var factory in steps) { // skip factories that return null. diff --git a/src/EventHub/EventHub.Autorest/generated/runtime/InfoAttribute.cs b/src/EventHub/EventHub.Autorest/generated/runtime/InfoAttribute.cs index 6e02caf002e2..44951545e066 100644 --- a/src/EventHub/EventHub.Autorest/generated/runtime/InfoAttribute.cs +++ b/src/EventHub/EventHub.Autorest/generated/runtime/InfoAttribute.cs @@ -11,6 +11,9 @@ public class InfoAttribute : Attribute { public bool Required { get; set; } = false; public bool ReadOnly { get; set; } = false; + public bool Read { get; set; } = true; + public bool Create { get; set; } = true; + public bool Update { get; set; } = true; public Type[] PossibleTypes { get; set; } = new Type[0]; public string Description { get; set; } = ""; public string SerializedName { get; set; } = ""; @@ -30,5 +33,6 @@ public class DefaultInfoAttribute : Attribute public string Script { get; set; } = ""; public string Name { get; set; } = ""; public string Description { get; set; } = ""; + public string SetCondition { get; set; } = ""; } } \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/runtime/InputHandler.cs b/src/EventHub/EventHub.Autorest/generated/runtime/InputHandler.cs new file mode 100644 index 000000000000..57a73c630bdd --- /dev/null +++ b/src/EventHub/EventHub.Autorest/generated/runtime/InputHandler.cs @@ -0,0 +1,22 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +using System; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Cmdlets +{ + public abstract class InputHandler + { + protected InputHandler NextHandler = null; + + public void SetNextHandler(InputHandler nextHandler) + { + this.NextHandler = nextHandler; + } + + public abstract void Process(Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.IContext context); + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/runtime/Nodes/Collections/XNodeArray.cs b/src/EventHub/EventHub.Autorest/generated/runtime/Nodes/Collections/XNodeArray.cs index e632429d2405..88a23a55dd82 100644 --- a/src/EventHub/EventHub.Autorest/generated/runtime/Nodes/Collections/XNodeArray.cs +++ b/src/EventHub/EventHub.Autorest/generated/runtime/Nodes/Collections/XNodeArray.cs @@ -21,6 +21,11 @@ internal XNodeArray(params JsonNode[] values) items = new List(values); } + internal XNodeArray(System.Collections.Generic.List values) + { + items = new List(values); + } + public override JsonNode this[int index] => items[index]; internal override JsonType? ElementType => null; diff --git a/src/EventHub/EventHub.Autorest/generated/runtime/SerializationMode.cs b/src/EventHub/EventHub.Autorest/generated/runtime/SerializationMode.cs index 8faf9b50c7a9..29c65368c111 100644 --- a/src/EventHub/EventHub.Autorest/generated/runtime/SerializationMode.cs +++ b/src/EventHub/EventHub.Autorest/generated/runtime/SerializationMode.cs @@ -9,8 +9,10 @@ public enum SerializationMode { None = 0, IncludeHeaders = 1 << 0, - IncludeReadOnly = 1 << 1, - - IncludeAll = IncludeHeaders | IncludeReadOnly + IncludeRead = 1 << 1, + IncludeCreate = 1 << 2, + IncludeUpdate = 1 << 3, + IncludeAll = IncludeHeaders | IncludeRead | IncludeCreate | IncludeUpdate, + IncludeCreateOrUpdate = IncludeCreate | IncludeUpdate } } \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/generated/runtime/TypeConverterExtensions.cs b/src/EventHub/EventHub.Autorest/generated/runtime/TypeConverterExtensions.cs index 54685f51141d..df4088216c70 100644 --- a/src/EventHub/EventHub.Autorest/generated/runtime/TypeConverterExtensions.cs +++ b/src/EventHub/EventHub.Autorest/generated/runtime/TypeConverterExtensions.cs @@ -62,6 +62,56 @@ internal static T[] SelectToArray(object source, System.Func return result.ToArray(); } + internal static System.Collections.Generic.List SelectToList(object source, System.Func converter) + { + // null begets null + if (source == null) + { + return null; + } + + // single values and strings are just encapsulated in the array. + if (source is string || !(source is System.Collections.IEnumerable)) + { + try + { + return new T[] { (T)converter(source) }.ToList(); + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + // silent conversion fail + } +#endif + return new T[0].ToList(); // empty result if couldn't convert. + } + + var result = new System.Collections.Generic.List(); + foreach (var each in (System.Collections.IEnumerable)source) + { + try + { + result.Add((T)converter(each)); + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + // silent conversion fail + } +#endif + } + return result; + } internal static System.Collections.Generic.IEnumerable GetPropertyKeys(this System.Collections.Generic.IDictionary dictionary) { if (null != dictionary) diff --git a/src/EventHub/EventHub.Autorest/help/Approve-AzEventHubPrivateEndpointConnection.md b/src/EventHub/EventHub.Autorest/help/Approve-AzEventHubPrivateEndpointConnection.md index c54c0b8c8788..e575cd4e2f5c 100644 --- a/src/EventHub/EventHub.Autorest/help/Approve-AzEventHubPrivateEndpointConnection.md +++ b/src/EventHub/EventHub.Autorest/help/Approve-AzEventHubPrivateEndpointConnection.md @@ -215,7 +215,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection ## NOTES diff --git a/src/EventHub/EventHub.Autorest/help/Az.EventHub.md b/src/EventHub/EventHub.Autorest/help/Az.EventHub.md index f74cfc9ec2fe..51147f4085c2 100644 --- a/src/EventHub/EventHub.Autorest/help/Az.EventHub.md +++ b/src/EventHub/EventHub.Autorest/help/Az.EventHub.md @@ -60,22 +60,22 @@ Gets lists of resources that supports Privatelinks. Gets the details of an EventHub schema group. ### [New-AzEventHub](New-AzEventHub.md) -Creates or updates a new Event Hub as a nested resource within a Namespace. +Create a new Event Hub as a nested resource within a Namespace. ### [New-AzEventHubApplicationGroup](New-AzEventHubApplicationGroup.md) -Creates or updates an ApplicationGroup for a Namespace. +Create an ApplicationGroup for a Namespace. ### [New-AzEventHubAuthorizationRule](New-AzEventHubAuthorizationRule.md) Creates an EventHub Authorization Rule ### [New-AzEventHubCluster](New-AzEventHubCluster.md) -Creates or updates an instance of an Event Hubs Cluster. +Create an instance of an Event Hubs Cluster. ### [New-AzEventHubConsumerGroup](New-AzEventHubConsumerGroup.md) -Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. +Create an Event Hubs consumer group as a nested resource within a Namespace. ### [New-AzEventHubGeoDRConfiguration](New-AzEventHubGeoDRConfiguration.md) -Creates or updates a new Alias(Disaster Recovery configuration) +Create a new Alias(Disaster Recovery configuration) ### [New-AzEventHubIPRuleConfig](New-AzEventHubIPRuleConfig.md) Constructs an INwRuleSetIPRules object that can be fed as input to Set-AzEventHubNetworkRuleSet @@ -90,7 +90,7 @@ Create an in-memory object for KeyVaultProperties. Creates an EventHub Namespace ### [New-AzEventHubSchemaGroup](New-AzEventHubSchemaGroup.md) -Creates or Updates an EventHub schema group. +Create an EventHub schema group. ### [New-AzEventHubThrottlingPolicyConfig](New-AzEventHubThrottlingPolicyConfig.md) Constructs an IThrottlingPolicy object that can be fed as input to New-AzEventHubApplicationGroup or Set-AzEventHubApplicationGroup diff --git a/src/EventHub/EventHub.Autorest/help/Deny-AzEventHubPrivateEndpointConnection.md b/src/EventHub/EventHub.Autorest/help/Deny-AzEventHubPrivateEndpointConnection.md index 759906db93f0..740bcd4e16c1 100644 --- a/src/EventHub/EventHub.Autorest/help/Deny-AzEventHubPrivateEndpointConnection.md +++ b/src/EventHub/EventHub.Autorest/help/Deny-AzEventHubPrivateEndpointConnection.md @@ -217,7 +217,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection ## NOTES diff --git a/src/EventHub/EventHub.Autorest/help/Get-AzEventHub.md b/src/EventHub/EventHub.Autorest/help/Get-AzEventHub.md index 4db7ad972be0..3d41505d3c54 100644 --- a/src/EventHub/EventHub.Autorest/help/Get-AzEventHub.md +++ b/src/EventHub/EventHub.Autorest/help/Get-AzEventHub.md @@ -29,6 +29,12 @@ Get-AzEventHub -Name -NamespaceName -ResourceGroupName [-DefaultProfile ] [] ``` +### GetViaIdentityNamespace +``` +Get-AzEventHub -Name -NamespaceInputObject [-DefaultProfile ] + [] +``` + ## DESCRIPTION Gets an Event Hubs description for the specified Event Hub. @@ -103,7 +109,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity @@ -122,7 +127,7 @@ The Event Hub name ```yaml Type: System.String -Parameter Sets: Get +Parameter Sets: Get, GetViaIdentityNamespace Aliases: EventHubName Required: True @@ -132,6 +137,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity +Parameter Sets: GetViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The Namespace name @@ -218,7 +238,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub ## NOTES diff --git a/src/EventHub/EventHub.Autorest/help/Get-AzEventHubApplicationGroup.md b/src/EventHub/EventHub.Autorest/help/Get-AzEventHubApplicationGroup.md index 758647889d46..2951337e6a71 100644 --- a/src/EventHub/EventHub.Autorest/help/Get-AzEventHubApplicationGroup.md +++ b/src/EventHub/EventHub.Autorest/help/Get-AzEventHubApplicationGroup.md @@ -30,6 +30,12 @@ Get-AzEventHubApplicationGroup -InputObject [-DefaultProfile [] ``` +### GetViaIdentityNamespace +``` +Get-AzEventHubApplicationGroup -Name -NamespaceInputObject + [-DefaultProfile ] [] +``` + ## DESCRIPTION Gets an ApplicationGroup for a Namespace. @@ -90,7 +96,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity @@ -109,7 +114,7 @@ The Application Group name ```yaml Type: System.String -Parameter Sets: Get +Parameter Sets: Get, GetViaIdentityNamespace Aliases: ApplicationGroupName Required: True @@ -119,6 +124,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity +Parameter Sets: GetViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The Namespace name @@ -174,7 +194,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup ## NOTES diff --git a/src/EventHub/EventHub.Autorest/help/Get-AzEventHubAuthorizationRule.md b/src/EventHub/EventHub.Autorest/help/Get-AzEventHubAuthorizationRule.md index 237e6a241f33..bf98369c4737 100644 --- a/src/EventHub/EventHub.Autorest/help/Get-AzEventHubAuthorizationRule.md +++ b/src/EventHub/EventHub.Autorest/help/Get-AzEventHubAuthorizationRule.md @@ -206,7 +206,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule ## NOTES diff --git a/src/EventHub/EventHub.Autorest/help/Get-AzEventHubCluster.md b/src/EventHub/EventHub.Autorest/help/Get-AzEventHubCluster.md index a921273e9f7d..8a42bfc6bdc9 100644 --- a/src/EventHub/EventHub.Autorest/help/Get-AzEventHubCluster.md +++ b/src/EventHub/EventHub.Autorest/help/Get-AzEventHubCluster.md @@ -80,7 +80,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity @@ -149,7 +148,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster ## NOTES diff --git a/src/EventHub/EventHub.Autorest/help/Get-AzEventHubClusterNamespace.md b/src/EventHub/EventHub.Autorest/help/Get-AzEventHubClusterNamespace.md index 09f01a03ad48..c7886d00a777 100644 --- a/src/EventHub/EventHub.Autorest/help/Get-AzEventHubClusterNamespace.md +++ b/src/EventHub/EventHub.Autorest/help/Get-AzEventHubClusterNamespace.md @@ -107,7 +107,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceIdContainer +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceIdListResult ## NOTES diff --git a/src/EventHub/EventHub.Autorest/help/Get-AzEventHubClustersAvailableRegion.md b/src/EventHub/EventHub.Autorest/help/Get-AzEventHubClustersAvailableRegion.md index 137daa73efc7..20cef3aee697 100644 --- a/src/EventHub/EventHub.Autorest/help/Get-AzEventHubClustersAvailableRegion.md +++ b/src/EventHub/EventHub.Autorest/help/Get-AzEventHubClustersAvailableRegion.md @@ -70,7 +70,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAvailableCluster +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAvailableClustersList ## NOTES diff --git a/src/EventHub/EventHub.Autorest/help/Get-AzEventHubConsumerGroup.md b/src/EventHub/EventHub.Autorest/help/Get-AzEventHubConsumerGroup.md index 2c3f5619f43a..a9fde52dc125 100644 --- a/src/EventHub/EventHub.Autorest/help/Get-AzEventHubConsumerGroup.md +++ b/src/EventHub/EventHub.Autorest/help/Get-AzEventHubConsumerGroup.md @@ -29,6 +29,18 @@ Get-AzEventHubConsumerGroup -EventHubName -Name -NamespaceName Get-AzEventHubConsumerGroup -InputObject [-DefaultProfile ] [] ``` +### GetViaIdentityEventhub +``` +Get-AzEventHubConsumerGroup -EventhubInputObject -Name + [-DefaultProfile ] [] +``` + +### GetViaIdentityNamespace +``` +Get-AzEventHubConsumerGroup -EventHubName -Name -NamespaceInputObject + [-DefaultProfile ] [] +``` + ## DESCRIPTION Gets a description for the specified consumer group. @@ -77,12 +89,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -EventhubInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity +Parameter Sets: GetViaIdentityEventhub +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -EventHubName The Event Hub name ```yaml Type: System.String -Parameter Sets: Get, List +Parameter Sets: Get, GetViaIdentityNamespace, List Aliases: Required: True @@ -94,7 +121,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity @@ -113,7 +139,7 @@ The consumer group name ```yaml Type: System.String -Parameter Sets: Get +Parameter Sets: Get, GetViaIdentityEventhub, GetViaIdentityNamespace Aliases: ConsumerGroupName Required: True @@ -123,6 +149,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity +Parameter Sets: GetViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The Namespace name @@ -209,7 +250,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup ## NOTES diff --git a/src/EventHub/EventHub.Autorest/help/Get-AzEventHubGeoDRConfiguration.md b/src/EventHub/EventHub.Autorest/help/Get-AzEventHubGeoDRConfiguration.md index 9c30677ecb7d..a75cad09f932 100644 --- a/src/EventHub/EventHub.Autorest/help/Get-AzEventHubGeoDRConfiguration.md +++ b/src/EventHub/EventHub.Autorest/help/Get-AzEventHubGeoDRConfiguration.md @@ -30,6 +30,12 @@ Get-AzEventHubGeoDRConfiguration -InputObject [-DefaultProfi [] ``` +### GetViaIdentityNamespace +``` +Get-AzEventHubGeoDRConfiguration -Name -NamespaceInputObject + [-DefaultProfile ] [] +``` + ## DESCRIPTION Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace @@ -74,7 +80,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity @@ -93,7 +98,7 @@ The Disaster Recovery configuration name ```yaml Type: System.String -Parameter Sets: Get +Parameter Sets: Get, GetViaIdentityNamespace Aliases: Required: True @@ -103,6 +108,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity +Parameter Sets: GetViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The Namespace name @@ -158,7 +178,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery ## NOTES diff --git a/src/EventHub/EventHub.Autorest/help/Get-AzEventHubKey.md b/src/EventHub/EventHub.Autorest/help/Get-AzEventHubKey.md index f522aa256f77..95b5bcc1f56b 100644 --- a/src/EventHub/EventHub.Autorest/help/Get-AzEventHubKey.md +++ b/src/EventHub/EventHub.Autorest/help/Get-AzEventHubKey.md @@ -214,7 +214,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys ## NOTES diff --git a/src/EventHub/EventHub.Autorest/help/Get-AzEventHubNamespace.md b/src/EventHub/EventHub.Autorest/help/Get-AzEventHubNamespace.md index c36e857f1915..d6e8516d72be 100644 --- a/src/EventHub/EventHub.Autorest/help/Get-AzEventHubNamespace.md +++ b/src/EventHub/EventHub.Autorest/help/Get-AzEventHubNamespace.md @@ -117,7 +117,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity @@ -186,7 +185,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace ## NOTES diff --git a/src/EventHub/EventHub.Autorest/help/Get-AzEventHubNetworkRuleSet.md b/src/EventHub/EventHub.Autorest/help/Get-AzEventHubNetworkRuleSet.md index a8c2f1dfff51..be04ca5b1119 100644 --- a/src/EventHub/EventHub.Autorest/help/Get-AzEventHubNetworkRuleSet.md +++ b/src/EventHub/EventHub.Autorest/help/Get-AzEventHubNetworkRuleSet.md @@ -73,7 +73,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity @@ -142,9 +141,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetListResult +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetListResult ## NOTES diff --git a/src/EventHub/EventHub.Autorest/help/Get-AzEventHubPrivateEndpointConnection.md b/src/EventHub/EventHub.Autorest/help/Get-AzEventHubPrivateEndpointConnection.md index 840abe820c7c..324e10caae4c 100644 --- a/src/EventHub/EventHub.Autorest/help/Get-AzEventHubPrivateEndpointConnection.md +++ b/src/EventHub/EventHub.Autorest/help/Get-AzEventHubPrivateEndpointConnection.md @@ -30,6 +30,12 @@ Get-AzEventHubPrivateEndpointConnection -InputObject [-Defau [] ``` +### GetViaIdentityNamespace +``` +Get-AzEventHubPrivateEndpointConnection -Name -NamespaceInputObject + [-DefaultProfile ] [] +``` + ## DESCRIPTION Gets a description for the specified Private Endpoint Connection name. @@ -81,7 +87,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity @@ -100,7 +105,7 @@ The PrivateEndpointConnection name ```yaml Type: System.String -Parameter Sets: Get +Parameter Sets: Get, GetViaIdentityNamespace Aliases: PrivateEndpointConnectionName Required: True @@ -110,6 +115,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity +Parameter Sets: GetViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The Namespace name @@ -165,9 +185,13 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection ## NOTES ## RELATED LINKS +[https://msdn.microsoft.com/en-us/library/azure/mt639379.aspx](https://msdn.microsoft.com/en-us/library/azure/mt639379.aspx) + +[https://msdn.microsoft.com/en-us/library/azure/mt639412.aspx](https://msdn.microsoft.com/en-us/library/azure/mt639412.aspx) + diff --git a/src/EventHub/EventHub.Autorest/help/Get-AzEventHubPrivateLink.md b/src/EventHub/EventHub.Autorest/help/Get-AzEventHubPrivateLink.md index b16baa0d6795..9e88ef6693f8 100644 --- a/src/EventHub/EventHub.Autorest/help/Get-AzEventHubPrivateLink.md +++ b/src/EventHub/EventHub.Autorest/help/Get-AzEventHubPrivateLink.md @@ -109,9 +109,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourcesListResult +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourcesListResult ## NOTES ## RELATED LINKS +[https://msdn.microsoft.com/en-us/library/azure/mt639379.aspx](https://msdn.microsoft.com/en-us/library/azure/mt639379.aspx) + diff --git a/src/EventHub/EventHub.Autorest/help/Get-AzEventHubSchemaGroup.md b/src/EventHub/EventHub.Autorest/help/Get-AzEventHubSchemaGroup.md index 34c29d62f966..3ea1737560a5 100644 --- a/src/EventHub/EventHub.Autorest/help/Get-AzEventHubSchemaGroup.md +++ b/src/EventHub/EventHub.Autorest/help/Get-AzEventHubSchemaGroup.md @@ -29,6 +29,12 @@ Get-AzEventHubSchemaGroup -Name -NamespaceName -ResourceGroupN Get-AzEventHubSchemaGroup -InputObject [-DefaultProfile ] [] ``` +### GetViaIdentityNamespace +``` +Get-AzEventHubSchemaGroup -Name -NamespaceInputObject + [-DefaultProfile ] [] +``` + ## DESCRIPTION Gets the details of an EventHub schema group. @@ -81,7 +87,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity @@ -100,7 +105,7 @@ The Schema Group name ```yaml Type: System.String -Parameter Sets: Get +Parameter Sets: Get, GetViaIdentityNamespace Aliases: SchemaGroupName Required: True @@ -110,6 +115,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity +Parameter Sets: GetViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The Namespace name @@ -196,7 +216,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup ## NOTES diff --git a/src/EventHub/EventHub.Autorest/help/New-AzEventHub.md b/src/EventHub/EventHub.Autorest/help/New-AzEventHub.md index 20a1998381ed..e80c83c790c8 100644 --- a/src/EventHub/EventHub.Autorest/help/New-AzEventHub.md +++ b/src/EventHub/EventHub.Autorest/help/New-AzEventHub.md @@ -8,22 +8,38 @@ schema: 2.0.0 # New-AzEventHub ## SYNOPSIS -Creates or updates a new Event Hub as a nested resource within a Namespace. +Create a new Event Hub as a nested resource within a Namespace. ## SYNTAX +### CreateExpanded (Default) ``` New-AzEventHub -Name -NamespaceName -ResourceGroupName [-SubscriptionId ] - [-ArchiveNameFormat ] [-BlobContainer ] [-CaptureEnabled] - [-CleanupPolicy ] [-DestinationName ] - [-Encoding ] [-IdentityType ] [-IntervalInSeconds ] + [-ArchiveNameFormat ] [-BlobContainer ] [-CaptureEnabled] [-CleanupPolicy ] + [-DestinationName ] [-Encoding ] [-IdentityType ] [-IntervalInSeconds ] [-PartitionCount ] [-RetentionTimeInHour ] [-SizeLimitInBytes ] [-SkipEmptyArchive] - [-Status ] [-StorageAccountResourceId ] [-TombstoneRetentionTimeInHour ] + [-Status ] [-StorageAccountResourceId ] [-TombstoneRetentionTimeInHour ] + [-UserAssignedIdentityId ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### CreateViaIdentityNamespace +``` +New-AzEventHub -Name -NamespaceInputObject -Parameter + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### CreateViaIdentityNamespaceExpanded +``` +New-AzEventHub -Name -NamespaceInputObject [-ArchiveNameFormat ] + [-BlobContainer ] [-CaptureEnabled] [-CleanupPolicy ] [-DestinationName ] + [-Encoding ] [-IdentityType ] [-IntervalInSeconds ] [-PartitionCount ] + [-RetentionTimeInHour ] [-SizeLimitInBytes ] [-SkipEmptyArchive] [-Status ] + [-StorageAccountResourceId ] [-TombstoneRetentionTimeInHour ] [-UserAssignedIdentityId ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] ``` ## DESCRIPTION -Creates or updates a new Event Hub as a nested resource within a Namespace. +Create a new Event Hub as a nested resource within a Namespace. ## EXAMPLES @@ -152,7 +168,7 @@ etc) are mandatory irrespective of order ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -167,7 +183,7 @@ Blob container Name ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -182,7 +198,7 @@ A value that indicates whether capture description is enabled. ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -196,8 +212,8 @@ Accept wildcard characters: False Enumerates the possible values for cleanup policy ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CleanupPolicyRetentionDescription -Parameter Sets: (All) +Type: System.String +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -228,7 +244,7 @@ Name for capture destination ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -243,8 +259,8 @@ Enumerates the possible values for the encoding format of capture description. Note: 'AvroDeflate' will be deprecated in New API Version ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription -Parameter Sets: (All) +Type: System.String +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -258,8 +274,8 @@ Accept wildcard characters: False Type of Azure Active Directory Managed Identity. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType -Parameter Sets: (All) +Type: System.String +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -274,7 +290,7 @@ The time window allows you to set the frequency with which the capture to Azure ```yaml Type: System.Int32 -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -299,12 +315,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity +Parameter Sets: CreateViaIdentityNamespace, CreateViaIdentityNamespaceExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The Namespace name ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: True @@ -314,12 +345,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Parameter +Single item in List or Get Event Hub operation + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub +Parameter Sets: CreateViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -PartitionCount Number of partitions created for the Event Hub, allowed values are from 1 to 32 partitions. ```yaml Type: System.Int64 -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -334,7 +380,7 @@ Name of the resource group within the azure subscription. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: True @@ -351,7 +397,7 @@ If cleanupPolicy is Compact the returned value of this property is Long.MaxValue ```yaml Type: System.Int64 -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -366,7 +412,7 @@ The size window defines the amount of data built up in your Event Hub before an ```yaml Type: System.Int32 -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -381,7 +427,7 @@ A value that indicates whether to Skip Empty Archives ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -395,8 +441,8 @@ Accept wildcard characters: False Enumerates the possible values for the status of the Event Hub. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus -Parameter Sets: (All) +Type: System.String +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -411,7 +457,7 @@ Resource id of the storage account to be used to create the blobs ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -427,7 +473,7 @@ The subscription ID forms part of the URI for every service call. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -444,7 +490,7 @@ Consumer must complete reading the tombstone marker within this specified amount ```yaml Type: System.Int32 -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -461,7 +507,7 @@ If type is SystemAssigned, then the System Assigned Identity Associated with the ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -507,9 +553,13 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub + +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity + ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub ## NOTES diff --git a/src/EventHub/EventHub.Autorest/help/New-AzEventHubApplicationGroup.md b/src/EventHub/EventHub.Autorest/help/New-AzEventHubApplicationGroup.md index daa73c2d742b..e8a770046fd9 100644 --- a/src/EventHub/EventHub.Autorest/help/New-AzEventHubApplicationGroup.md +++ b/src/EventHub/EventHub.Autorest/help/New-AzEventHubApplicationGroup.md @@ -8,18 +8,32 @@ schema: 2.0.0 # New-AzEventHubApplicationGroup ## SYNOPSIS -Creates or updates an ApplicationGroup for a Namespace. +Create an ApplicationGroup for a Namespace. ## SYNTAX +### CreateExpanded (Default) ``` New-AzEventHubApplicationGroup -Name -NamespaceName -ResourceGroupName [-SubscriptionId ] [-ClientAppGroupIdentifier ] [-IsEnabled] [-Policy ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] ``` +### CreateViaIdentityNamespace +``` +New-AzEventHubApplicationGroup -Name -NamespaceInputObject + -Parameter [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### CreateViaIdentityNamespaceExpanded +``` +New-AzEventHubApplicationGroup -Name -NamespaceInputObject + [-ClientAppGroupIdentifier ] [-IsEnabled] [-Policy ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + ## DESCRIPTION -Creates or updates an ApplicationGroup for a Namespace. +Create an ApplicationGroup for a Namespace. ## EXAMPLES @@ -60,7 +74,7 @@ The Unique identifier for application group.Supports SAS(SASKeyName=KeyName) or ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -92,7 +106,7 @@ Once the isEnabled is set to false, all the existing connections of application ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -117,12 +131,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity +Parameter Sets: CreateViaIdentityNamespace, CreateViaIdentityNamespaceExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The Namespace name ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: True @@ -132,14 +161,28 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Parameter +The Application Group object + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup +Parameter Sets: CreateViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -Policy List of group policies that define the behavior of application group. The policies can support resource governance scenarios such as limiting ingress or egress traffic. -To construct, see NOTES section for POLICY properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicy[] -Parameter Sets: (All) +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicy[] +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -154,7 +197,7 @@ Name of the resource group within the azure subscription. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: True @@ -170,7 +213,7 @@ The subscription ID forms part of the URI for every service call. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -216,9 +259,13 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup + +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity + ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup ## NOTES diff --git a/src/EventHub/EventHub.Autorest/help/New-AzEventHubAuthorizationRule.md b/src/EventHub/EventHub.Autorest/help/New-AzEventHubAuthorizationRule.md index 3cc0f59607d9..b78d7ace0d69 100644 --- a/src/EventHub/EventHub.Autorest/help/New-AzEventHubAuthorizationRule.md +++ b/src/EventHub/EventHub.Autorest/help/New-AzEventHubAuthorizationRule.md @@ -15,15 +15,15 @@ Creates an EventHub Authorization Rule ### NewExpandedNamespace (Default) ``` New-AzEventHubAuthorizationRule -Name -NamespaceName -ResourceGroupName - [-SubscriptionId ] [-Rights ] [-DefaultProfile ] [-AsJob] [-NoWait] - [-Confirm] [-WhatIf] [] + [-SubscriptionId ] [-Rights ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] + [-WhatIf] [] ``` ### NewExpandedEntity ``` New-AzEventHubAuthorizationRule -EventHubName -Name -NamespaceName - -ResourceGroupName [-SubscriptionId ] [-Rights ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] + -ResourceGroupName [-SubscriptionId ] [-Rights ] [-DefaultProfile ] + [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` ## DESCRIPTION @@ -173,7 +173,7 @@ Accept wildcard characters: False The rights associated with the rule. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights[] +Type: System.String[] Parameter Sets: (All) Aliases: @@ -237,7 +237,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule ## NOTES diff --git a/src/EventHub/EventHub.Autorest/help/New-AzEventHubCluster.md b/src/EventHub/EventHub.Autorest/help/New-AzEventHubCluster.md index 6b3a1ba2c6be..6a2f7d84d00f 100644 --- a/src/EventHub/EventHub.Autorest/help/New-AzEventHubCluster.md +++ b/src/EventHub/EventHub.Autorest/help/New-AzEventHubCluster.md @@ -8,7 +8,7 @@ schema: 2.0.0 # New-AzEventHubCluster ## SYNOPSIS -Creates or updates an instance of an Event Hubs Cluster. +Create an instance of an Event Hubs Cluster. ## SYNTAX @@ -19,7 +19,7 @@ New-AzEventHubCluster -Name -ResourceGroupName [-SubscriptionI ``` ## DESCRIPTION -Creates or updates an instance of an Event Hubs Cluster. +Create an instance of an Event Hubs Cluster. ## EXAMPLES @@ -257,7 +257,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster ## NOTES diff --git a/src/EventHub/EventHub.Autorest/help/New-AzEventHubConsumerGroup.md b/src/EventHub/EventHub.Autorest/help/New-AzEventHubConsumerGroup.md index b74ab5f56401..8f700d15f9cb 100644 --- a/src/EventHub/EventHub.Autorest/help/New-AzEventHubConsumerGroup.md +++ b/src/EventHub/EventHub.Autorest/help/New-AzEventHubConsumerGroup.md @@ -8,18 +8,43 @@ schema: 2.0.0 # New-AzEventHubConsumerGroup ## SYNOPSIS -Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. +Create an Event Hubs consumer group as a nested resource within a Namespace. ## SYNTAX +### CreateExpanded (Default) ``` New-AzEventHubConsumerGroup -EventHubName -Name -NamespaceName -ResourceGroupName [-SubscriptionId ] [-UserMetadata ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] ``` +### CreateViaIdentityEventhub +``` +New-AzEventHubConsumerGroup -EventhubInputObject -Name + -Parameter [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### CreateViaIdentityEventhubExpanded +``` +New-AzEventHubConsumerGroup -EventhubInputObject -Name [-UserMetadata ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### CreateViaIdentityNamespace +``` +New-AzEventHubConsumerGroup -EventHubName -Name -NamespaceInputObject + -Parameter [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### CreateViaIdentityNamespaceExpanded +``` +New-AzEventHubConsumerGroup -EventHubName -Name -NamespaceInputObject + [-UserMetadata ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + ## DESCRIPTION -Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. +Create an Event Hubs consumer group as a nested resource within a Namespace. ## EXAMPLES @@ -59,12 +84,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -EventhubInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity +Parameter Sets: CreateViaIdentityEventhub, CreateViaIdentityEventhubExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -EventHubName The Event Hub name ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespace, CreateViaIdentityNamespaceExpanded Aliases: Required: True @@ -89,12 +129,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity +Parameter Sets: CreateViaIdentityNamespace, CreateViaIdentityNamespaceExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The Namespace name ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: True @@ -104,12 +159,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Parameter +Single item in List or Get Consumer group operation + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup +Parameter Sets: CreateViaIdentityEventhub, CreateViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -ResourceGroupName Name of the resource group within the azure subscription. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: True @@ -125,7 +195,7 @@ The subscription ID forms part of the URI for every service call. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -142,7 +212,7 @@ it can be used to store descriptive data, such as list of teams and their contac ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityEventhubExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -188,9 +258,13 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup + +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity + ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup ## NOTES diff --git a/src/EventHub/EventHub.Autorest/help/New-AzEventHubGeoDRConfiguration.md b/src/EventHub/EventHub.Autorest/help/New-AzEventHubGeoDRConfiguration.md index 737255960704..4f91a1e524a6 100644 --- a/src/EventHub/EventHub.Autorest/help/New-AzEventHubGeoDRConfiguration.md +++ b/src/EventHub/EventHub.Autorest/help/New-AzEventHubGeoDRConfiguration.md @@ -8,18 +8,32 @@ schema: 2.0.0 # New-AzEventHubGeoDRConfiguration ## SYNOPSIS -Creates or updates a new Alias(Disaster Recovery configuration) +Create a new Alias(Disaster Recovery configuration) ## SYNTAX +### CreateExpanded (Default) ``` New-AzEventHubGeoDRConfiguration -Name -NamespaceName -ResourceGroupName [-SubscriptionId ] [-AlternateName ] [-PartnerNamespace ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] ``` +### CreateViaIdentityNamespace +``` +New-AzEventHubGeoDRConfiguration -Name -NamespaceInputObject + -Parameter [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### CreateViaIdentityNamespaceExpanded +``` +New-AzEventHubGeoDRConfiguration -Name -NamespaceInputObject + [-AlternateName ] [-PartnerNamespace ] [-DefaultProfile ] [-Confirm] [-WhatIf] + [] +``` + ## DESCRIPTION -Creates or updates a new Alias(Disaster Recovery configuration) +Create a new Alias(Disaster Recovery configuration) ## EXAMPLES @@ -50,7 +64,7 @@ Alternate name specified when alias and namespace names are same. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -91,12 +105,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity +Parameter Sets: CreateViaIdentityNamespace, CreateViaIdentityNamespaceExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The Namespace name ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: True @@ -106,12 +135,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Parameter +Single item in List or Get Alias(Disaster Recovery configuration) operation + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery +Parameter Sets: CreateViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -PartnerNamespace ARM Id of the Primary/Secondary eventhub namespace name, which is part of GEO DR pairing ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -126,7 +170,7 @@ Name of the resource group within the azure subscription. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: True @@ -142,7 +186,7 @@ The subscription ID forms part of the URI for every service call. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -188,9 +232,13 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery + +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity + ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery ## NOTES diff --git a/src/EventHub/EventHub.Autorest/help/New-AzEventHubIPRuleConfig.md b/src/EventHub/EventHub.Autorest/help/New-AzEventHubIPRuleConfig.md index 01cbcf081e16..bdae42c343c9 100644 --- a/src/EventHub/EventHub.Autorest/help/New-AzEventHubIPRuleConfig.md +++ b/src/EventHub/EventHub.Autorest/help/New-AzEventHubIPRuleConfig.md @@ -13,7 +13,7 @@ Constructs an INwRuleSetIPRules object that can be fed as input to Set-AzEventHu ## SYNTAX ``` -New-AzEventHubIPRuleConfig -IPMask [-Action ] [] +New-AzEventHubIPRuleConfig -IPMask [-Action ] [] ``` ## DESCRIPTION @@ -40,7 +40,7 @@ Please refer examples for Set-AzEventHubNetworkRuleSet to know more. The IP Filter Action ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkRuleIPAction +Type: System.String Parameter Sets: (All) Aliases: @@ -73,7 +73,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetIPRules +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetIPRules ## NOTES diff --git a/src/EventHub/EventHub.Autorest/help/New-AzEventHubKey.md b/src/EventHub/EventHub.Autorest/help/New-AzEventHubKey.md index 80cdd0595b53..29d7a3781f61 100644 --- a/src/EventHub/EventHub.Autorest/help/New-AzEventHubKey.md +++ b/src/EventHub/EventHub.Autorest/help/New-AzEventHubKey.md @@ -15,14 +15,14 @@ Regenerates an EventHub SAS key ### NewExpandedNamespace (Default) ``` New-AzEventHubKey -Name -NamespaceName -ResourceGroupName - [-SubscriptionId ] [-KeyType ] [-KeyValue ] [-DefaultProfile ] [-AsJob] + [-SubscriptionId ] [-KeyType ] [-KeyValue ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` ### NewExpandedEntity ``` New-AzEventHubKey -EventHubName -Name -NamespaceName -ResourceGroupName - [-SubscriptionId ] [-KeyType ] [-KeyValue ] [-DefaultProfile ] [-AsJob] + [-SubscriptionId ] [-KeyType ] [-KeyValue ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` @@ -112,7 +112,7 @@ Accept wildcard characters: False The access key to regenerate. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeyType +Type: System.String Parameter Sets: (All) Aliases: RegenerateKey @@ -252,7 +252,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys ## NOTES diff --git a/src/EventHub/EventHub.Autorest/help/New-AzEventHubKeyVaultPropertiesObject.md b/src/EventHub/EventHub.Autorest/help/New-AzEventHubKeyVaultPropertiesObject.md index 9283b40c68bf..1774f6f1f40e 100644 --- a/src/EventHub/EventHub.Autorest/help/New-AzEventHubKeyVaultPropertiesObject.md +++ b/src/EventHub/EventHub.Autorest/help/New-AzEventHubKeyVaultPropertiesObject.md @@ -1,7 +1,7 @@ --- external help file: Module Name: Az.EventHub -online version: https://learn.microsoft.com/powershell/module/Az.EventHub/new-AzEventHubKeyVaultPropertiesObject +online version: https://learn.microsoft.com/powershell/module/Az.EventHub/new-azeventhubkeyvaultpropertiesobject schema: 2.0.0 --- @@ -100,7 +100,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.KeyVaultProperties +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.KeyVaultProperties ## NOTES diff --git a/src/EventHub/EventHub.Autorest/help/New-AzEventHubNamespace.md b/src/EventHub/EventHub.Autorest/help/New-AzEventHubNamespace.md index 15aa8eb054fe..9b3558dd48eb 100644 --- a/src/EventHub/EventHub.Autorest/help/New-AzEventHubNamespace.md +++ b/src/EventHub/EventHub.Autorest/help/New-AzEventHubNamespace.md @@ -15,9 +15,9 @@ Creates an EventHub Namespace ``` New-AzEventHubNamespace -Name -ResourceGroupName -Location [-SubscriptionId ] [-AlternateName ] [-ClusterArmId ] [-DisableLocalAuth] - [-EnableAutoInflate] [-IdentityType ] [-KeyVaultProperty ] - [-MaximumThroughputUnit ] [-MinimumTlsVersion ] [-PublicNetworkAccess ] - [-RequireInfrastructureEncryption] [-SkuCapacity ] [-SkuName ] [-Tag ] + [-EnableAutoInflate] [-IdentityType ] [-KeyVaultProperty ] + [-MaximumThroughputUnit ] [-MinimumTlsVersion ] [-PublicNetworkAccess ] + [-RequireInfrastructureEncryption] [-SkuCapacity ] [-SkuName ] [-Tag ] [-UserAssignedIdentityId ] [-ZoneRedundant] [-DefaultProfile ] [-AsJob] [-Confirm] [-WhatIf] [] ``` @@ -276,7 +276,7 @@ Accept wildcard characters: False Type of managed service identity. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType +Type: System.String Parameter Sets: (All) Aliases: @@ -289,10 +289,9 @@ Accept wildcard characters: False ### -KeyVaultProperty Properties to configure Encryption -To construct, see NOTES section for KEYVAULTPROPERTY properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultProperties[] +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultProperties[] Parameter Sets: (All) Aliases: @@ -370,7 +369,7 @@ This determines if traffic is allowed over public network. By default it is enabled. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess +Type: System.String Parameter Sets: (All) Aliases: @@ -433,7 +432,7 @@ The minimum TLS version for the cluster to support, e.g. '1.2' ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuName +Type: System.String Parameter Sets: (All) Aliases: @@ -542,7 +541,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace ## NOTES diff --git a/src/EventHub/EventHub.Autorest/help/New-AzEventHubSchemaGroup.md b/src/EventHub/EventHub.Autorest/help/New-AzEventHubSchemaGroup.md index 65ca117df74d..87d424603bcb 100644 --- a/src/EventHub/EventHub.Autorest/help/New-AzEventHubSchemaGroup.md +++ b/src/EventHub/EventHub.Autorest/help/New-AzEventHubSchemaGroup.md @@ -8,18 +8,32 @@ schema: 2.0.0 # New-AzEventHubSchemaGroup ## SYNOPSIS -Creates or Updates an EventHub schema group. +Create an EventHub schema group. ## SYNTAX +### CreateExpanded (Default) ``` New-AzEventHubSchemaGroup -Name -NamespaceName -ResourceGroupName - [-SubscriptionId ] [-GroupProperty ] [-SchemaCompatibility ] - [-SchemaType ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] + [-SubscriptionId ] [-GroupProperty ] [-SchemaCompatibility ] + [-SchemaType ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### CreateViaIdentityNamespace +``` +New-AzEventHubSchemaGroup -Name -NamespaceInputObject -Parameter + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### CreateViaIdentityNamespaceExpanded +``` +New-AzEventHubSchemaGroup -Name -NamespaceInputObject + [-GroupProperty ] [-SchemaCompatibility ] [-SchemaType ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] ``` ## DESCRIPTION -Creates or Updates an EventHub schema group. +Create an EventHub schema group. ## EXAMPLES @@ -66,7 +80,7 @@ dictionary object for SchemaGroup group properties ```yaml Type: System.Collections.Hashtable -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -91,12 +105,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity +Parameter Sets: CreateViaIdentityNamespace, CreateViaIdentityNamespaceExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The Namespace name ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: True @@ -106,12 +135,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Parameter +Single item in List or Get Schema Group operation + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup +Parameter Sets: CreateViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -ResourceGroupName Name of the resource group within the azure subscription. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: True @@ -125,8 +169,8 @@ Accept wildcard characters: False . ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaCompatibility -Parameter Sets: (All) +Type: System.String +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -140,8 +184,8 @@ Accept wildcard characters: False . ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaType -Parameter Sets: (All) +Type: System.String +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -157,7 +201,7 @@ The subscription ID forms part of the URI for every service call. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -203,9 +247,13 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity + +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup + ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup ## NOTES diff --git a/src/EventHub/EventHub.Autorest/help/New-AzEventHubThrottlingPolicyConfig.md b/src/EventHub/EventHub.Autorest/help/New-AzEventHubThrottlingPolicyConfig.md index 028ca766e8a4..21d6b1d83a28 100644 --- a/src/EventHub/EventHub.Autorest/help/New-AzEventHubThrottlingPolicyConfig.md +++ b/src/EventHub/EventHub.Autorest/help/New-AzEventHubThrottlingPolicyConfig.md @@ -13,7 +13,7 @@ Constructs an IThrottlingPolicy object that can be fed as input to New-AzEventHu ## SYNTAX ``` -New-AzEventHubThrottlingPolicyConfig -MetricId -Name -RateLimitThreshold +New-AzEventHubThrottlingPolicyConfig -MetricId -Name -RateLimitThreshold [] ``` @@ -41,7 +41,7 @@ Please refer examples for Set-AzEventHubApplicationGroup to know more. Metric Id on which the throttle limit should be set, MetricId can be discovered by hovering over Metric in the Metrics section of Event Hub Namespace inside Azure Portal ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.MetricId +Type: System.String Parameter Sets: (All) Aliases: @@ -89,7 +89,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IThrottlingPolicy +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IThrottlingPolicy ## NOTES diff --git a/src/EventHub/EventHub.Autorest/help/New-AzEventHubVirtualNetworkRuleConfig.md b/src/EventHub/EventHub.Autorest/help/New-AzEventHubVirtualNetworkRuleConfig.md index 4f39cba3a973..755feed06dac 100644 --- a/src/EventHub/EventHub.Autorest/help/New-AzEventHubVirtualNetworkRuleConfig.md +++ b/src/EventHub/EventHub.Autorest/help/New-AzEventHubVirtualNetworkRuleConfig.md @@ -75,7 +75,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetVirtualNetworkRules +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetVirtualNetworkRules ## NOTES diff --git a/src/EventHub/EventHub.Autorest/help/Remove-AzEventHub.md b/src/EventHub/EventHub.Autorest/help/Remove-AzEventHub.md index 2226de80f510..52dc6eea7a46 100644 --- a/src/EventHub/EventHub.Autorest/help/Remove-AzEventHub.md +++ b/src/EventHub/EventHub.Autorest/help/Remove-AzEventHub.md @@ -24,6 +24,12 @@ Remove-AzEventHub -InputObject [-DefaultProfile ] [-WhatIf] [] ``` +### DeleteViaIdentityNamespace +``` +Remove-AzEventHub -Name -NamespaceInputObject [-DefaultProfile ] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + ## DESCRIPTION Deletes an Event Hub from the specified Namespace and resource group. @@ -56,7 +62,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity @@ -75,7 +80,7 @@ The Event Hub name ```yaml Type: System.String -Parameter Sets: Delete +Parameter Sets: Delete, DeleteViaIdentityNamespace Aliases: EventHubName Required: True @@ -85,6 +90,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity +Parameter Sets: DeleteViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The Namespace name diff --git a/src/EventHub/EventHub.Autorest/help/Remove-AzEventHubApplicationGroup.md b/src/EventHub/EventHub.Autorest/help/Remove-AzEventHubApplicationGroup.md index ee67dc588f0b..bd4ec0a45105 100644 --- a/src/EventHub/EventHub.Autorest/help/Remove-AzEventHubApplicationGroup.md +++ b/src/EventHub/EventHub.Autorest/help/Remove-AzEventHubApplicationGroup.md @@ -24,6 +24,12 @@ Remove-AzEventHubApplicationGroup -InputObject [-DefaultProf [-Confirm] [-WhatIf] [] ``` +### DeleteViaIdentityNamespace +``` +Remove-AzEventHubApplicationGroup -Name -NamespaceInputObject + [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] [] +``` + ## DESCRIPTION Deletes an ApplicationGroup for a Namespace. @@ -56,7 +62,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity @@ -75,7 +80,7 @@ The Application Group name ```yaml Type: System.String -Parameter Sets: Delete +Parameter Sets: Delete, DeleteViaIdentityNamespace Aliases: ApplicationGroupName Required: True @@ -85,6 +90,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity +Parameter Sets: DeleteViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The Namespace name diff --git a/src/EventHub/EventHub.Autorest/help/Remove-AzEventHubAuthorizationRule.md b/src/EventHub/EventHub.Autorest/help/Remove-AzEventHubAuthorizationRule.md index 1eff8a57b7b6..c2df0f3eac15 100644 --- a/src/EventHub/EventHub.Autorest/help/Remove-AzEventHubAuthorizationRule.md +++ b/src/EventHub/EventHub.Autorest/help/Remove-AzEventHubAuthorizationRule.md @@ -230,7 +230,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule ## NOTES diff --git a/src/EventHub/EventHub.Autorest/help/Remove-AzEventHubCluster.md b/src/EventHub/EventHub.Autorest/help/Remove-AzEventHubCluster.md index 43e012301ea8..d6e01fcb8921 100644 --- a/src/EventHub/EventHub.Autorest/help/Remove-AzEventHubCluster.md +++ b/src/EventHub/EventHub.Autorest/help/Remove-AzEventHubCluster.md @@ -73,7 +73,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity diff --git a/src/EventHub/EventHub.Autorest/help/Remove-AzEventHubConsumerGroup.md b/src/EventHub/EventHub.Autorest/help/Remove-AzEventHubConsumerGroup.md index 19e5fc86fc83..80493b19c41f 100644 --- a/src/EventHub/EventHub.Autorest/help/Remove-AzEventHubConsumerGroup.md +++ b/src/EventHub/EventHub.Autorest/help/Remove-AzEventHubConsumerGroup.md @@ -25,6 +25,18 @@ Remove-AzEventHubConsumerGroup -InputObject [-DefaultProfile [-Confirm] [-WhatIf] [] ``` +### DeleteViaIdentityEventhub +``` +Remove-AzEventHubConsumerGroup -EventhubInputObject -Name + [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### DeleteViaIdentityNamespace +``` +Remove-AzEventHubConsumerGroup -EventHubName -Name -NamespaceInputObject + [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] [] +``` + ## DESCRIPTION Deletes a consumer group from the specified Event Hub and resource group. @@ -55,12 +67,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -EventhubInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity +Parameter Sets: DeleteViaIdentityEventhub +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -EventHubName The Event Hub name ```yaml Type: System.String -Parameter Sets: Delete +Parameter Sets: Delete, DeleteViaIdentityNamespace Aliases: Required: True @@ -72,7 +99,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity @@ -91,7 +117,7 @@ The consumer group name ```yaml Type: System.String -Parameter Sets: Delete +Parameter Sets: Delete, DeleteViaIdentityEventhub, DeleteViaIdentityNamespace Aliases: ConsumerGroupName Required: True @@ -101,6 +127,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity +Parameter Sets: DeleteViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The Namespace name diff --git a/src/EventHub/EventHub.Autorest/help/Remove-AzEventHubGeoDRConfiguration.md b/src/EventHub/EventHub.Autorest/help/Remove-AzEventHubGeoDRConfiguration.md index 563fc36f5db4..285c3b3fdcc4 100644 --- a/src/EventHub/EventHub.Autorest/help/Remove-AzEventHubGeoDRConfiguration.md +++ b/src/EventHub/EventHub.Autorest/help/Remove-AzEventHubGeoDRConfiguration.md @@ -24,6 +24,12 @@ Remove-AzEventHubGeoDRConfiguration -InputObject [-DefaultPr [-Confirm] [-WhatIf] [] ``` +### DeleteViaIdentityNamespace +``` +Remove-AzEventHubGeoDRConfiguration -Name -NamespaceInputObject + [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] [] +``` + ## DESCRIPTION Deletes an Alias(Disaster Recovery configuration) @@ -56,7 +62,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity @@ -75,7 +80,7 @@ The Disaster Recovery configuration name ```yaml Type: System.String -Parameter Sets: Delete +Parameter Sets: Delete, DeleteViaIdentityNamespace Aliases: Required: True @@ -85,6 +90,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity +Parameter Sets: DeleteViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The Namespace name diff --git a/src/EventHub/EventHub.Autorest/help/Remove-AzEventHubNamespace.md b/src/EventHub/EventHub.Autorest/help/Remove-AzEventHubNamespace.md index a4ce14309c92..41d92e6c6d9a 100644 --- a/src/EventHub/EventHub.Autorest/help/Remove-AzEventHubNamespace.md +++ b/src/EventHub/EventHub.Autorest/help/Remove-AzEventHubNamespace.md @@ -81,7 +81,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity diff --git a/src/EventHub/EventHub.Autorest/help/Remove-AzEventHubPrivateEndpointConnection.md b/src/EventHub/EventHub.Autorest/help/Remove-AzEventHubPrivateEndpointConnection.md index 36af4686e159..b5acc0021a12 100644 --- a/src/EventHub/EventHub.Autorest/help/Remove-AzEventHubPrivateEndpointConnection.md +++ b/src/EventHub/EventHub.Autorest/help/Remove-AzEventHubPrivateEndpointConnection.md @@ -26,6 +26,12 @@ Remove-AzEventHubPrivateEndpointConnection -InputObject [-De [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] ``` +### DeleteViaIdentityNamespace +``` +Remove-AzEventHubPrivateEndpointConnection -Name -NamespaceInputObject + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + ## DESCRIPTION Deletes an existing namespace. This operation also removes all associated resources under the namespace. @@ -74,7 +80,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity @@ -93,7 +98,7 @@ The PrivateEndpointConnection name ```yaml Type: System.String -Parameter Sets: Delete +Parameter Sets: Delete, DeleteViaIdentityNamespace Aliases: PrivateEndpointConnectionName Required: True @@ -103,6 +108,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity +Parameter Sets: DeleteViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The Namespace name @@ -225,3 +245,5 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS +[https://msdn.microsoft.com/en-us/library/azure/mt639389.aspx](https://msdn.microsoft.com/en-us/library/azure/mt639389.aspx) + diff --git a/src/EventHub/EventHub.Autorest/help/Remove-AzEventHubSchemaGroup.md b/src/EventHub/EventHub.Autorest/help/Remove-AzEventHubSchemaGroup.md index 164b4eabf9dd..be0d26e28bb9 100644 --- a/src/EventHub/EventHub.Autorest/help/Remove-AzEventHubSchemaGroup.md +++ b/src/EventHub/EventHub.Autorest/help/Remove-AzEventHubSchemaGroup.md @@ -24,6 +24,12 @@ Remove-AzEventHubSchemaGroup -InputObject [-DefaultProfile < [-Confirm] [-WhatIf] [] ``` +### DeleteViaIdentityNamespace +``` +Remove-AzEventHubSchemaGroup -Name -NamespaceInputObject + [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] [] +``` + ## DESCRIPTION Deletes an EventHub schema group. @@ -56,7 +62,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity @@ -75,7 +80,7 @@ The Schema Group name ```yaml Type: System.String -Parameter Sets: Delete +Parameter Sets: Delete, DeleteViaIdentityNamespace Aliases: SchemaGroupName Required: True @@ -85,6 +90,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity +Parameter Sets: DeleteViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The Namespace name diff --git a/src/EventHub/EventHub.Autorest/help/Set-AzEventHub.md b/src/EventHub/EventHub.Autorest/help/Set-AzEventHub.md index 35a9b545f1ee..7244cdba5099 100644 --- a/src/EventHub/EventHub.Autorest/help/Set-AzEventHub.md +++ b/src/EventHub/EventHub.Autorest/help/Set-AzEventHub.md @@ -16,22 +16,21 @@ Updates an EventHub Entity ``` Set-AzEventHub -Name -NamespaceName -ResourceGroupName [-SubscriptionId ] [-ArchiveNameFormat ] [-BlobContainer ] [-CaptureEnabled] [-DestinationName ] - [-Encoding ] [-IdentityType ] - [-IntervalInSeconds ] [-PartitionCount ] [-RetentionTimeInHour ] - [-SizeLimitInBytes ] [-SkipEmptyArchive] [-Status ] [-StorageAccountResourceId ] - [-TombstoneRetentionTimeInHour ] [-UserAssignedIdentityId ] [-DefaultProfile ] - [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] + [-Encoding ] [-IdentityType ] [-IntervalInSeconds ] [-PartitionCount ] + [-RetentionTimeInHour ] [-SizeLimitInBytes ] [-SkipEmptyArchive] [-Status ] + [-StorageAccountResourceId ] [-TombstoneRetentionTimeInHour ] + [-UserAssignedIdentityId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] ``` ### SetViaIdentityExpanded ``` Set-AzEventHub -InputObject [-ArchiveNameFormat ] [-BlobContainer ] - [-CaptureEnabled] [-DestinationName ] [-Encoding ] - [-IdentityType ] [-IntervalInSeconds ] [-PartitionCount ] - [-RetentionTimeInHour ] [-SizeLimitInBytes ] [-SkipEmptyArchive] [-Status ] - [-StorageAccountResourceId ] [-TombstoneRetentionTimeInHour ] - [-UserAssignedIdentityId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] - [] + [-CaptureEnabled] [-DestinationName ] [-Encoding ] [-IdentityType ] + [-IntervalInSeconds ] [-PartitionCount ] [-RetentionTimeInHour ] + [-SizeLimitInBytes ] [-SkipEmptyArchive] [-Status ] [-StorageAccountResourceId ] + [-TombstoneRetentionTimeInHour ] [-UserAssignedIdentityId ] [-DefaultProfile ] + [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` ## DESCRIPTION @@ -225,7 +224,7 @@ Enumerates the possible values for the encoding format of capture description. Note: 'AvroDeflate' will be deprecated in New API Version ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription +Type: System.String Parameter Sets: (All) Aliases: @@ -240,7 +239,7 @@ Accept wildcard characters: False Type of managed service identity. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType +Type: System.String Parameter Sets: (All) Aliases: @@ -410,7 +409,7 @@ Accept wildcard characters: False Enumerates the possible values for the status of the Event Hub. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus +Type: System.String Parameter Sets: (All) Aliases: @@ -523,7 +522,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub ## NOTES diff --git a/src/EventHub/EventHub.Autorest/help/Set-AzEventHubApplicationGroup.md b/src/EventHub/EventHub.Autorest/help/Set-AzEventHubApplicationGroup.md index 6badd9b8722f..7872c99e6c41 100644 --- a/src/EventHub/EventHub.Autorest/help/Set-AzEventHubApplicationGroup.md +++ b/src/EventHub/EventHub.Autorest/help/Set-AzEventHubApplicationGroup.md @@ -231,10 +231,9 @@ Accept wildcard characters: False ### -Policy List of group policies that define the behavior of application group. The policies can support resource governance scenarios such as limiting ingress or egress traffic. -To construct, see NOTES section for POLICY properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicy[] +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicy[] Parameter Sets: (All) Aliases: @@ -312,7 +311,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicy[] +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicy[] ### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity @@ -322,7 +321,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup ## NOTES diff --git a/src/EventHub/EventHub.Autorest/help/Set-AzEventHubAuthorizationRule.md b/src/EventHub/EventHub.Autorest/help/Set-AzEventHubAuthorizationRule.md index e63a35a17c19..689e232a1839 100644 --- a/src/EventHub/EventHub.Autorest/help/Set-AzEventHubAuthorizationRule.md +++ b/src/EventHub/EventHub.Autorest/help/Set-AzEventHubAuthorizationRule.md @@ -14,7 +14,7 @@ Sets an EventHub Authorization Rule ### SetExpandedNamespace (Default) ``` -Set-AzEventHubAuthorizationRule -NamespaceName -ResourceGroupName -Rights +Set-AzEventHubAuthorizationRule -NamespaceName -ResourceGroupName -Rights [-Name ] [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` @@ -22,13 +22,13 @@ Set-AzEventHubAuthorizationRule -NamespaceName -ResourceGroupName -NamespaceName -ResourceGroupName - -Rights [-Name ] [-SubscriptionId ] [-DefaultProfile ] [-AsJob] + -Rights [-Name ] [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` ### SetViaIdentityExpanded ``` -Set-AzEventHubAuthorizationRule -InputObject -Rights +Set-AzEventHubAuthorizationRule -InputObject -Rights [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` @@ -195,7 +195,7 @@ Accept wildcard characters: False The rights associated with the rule. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights[] +Type: System.String[] Parameter Sets: (All) Aliases: @@ -261,7 +261,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule ## NOTES diff --git a/src/EventHub/EventHub.Autorest/help/Set-AzEventHubCluster.md b/src/EventHub/EventHub.Autorest/help/Set-AzEventHubCluster.md index 6779d569721e..d2420760027b 100644 --- a/src/EventHub/EventHub.Autorest/help/Set-AzEventHubCluster.md +++ b/src/EventHub/EventHub.Autorest/help/Set-AzEventHubCluster.md @@ -199,10 +199,9 @@ Accept wildcard characters: False ### -Tag Resource tags. -To construct, see NOTES section for TAG properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceTags +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceTags Parameter Sets: (All) Aliases: @@ -253,7 +252,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster ## NOTES diff --git a/src/EventHub/EventHub.Autorest/help/Set-AzEventHubConsumerGroup.md b/src/EventHub/EventHub.Autorest/help/Set-AzEventHubConsumerGroup.md index 89ea9873793b..b2b60044c402 100644 --- a/src/EventHub/EventHub.Autorest/help/Set-AzEventHubConsumerGroup.md +++ b/src/EventHub/EventHub.Autorest/help/Set-AzEventHubConsumerGroup.md @@ -263,7 +263,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup ## NOTES diff --git a/src/EventHub/EventHub.Autorest/help/Set-AzEventHubNamespace.md b/src/EventHub/EventHub.Autorest/help/Set-AzEventHubNamespace.md index 1bd8b82b5288..16e11be42e7a 100644 --- a/src/EventHub/EventHub.Autorest/help/Set-AzEventHubNamespace.md +++ b/src/EventHub/EventHub.Autorest/help/Set-AzEventHubNamespace.md @@ -15,10 +15,9 @@ Updates an EventHub Namespace ### SetExpanded (Default) ``` Set-AzEventHubNamespace -Name -ResourceGroupName [-SubscriptionId ] - [-AlternateName ] [-DisableLocalAuth] [-EnableAutoInflate] - [-IdentityType ] [-KeyVaultProperty ] - [-MaximumThroughputUnit ] [-MinimumTlsVersion ] [-PublicNetworkAccess ] - [-RequireInfrastructureEncryption] [-SkuCapacity ] [-Tag ] + [-AlternateName ] [-DisableLocalAuth] [-EnableAutoInflate] [-IdentityType ] + [-KeyVaultProperty ] [-MaximumThroughputUnit ] [-MinimumTlsVersion ] + [-PublicNetworkAccess ] [-RequireInfrastructureEncryption] [-SkuCapacity ] [-Tag ] [-UserAssignedIdentityId ] [-DefaultProfile ] [-AsJob] [-Confirm] [-WhatIf] [] ``` @@ -26,8 +25,8 @@ Set-AzEventHubNamespace -Name -ResourceGroupName [-Subscriptio ### SetViaIdentityExpanded ``` Set-AzEventHubNamespace -InputObject [-AlternateName ] [-DisableLocalAuth] - [-EnableAutoInflate] [-IdentityType ] [-KeyVaultProperty ] - [-MaximumThroughputUnit ] [-MinimumTlsVersion ] [-PublicNetworkAccess ] + [-EnableAutoInflate] [-IdentityType ] [-KeyVaultProperty ] + [-MaximumThroughputUnit ] [-MinimumTlsVersion ] [-PublicNetworkAccess ] [-RequireInfrastructureEncryption] [-SkuCapacity ] [-Tag ] [-UserAssignedIdentityId ] [-DefaultProfile ] [-AsJob] [-Confirm] [-WhatIf] [] @@ -454,7 +453,7 @@ Accept wildcard characters: False Type of managed service identity. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType +Type: System.String Parameter Sets: (All) Aliases: @@ -483,10 +482,9 @@ Accept wildcard characters: False ### -KeyVaultProperty Properties to configure Encryption -To construct, see NOTES section for KEYVAULTPROPERTY properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultProperties[] +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultProperties[] Parameter Sets: (All) Aliases: @@ -549,7 +547,7 @@ This determines if traffic is allowed over public network. By default it is enabled. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess +Type: System.String Parameter Sets: (All) Aliases: @@ -692,7 +690,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace ## NOTES diff --git a/src/EventHub/EventHub.Autorest/help/Set-AzEventHubNetworkRuleSet.md b/src/EventHub/EventHub.Autorest/help/Set-AzEventHubNetworkRuleSet.md index 97b8f5c63057..dc5212afd527 100644 --- a/src/EventHub/EventHub.Autorest/help/Set-AzEventHubNetworkRuleSet.md +++ b/src/EventHub/EventHub.Autorest/help/Set-AzEventHubNetworkRuleSet.md @@ -15,15 +15,15 @@ Sets an EventHub Namespace Network Rule Set ### SetExpanded (Default) ``` Set-AzEventHubNetworkRuleSet -NamespaceName -ResourceGroupName [-SubscriptionId ] - [-DefaultAction ] [-IPRule ] [-PublicNetworkAccess ] + [-DefaultAction ] [-IPRule ] [-PublicNetworkAccess ] [-TrustedServiceAccessEnabled] [-VirtualNetworkRule ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` ### SetViaIdentityExpanded ``` -Set-AzEventHubNetworkRuleSet -InputObject [-DefaultAction ] - [-IPRule ] [-PublicNetworkAccess ] [-TrustedServiceAccessEnabled] +Set-AzEventHubNetworkRuleSet -InputObject [-DefaultAction ] + [-IPRule ] [-PublicNetworkAccess ] [-TrustedServiceAccessEnabled] [-VirtualNetworkRule ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` @@ -141,7 +141,7 @@ Accept wildcard characters: False Default Action for Network Rule Set ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.DefaultAction +Type: System.String Parameter Sets: (All) Aliases: @@ -185,10 +185,9 @@ Accept wildcard characters: False ### -IPRule List of IpRules -To construct, see NOTES section for IPRULE properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetIPRules[] +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetIPRules[] Parameter Sets: (All) Aliases: @@ -235,7 +234,7 @@ By default it is enabled. If value is SecuredByPerimeter then Inbound and Outbound communication is controlled by the network security perimeter and profile's access rules. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess +Type: System.String Parameter Sets: (All) Aliases: @@ -294,10 +293,9 @@ Accept wildcard characters: False ### -VirtualNetworkRule List of VirtualNetwork Rules -To construct, see NOTES section for VIRTUALNETWORKRULE properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetVirtualNetworkRules[] +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetVirtualNetworkRules[] Parameter Sets: (All) Aliases: @@ -348,7 +346,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet ## NOTES diff --git a/src/EventHub/EventHub.Autorest/help/Test-AzEventHubName.md b/src/EventHub/EventHub.Autorest/help/Test-AzEventHubName.md index d09f7342c0cd..416f49ff3414 100644 --- a/src/EventHub/EventHub.Autorest/help/Test-AzEventHubName.md +++ b/src/EventHub/EventHub.Autorest/help/Test-AzEventHubName.md @@ -169,7 +169,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult ## NOTES diff --git a/src/EventHub/EventHub.Autorest/internal/Get-AzEventHubAuthorizationRule.ps1 b/src/EventHub/EventHub.Autorest/internal/Get-AzEventHubAuthorizationRule.ps1 index 5e80264aa22e..37b0c05eca6d 100644 --- a/src/EventHub/EventHub.Autorest/internal/Get-AzEventHubAuthorizationRule.ps1 +++ b/src/EventHub/EventHub.Autorest/internal/Get-AzEventHubAuthorizationRule.ps1 @@ -27,12 +27,27 @@ Get-AzEventHubAuthorizationRule -ResourceGroupName myResourceGroup -NamespaceNam .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. +EVENTHUBINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [ApplicationGroupName ]: The Application Group name @@ -47,14 +62,30 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: Name of the resource group within the azure subscription. [SchemaGroupName ]: The Schema Group name [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. .Link https://learn.microsoft.com/powershell/module/az.eventhub/get-azeventhubauthorizationrule #> function Get-AzEventHubAuthorizationRule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] @@ -62,6 +93,8 @@ param( ${EventHubName}, [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityEventhub', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # The authorization rule name. @@ -94,9 +127,20 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityEventhub', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${EventhubInputObject}, + + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -157,9 +201,11 @@ begin { $mapping = @{ Get = 'Az.EventHub.private\Get-AzEventHubAuthorizationRule_Get'; GetViaIdentity = 'Az.EventHub.private\Get-AzEventHubAuthorizationRule_GetViaIdentity'; + GetViaIdentityEventhub = 'Az.EventHub.private\Get-AzEventHubAuthorizationRule_GetViaIdentityEventhub'; + GetViaIdentityNamespace = 'Az.EventHub.private\Get-AzEventHubAuthorizationRule_GetViaIdentityNamespace'; List = 'Az.EventHub.private\Get-AzEventHubAuthorizationRule_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/internal/Get-AzEventHubDisasterRecoveryConfigAuthorizationRule.ps1 b/src/EventHub/EventHub.Autorest/internal/Get-AzEventHubDisasterRecoveryConfigAuthorizationRule.ps1 index a3381237d061..e8d833b04649 100644 --- a/src/EventHub/EventHub.Autorest/internal/Get-AzEventHubDisasterRecoveryConfigAuthorizationRule.ps1 +++ b/src/EventHub/EventHub.Autorest/internal/Get-AzEventHubDisasterRecoveryConfigAuthorizationRule.ps1 @@ -27,12 +27,27 @@ Gets an AuthorizationRule for a Namespace by rule name. .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. +DISASTERRECOVERYCONFIGINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [ApplicationGroupName ]: The Application Group name @@ -47,14 +62,30 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: Name of the resource group within the azure subscription. [SchemaGroupName ]: The Schema Group name [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. .Link https://learn.microsoft.com/powershell/module/az.eventhub/get-azeventhubdisasterrecoveryconfigauthorizationrule #> function Get-AzEventHubDisasterRecoveryConfigAuthorizationRule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] @@ -62,6 +93,8 @@ param( ${Alias}, [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityDisasterRecoveryConfig', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # The authorization rule name. @@ -94,9 +127,20 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityDisasterRecoveryConfig', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${DisasterRecoveryConfigInputObject}, + + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -157,9 +201,11 @@ begin { $mapping = @{ Get = 'Az.EventHub.private\Get-AzEventHubDisasterRecoveryConfigAuthorizationRule_Get'; GetViaIdentity = 'Az.EventHub.private\Get-AzEventHubDisasterRecoveryConfigAuthorizationRule_GetViaIdentity'; + GetViaIdentityDisasterRecoveryConfig = 'Az.EventHub.private\Get-AzEventHubDisasterRecoveryConfigAuthorizationRule_GetViaIdentityDisasterRecoveryConfig'; + GetViaIdentityNamespace = 'Az.EventHub.private\Get-AzEventHubDisasterRecoveryConfigAuthorizationRule_GetViaIdentityNamespace'; List = 'Az.EventHub.private\Get-AzEventHubDisasterRecoveryConfigAuthorizationRule_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/internal/Get-AzEventHubDisasterRecoveryConfigKey.ps1 b/src/EventHub/EventHub.Autorest/internal/Get-AzEventHubDisasterRecoveryConfigKey.ps1 index 7dc471f9698f..d376ce5879d7 100644 --- a/src/EventHub/EventHub.Autorest/internal/Get-AzEventHubDisasterRecoveryConfigKey.ps1 +++ b/src/EventHub/EventHub.Autorest/internal/Get-AzEventHubDisasterRecoveryConfigKey.ps1 @@ -25,12 +25,12 @@ Gets the primary and secondary connection strings for the Namespace. {{ Add code here }} .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys .Link https://learn.microsoft.com/powershell/module/az.eventhub/get-azeventhubdisasterrecoveryconfigkey #> function Get-AzEventHubDisasterRecoveryConfigKey { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -125,7 +125,7 @@ begin { $mapping = @{ List = 'Az.EventHub.private\Get-AzEventHubDisasterRecoveryConfigKey_List'; } - if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/internal/Get-AzEventHubKey.ps1 b/src/EventHub/EventHub.Autorest/internal/Get-AzEventHubKey.ps1 index 70e9e4ccbf59..a6da25342830 100644 --- a/src/EventHub/EventHub.Autorest/internal/Get-AzEventHubKey.ps1 +++ b/src/EventHub/EventHub.Autorest/internal/Get-AzEventHubKey.ps1 @@ -25,12 +25,12 @@ Get-AzEventHubKey -ResourceGroupName myResourceGroup -NamespaceName myNamespace Get-AzEventHubKey -ResourceGroupName myResourceGroup -NamespaceName myNamespace -EventHubName myEventHub -Name RootManageSharedAccessKey .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys .Link https://learn.microsoft.com/powershell/module/az.eventhub/get-azeventhubkey #> function Get-AzEventHubKey { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -125,7 +125,7 @@ begin { $mapping = @{ List = 'Az.EventHub.private\Get-AzEventHubKey_List'; } - if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/internal/Get-AzEventHubNamespaceAuthorizationRule.ps1 b/src/EventHub/EventHub.Autorest/internal/Get-AzEventHubNamespaceAuthorizationRule.ps1 index bb79a5c8ff67..03ba0622ebbd 100644 --- a/src/EventHub/EventHub.Autorest/internal/Get-AzEventHubNamespaceAuthorizationRule.ps1 +++ b/src/EventHub/EventHub.Autorest/internal/Get-AzEventHubNamespaceAuthorizationRule.ps1 @@ -27,7 +27,7 @@ Gets an AuthorizationRule for a Namespace by rule name. .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule .Notes COMPLEX PARAMETER PROPERTIES @@ -47,14 +47,30 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: Name of the resource group within the azure subscription. [SchemaGroupName ]: The Schema Group name [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. .Link https://learn.microsoft.com/powershell/module/az.eventhub/get-azeventhubnamespaceauthorizationrule #> function Get-AzEventHubNamespaceAuthorizationRule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # The authorization rule name. @@ -87,9 +103,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -150,9 +171,10 @@ begin { $mapping = @{ Get = 'Az.EventHub.private\Get-AzEventHubNamespaceAuthorizationRule_Get'; GetViaIdentity = 'Az.EventHub.private\Get-AzEventHubNamespaceAuthorizationRule_GetViaIdentity'; + GetViaIdentityNamespace = 'Az.EventHub.private\Get-AzEventHubNamespaceAuthorizationRule_GetViaIdentityNamespace'; List = 'Az.EventHub.private\Get-AzEventHubNamespaceAuthorizationRule_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/internal/Get-AzEventHubNamespaceKey.ps1 b/src/EventHub/EventHub.Autorest/internal/Get-AzEventHubNamespaceKey.ps1 index 0cf0535457ff..4d1501bdc4ea 100644 --- a/src/EventHub/EventHub.Autorest/internal/Get-AzEventHubNamespaceKey.ps1 +++ b/src/EventHub/EventHub.Autorest/internal/Get-AzEventHubNamespaceKey.ps1 @@ -25,12 +25,12 @@ Gets the primary and secondary connection strings for the Namespace. {{ Add code here }} .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys .Link https://learn.microsoft.com/powershell/module/az.eventhub/get-azeventhubnamespacekey #> function Get-AzEventHubNamespaceKey { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -119,7 +119,7 @@ begin { $mapping = @{ List = 'Az.EventHub.private\Get-AzEventHubNamespaceKey_List'; } - if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/internal/Get-AzEventHubOperation.ps1 b/src/EventHub/EventHub.Autorest/internal/Get-AzEventHubOperation.ps1 index 0490789bd223..0748df37c882 100644 --- a/src/EventHub/EventHub.Autorest/internal/Get-AzEventHubOperation.ps1 +++ b/src/EventHub/EventHub.Autorest/internal/Get-AzEventHubOperation.ps1 @@ -25,12 +25,12 @@ Lists all of the available Event Hub REST API operations. {{ Add code here }} .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperation +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperation .Link https://learn.microsoft.com/powershell/module/az.eventhub/get-azeventhuboperation #> function Get-AzEventHubOperation { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperation])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperation])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter()] diff --git a/src/EventHub/EventHub.Autorest/internal/Invoke-AzEventHubBreakDisasterRecoveryConfigPairing.ps1 b/src/EventHub/EventHub.Autorest/internal/Invoke-AzEventHubBreakDisasterRecoveryConfigPairing.ps1 index 89fae91f60b5..1cde86d5b9b9 100644 --- a/src/EventHub/EventHub.Autorest/internal/Invoke-AzEventHubBreakDisasterRecoveryConfigPairing.ps1 +++ b/src/EventHub/EventHub.Autorest/internal/Invoke-AzEventHubBreakDisasterRecoveryConfigPairing.ps1 @@ -47,6 +47,21 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: Name of the resource group within the azure subscription. [SchemaGroupName ]: The Schema Group name [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. .Link https://learn.microsoft.com/powershell/module/az.eventhub/invoke-azeventhubbreakdisasterrecoveryconfigpairing #> @@ -55,6 +70,7 @@ function Invoke-AzEventHubBreakDisasterRecoveryConfigPairing { [CmdletBinding(DefaultParameterSetName='Break', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Break', Mandatory)] + [Parameter(ParameterSetName='BreakViaIdentityNamespace', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # The Disaster Recovery configuration name @@ -84,9 +100,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='BreakViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -153,8 +174,9 @@ begin { $mapping = @{ Break = 'Az.EventHub.private\Invoke-AzEventHubBreakDisasterRecoveryConfigPairing_Break'; BreakViaIdentity = 'Az.EventHub.private\Invoke-AzEventHubBreakDisasterRecoveryConfigPairing_BreakViaIdentity'; + BreakViaIdentityNamespace = 'Az.EventHub.private\Invoke-AzEventHubBreakDisasterRecoveryConfigPairing_BreakViaIdentityNamespace'; } - if (('Break') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Break') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/internal/Invoke-AzEventHubFailDisasterRecoveryConfigOver.ps1 b/src/EventHub/EventHub.Autorest/internal/Invoke-AzEventHubFailDisasterRecoveryConfigOver.ps1 index 9a164aa047e5..75b522e49d99 100644 --- a/src/EventHub/EventHub.Autorest/internal/Invoke-AzEventHubFailDisasterRecoveryConfigOver.ps1 +++ b/src/EventHub/EventHub.Autorest/internal/Invoke-AzEventHubFailDisasterRecoveryConfigOver.ps1 @@ -47,6 +47,21 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: Name of the resource group within the azure subscription. [SchemaGroupName ]: The Schema Group name [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. .Link https://learn.microsoft.com/powershell/module/az.eventhub/invoke-azeventhubfaildisasterrecoveryconfigover #> @@ -55,6 +70,7 @@ function Invoke-AzEventHubFailDisasterRecoveryConfigOver { [CmdletBinding(DefaultParameterSetName='Fail', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Fail', Mandatory)] + [Parameter(ParameterSetName='FailViaIdentityNamespace', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # The Disaster Recovery configuration name @@ -84,9 +100,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='FailViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -153,8 +174,9 @@ begin { $mapping = @{ Fail = 'Az.EventHub.private\Invoke-AzEventHubFailDisasterRecoveryConfigOver_Fail'; FailViaIdentity = 'Az.EventHub.private\Invoke-AzEventHubFailDisasterRecoveryConfigOver_FailViaIdentity'; + FailViaIdentityNamespace = 'Az.EventHub.private\Invoke-AzEventHubFailDisasterRecoveryConfigOver_FailViaIdentityNamespace'; } - if (('Fail') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Fail') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/internal/New-AzEventHub.ps1 b/src/EventHub/EventHub.Autorest/internal/New-AzEventHub.ps1 index 76fe6c66b6ab..8a1e0eae393c 100644 --- a/src/EventHub/EventHub.Autorest/internal/New-AzEventHub.ps1 +++ b/src/EventHub/EventHub.Autorest/internal/New-AzEventHub.ps1 @@ -16,9 +16,9 @@ <# .Synopsis -Creates or updates a new Event Hub as a nested resource within a Namespace. +Create a new Event Hub as a nested resource within a Namespace. .Description -Creates or updates a new Event Hub as a nested resource within a Namespace. +Create a new Event Hub as a nested resource within a Namespace. .Example New-AzEventHub -Name myEventHub -ResourceGroupName myResourceGroup -NamespaceName myNamespace -RetentionTimeInHour 168 -PartitionCount 5 -CleanupPolicy Delete .Example @@ -27,11 +27,11 @@ New-AzEventHub -Name myEventHub -ResourceGroupName myResourceGroup -NamespaceNam New-AzEventHub -Name myEventHub -ResourceGroupName myResourceGroup -NamespaceName myNamespace -CleanupPolicy Compact .Inputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub .Notes COMPLEX PARAMETER PROPERTIES @@ -56,48 +56,40 @@ PARAMETER : Single item in List or Get Event Hub operation [ArchiveNameFormat ]: Blob naming convention for archive, e.g. {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}. Here all the parameters (Namespace,EventHub .. etc) are mandatory irrespective of order [BlobContainer ]: Blob container Name [CaptureEnabled ]: A value that indicates whether capture description is enabled. - [CleanupPolicy ]: Enumerates the possible values for cleanup policy + [CleanupPolicy ]: Enumerates the possible values for cleanup policy [DataLakeAccountName ]: The Azure Data Lake Store name for the captured events [DataLakeFolderPath ]: The destination folder path for the captured events [DataLakeSubscriptionId ]: Subscription Id of Azure Data Lake Store [DestinationName ]: Name for capture destination - [Encoding ]: Enumerates the possible values for the encoding format of capture description. Note: 'AvroDeflate' will be deprecated in New API Version - [IdentityType ]: Type of Azure Active Directory Managed Identity. + [Encoding ]: Enumerates the possible values for the encoding format of capture description. Note: 'AvroDeflate' will be deprecated in New API Version + [IdentityType ]: Type of Azure Active Directory Managed Identity. [IntervalInSeconds ]: The time window allows you to set the frequency with which the capture to Azure Blobs will happen, value should between 60 to 900 seconds [MessageRetentionInDay ]: Number of days to retain the events for this Event Hub, value should be 1 to 7 days [PartitionCount ]: Number of partitions created for the Event Hub, allowed values are from 1 to 32 partitions. [RetentionTimeInHour ]: Number of hours to retain the events for this Event Hub. This value is only used when cleanupPolicy is Delete. If cleanupPolicy is Compact the returned value of this property is Long.MaxValue [SizeLimitInBytes ]: The size window defines the amount of data built up in your Event Hub before an capture operation, value should be between 10485760 to 524288000 bytes [SkipEmptyArchive ]: A value that indicates whether to Skip Empty Archives - [Status ]: Enumerates the possible values for the status of the Event Hub. + [Status ]: Enumerates the possible values for the status of the Event Hub. [StorageAccountResourceId ]: Resource id of the storage account to be used to create the blobs - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The type of identity that last modified the resource. - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. [TombstoneRetentionTimeInHour ]: Number of hours to retain the tombstone markers of a compacted Event Hub. This value is only used when cleanupPolicy is Compact. Consumer must complete reading the tombstone marker within this specified amount of time if consumer begins from starting offset to ensure they get a valid snapshot for the specific key described by the tombstone marker within the compacted Event Hub [UserAssignedIdentityId ]: ARM ID of Managed User Identity. This property is required is the type is UserAssignedIdentity. If type is SystemAssigned, then the System Assigned Identity Associated with the namespace will be used. .Link https://learn.microsoft.com/powershell/module/az.eventhub/new-azeventhub #> function New-AzEventHub { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub])] [CmdletBinding(DefaultParameterSetName='CreateViaIdentity', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter(Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub] # Single item in List or Get Event Hub operation - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter()] diff --git a/src/EventHub/EventHub.Autorest/internal/New-AzEventHubApplicationGroup.ps1 b/src/EventHub/EventHub.Autorest/internal/New-AzEventHubApplicationGroup.ps1 index d4ac90668344..cba086fe4053 100644 --- a/src/EventHub/EventHub.Autorest/internal/New-AzEventHubApplicationGroup.ps1 +++ b/src/EventHub/EventHub.Autorest/internal/New-AzEventHubApplicationGroup.ps1 @@ -16,20 +16,20 @@ <# .Synopsis -Creates or updates an ApplicationGroup for a Namespace. +Create an ApplicationGroup for a Namespace. .Description -Creates or updates an ApplicationGroup for a Namespace. +Create an ApplicationGroup for a Namespace. .Example $t1 = New-AzEventHubThrottlingPolicyConfig -Name t1 -MetricId IncomingMessages -RateLimitThreshold 10000 $t2 = New-AzEventHubThrottlingPolicyConfig -Name t2 -MetricId OutgoingBytes -RateLimitThreshold 20000 New-AzEventHubApplicationGroup -NamespaceName myNamespace -ResourceGroupName myResourceGroup -Name myAppGroup -ClientAppGroupIdentifier NamespaceSASKeyName=a -Policy $t1,$t2 .Inputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup .Notes COMPLEX PARAMETER PROPERTIES @@ -53,33 +53,25 @@ INPUTOBJECT : Identity Parameter PARAMETER : The Application Group object [ClientAppGroupIdentifier ]: The Unique identifier for application group.Supports SAS(SASKeyName=KeyName) or AAD(AADAppID=Guid) [IsEnabled ]: Determines if Application Group is allowed to create connection with namespace or not. Once the isEnabled is set to false, all the existing connections of application group gets dropped and no new connections will be allowed - [Policy ]: List of group policies that define the behavior of application group. The policies can support resource governance scenarios such as limiting ingress or egress traffic. + [Policy >]: List of group policies that define the behavior of application group. The policies can support resource governance scenarios such as limiting ingress or egress traffic. Name : The Name of this policy - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The type of identity that last modified the resource. - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. .Link https://learn.microsoft.com/powershell/module/az.eventhub/new-azeventhubapplicationgroup #> function New-AzEventHubApplicationGroup { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup])] [CmdletBinding(DefaultParameterSetName='CreateViaIdentity', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter(Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup] # The Application Group object - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter()] diff --git a/src/EventHub/EventHub.Autorest/internal/New-AzEventHubAuthorizationRule.ps1 b/src/EventHub/EventHub.Autorest/internal/New-AzEventHubAuthorizationRule.ps1 index cb30ddaf4747..cc27bd8df219 100644 --- a/src/EventHub/EventHub.Autorest/internal/New-AzEventHubAuthorizationRule.ps1 +++ b/src/EventHub/EventHub.Autorest/internal/New-AzEventHubAuthorizationRule.ps1 @@ -16,10 +16,10 @@ <# .Synopsis -Creates or updates an AuthorizationRule for the specified Event Hub. +Create an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule will take a few seconds to take effect. .Description -Creates or updates an AuthorizationRule for the specified Event Hub. +Create an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule will take a few seconds to take effect. .Example New-AzEventHubAuthorizationRule -ResourceGroupName myResourceGroup -NamespaceName myNamespace -Name myAuthRule -Rights @('Manage', 'Send', 'Listen') @@ -27,16 +27,31 @@ New-AzEventHubAuthorizationRule -ResourceGroupName myResourceGroup -NamespaceNam New-AzEventHubAuthorizationRule -ResourceGroupName myResourceGroup -NamespaceName myNamespace -EventHubName myEventHub -Name myAuthRule -Rights @('Manage', 'Send', 'Listen') .Inputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. +EVENTHUBINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [ApplicationGroupName ]: The Application Group name @@ -52,28 +67,43 @@ INPUTOBJECT : Identity Parameter [SchemaGroupName ]: The Schema Group name [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + PARAMETER : Single item in a List or Get AuthorizationRule operation - [Rights ]: The rights associated with the rule. - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The type of identity that last modified the resource. - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. + [Rights >]: The rights associated with the rule. .Link https://learn.microsoft.com/powershell/module/az.eventhub/new-azeventhubauthorizationrule #> function New-AzEventHubAuthorizationRule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # The Event Hub name ${EventHubName}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityEventhub', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityEventhubExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # The authorization rule name. @@ -103,22 +133,38 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='CreateViaIdentityEventhub', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityEventhubExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${EventhubInputObject}, + + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityEventhubExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [AllowEmptyCollection()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights])] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Manage", "Send", "Listen")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights[]] + [System.String[]] # The rights associated with the rule. ${Rights}, [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityEventhub', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule] # Single item in a List or Get AuthorizationRule operation - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter()] @@ -181,8 +227,12 @@ begin { $mapping = @{ CreateExpanded = 'Az.EventHub.private\New-AzEventHubAuthorizationRule_CreateExpanded'; CreateViaIdentity = 'Az.EventHub.private\New-AzEventHubAuthorizationRule_CreateViaIdentity'; + CreateViaIdentityEventhub = 'Az.EventHub.private\New-AzEventHubAuthorizationRule_CreateViaIdentityEventhub'; + CreateViaIdentityEventhubExpanded = 'Az.EventHub.private\New-AzEventHubAuthorizationRule_CreateViaIdentityEventhubExpanded'; + CreateViaIdentityNamespace = 'Az.EventHub.private\New-AzEventHubAuthorizationRule_CreateViaIdentityNamespace'; + CreateViaIdentityNamespaceExpanded = 'Az.EventHub.private\New-AzEventHubAuthorizationRule_CreateViaIdentityNamespaceExpanded'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/internal/New-AzEventHubCluster.ps1 b/src/EventHub/EventHub.Autorest/internal/New-AzEventHubCluster.ps1 index 2b24f971c9d4..c179584bc035 100644 --- a/src/EventHub/EventHub.Autorest/internal/New-AzEventHubCluster.ps1 +++ b/src/EventHub/EventHub.Autorest/internal/New-AzEventHubCluster.ps1 @@ -16,20 +16,20 @@ <# .Synopsis -Creates or updates an instance of an Event Hubs Cluster. +Create an instance of an Event Hubs Cluster. .Description -Creates or updates an instance of an Event Hubs Cluster. +Create an instance of an Event Hubs Cluster. .Example New-AzEventHubCluster -ResourceGroupName myResourceGroup -Name myEventHubsCluster -Location "eastasia" -SupportsScaling -Capacity 2 .Example New-AzEventHubCluster -ResourceGroupName myResourceGroup -Name myEventHubsCluster -Location "eastasia" .Inputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster .Notes COMPLEX PARAMETER PROPERTIES @@ -56,31 +56,23 @@ PARAMETER : Single Event Hubs Cluster resource in List or Get operatio [(Any) ]: This indicates any property can be added to this object. [Capacity ]: The quantity of Event Hubs Cluster Capacity Units contained in this cluster. [SupportsScaling ]: A value that indicates whether Scaling is Supported. - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The type of identity that last modified the resource. - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. .Link https://learn.microsoft.com/powershell/module/az.eventhub/new-azeventhubcluster #> function New-AzEventHubCluster { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster])] [CmdletBinding(DefaultParameterSetName='CreateViaIdentity', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter(Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster] # Single Event Hubs Cluster resource in List or Get operations. - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter()] diff --git a/src/EventHub/EventHub.Autorest/internal/New-AzEventHubConsumerGroup.ps1 b/src/EventHub/EventHub.Autorest/internal/New-AzEventHubConsumerGroup.ps1 index de7a087e9b9e..d2635c85b3f0 100644 --- a/src/EventHub/EventHub.Autorest/internal/New-AzEventHubConsumerGroup.ps1 +++ b/src/EventHub/EventHub.Autorest/internal/New-AzEventHubConsumerGroup.ps1 @@ -16,18 +16,18 @@ <# .Synopsis -Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. +Create an Event Hubs consumer group as a nested resource within a Namespace. .Description -Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. +Create an Event Hubs consumer group as a nested resource within a Namespace. .Example New-AzEventHubConsumerGroup -Name myConsumerGroup -NamespaceName myNamespace -ResourceGroupName myResourceGroup -EventHubName myEventHub -UserMetadata "Test ConsumerGroup" .Inputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup .Notes COMPLEX PARAMETER PROPERTIES @@ -49,32 +49,24 @@ INPUTOBJECT : Identity Parameter [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. PARAMETER : Single item in List or Get Consumer group operation - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The type of identity that last modified the resource. - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. [UserMetadata ]: User Metadata is a placeholder to store user-defined string data with maximum length 1024. e.g. it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored. .Link https://learn.microsoft.com/powershell/module/az.eventhub/new-azeventhubconsumergroup #> function New-AzEventHubConsumerGroup { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup])] [CmdletBinding(DefaultParameterSetName='CreateViaIdentity', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter(Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup] # Single item in List or Get Consumer group operation - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter()] diff --git a/src/EventHub/EventHub.Autorest/internal/New-AzEventHubGeoDRConfiguration.ps1 b/src/EventHub/EventHub.Autorest/internal/New-AzEventHubGeoDRConfiguration.ps1 index f99cd6f9075d..f6774b9f6460 100644 --- a/src/EventHub/EventHub.Autorest/internal/New-AzEventHubGeoDRConfiguration.ps1 +++ b/src/EventHub/EventHub.Autorest/internal/New-AzEventHubGeoDRConfiguration.ps1 @@ -16,18 +16,18 @@ <# .Synopsis -Creates or updates a new Alias(Disaster Recovery configuration) +Create a new Alias(Disaster Recovery configuration) .Description -Creates or updates a new Alias(Disaster Recovery configuration) +Create a new Alias(Disaster Recovery configuration) .Example New-AzEventHubGeoDRConfiguration -Name myAlias -ResourceGroupName myResourceGroup -NamespaceName myPrimaryNamespace -PartnerNamespace /subscriptions/subscriptionId/resourceGroups/myResourceGroup/providers/Microsoft.EventHub/namespaces/mySecondaryNamespace .Inputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery .Notes COMPLEX PARAMETER PROPERTIES @@ -51,31 +51,23 @@ INPUTOBJECT : Identity Parameter PARAMETER : Single item in List or Get Alias(Disaster Recovery configuration) operation [AlternateName ]: Alternate name specified when alias and namespace names are same. [PartnerNamespace ]: ARM Id of the Primary/Secondary eventhub namespace name, which is part of GEO DR pairing - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The type of identity that last modified the resource. - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. .Link https://learn.microsoft.com/powershell/module/az.eventhub/new-azeventhubgeodrconfiguration #> function New-AzEventHubGeoDRConfiguration { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery])] [CmdletBinding(DefaultParameterSetName='CreateViaIdentity', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter(Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery] # Single item in List or Get Alias(Disaster Recovery configuration) operation - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter()] diff --git a/src/EventHub/EventHub.Autorest/internal/New-AzEventHubKey.ps1 b/src/EventHub/EventHub.Autorest/internal/New-AzEventHubKey.ps1 index 6c2f4cb66178..93af1e6047d3 100644 --- a/src/EventHub/EventHub.Autorest/internal/New-AzEventHubKey.ps1 +++ b/src/EventHub/EventHub.Autorest/internal/New-AzEventHubKey.ps1 @@ -25,49 +25,91 @@ New-AzEventHubKey -ResourceGroupName myResourceGroup -NamespaceName myNamespace New-AzEventHubKey -ResourceGroupName myResourceGroup -NamespaceName myNamespace -EventHubName myEventHub -Name rootmanagesharedaccesskey -KeyType SecondaryKey .Inputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRegenerateAccessKeyParameters +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRegenerateAccessKeyParameters .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. +EVENTHUBINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + PARAMETER : Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset. - KeyType : The access key to regenerate. + KeyType : The access key to regenerate. [Key ]: Optional, if the key value provided, is set for KeyType or autogenerated Key value set for keyType .Link https://learn.microsoft.com/powershell/module/az.eventhub/new-azeventhubkey #> function New-AzEventHubKey { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys])] -[CmdletBinding(DefaultParameterSetName='Regenerate', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys])] +[CmdletBinding(DefaultParameterSetName='RegenerateViaIdentityEventhub', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] - # The Event Hub name - ${EventHubName}, + # The authorization rule name. + ${Name}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='Regenerate', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaIdentityNamespaceExpanded', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] - # The authorization rule name. - ${Name}, + # The Event Hub name + ${EventHubName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='Regenerate', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # The Namespace name ${NamespaceName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='Regenerate', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # Name of the resource group within the azure subscription. ${ResourceGroupName}, - [Parameter()] + [Parameter(ParameterSetName='Regenerate')] + [Parameter(ParameterSetName='RegenerateViaJsonFilePath')] + [Parameter(ParameterSetName='RegenerateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -75,13 +117,55 @@ param( # The subscription ID forms part of the URI for every service call. ${SubscriptionId}, - [Parameter(Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RegenerateViaIdentityEventhub', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RegenerateViaIdentityEventhubExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${EventhubInputObject}, + + [Parameter(ParameterSetName='RegenerateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RegenerateViaIdentityNamespaceExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + + [Parameter(ParameterSetName='Regenerate', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RegenerateViaIdentityEventhub', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RegenerateViaIdentityNamespace', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRegenerateAccessKeyParameters] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRegenerateAccessKeyParameters] # Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset. - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, + [Parameter(ParameterSetName='RegenerateViaIdentityEventhubExpanded', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaIdentityNamespaceExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("PrimaryKey", "SecondaryKey")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] + [System.String] + # The access key to regenerate. + ${KeyType}, + + [Parameter(ParameterSetName='RegenerateViaIdentityEventhubExpanded')] + [Parameter(ParameterSetName='RegenerateViaIdentityNamespaceExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] + [System.String] + # Optional, if the key value provided, is set for KeyType or autogenerated Key value set for keyType + ${Key}, + + [Parameter(ParameterSetName='RegenerateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] + [System.String] + # Path of Json file supplied to the Regenerate operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='RegenerateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] + [System.String] + # Json string supplied to the Regenerate operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -141,8 +225,14 @@ begin { $mapping = @{ Regenerate = 'Az.EventHub.private\New-AzEventHubKey_Regenerate'; + RegenerateViaIdentityEventhub = 'Az.EventHub.private\New-AzEventHubKey_RegenerateViaIdentityEventhub'; + RegenerateViaIdentityEventhubExpanded = 'Az.EventHub.private\New-AzEventHubKey_RegenerateViaIdentityEventhubExpanded'; + RegenerateViaIdentityNamespace = 'Az.EventHub.private\New-AzEventHubKey_RegenerateViaIdentityNamespace'; + RegenerateViaIdentityNamespaceExpanded = 'Az.EventHub.private\New-AzEventHubKey_RegenerateViaIdentityNamespaceExpanded'; + RegenerateViaJsonFilePath = 'Az.EventHub.private\New-AzEventHubKey_RegenerateViaJsonFilePath'; + RegenerateViaJsonString = 'Az.EventHub.private\New-AzEventHubKey_RegenerateViaJsonString'; } - if (('Regenerate') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Regenerate', 'RegenerateViaJsonFilePath', 'RegenerateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/internal/New-AzEventHubNamespace.ps1 b/src/EventHub/EventHub.Autorest/internal/New-AzEventHubNamespace.ps1 index f61058faaf37..da21d563d20c 100644 --- a/src/EventHub/EventHub.Autorest/internal/New-AzEventHubNamespace.ps1 +++ b/src/EventHub/EventHub.Autorest/internal/New-AzEventHubNamespace.ps1 @@ -16,11 +16,11 @@ <# .Synopsis -Creates or updates a namespace. +Create a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. .Description -Creates or updates a namespace. +Create a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. .Example @@ -34,11 +34,11 @@ New-AzEventHubNamespace -ResourceGroupName myResourceGroup -Name myNamespace -Sk New-AzEventHubNamespace -ResourceGroupName myResourceGroup -Name myNamespace -SkuCapacity 10 -MaximumThroughputUnit 18 -SkuName Standard -Location southcentralus -Tag @{k1='v1'; k2='v2'} -EnableAutoInflate -DisableLocalAuth .Inputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace .Notes COMPLEX PARAMETER PROPERTIES @@ -47,7 +47,7 @@ To create the parameters described below, construct a hash table containing the GEODATAREPLICATIONLOCATION : A list of regions where replicas of the namespace are maintained. [ClusterArmId ]: Optional property that denotes the ARM ID of the Cluster. This is required, if a namespace replica should be placed in a Dedicated Event Hub Cluster [LocationName ]: Azure regions where a replica of the namespace is maintained - [RoleType ]: GeoDR Role Types + [RoleType ]: GeoDR Role Types INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name @@ -78,63 +78,45 @@ PARAMETER : Single Namespace item in List or Get Operation [ClusterArmId ]: Cluster ARM ID of the Namespace. [DisableLocalAuth ]: This property disables SAS authentication for the Event Hubs namespace. [EnableAutoInflate ]: Value that indicates whether AutoInflate is enabled for eventhub namespace. - [GeoDataReplicationLocation ]: A list of regions where replicas of the namespace are maintained. + [GeoDataReplicationLocation >]: A list of regions where replicas of the namespace are maintained. [ClusterArmId ]: Optional property that denotes the ARM ID of the Cluster. This is required, if a namespace replica should be placed in a Dedicated Event Hub Cluster [LocationName ]: Azure regions where a replica of the namespace is maintained - [RoleType ]: GeoDR Role Types + [RoleType ]: GeoDR Role Types [GeoDataReplicationMaxReplicationLagDurationInSecond ]: The maximum acceptable lag for data replication operations from the primary replica to a quorum of secondary replicas. When the lag exceeds the configured amount, operations on the primary replica will be failed. The allowed values are 0 and 5 minutes to 1 day. - [IdentityType ]: Type of managed service identity. + [IdentityType ]: Type of managed service identity. [KafkaEnabled ]: Value that indicates whether Kafka is enabled for eventhub namespace. - [KeySource ]: Enumerates the possible value of keySource for Encryption - [KeyVaultProperty ]: Properties of KeyVault + [KeySource ]: Enumerates the possible value of keySource for Encryption + [KeyVaultProperty >]: Properties of KeyVault [KeyName ]: Name of the Key from KeyVault [KeyVaultUri ]: Uri of KeyVault [KeyVersion ]: Key Version [UserAssignedIdentity ]: ARM ID of user Identity selected for encryption [MaximumThroughputUnit ]: Upper limit of throughput units when AutoInflate is enabled, value should be within 0 to 20 throughput units. ( '0' if AutoInflateEnabled = true) - [MinimumTlsVersion ]: The minimum TLS version for the cluster to support, e.g. '1.2' - [PrivateEndpointConnection ]: List of private endpoint connections. - [ConnectionState ]: Status of the connection. + [MinimumTlsVersion ]: The minimum TLS version for the cluster to support, e.g. '1.2' + [PrivateEndpointConnection >]: List of private endpoint connections. + [ConnectionState ]: Status of the connection. [Description ]: Description of the connection state. [PrivateEndpointId ]: The ARM identifier for Private Endpoint. - [ProvisioningState ]: Provisioning state of the Private Endpoint Connection. - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The type of identity that last modified the resource. - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. - [PublicNetworkAccess ]: This determines if traffic is allowed over public network. By default it is enabled. + [ProvisioningState ]: Provisioning state of the Private Endpoint Connection. + [PublicNetworkAccess ]: This determines if traffic is allowed over public network. By default it is enabled. [RequireInfrastructureEncryption ]: Enable Infrastructure Encryption (Double Encryption) [SkuCapacity ]: The Event Hubs throughput units for Basic or Standard tiers, where value should be 0 to 20 throughput units. The Event Hubs premium units for Premium tier, where value should be 0 to 10 premium units. - [SkuName ]: Name of this SKU. - [SkuTier ]: The billing tier of this particular SKU. - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The type of identity that last modified the resource. - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. + [SkuName ]: Name of this SKU. + [SkuTier ]: The billing tier of this particular SKU. [UserAssignedIdentity ]: Properties for User Assigned Identities [(Any) ]: This indicates any property can be added to this object. [ZoneRedundant ]: Enabling this property creates a Standard Event Hubs Namespace in regions supported availability zones. PRIVATEENDPOINTCONNECTION : List of private endpoint connections. - [ConnectionState ]: Status of the connection. + [ConnectionState ]: Status of the connection. [Description ]: Description of the connection state. [PrivateEndpointId ]: The ARM identifier for Private Endpoint. - [ProvisioningState ]: Provisioning state of the Private Endpoint Connection. - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The type of identity that last modified the resource. - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. + [ProvisioningState ]: Provisioning state of the Private Endpoint Connection. .Link https://learn.microsoft.com/powershell/module/az.eventhub/new-azeventhubnamespace #> function New-AzEventHubNamespace { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] @@ -162,7 +144,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter(ParameterSetName='CreateExpanded')] @@ -192,9 +173,8 @@ param( [Parameter(ParameterSetName='CreateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INamespaceReplicaLocation[]] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INamespaceReplicaLocation[]] # A list of regions where replicas of the namespace are maintained. - # To construct, see NOTES section for GEODATAREPLICATIONLOCATION properties and create a hash table. ${GeoDataReplicationLocation}, [Parameter(ParameterSetName='CreateExpanded')] @@ -206,9 +186,9 @@ param( ${GeoDataReplicationMaxReplicationLagDurationInSecond}, [Parameter(ParameterSetName='CreateExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType])] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned", "None")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType] + [System.String] # Type of managed service identity. ${IdentityType}, @@ -219,18 +199,17 @@ param( ${KafkaEnabled}, [Parameter(ParameterSetName='CreateExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeySource])] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Microsoft.KeyVault")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeySource] + [System.String] # Enumerates the possible value of keySource for Encryption ${KeySource}, [Parameter(ParameterSetName='CreateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultProperties[]] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultProperties[]] # Properties of KeyVault - # To construct, see NOTES section for KEYVAULTPROPERTY properties and create a hash table. ${KeyVaultProperty}, [Parameter(ParameterSetName='CreateExpanded')] @@ -247,9 +226,9 @@ param( ${MaximumThroughputUnit}, [Parameter(ParameterSetName='CreateExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.TlsVersion])] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("1.0", "1.1", "1.2")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.TlsVersion] + [System.String] # The minimum TLS version for the cluster to support, e.g. # '1.2' ${MinimumTlsVersion}, @@ -257,15 +236,14 @@ param( [Parameter(ParameterSetName='CreateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection[]] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection[]] # List of private endpoint connections. - # To construct, see NOTES section for PRIVATEENDPOINTCONNECTION properties and create a hash table. ${PrivateEndpointConnection}, [Parameter(ParameterSetName='CreateExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess])] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Enabled", "Disabled", "SecuredByPerimeter")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess] + [System.String] # This determines if traffic is allowed over public network. # By default it is enabled. ${PublicNetworkAccess}, @@ -284,29 +262,29 @@ param( ${SkuCapacity}, [Parameter(ParameterSetName='CreateExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuName])] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Basic", "Standard", "Premium")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuName] + [System.String] # Name of this SKU. ${SkuName}, [Parameter(ParameterSetName='CreateExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuTier])] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Basic", "Standard", "Premium")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuTier] + [System.String] # The billing tier of this particular SKU. ${SkuTier}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityUserAssignedIdentities]))] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityUserAssignedIdentities]))] [System.Collections.Hashtable] # Properties for User Assigned Identities ${UserAssignedIdentity}, @@ -319,9 +297,8 @@ param( [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace] # Single Namespace item in List or Get Operation - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter()] @@ -397,7 +374,7 @@ begin { CreateExpanded = 'Az.EventHub.private\New-AzEventHubNamespace_CreateExpanded'; CreateViaIdentity = 'Az.EventHub.private\New-AzEventHubNamespace_CreateViaIdentity'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/internal/New-AzEventHubNamespaceAuthorizationRule.ps1 b/src/EventHub/EventHub.Autorest/internal/New-AzEventHubNamespaceAuthorizationRule.ps1 index e45d6197f5f4..8f7833f04f6c 100644 --- a/src/EventHub/EventHub.Autorest/internal/New-AzEventHubNamespaceAuthorizationRule.ps1 +++ b/src/EventHub/EventHub.Autorest/internal/New-AzEventHubNamespaceAuthorizationRule.ps1 @@ -16,20 +16,20 @@ <# .Synopsis -Creates or updates an AuthorizationRule for a Namespace. +Create an AuthorizationRule for a Namespace. .Description -Creates or updates an AuthorizationRule for a Namespace. +Create an AuthorizationRule for a Namespace. .Example {{ Add code here }} .Example {{ Add code here }} .Inputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule .Notes COMPLEX PARAMETER PROPERTIES @@ -50,22 +50,33 @@ INPUTOBJECT : Identity Parameter [SchemaGroupName ]: The Schema Group name [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + PARAMETER : Single item in a List or Get AuthorizationRule operation - [Rights ]: The rights associated with the rule. - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The type of identity that last modified the resource. - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. + [Rights >]: The rights associated with the rule. .Link https://learn.microsoft.com/powershell/module/az.eventhub/new-azeventhubnamespaceauthorizationrule #> function New-AzEventHubNamespaceAuthorizationRule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # The authorization rule name. @@ -95,22 +106,29 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [AllowEmptyCollection()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights])] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Manage", "Send", "Listen")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights[]] + [System.String[]] # The rights associated with the rule. ${Rights}, [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule] # Single item in a List or Get AuthorizationRule operation - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter()] @@ -173,8 +191,10 @@ begin { $mapping = @{ CreateExpanded = 'Az.EventHub.private\New-AzEventHubNamespaceAuthorizationRule_CreateExpanded'; CreateViaIdentity = 'Az.EventHub.private\New-AzEventHubNamespaceAuthorizationRule_CreateViaIdentity'; + CreateViaIdentityNamespace = 'Az.EventHub.private\New-AzEventHubNamespaceAuthorizationRule_CreateViaIdentityNamespace'; + CreateViaIdentityNamespaceExpanded = 'Az.EventHub.private\New-AzEventHubNamespaceAuthorizationRule_CreateViaIdentityNamespaceExpanded'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/internal/New-AzEventHubNamespaceKey.ps1 b/src/EventHub/EventHub.Autorest/internal/New-AzEventHubNamespaceKey.ps1 index d000482fc049..c8f595b81d2e 100644 --- a/src/EventHub/EventHub.Autorest/internal/New-AzEventHubNamespaceKey.ps1 +++ b/src/EventHub/EventHub.Autorest/internal/New-AzEventHubNamespaceKey.ps1 @@ -25,23 +25,40 @@ Regenerates the primary or secondary connection strings for the specified Namesp {{ Add code here }} .Inputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRegenerateAccessKeyParameters +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRegenerateAccessKeyParameters .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + PARAMETER : Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset. - KeyType : The access key to regenerate. + KeyType : The access key to regenerate. [Key ]: Optional, if the key value provided, is set for KeyType or autogenerated Key value set for keyType .Link https://learn.microsoft.com/powershell/module/az.eventhub/new-azeventhubnamespacekey #> function New-AzEventHubNamespaceKey { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys])] -[CmdletBinding(DefaultParameterSetName='Regenerate', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys])] +[CmdletBinding(DefaultParameterSetName='RegenerateViaIdentityNamespace', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] @@ -49,19 +66,25 @@ param( # The authorization rule name. ${Name}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='Regenerate', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # The Namespace name ${NamespaceName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='Regenerate', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # Name of the resource group within the azure subscription. ${ResourceGroupName}, - [Parameter()] + [Parameter(ParameterSetName='Regenerate')] + [Parameter(ParameterSetName='RegenerateViaJsonFilePath')] + [Parameter(ParameterSetName='RegenerateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -69,13 +92,45 @@ param( # The subscription ID forms part of the URI for every service call. ${SubscriptionId}, - [Parameter(Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RegenerateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RegenerateViaIdentityNamespaceExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + + [Parameter(ParameterSetName='Regenerate', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RegenerateViaIdentityNamespace', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRegenerateAccessKeyParameters] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRegenerateAccessKeyParameters] # Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset. - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, + [Parameter(ParameterSetName='RegenerateViaIdentityNamespaceExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("PrimaryKey", "SecondaryKey")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] + [System.String] + # The access key to regenerate. + ${KeyType}, + + [Parameter(ParameterSetName='RegenerateViaIdentityNamespaceExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] + [System.String] + # Optional, if the key value provided, is set for KeyType or autogenerated Key value set for keyType + ${Key}, + + [Parameter(ParameterSetName='RegenerateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] + [System.String] + # Path of Json file supplied to the Regenerate operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='RegenerateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] + [System.String] + # Json string supplied to the Regenerate operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -135,8 +190,12 @@ begin { $mapping = @{ Regenerate = 'Az.EventHub.private\New-AzEventHubNamespaceKey_Regenerate'; + RegenerateViaIdentityNamespace = 'Az.EventHub.private\New-AzEventHubNamespaceKey_RegenerateViaIdentityNamespace'; + RegenerateViaIdentityNamespaceExpanded = 'Az.EventHub.private\New-AzEventHubNamespaceKey_RegenerateViaIdentityNamespaceExpanded'; + RegenerateViaJsonFilePath = 'Az.EventHub.private\New-AzEventHubNamespaceKey_RegenerateViaJsonFilePath'; + RegenerateViaJsonString = 'Az.EventHub.private\New-AzEventHubNamespaceKey_RegenerateViaJsonString'; } - if (('Regenerate') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Regenerate', 'RegenerateViaJsonFilePath', 'RegenerateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/internal/New-AzEventHubNetworkRuleSet.ps1 b/src/EventHub/EventHub.Autorest/internal/New-AzEventHubNetworkRuleSet.ps1 index f7a34e0e41ff..9822b7c55367 100644 --- a/src/EventHub/EventHub.Autorest/internal/New-AzEventHubNetworkRuleSet.ps1 +++ b/src/EventHub/EventHub.Autorest/internal/New-AzEventHubNetworkRuleSet.ps1 @@ -16,20 +16,20 @@ <# .Synopsis -Create or update NetworkRuleSet for a Namespace. +Create NetworkRuleSet for a Namespace. .Description -Create or update NetworkRuleSet for a Namespace. +Create NetworkRuleSet for a Namespace. .Example {{ Add code here }} .Example {{ Add code here }} -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet .Notes COMPLEX PARAMETER PROPERTIES @@ -51,23 +51,17 @@ INPUTOBJECT : Identity Parameter [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. IPRULE : List of IpRules - [Action ]: The IP Filter Action + [Action ]: The IP Filter Action [IPMask ]: IP Mask PARAMETER : Description of topic resource. - [DefaultAction ]: Default Action for Network Rule Set - [IPRule ]: List of IpRules - [Action ]: The IP Filter Action + [DefaultAction ]: Default Action for Network Rule Set + [IPRule >]: List of IpRules + [Action ]: The IP Filter Action [IPMask ]: IP Mask - [PublicNetworkAccess ]: This determines if traffic is allowed over public network. By default it is enabled. If value is SecuredByPerimeter then Inbound and Outbound communication is controlled by the network security perimeter and profile's access rules. - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The type of identity that last modified the resource. - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. + [PublicNetworkAccess ]: This determines if traffic is allowed over public network. By default it is enabled. If value is SecuredByPerimeter then Inbound and Outbound communication is controlled by the network security perimeter and profile's access rules. [TrustedServiceAccessEnabled ]: Value that indicates whether Trusted Service Access is Enabled or not. - [VirtualNetworkRule ]: List VirtualNetwork Rules + [VirtualNetworkRule >]: List VirtualNetwork Rules [IgnoreMissingVnetServiceEndpoint ]: Value that indicates whether to ignore missing Vnet Service Endpoint [SubnetId ]: Resource ID of Virtual Network Subnet @@ -78,7 +72,7 @@ VIRTUALNETWORKRULE : List VirtualNetwork Rules https://learn.microsoft.com/powershell/module/az.eventhub/new-azeventhubnetworkruleset #> function New-AzEventHubNetworkRuleSet { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] @@ -105,28 +99,26 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter(ParameterSetName='CreateExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.DefaultAction])] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Allow", "Deny")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.DefaultAction] + [System.String] # Default Action for Network Rule Set ${DefaultAction}, [Parameter(ParameterSetName='CreateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetIPRules[]] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetIPRules[]] # List of IpRules - # To construct, see NOTES section for IPRULE properties and create a hash table. ${IPRule}, [Parameter(ParameterSetName='CreateExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccessFlag])] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Enabled", "Disabled", "SecuredByPerimeter")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccessFlag] + [System.String] # This determines if traffic is allowed over public network. # By default it is enabled. # If value is SecuredByPerimeter then Inbound and Outbound communication is controlled by the network security perimeter and profile's access rules. @@ -141,16 +133,14 @@ param( [Parameter(ParameterSetName='CreateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetVirtualNetworkRules[]] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetVirtualNetworkRules[]] # List VirtualNetwork Rules - # To construct, see NOTES section for VIRTUALNETWORKRULE properties and create a hash table. ${VirtualNetworkRule}, [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet] # Description of topic resource. - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter()] @@ -214,7 +204,7 @@ begin { CreateExpanded = 'Az.EventHub.private\New-AzEventHubNetworkRuleSet_CreateExpanded'; CreateViaIdentity = 'Az.EventHub.private\New-AzEventHubNetworkRuleSet_CreateViaIdentity'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/internal/New-AzEventHubPrivateEndpointConnection.ps1 b/src/EventHub/EventHub.Autorest/internal/New-AzEventHubPrivateEndpointConnection.ps1 index c650638e89d1..9818b4b3f593 100644 --- a/src/EventHub/EventHub.Autorest/internal/New-AzEventHubPrivateEndpointConnection.ps1 +++ b/src/EventHub/EventHub.Autorest/internal/New-AzEventHubPrivateEndpointConnection.ps1 @@ -16,20 +16,20 @@ <# .Synopsis -Creates or updates PrivateEndpointConnections of service namespace. +Create PrivateEndpointConnections of service namespace. .Description -Creates or updates PrivateEndpointConnections of service namespace. +Create PrivateEndpointConnections of service namespace. .Example {{ Add code here }} .Example {{ Add code here }} -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection .Notes COMPLEX PARAMETER PROPERTIES @@ -50,25 +50,38 @@ INPUTOBJECT : Identity Parameter [SchemaGroupName ]: The Schema Group name [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + PARAMETER : Properties of the PrivateEndpointConnection. - [ConnectionState ]: Status of the connection. + [ConnectionState ]: Status of the connection. [Description ]: Description of the connection state. [PrivateEndpointId ]: The ARM identifier for Private Endpoint. - [ProvisioningState ]: Provisioning state of the Private Endpoint Connection. - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The type of identity that last modified the resource. - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. + [ProvisioningState ]: Provisioning state of the Private Endpoint Connection. .Link https://learn.microsoft.com/powershell/module/az.eventhub/new-azeventhubprivateendpointconnection +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639408.aspx #> function New-AzEventHubPrivateEndpointConnection { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory)] [Alias('PrivateEndpointConnectionName')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] @@ -99,40 +112,50 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] [System.String] # The ARM identifier for Private Endpoint. ${PrivateEndpointId}, [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] [System.String] # Description of the connection state. ${PrivateLinkServiceConnectionStateDescription}, [Parameter(ParameterSetName='CreateExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PrivateLinkConnectionStatus])] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Pending", "Approved", "Rejected", "Disconnected")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PrivateLinkConnectionStatus] + [System.String] # Status of the connection. ${PrivateLinkServiceConnectionStateStatus}, [Parameter(ParameterSetName='CreateExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EndPointProvisioningState])] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Creating", "Updating", "Deleting", "Succeeded", "Canceled", "Failed")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EndPointProvisioningState] + [System.String] # Provisioning state of the Private Endpoint Connection. ${ProvisioningState}, [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection] # Properties of the PrivateEndpointConnection. - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter()] @@ -195,8 +218,10 @@ begin { $mapping = @{ CreateExpanded = 'Az.EventHub.private\New-AzEventHubPrivateEndpointConnection_CreateExpanded'; CreateViaIdentity = 'Az.EventHub.private\New-AzEventHubPrivateEndpointConnection_CreateViaIdentity'; + CreateViaIdentityNamespace = 'Az.EventHub.private\New-AzEventHubPrivateEndpointConnection_CreateViaIdentityNamespace'; + CreateViaIdentityNamespaceExpanded = 'Az.EventHub.private\New-AzEventHubPrivateEndpointConnection_CreateViaIdentityNamespaceExpanded'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/internal/New-AzEventHubSchemaGroup.ps1 b/src/EventHub/EventHub.Autorest/internal/New-AzEventHubSchemaGroup.ps1 index 8577a8d5cdb1..ffe5cd4e87f7 100644 --- a/src/EventHub/EventHub.Autorest/internal/New-AzEventHubSchemaGroup.ps1 +++ b/src/EventHub/EventHub.Autorest/internal/New-AzEventHubSchemaGroup.ps1 @@ -16,18 +16,18 @@ <# .Synopsis -Creates or Updates an EventHub schema group. +Create an EventHub schema group. .Description -Creates or Updates an EventHub schema group. +Create an EventHub schema group. .Example $schemaGroup = New-AzEventHubSchemaGroup -ResourceGroupName myResourceGroup -NamespaceName myNamespace -Name mySchemaGroup -SchemaCompatibility Backward -SchemaType Avro -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup .Notes COMPLEX PARAMETER PROPERTIES @@ -51,33 +51,25 @@ INPUTOBJECT : Identity Parameter PARAMETER : Single item in List or Get Schema Group operation [GroupProperty ]: dictionary object for SchemaGroup group properties [(Any) ]: This indicates any property can be added to this object. - [SchemaCompatibility ]: - [SchemaType ]: - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The type of identity that last modified the resource. - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. + [SchemaCompatibility ]: + [SchemaType ]: .Link https://learn.microsoft.com/powershell/module/az.eventhub/new-azeventhubschemagroup #> function New-AzEventHubSchemaGroup { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup])] [CmdletBinding(DefaultParameterSetName='CreateViaIdentity', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter(Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup] # Single item in List or Get Schema Group operation - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter()] diff --git a/src/EventHub/EventHub.Autorest/internal/ProxyCmdletDefinitions.ps1 b/src/EventHub/EventHub.Autorest/internal/ProxyCmdletDefinitions.ps1 index 6944b8ef6b63..ec477873cce5 100644 --- a/src/EventHub/EventHub.Autorest/internal/ProxyCmdletDefinitions.ps1 +++ b/src/EventHub/EventHub.Autorest/internal/ProxyCmdletDefinitions.ps1 @@ -27,12 +27,27 @@ Get-AzEventHubAuthorizationRule -ResourceGroupName myResourceGroup -NamespaceNam .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. +EVENTHUBINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [ApplicationGroupName ]: The Application Group name @@ -47,14 +62,30 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: Name of the resource group within the azure subscription. [SchemaGroupName ]: The Schema Group name [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. .Link https://learn.microsoft.com/powershell/module/az.eventhub/get-azeventhubauthorizationrule #> function Get-AzEventHubAuthorizationRule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] @@ -62,6 +93,8 @@ param( ${EventHubName}, [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityEventhub', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # The authorization rule name. @@ -94,9 +127,20 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityEventhub', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${EventhubInputObject}, + + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -157,9 +201,11 @@ begin { $mapping = @{ Get = 'Az.EventHub.private\Get-AzEventHubAuthorizationRule_Get'; GetViaIdentity = 'Az.EventHub.private\Get-AzEventHubAuthorizationRule_GetViaIdentity'; + GetViaIdentityEventhub = 'Az.EventHub.private\Get-AzEventHubAuthorizationRule_GetViaIdentityEventhub'; + GetViaIdentityNamespace = 'Az.EventHub.private\Get-AzEventHubAuthorizationRule_GetViaIdentityNamespace'; List = 'Az.EventHub.private\Get-AzEventHubAuthorizationRule_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -212,12 +258,27 @@ Gets an AuthorizationRule for a Namespace by rule name. .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. +DISASTERRECOVERYCONFIGINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [ApplicationGroupName ]: The Application Group name @@ -232,14 +293,30 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: Name of the resource group within the azure subscription. [SchemaGroupName ]: The Schema Group name [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. .Link https://learn.microsoft.com/powershell/module/az.eventhub/get-azeventhubdisasterrecoveryconfigauthorizationrule #> function Get-AzEventHubDisasterRecoveryConfigAuthorizationRule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] @@ -247,6 +324,8 @@ param( ${Alias}, [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityDisasterRecoveryConfig', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # The authorization rule name. @@ -279,9 +358,20 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityDisasterRecoveryConfig', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${DisasterRecoveryConfigInputObject}, + + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -342,9 +432,11 @@ begin { $mapping = @{ Get = 'Az.EventHub.private\Get-AzEventHubDisasterRecoveryConfigAuthorizationRule_Get'; GetViaIdentity = 'Az.EventHub.private\Get-AzEventHubDisasterRecoveryConfigAuthorizationRule_GetViaIdentity'; + GetViaIdentityDisasterRecoveryConfig = 'Az.EventHub.private\Get-AzEventHubDisasterRecoveryConfigAuthorizationRule_GetViaIdentityDisasterRecoveryConfig'; + GetViaIdentityNamespace = 'Az.EventHub.private\Get-AzEventHubDisasterRecoveryConfigAuthorizationRule_GetViaIdentityNamespace'; List = 'Az.EventHub.private\Get-AzEventHubDisasterRecoveryConfigAuthorizationRule_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -395,12 +487,12 @@ Gets the primary and secondary connection strings for the Namespace. {{ Add code here }} .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys .Link https://learn.microsoft.com/powershell/module/az.eventhub/get-azeventhubdisasterrecoveryconfigkey #> function Get-AzEventHubDisasterRecoveryConfigKey { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -495,7 +587,7 @@ begin { $mapping = @{ List = 'Az.EventHub.private\Get-AzEventHubDisasterRecoveryConfigKey_List'; } - if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -546,12 +638,12 @@ Get-AzEventHubKey -ResourceGroupName myResourceGroup -NamespaceName myNamespace Get-AzEventHubKey -ResourceGroupName myResourceGroup -NamespaceName myNamespace -EventHubName myEventHub -Name RootManageSharedAccessKey .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys .Link https://learn.microsoft.com/powershell/module/az.eventhub/get-azeventhubkey #> function Get-AzEventHubKey { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -646,7 +738,7 @@ begin { $mapping = @{ List = 'Az.EventHub.private\Get-AzEventHubKey_List'; } - if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -699,7 +791,7 @@ Gets an AuthorizationRule for a Namespace by rule name. .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule .Notes COMPLEX PARAMETER PROPERTIES @@ -719,14 +811,30 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: Name of the resource group within the azure subscription. [SchemaGroupName ]: The Schema Group name [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. .Link https://learn.microsoft.com/powershell/module/az.eventhub/get-azeventhubnamespaceauthorizationrule #> function Get-AzEventHubNamespaceAuthorizationRule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # The authorization rule name. @@ -759,9 +867,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -822,9 +935,10 @@ begin { $mapping = @{ Get = 'Az.EventHub.private\Get-AzEventHubNamespaceAuthorizationRule_Get'; GetViaIdentity = 'Az.EventHub.private\Get-AzEventHubNamespaceAuthorizationRule_GetViaIdentity'; + GetViaIdentityNamespace = 'Az.EventHub.private\Get-AzEventHubNamespaceAuthorizationRule_GetViaIdentityNamespace'; List = 'Az.EventHub.private\Get-AzEventHubNamespaceAuthorizationRule_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -875,12 +989,12 @@ Gets the primary and secondary connection strings for the Namespace. {{ Add code here }} .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys .Link https://learn.microsoft.com/powershell/module/az.eventhub/get-azeventhubnamespacekey #> function Get-AzEventHubNamespaceKey { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -969,7 +1083,7 @@ begin { $mapping = @{ List = 'Az.EventHub.private\Get-AzEventHubNamespaceKey_List'; } - if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -1020,12 +1134,12 @@ Lists all of the available Event Hub REST API operations. {{ Add code here }} .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperation +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperation .Link https://learn.microsoft.com/powershell/module/az.eventhub/get-azeventhuboperation #> function Get-AzEventHubOperation { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IOperation])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IOperation])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter()] @@ -1152,6 +1266,21 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: Name of the resource group within the azure subscription. [SchemaGroupName ]: The Schema Group name [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. .Link https://learn.microsoft.com/powershell/module/az.eventhub/invoke-azeventhubbreakdisasterrecoveryconfigpairing #> @@ -1160,6 +1289,7 @@ function Invoke-AzEventHubBreakDisasterRecoveryConfigPairing { [CmdletBinding(DefaultParameterSetName='Break', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Break', Mandatory)] + [Parameter(ParameterSetName='BreakViaIdentityNamespace', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # The Disaster Recovery configuration name @@ -1189,9 +1319,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='BreakViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -1258,8 +1393,9 @@ begin { $mapping = @{ Break = 'Az.EventHub.private\Invoke-AzEventHubBreakDisasterRecoveryConfigPairing_Break'; BreakViaIdentity = 'Az.EventHub.private\Invoke-AzEventHubBreakDisasterRecoveryConfigPairing_BreakViaIdentity'; + BreakViaIdentityNamespace = 'Az.EventHub.private\Invoke-AzEventHubBreakDisasterRecoveryConfigPairing_BreakViaIdentityNamespace'; } - if (('Break') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Break') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -1332,6 +1468,21 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: Name of the resource group within the azure subscription. [SchemaGroupName ]: The Schema Group name [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. .Link https://learn.microsoft.com/powershell/module/az.eventhub/invoke-azeventhubfaildisasterrecoveryconfigover #> @@ -1340,6 +1491,7 @@ function Invoke-AzEventHubFailDisasterRecoveryConfigOver { [CmdletBinding(DefaultParameterSetName='Fail', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Fail', Mandatory)] + [Parameter(ParameterSetName='FailViaIdentityNamespace', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # The Disaster Recovery configuration name @@ -1369,9 +1521,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='FailViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -1438,8 +1595,9 @@ begin { $mapping = @{ Fail = 'Az.EventHub.private\Invoke-AzEventHubFailDisasterRecoveryConfigOver_Fail'; FailViaIdentity = 'Az.EventHub.private\Invoke-AzEventHubFailDisasterRecoveryConfigOver_FailViaIdentity'; + FailViaIdentityNamespace = 'Az.EventHub.private\Invoke-AzEventHubFailDisasterRecoveryConfigOver_FailViaIdentityNamespace'; } - if (('Fail') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Fail') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -1481,20 +1639,20 @@ end { <# .Synopsis -Creates or updates an ApplicationGroup for a Namespace. +Create an ApplicationGroup for a Namespace. .Description -Creates or updates an ApplicationGroup for a Namespace. +Create an ApplicationGroup for a Namespace. .Example $t1 = New-AzEventHubThrottlingPolicyConfig -Name t1 -MetricId IncomingMessages -RateLimitThreshold 10000 $t2 = New-AzEventHubThrottlingPolicyConfig -Name t2 -MetricId OutgoingBytes -RateLimitThreshold 20000 New-AzEventHubApplicationGroup -NamespaceName myNamespace -ResourceGroupName myResourceGroup -Name myAppGroup -ClientAppGroupIdentifier NamespaceSASKeyName=a -Policy $t1,$t2 .Inputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup .Notes COMPLEX PARAMETER PROPERTIES @@ -1518,33 +1676,25 @@ INPUTOBJECT : Identity Parameter PARAMETER : The Application Group object [ClientAppGroupIdentifier ]: The Unique identifier for application group.Supports SAS(SASKeyName=KeyName) or AAD(AADAppID=Guid) [IsEnabled ]: Determines if Application Group is allowed to create connection with namespace or not. Once the isEnabled is set to false, all the existing connections of application group gets dropped and no new connections will be allowed - [Policy ]: List of group policies that define the behavior of application group. The policies can support resource governance scenarios such as limiting ingress or egress traffic. + [Policy >]: List of group policies that define the behavior of application group. The policies can support resource governance scenarios such as limiting ingress or egress traffic. Name : The Name of this policy - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The type of identity that last modified the resource. - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. .Link https://learn.microsoft.com/powershell/module/az.eventhub/new-azeventhubapplicationgroup #> function New-AzEventHubApplicationGroup { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup])] [CmdletBinding(DefaultParameterSetName='CreateViaIdentity', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter(Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup] # The Application Group object - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter()] @@ -1640,10 +1790,10 @@ end { <# .Synopsis -Creates or updates an AuthorizationRule for the specified Event Hub. +Create an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule will take a few seconds to take effect. .Description -Creates or updates an AuthorizationRule for the specified Event Hub. +Create an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule will take a few seconds to take effect. .Example New-AzEventHubAuthorizationRule -ResourceGroupName myResourceGroup -NamespaceName myNamespace -Name myAuthRule -Rights @('Manage', 'Send', 'Listen') @@ -1651,16 +1801,31 @@ New-AzEventHubAuthorizationRule -ResourceGroupName myResourceGroup -NamespaceNam New-AzEventHubAuthorizationRule -ResourceGroupName myResourceGroup -NamespaceName myNamespace -EventHubName myEventHub -Name myAuthRule -Rights @('Manage', 'Send', 'Listen') .Inputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. +EVENTHUBINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [ApplicationGroupName ]: The Application Group name @@ -1676,28 +1841,43 @@ INPUTOBJECT : Identity Parameter [SchemaGroupName ]: The Schema Group name [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + PARAMETER : Single item in a List or Get AuthorizationRule operation - [Rights ]: The rights associated with the rule. - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The type of identity that last modified the resource. - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. + [Rights >]: The rights associated with the rule. .Link https://learn.microsoft.com/powershell/module/az.eventhub/new-azeventhubauthorizationrule #> function New-AzEventHubAuthorizationRule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # The Event Hub name ${EventHubName}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityEventhub', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityEventhubExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # The authorization rule name. @@ -1727,22 +1907,38 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='CreateViaIdentityEventhub', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityEventhubExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${EventhubInputObject}, + + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityEventhubExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [AllowEmptyCollection()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights])] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Manage", "Send", "Listen")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights[]] + [System.String[]] # The rights associated with the rule. ${Rights}, [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityEventhub', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule] # Single item in a List or Get AuthorizationRule operation - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter()] @@ -1805,8 +2001,12 @@ begin { $mapping = @{ CreateExpanded = 'Az.EventHub.private\New-AzEventHubAuthorizationRule_CreateExpanded'; CreateViaIdentity = 'Az.EventHub.private\New-AzEventHubAuthorizationRule_CreateViaIdentity'; + CreateViaIdentityEventhub = 'Az.EventHub.private\New-AzEventHubAuthorizationRule_CreateViaIdentityEventhub'; + CreateViaIdentityEventhubExpanded = 'Az.EventHub.private\New-AzEventHubAuthorizationRule_CreateViaIdentityEventhubExpanded'; + CreateViaIdentityNamespace = 'Az.EventHub.private\New-AzEventHubAuthorizationRule_CreateViaIdentityNamespace'; + CreateViaIdentityNamespaceExpanded = 'Az.EventHub.private\New-AzEventHubAuthorizationRule_CreateViaIdentityNamespaceExpanded'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -1848,20 +2048,20 @@ end { <# .Synopsis -Creates or updates an instance of an Event Hubs Cluster. +Create an instance of an Event Hubs Cluster. .Description -Creates or updates an instance of an Event Hubs Cluster. +Create an instance of an Event Hubs Cluster. .Example New-AzEventHubCluster -ResourceGroupName myResourceGroup -Name myEventHubsCluster -Location "eastasia" -SupportsScaling -Capacity 2 .Example New-AzEventHubCluster -ResourceGroupName myResourceGroup -Name myEventHubsCluster -Location "eastasia" .Inputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster .Notes COMPLEX PARAMETER PROPERTIES @@ -1888,31 +2088,23 @@ PARAMETER : Single Event Hubs Cluster resource in List or Get operatio [(Any) ]: This indicates any property can be added to this object. [Capacity ]: The quantity of Event Hubs Cluster Capacity Units contained in this cluster. [SupportsScaling ]: A value that indicates whether Scaling is Supported. - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The type of identity that last modified the resource. - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. .Link https://learn.microsoft.com/powershell/module/az.eventhub/new-azeventhubcluster #> function New-AzEventHubCluster { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster])] [CmdletBinding(DefaultParameterSetName='CreateViaIdentity', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter(Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster] # Single Event Hubs Cluster resource in List or Get operations. - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter()] @@ -2020,18 +2212,18 @@ end { <# .Synopsis -Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. +Create an Event Hubs consumer group as a nested resource within a Namespace. .Description -Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. +Create an Event Hubs consumer group as a nested resource within a Namespace. .Example New-AzEventHubConsumerGroup -Name myConsumerGroup -NamespaceName myNamespace -ResourceGroupName myResourceGroup -EventHubName myEventHub -UserMetadata "Test ConsumerGroup" .Inputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup .Notes COMPLEX PARAMETER PROPERTIES @@ -2053,32 +2245,24 @@ INPUTOBJECT : Identity Parameter [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. PARAMETER : Single item in List or Get Consumer group operation - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The type of identity that last modified the resource. - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. [UserMetadata ]: User Metadata is a placeholder to store user-defined string data with maximum length 1024. e.g. it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored. .Link https://learn.microsoft.com/powershell/module/az.eventhub/new-azeventhubconsumergroup #> function New-AzEventHubConsumerGroup { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup])] [CmdletBinding(DefaultParameterSetName='CreateViaIdentity', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter(Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup] # Single item in List or Get Consumer group operation - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter()] @@ -2174,18 +2358,18 @@ end { <# .Synopsis -Creates or updates a new Alias(Disaster Recovery configuration) +Create a new Alias(Disaster Recovery configuration) .Description -Creates or updates a new Alias(Disaster Recovery configuration) +Create a new Alias(Disaster Recovery configuration) .Example New-AzEventHubGeoDRConfiguration -Name myAlias -ResourceGroupName myResourceGroup -NamespaceName myPrimaryNamespace -PartnerNamespace /subscriptions/subscriptionId/resourceGroups/myResourceGroup/providers/Microsoft.EventHub/namespaces/mySecondaryNamespace .Inputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery .Notes COMPLEX PARAMETER PROPERTIES @@ -2209,31 +2393,23 @@ INPUTOBJECT : Identity Parameter PARAMETER : Single item in List or Get Alias(Disaster Recovery configuration) operation [AlternateName ]: Alternate name specified when alias and namespace names are same. [PartnerNamespace ]: ARM Id of the Primary/Secondary eventhub namespace name, which is part of GEO DR pairing - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The type of identity that last modified the resource. - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. .Link https://learn.microsoft.com/powershell/module/az.eventhub/new-azeventhubgeodrconfiguration #> function New-AzEventHubGeoDRConfiguration { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery])] [CmdletBinding(DefaultParameterSetName='CreateViaIdentity', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter(Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery] # Single item in List or Get Alias(Disaster Recovery configuration) operation - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter()] @@ -2338,49 +2514,91 @@ New-AzEventHubKey -ResourceGroupName myResourceGroup -NamespaceName myNamespace New-AzEventHubKey -ResourceGroupName myResourceGroup -NamespaceName myNamespace -EventHubName myEventHub -Name rootmanagesharedaccesskey -KeyType SecondaryKey .Inputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRegenerateAccessKeyParameters +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRegenerateAccessKeyParameters .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. +EVENTHUBINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + PARAMETER : Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset. - KeyType : The access key to regenerate. + KeyType : The access key to regenerate. [Key ]: Optional, if the key value provided, is set for KeyType or autogenerated Key value set for keyType .Link https://learn.microsoft.com/powershell/module/az.eventhub/new-azeventhubkey #> function New-AzEventHubKey { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys])] -[CmdletBinding(DefaultParameterSetName='Regenerate', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys])] +[CmdletBinding(DefaultParameterSetName='RegenerateViaIdentityEventhub', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] - # The Event Hub name - ${EventHubName}, + # The authorization rule name. + ${Name}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='Regenerate', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaIdentityNamespaceExpanded', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] - # The authorization rule name. - ${Name}, + # The Event Hub name + ${EventHubName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='Regenerate', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # The Namespace name ${NamespaceName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='Regenerate', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # Name of the resource group within the azure subscription. ${ResourceGroupName}, - [Parameter()] + [Parameter(ParameterSetName='Regenerate')] + [Parameter(ParameterSetName='RegenerateViaJsonFilePath')] + [Parameter(ParameterSetName='RegenerateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -2388,13 +2606,55 @@ param( # The subscription ID forms part of the URI for every service call. ${SubscriptionId}, - [Parameter(Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RegenerateViaIdentityEventhub', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RegenerateViaIdentityEventhubExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${EventhubInputObject}, + + [Parameter(ParameterSetName='RegenerateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RegenerateViaIdentityNamespaceExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + + [Parameter(ParameterSetName='Regenerate', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RegenerateViaIdentityEventhub', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RegenerateViaIdentityNamespace', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRegenerateAccessKeyParameters] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRegenerateAccessKeyParameters] # Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset. - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, + [Parameter(ParameterSetName='RegenerateViaIdentityEventhubExpanded', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaIdentityNamespaceExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("PrimaryKey", "SecondaryKey")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] + [System.String] + # The access key to regenerate. + ${KeyType}, + + [Parameter(ParameterSetName='RegenerateViaIdentityEventhubExpanded')] + [Parameter(ParameterSetName='RegenerateViaIdentityNamespaceExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] + [System.String] + # Optional, if the key value provided, is set for KeyType or autogenerated Key value set for keyType + ${Key}, + + [Parameter(ParameterSetName='RegenerateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] + [System.String] + # Path of Json file supplied to the Regenerate operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='RegenerateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] + [System.String] + # Json string supplied to the Regenerate operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -2454,8 +2714,14 @@ begin { $mapping = @{ Regenerate = 'Az.EventHub.private\New-AzEventHubKey_Regenerate'; + RegenerateViaIdentityEventhub = 'Az.EventHub.private\New-AzEventHubKey_RegenerateViaIdentityEventhub'; + RegenerateViaIdentityEventhubExpanded = 'Az.EventHub.private\New-AzEventHubKey_RegenerateViaIdentityEventhubExpanded'; + RegenerateViaIdentityNamespace = 'Az.EventHub.private\New-AzEventHubKey_RegenerateViaIdentityNamespace'; + RegenerateViaIdentityNamespaceExpanded = 'Az.EventHub.private\New-AzEventHubKey_RegenerateViaIdentityNamespaceExpanded'; + RegenerateViaJsonFilePath = 'Az.EventHub.private\New-AzEventHubKey_RegenerateViaJsonFilePath'; + RegenerateViaJsonString = 'Az.EventHub.private\New-AzEventHubKey_RegenerateViaJsonString'; } - if (('Regenerate') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Regenerate', 'RegenerateViaJsonFilePath', 'RegenerateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -2497,20 +2763,20 @@ end { <# .Synopsis -Creates or updates an AuthorizationRule for a Namespace. +Create an AuthorizationRule for a Namespace. .Description -Creates or updates an AuthorizationRule for a Namespace. +Create an AuthorizationRule for a Namespace. .Example {{ Add code here }} .Example {{ Add code here }} .Inputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule .Notes COMPLEX PARAMETER PROPERTIES @@ -2531,22 +2797,33 @@ INPUTOBJECT : Identity Parameter [SchemaGroupName ]: The Schema Group name [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + PARAMETER : Single item in a List or Get AuthorizationRule operation - [Rights ]: The rights associated with the rule. - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The type of identity that last modified the resource. - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. + [Rights >]: The rights associated with the rule. .Link https://learn.microsoft.com/powershell/module/az.eventhub/new-azeventhubnamespaceauthorizationrule #> function New-AzEventHubNamespaceAuthorizationRule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # The authorization rule name. @@ -2576,22 +2853,29 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [AllowEmptyCollection()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights])] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Manage", "Send", "Listen")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights[]] + [System.String[]] # The rights associated with the rule. ${Rights}, [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule] # Single item in a List or Get AuthorizationRule operation - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter()] @@ -2654,8 +2938,10 @@ begin { $mapping = @{ CreateExpanded = 'Az.EventHub.private\New-AzEventHubNamespaceAuthorizationRule_CreateExpanded'; CreateViaIdentity = 'Az.EventHub.private\New-AzEventHubNamespaceAuthorizationRule_CreateViaIdentity'; + CreateViaIdentityNamespace = 'Az.EventHub.private\New-AzEventHubNamespaceAuthorizationRule_CreateViaIdentityNamespace'; + CreateViaIdentityNamespaceExpanded = 'Az.EventHub.private\New-AzEventHubNamespaceAuthorizationRule_CreateViaIdentityNamespaceExpanded'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -2706,23 +2992,40 @@ Regenerates the primary or secondary connection strings for the specified Namesp {{ Add code here }} .Inputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRegenerateAccessKeyParameters +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRegenerateAccessKeyParameters .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + PARAMETER : Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset. - KeyType : The access key to regenerate. + KeyType : The access key to regenerate. [Key ]: Optional, if the key value provided, is set for KeyType or autogenerated Key value set for keyType .Link https://learn.microsoft.com/powershell/module/az.eventhub/new-azeventhubnamespacekey #> function New-AzEventHubNamespaceKey { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys])] -[CmdletBinding(DefaultParameterSetName='Regenerate', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys])] +[CmdletBinding(DefaultParameterSetName='RegenerateViaIdentityNamespace', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] @@ -2730,19 +3033,25 @@ param( # The authorization rule name. ${Name}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='Regenerate', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # The Namespace name ${NamespaceName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='Regenerate', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='RegenerateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # Name of the resource group within the azure subscription. ${ResourceGroupName}, - [Parameter()] + [Parameter(ParameterSetName='Regenerate')] + [Parameter(ParameterSetName='RegenerateViaJsonFilePath')] + [Parameter(ParameterSetName='RegenerateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -2750,13 +3059,45 @@ param( # The subscription ID forms part of the URI for every service call. ${SubscriptionId}, - [Parameter(Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RegenerateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RegenerateViaIdentityNamespaceExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + + [Parameter(ParameterSetName='Regenerate', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RegenerateViaIdentityNamespace', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IRegenerateAccessKeyParameters] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IRegenerateAccessKeyParameters] # Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset. - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, + [Parameter(ParameterSetName='RegenerateViaIdentityNamespaceExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("PrimaryKey", "SecondaryKey")] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] + [System.String] + # The access key to regenerate. + ${KeyType}, + + [Parameter(ParameterSetName='RegenerateViaIdentityNamespaceExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] + [System.String] + # Optional, if the key value provided, is set for KeyType or autogenerated Key value set for keyType + ${Key}, + + [Parameter(ParameterSetName='RegenerateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] + [System.String] + # Path of Json file supplied to the Regenerate operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='RegenerateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] + [System.String] + # Json string supplied to the Regenerate operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -2816,8 +3157,12 @@ begin { $mapping = @{ Regenerate = 'Az.EventHub.private\New-AzEventHubNamespaceKey_Regenerate'; + RegenerateViaIdentityNamespace = 'Az.EventHub.private\New-AzEventHubNamespaceKey_RegenerateViaIdentityNamespace'; + RegenerateViaIdentityNamespaceExpanded = 'Az.EventHub.private\New-AzEventHubNamespaceKey_RegenerateViaIdentityNamespaceExpanded'; + RegenerateViaJsonFilePath = 'Az.EventHub.private\New-AzEventHubNamespaceKey_RegenerateViaJsonFilePath'; + RegenerateViaJsonString = 'Az.EventHub.private\New-AzEventHubNamespaceKey_RegenerateViaJsonString'; } - if (('Regenerate') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Regenerate', 'RegenerateViaJsonFilePath', 'RegenerateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -2859,11 +3204,11 @@ end { <# .Synopsis -Creates or updates a namespace. +Create a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. .Description -Creates or updates a namespace. +Create a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. .Example @@ -2877,11 +3222,11 @@ New-AzEventHubNamespace -ResourceGroupName myResourceGroup -Name myNamespace -Sk New-AzEventHubNamespace -ResourceGroupName myResourceGroup -Name myNamespace -SkuCapacity 10 -MaximumThroughputUnit 18 -SkuName Standard -Location southcentralus -Tag @{k1='v1'; k2='v2'} -EnableAutoInflate -DisableLocalAuth .Inputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace .Notes COMPLEX PARAMETER PROPERTIES @@ -2890,7 +3235,7 @@ To create the parameters described below, construct a hash table containing the GEODATAREPLICATIONLOCATION : A list of regions where replicas of the namespace are maintained. [ClusterArmId ]: Optional property that denotes the ARM ID of the Cluster. This is required, if a namespace replica should be placed in a Dedicated Event Hub Cluster [LocationName ]: Azure regions where a replica of the namespace is maintained - [RoleType ]: GeoDR Role Types + [RoleType ]: GeoDR Role Types INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name @@ -2921,63 +3266,45 @@ PARAMETER : Single Namespace item in List or Get Operation [ClusterArmId ]: Cluster ARM ID of the Namespace. [DisableLocalAuth ]: This property disables SAS authentication for the Event Hubs namespace. [EnableAutoInflate ]: Value that indicates whether AutoInflate is enabled for eventhub namespace. - [GeoDataReplicationLocation ]: A list of regions where replicas of the namespace are maintained. + [GeoDataReplicationLocation >]: A list of regions where replicas of the namespace are maintained. [ClusterArmId ]: Optional property that denotes the ARM ID of the Cluster. This is required, if a namespace replica should be placed in a Dedicated Event Hub Cluster [LocationName ]: Azure regions where a replica of the namespace is maintained - [RoleType ]: GeoDR Role Types + [RoleType ]: GeoDR Role Types [GeoDataReplicationMaxReplicationLagDurationInSecond ]: The maximum acceptable lag for data replication operations from the primary replica to a quorum of secondary replicas. When the lag exceeds the configured amount, operations on the primary replica will be failed. The allowed values are 0 and 5 minutes to 1 day. - [IdentityType ]: Type of managed service identity. + [IdentityType ]: Type of managed service identity. [KafkaEnabled ]: Value that indicates whether Kafka is enabled for eventhub namespace. - [KeySource ]: Enumerates the possible value of keySource for Encryption - [KeyVaultProperty ]: Properties of KeyVault + [KeySource ]: Enumerates the possible value of keySource for Encryption + [KeyVaultProperty >]: Properties of KeyVault [KeyName ]: Name of the Key from KeyVault [KeyVaultUri ]: Uri of KeyVault [KeyVersion ]: Key Version [UserAssignedIdentity ]: ARM ID of user Identity selected for encryption [MaximumThroughputUnit ]: Upper limit of throughput units when AutoInflate is enabled, value should be within 0 to 20 throughput units. ( '0' if AutoInflateEnabled = true) - [MinimumTlsVersion ]: The minimum TLS version for the cluster to support, e.g. '1.2' - [PrivateEndpointConnection ]: List of private endpoint connections. - [ConnectionState ]: Status of the connection. + [MinimumTlsVersion ]: The minimum TLS version for the cluster to support, e.g. '1.2' + [PrivateEndpointConnection >]: List of private endpoint connections. + [ConnectionState ]: Status of the connection. [Description ]: Description of the connection state. [PrivateEndpointId ]: The ARM identifier for Private Endpoint. - [ProvisioningState ]: Provisioning state of the Private Endpoint Connection. - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The type of identity that last modified the resource. - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. - [PublicNetworkAccess ]: This determines if traffic is allowed over public network. By default it is enabled. + [ProvisioningState ]: Provisioning state of the Private Endpoint Connection. + [PublicNetworkAccess ]: This determines if traffic is allowed over public network. By default it is enabled. [RequireInfrastructureEncryption ]: Enable Infrastructure Encryption (Double Encryption) [SkuCapacity ]: The Event Hubs throughput units for Basic or Standard tiers, where value should be 0 to 20 throughput units. The Event Hubs premium units for Premium tier, where value should be 0 to 10 premium units. - [SkuName ]: Name of this SKU. - [SkuTier ]: The billing tier of this particular SKU. - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The type of identity that last modified the resource. - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. + [SkuName ]: Name of this SKU. + [SkuTier ]: The billing tier of this particular SKU. [UserAssignedIdentity ]: Properties for User Assigned Identities [(Any) ]: This indicates any property can be added to this object. [ZoneRedundant ]: Enabling this property creates a Standard Event Hubs Namespace in regions supported availability zones. PRIVATEENDPOINTCONNECTION : List of private endpoint connections. - [ConnectionState ]: Status of the connection. + [ConnectionState ]: Status of the connection. [Description ]: Description of the connection state. [PrivateEndpointId ]: The ARM identifier for Private Endpoint. - [ProvisioningState ]: Provisioning state of the Private Endpoint Connection. - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The type of identity that last modified the resource. - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. + [ProvisioningState ]: Provisioning state of the Private Endpoint Connection. .Link https://learn.microsoft.com/powershell/module/az.eventhub/new-azeventhubnamespace #> function New-AzEventHubNamespace { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] @@ -3005,7 +3332,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter(ParameterSetName='CreateExpanded')] @@ -3035,9 +3361,8 @@ param( [Parameter(ParameterSetName='CreateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INamespaceReplicaLocation[]] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INamespaceReplicaLocation[]] # A list of regions where replicas of the namespace are maintained. - # To construct, see NOTES section for GEODATAREPLICATIONLOCATION properties and create a hash table. ${GeoDataReplicationLocation}, [Parameter(ParameterSetName='CreateExpanded')] @@ -3049,9 +3374,9 @@ param( ${GeoDataReplicationMaxReplicationLagDurationInSecond}, [Parameter(ParameterSetName='CreateExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType])] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned", "None")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType] + [System.String] # Type of managed service identity. ${IdentityType}, @@ -3062,18 +3387,17 @@ param( ${KafkaEnabled}, [Parameter(ParameterSetName='CreateExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeySource])] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Microsoft.KeyVault")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeySource] + [System.String] # Enumerates the possible value of keySource for Encryption ${KeySource}, [Parameter(ParameterSetName='CreateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultProperties[]] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultProperties[]] # Properties of KeyVault - # To construct, see NOTES section for KEYVAULTPROPERTY properties and create a hash table. ${KeyVaultProperty}, [Parameter(ParameterSetName='CreateExpanded')] @@ -3090,9 +3414,9 @@ param( ${MaximumThroughputUnit}, [Parameter(ParameterSetName='CreateExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.TlsVersion])] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("1.0", "1.1", "1.2")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.TlsVersion] + [System.String] # The minimum TLS version for the cluster to support, e.g. # '1.2' ${MinimumTlsVersion}, @@ -3100,15 +3424,14 @@ param( [Parameter(ParameterSetName='CreateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection[]] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection[]] # List of private endpoint connections. - # To construct, see NOTES section for PRIVATEENDPOINTCONNECTION properties and create a hash table. ${PrivateEndpointConnection}, [Parameter(ParameterSetName='CreateExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess])] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Enabled", "Disabled", "SecuredByPerimeter")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess] + [System.String] # This determines if traffic is allowed over public network. # By default it is enabled. ${PublicNetworkAccess}, @@ -3127,29 +3450,29 @@ param( ${SkuCapacity}, [Parameter(ParameterSetName='CreateExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuName])] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Basic", "Standard", "Premium")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuName] + [System.String] # Name of this SKU. ${SkuName}, [Parameter(ParameterSetName='CreateExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuTier])] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Basic", "Standard", "Premium")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuTier] + [System.String] # The billing tier of this particular SKU. ${SkuTier}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IIdentityUserAssignedIdentities]))] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IIdentityUserAssignedIdentities]))] [System.Collections.Hashtable] # Properties for User Assigned Identities ${UserAssignedIdentity}, @@ -3162,9 +3485,8 @@ param( [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace] # Single Namespace item in List or Get Operation - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter()] @@ -3240,7 +3562,7 @@ begin { CreateExpanded = 'Az.EventHub.private\New-AzEventHubNamespace_CreateExpanded'; CreateViaIdentity = 'Az.EventHub.private\New-AzEventHubNamespace_CreateViaIdentity'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -3282,20 +3604,20 @@ end { <# .Synopsis -Create or update NetworkRuleSet for a Namespace. +Create NetworkRuleSet for a Namespace. .Description -Create or update NetworkRuleSet for a Namespace. +Create NetworkRuleSet for a Namespace. .Example {{ Add code here }} .Example {{ Add code here }} -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet .Notes COMPLEX PARAMETER PROPERTIES @@ -3317,23 +3639,17 @@ INPUTOBJECT : Identity Parameter [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. IPRULE : List of IpRules - [Action ]: The IP Filter Action + [Action ]: The IP Filter Action [IPMask ]: IP Mask PARAMETER : Description of topic resource. - [DefaultAction ]: Default Action for Network Rule Set - [IPRule ]: List of IpRules - [Action ]: The IP Filter Action + [DefaultAction ]: Default Action for Network Rule Set + [IPRule >]: List of IpRules + [Action ]: The IP Filter Action [IPMask ]: IP Mask - [PublicNetworkAccess ]: This determines if traffic is allowed over public network. By default it is enabled. If value is SecuredByPerimeter then Inbound and Outbound communication is controlled by the network security perimeter and profile's access rules. - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The type of identity that last modified the resource. - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. + [PublicNetworkAccess ]: This determines if traffic is allowed over public network. By default it is enabled. If value is SecuredByPerimeter then Inbound and Outbound communication is controlled by the network security perimeter and profile's access rules. [TrustedServiceAccessEnabled ]: Value that indicates whether Trusted Service Access is Enabled or not. - [VirtualNetworkRule ]: List VirtualNetwork Rules + [VirtualNetworkRule >]: List VirtualNetwork Rules [IgnoreMissingVnetServiceEndpoint ]: Value that indicates whether to ignore missing Vnet Service Endpoint [SubnetId ]: Resource ID of Virtual Network Subnet @@ -3344,7 +3660,7 @@ VIRTUALNETWORKRULE : List VirtualNetwork Rules https://learn.microsoft.com/powershell/module/az.eventhub/new-azeventhubnetworkruleset #> function New-AzEventHubNetworkRuleSet { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] @@ -3371,28 +3687,26 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter(ParameterSetName='CreateExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.DefaultAction])] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Allow", "Deny")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.DefaultAction] + [System.String] # Default Action for Network Rule Set ${DefaultAction}, [Parameter(ParameterSetName='CreateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetIPRules[]] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetIPRules[]] # List of IpRules - # To construct, see NOTES section for IPRULE properties and create a hash table. ${IPRule}, [Parameter(ParameterSetName='CreateExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccessFlag])] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Enabled", "Disabled", "SecuredByPerimeter")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccessFlag] + [System.String] # This determines if traffic is allowed over public network. # By default it is enabled. # If value is SecuredByPerimeter then Inbound and Outbound communication is controlled by the network security perimeter and profile's access rules. @@ -3407,16 +3721,14 @@ param( [Parameter(ParameterSetName='CreateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetVirtualNetworkRules[]] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetVirtualNetworkRules[]] # List VirtualNetwork Rules - # To construct, see NOTES section for VIRTUALNETWORKRULE properties and create a hash table. ${VirtualNetworkRule}, [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet] # Description of topic resource. - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter()] @@ -3480,7 +3792,7 @@ begin { CreateExpanded = 'Az.EventHub.private\New-AzEventHubNetworkRuleSet_CreateExpanded'; CreateViaIdentity = 'Az.EventHub.private\New-AzEventHubNetworkRuleSet_CreateViaIdentity'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -3522,20 +3834,20 @@ end { <# .Synopsis -Creates or updates PrivateEndpointConnections of service namespace. +Create PrivateEndpointConnections of service namespace. .Description -Creates or updates PrivateEndpointConnections of service namespace. +Create PrivateEndpointConnections of service namespace. .Example {{ Add code here }} .Example {{ Add code here }} -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection .Notes COMPLEX PARAMETER PROPERTIES @@ -3556,25 +3868,38 @@ INPUTOBJECT : Identity Parameter [SchemaGroupName ]: The Schema Group name [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + PARAMETER : Properties of the PrivateEndpointConnection. - [ConnectionState ]: Status of the connection. + [ConnectionState ]: Status of the connection. [Description ]: Description of the connection state. [PrivateEndpointId ]: The ARM identifier for Private Endpoint. - [ProvisioningState ]: Provisioning state of the Private Endpoint Connection. - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The type of identity that last modified the resource. - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. + [ProvisioningState ]: Provisioning state of the Private Endpoint Connection. .Link https://learn.microsoft.com/powershell/module/az.eventhub/new-azeventhubprivateendpointconnection +.Link +https://msdn.microsoft.com/en-us/library/azure/mt639408.aspx #> function New-AzEventHubPrivateEndpointConnection { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory)] [Alias('PrivateEndpointConnectionName')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] @@ -3605,40 +3930,50 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] [System.String] # The ARM identifier for Private Endpoint. ${PrivateEndpointId}, [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] [System.String] # Description of the connection state. ${PrivateLinkServiceConnectionStateDescription}, [Parameter(ParameterSetName='CreateExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PrivateLinkConnectionStatus])] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Pending", "Approved", "Rejected", "Disconnected")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PrivateLinkConnectionStatus] + [System.String] # Status of the connection. ${PrivateLinkServiceConnectionStateStatus}, [Parameter(ParameterSetName='CreateExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EndPointProvisioningState])] + [Parameter(ParameterSetName='CreateViaIdentityNamespaceExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.PSArgumentCompleterAttribute("Creating", "Updating", "Deleting", "Succeeded", "Canceled", "Failed")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EndPointProvisioningState] + [System.String] # Provisioning state of the Private Endpoint Connection. ${ProvisioningState}, [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityNamespace', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection] # Properties of the PrivateEndpointConnection. - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter()] @@ -3701,8 +4036,10 @@ begin { $mapping = @{ CreateExpanded = 'Az.EventHub.private\New-AzEventHubPrivateEndpointConnection_CreateExpanded'; CreateViaIdentity = 'Az.EventHub.private\New-AzEventHubPrivateEndpointConnection_CreateViaIdentity'; + CreateViaIdentityNamespace = 'Az.EventHub.private\New-AzEventHubPrivateEndpointConnection_CreateViaIdentityNamespace'; + CreateViaIdentityNamespaceExpanded = 'Az.EventHub.private\New-AzEventHubPrivateEndpointConnection_CreateViaIdentityNamespaceExpanded'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -3744,18 +4081,18 @@ end { <# .Synopsis -Creates or Updates an EventHub schema group. +Create an EventHub schema group. .Description -Creates or Updates an EventHub schema group. +Create an EventHub schema group. .Example $schemaGroup = New-AzEventHubSchemaGroup -ResourceGroupName myResourceGroup -NamespaceName myNamespace -Name mySchemaGroup -SchemaCompatibility Backward -SchemaType Avro -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup .Notes COMPLEX PARAMETER PROPERTIES @@ -3779,33 +4116,25 @@ INPUTOBJECT : Identity Parameter PARAMETER : Single item in List or Get Schema Group operation [GroupProperty ]: dictionary object for SchemaGroup group properties [(Any) ]: This indicates any property can be added to this object. - [SchemaCompatibility ]: - [SchemaType ]: - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The type of identity that last modified the resource. - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. + [SchemaCompatibility ]: + [SchemaType ]: .Link https://learn.microsoft.com/powershell/module/az.eventhub/new-azeventhubschemagroup #> function New-AzEventHubSchemaGroup { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup])] [CmdletBinding(DefaultParameterSetName='CreateViaIdentity', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter(Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup] # Single item in List or Get Schema Group operation - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter()] @@ -3901,9 +4230,9 @@ end { <# .Synopsis -Creates or updates a new Event Hub as a nested resource within a Namespace. +Create a new Event Hub as a nested resource within a Namespace. .Description -Creates or updates a new Event Hub as a nested resource within a Namespace. +Create a new Event Hub as a nested resource within a Namespace. .Example New-AzEventHub -Name myEventHub -ResourceGroupName myResourceGroup -NamespaceName myNamespace -RetentionTimeInHour 168 -PartitionCount 5 -CleanupPolicy Delete .Example @@ -3912,11 +4241,11 @@ New-AzEventHub -Name myEventHub -ResourceGroupName myResourceGroup -NamespaceNam New-AzEventHub -Name myEventHub -ResourceGroupName myResourceGroup -NamespaceName myNamespace -CleanupPolicy Compact .Inputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub .Notes COMPLEX PARAMETER PROPERTIES @@ -3941,48 +4270,40 @@ PARAMETER : Single item in List or Get Event Hub operation [ArchiveNameFormat ]: Blob naming convention for archive, e.g. {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}. Here all the parameters (Namespace,EventHub .. etc) are mandatory irrespective of order [BlobContainer ]: Blob container Name [CaptureEnabled ]: A value that indicates whether capture description is enabled. - [CleanupPolicy ]: Enumerates the possible values for cleanup policy + [CleanupPolicy ]: Enumerates the possible values for cleanup policy [DataLakeAccountName ]: The Azure Data Lake Store name for the captured events [DataLakeFolderPath ]: The destination folder path for the captured events [DataLakeSubscriptionId ]: Subscription Id of Azure Data Lake Store [DestinationName ]: Name for capture destination - [Encoding ]: Enumerates the possible values for the encoding format of capture description. Note: 'AvroDeflate' will be deprecated in New API Version - [IdentityType ]: Type of Azure Active Directory Managed Identity. + [Encoding ]: Enumerates the possible values for the encoding format of capture description. Note: 'AvroDeflate' will be deprecated in New API Version + [IdentityType ]: Type of Azure Active Directory Managed Identity. [IntervalInSeconds ]: The time window allows you to set the frequency with which the capture to Azure Blobs will happen, value should between 60 to 900 seconds [MessageRetentionInDay ]: Number of days to retain the events for this Event Hub, value should be 1 to 7 days [PartitionCount ]: Number of partitions created for the Event Hub, allowed values are from 1 to 32 partitions. [RetentionTimeInHour ]: Number of hours to retain the events for this Event Hub. This value is only used when cleanupPolicy is Delete. If cleanupPolicy is Compact the returned value of this property is Long.MaxValue [SizeLimitInBytes ]: The size window defines the amount of data built up in your Event Hub before an capture operation, value should be between 10485760 to 524288000 bytes [SkipEmptyArchive ]: A value that indicates whether to Skip Empty Archives - [Status ]: Enumerates the possible values for the status of the Event Hub. + [Status ]: Enumerates the possible values for the status of the Event Hub. [StorageAccountResourceId ]: Resource id of the storage account to be used to create the blobs - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The type of identity that last modified the resource. - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. [TombstoneRetentionTimeInHour ]: Number of hours to retain the tombstone markers of a compacted Event Hub. This value is only used when cleanupPolicy is Compact. Consumer must complete reading the tombstone marker within this specified amount of time if consumer begins from starting offset to ensure they get a valid snapshot for the specific key described by the tombstone marker within the compacted Event Hub [UserAssignedIdentityId ]: ARM ID of Managed User Identity. This property is required is the type is UserAssignedIdentity. If type is SystemAssigned, then the System Assigned Identity Associated with the namespace will be used. .Link https://learn.microsoft.com/powershell/module/az.eventhub/new-azeventhub #> function New-AzEventHub { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub])] [CmdletBinding(DefaultParameterSetName='CreateViaIdentity', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter(Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub] # Single item in List or Get Event Hub operation - # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter()] @@ -4095,6 +4416,21 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. +EVENTHUBINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [ApplicationGroupName ]: The Application Group name @@ -4109,6 +4445,21 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: Name of the resource group within the azure subscription. [SchemaGroupName ]: The Schema Group name [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. .Link https://learn.microsoft.com/powershell/module/az.eventhub/remove-azeventhubauthorizationrule #> @@ -4117,12 +4468,15 @@ function Remove-AzEventHubAuthorizationRule { [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # The Event Hub name ${EventHubName}, [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityEventhub', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # The authorization rule name. @@ -4152,9 +4506,20 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='DeleteViaIdentityEventhub', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${EventhubInputObject}, + + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -4221,8 +4586,10 @@ begin { $mapping = @{ Delete = 'Az.EventHub.private\Remove-AzEventHubAuthorizationRule_Delete'; DeleteViaIdentity = 'Az.EventHub.private\Remove-AzEventHubAuthorizationRule_DeleteViaIdentity'; + DeleteViaIdentityEventhub = 'Az.EventHub.private\Remove-AzEventHubAuthorizationRule_DeleteViaIdentityEventhub'; + DeleteViaIdentityNamespace = 'Az.EventHub.private\Remove-AzEventHubAuthorizationRule_DeleteViaIdentityNamespace'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -4295,6 +4662,21 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: Name of the resource group within the azure subscription. [SchemaGroupName ]: The Schema Group name [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. .Link https://learn.microsoft.com/powershell/module/az.eventhub/remove-azeventhubnamespaceauthorizationrule #> @@ -4303,6 +4685,7 @@ function Remove-AzEventHubNamespaceAuthorizationRule { [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # The authorization rule name. @@ -4332,9 +4715,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -4401,8 +4789,9 @@ begin { $mapping = @{ Delete = 'Az.EventHub.private\Remove-AzEventHubNamespaceAuthorizationRule_Delete'; DeleteViaIdentity = 'Az.EventHub.private\Remove-AzEventHubNamespaceAuthorizationRule_DeleteViaIdentity'; + DeleteViaIdentityNamespace = 'Az.EventHub.private\Remove-AzEventHubNamespaceAuthorizationRule_DeleteViaIdentityNamespace'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -4453,11 +4842,11 @@ Check the give Namespace name availability. {{ Add code here }} .Inputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityParameter +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityParameter .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult .Notes COMPLEX PARAMETER PROPERTIES @@ -4484,11 +4873,13 @@ PARAMETER : Parameter supplied to check Namespa https://learn.microsoft.com/powershell/module/az.eventhub/test-azeventhubdisasterrecoveryconfignameavailability #> function Test-AzEventHubDisasterRecoveryConfigNameAvailability { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult])] [CmdletBinding(DefaultParameterSetName='CheckExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Check', Mandatory)] [Parameter(ParameterSetName='CheckExpanded', Mandatory)] + [Parameter(ParameterSetName='CheckViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CheckViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # The Namespace name @@ -4496,6 +4887,8 @@ param( [Parameter(ParameterSetName='Check', Mandatory)] [Parameter(ParameterSetName='CheckExpanded', Mandatory)] + [Parameter(ParameterSetName='CheckViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CheckViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # Name of the resource group within the azure subscription. @@ -4503,6 +4896,8 @@ param( [Parameter(ParameterSetName='Check')] [Parameter(ParameterSetName='CheckExpanded')] + [Parameter(ParameterSetName='CheckViaJsonFilePath')] + [Parameter(ParameterSetName='CheckViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -4515,15 +4910,13 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter(ParameterSetName='Check', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='CheckViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityParameter] - # Parameter supplied to check Namespace name availability operation - # To construct, see NOTES section for PARAMETER properties and create a hash table. + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityParameter] + # Parameter supplied to check Namespace name availability operation ${Parameter}, [Parameter(ParameterSetName='CheckExpanded', Mandatory)] @@ -4533,6 +4926,18 @@ param( # Name to check the namespace name availability ${Name}, + [Parameter(ParameterSetName='CheckViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] + [System.String] + # Path of Json file supplied to the Check operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CheckViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] + [System.String] + # Json string supplied to the Check operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -4595,8 +5000,10 @@ begin { CheckExpanded = 'Az.EventHub.private\Test-AzEventHubDisasterRecoveryConfigNameAvailability_CheckExpanded'; CheckViaIdentity = 'Az.EventHub.private\Test-AzEventHubDisasterRecoveryConfigNameAvailability_CheckViaIdentity'; CheckViaIdentityExpanded = 'Az.EventHub.private\Test-AzEventHubDisasterRecoveryConfigNameAvailability_CheckViaIdentityExpanded'; + CheckViaJsonFilePath = 'Az.EventHub.private\Test-AzEventHubDisasterRecoveryConfigNameAvailability_CheckViaJsonFilePath'; + CheckViaJsonString = 'Az.EventHub.private\Test-AzEventHubDisasterRecoveryConfigNameAvailability_CheckViaJsonString'; } - if (('Check', 'CheckExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Check', 'CheckExpanded', 'CheckViaJsonFilePath', 'CheckViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -4647,42 +5054,24 @@ Check the give Namespace name availability. {{ Add code here }} .Inputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityParameter -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityParameter .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity Parameter - [Alias ]: The Disaster Recovery configuration name - [ApplicationGroupName ]: The Application Group name - [AuthorizationRuleName ]: The authorization rule name. - [ClusterName ]: The name of the Event Hubs Cluster. - [ConsumerGroupName ]: The consumer group name - [EventHubName ]: The Event Hub name - [Id ]: Resource identity path - [NamespaceName ]: The Namespace name - [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name - [ResourceAssociationName ]: The ResourceAssociation Name - [ResourceGroupName ]: Name of the resource group within the azure subscription. - [SchemaGroupName ]: The Schema Group name - [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - PARAMETER : Parameter supplied to check Namespace name availability operation Name : Name to check the namespace name availability .Link https://learn.microsoft.com/powershell/module/az.eventhub/test-azeventhubnamespacenameavailability #> function Test-AzEventHubNamespaceNameAvailability { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult])] [CmdletBinding(DefaultParameterSetName='CheckExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='Check')] - [Parameter(ParameterSetName='CheckExpanded')] + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -4690,29 +5079,30 @@ param( # The subscription ID forms part of the URI for every service call. ${SubscriptionId}, - [Parameter(ParameterSetName='CheckViaIdentity', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='CheckViaIdentityExpanded', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] - # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - ${InputObject}, - [Parameter(ParameterSetName='Check', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='CheckViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityParameter] - # Parameter supplied to check Namespace name availability operation - # To construct, see NOTES section for PARAMETER properties and create a hash table. + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityParameter] + # Parameter supplied to check Namespace name availability operation ${Parameter}, [Parameter(ParameterSetName='CheckExpanded', Mandatory)] - [Parameter(ParameterSetName='CheckViaIdentityExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] [System.String] # Name to check the namespace name availability ${Name}, + [Parameter(ParameterSetName='CheckViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] + [System.String] + # Path of Json file supplied to the Check operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CheckViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] + [System.String] + # Json string supplied to the Check operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -4773,10 +5163,10 @@ begin { $mapping = @{ Check = 'Az.EventHub.private\Test-AzEventHubNamespaceNameAvailability_Check'; CheckExpanded = 'Az.EventHub.private\Test-AzEventHubNamespaceNameAvailability_CheckExpanded'; - CheckViaIdentity = 'Az.EventHub.private\Test-AzEventHubNamespaceNameAvailability_CheckViaIdentity'; - CheckViaIdentityExpanded = 'Az.EventHub.private\Test-AzEventHubNamespaceNameAvailability_CheckViaIdentityExpanded'; + CheckViaJsonFilePath = 'Az.EventHub.private\Test-AzEventHubNamespaceNameAvailability_CheckViaJsonFilePath'; + CheckViaJsonString = 'Az.EventHub.private\Test-AzEventHubNamespaceNameAvailability_CheckViaJsonString'; } - if (('Check', 'CheckExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Check', 'CheckExpanded', 'CheckViaJsonFilePath', 'CheckViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/internal/Remove-AzEventHubAuthorizationRule.ps1 b/src/EventHub/EventHub.Autorest/internal/Remove-AzEventHubAuthorizationRule.ps1 index 9d9d31970d6a..2d1e50b4a290 100644 --- a/src/EventHub/EventHub.Autorest/internal/Remove-AzEventHubAuthorizationRule.ps1 +++ b/src/EventHub/EventHub.Autorest/internal/Remove-AzEventHubAuthorizationRule.ps1 @@ -33,6 +33,21 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. +EVENTHUBINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + INPUTOBJECT : Identity Parameter [Alias ]: The Disaster Recovery configuration name [ApplicationGroupName ]: The Application Group name @@ -47,6 +62,21 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: Name of the resource group within the azure subscription. [SchemaGroupName ]: The Schema Group name [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. .Link https://learn.microsoft.com/powershell/module/az.eventhub/remove-azeventhubauthorizationrule #> @@ -55,12 +85,15 @@ function Remove-AzEventHubAuthorizationRule { [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # The Event Hub name ${EventHubName}, [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityEventhub', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # The authorization rule name. @@ -90,9 +123,20 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='DeleteViaIdentityEventhub', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${EventhubInputObject}, + + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -159,8 +203,10 @@ begin { $mapping = @{ Delete = 'Az.EventHub.private\Remove-AzEventHubAuthorizationRule_Delete'; DeleteViaIdentity = 'Az.EventHub.private\Remove-AzEventHubAuthorizationRule_DeleteViaIdentity'; + DeleteViaIdentityEventhub = 'Az.EventHub.private\Remove-AzEventHubAuthorizationRule_DeleteViaIdentityEventhub'; + DeleteViaIdentityNamespace = 'Az.EventHub.private\Remove-AzEventHubAuthorizationRule_DeleteViaIdentityNamespace'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/internal/Remove-AzEventHubNamespaceAuthorizationRule.ps1 b/src/EventHub/EventHub.Autorest/internal/Remove-AzEventHubNamespaceAuthorizationRule.ps1 index 925865ce1137..abae08fc0164 100644 --- a/src/EventHub/EventHub.Autorest/internal/Remove-AzEventHubNamespaceAuthorizationRule.ps1 +++ b/src/EventHub/EventHub.Autorest/internal/Remove-AzEventHubNamespaceAuthorizationRule.ps1 @@ -47,6 +47,21 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: Name of the resource group within the azure subscription. [SchemaGroupName ]: The Schema Group name [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + +NAMESPACEINPUTOBJECT : Identity Parameter + [Alias ]: The Disaster Recovery configuration name + [ApplicationGroupName ]: The Application Group name + [AuthorizationRuleName ]: The authorization rule name. + [ClusterName ]: The name of the Event Hubs Cluster. + [ConsumerGroupName ]: The consumer group name + [EventHubName ]: The Event Hub name + [Id ]: Resource identity path + [NamespaceName ]: The Namespace name + [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name + [ResourceAssociationName ]: The ResourceAssociation Name + [ResourceGroupName ]: Name of the resource group within the azure subscription. + [SchemaGroupName ]: The Schema Group name + [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. .Link https://learn.microsoft.com/powershell/module/az.eventhub/remove-azeventhubnamespaceauthorizationrule #> @@ -55,6 +70,7 @@ function Remove-AzEventHubNamespaceAuthorizationRule { [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # The authorization rule name. @@ -84,9 +100,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='DeleteViaIdentityNamespace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] + # Identity Parameter + ${NamespaceInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -153,8 +174,9 @@ begin { $mapping = @{ Delete = 'Az.EventHub.private\Remove-AzEventHubNamespaceAuthorizationRule_Delete'; DeleteViaIdentity = 'Az.EventHub.private\Remove-AzEventHubNamespaceAuthorizationRule_DeleteViaIdentity'; + DeleteViaIdentityNamespace = 'Az.EventHub.private\Remove-AzEventHubNamespaceAuthorizationRule_DeleteViaIdentityNamespace'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/internal/Test-AzEventHubDisasterRecoveryConfigNameAvailability.ps1 b/src/EventHub/EventHub.Autorest/internal/Test-AzEventHubDisasterRecoveryConfigNameAvailability.ps1 index c816d996a425..fc3e8a5a31a5 100644 --- a/src/EventHub/EventHub.Autorest/internal/Test-AzEventHubDisasterRecoveryConfigNameAvailability.ps1 +++ b/src/EventHub/EventHub.Autorest/internal/Test-AzEventHubDisasterRecoveryConfigNameAvailability.ps1 @@ -25,11 +25,11 @@ Check the give Namespace name availability. {{ Add code here }} .Inputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityParameter +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityParameter .Inputs Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult .Notes COMPLEX PARAMETER PROPERTIES @@ -56,11 +56,13 @@ PARAMETER : Parameter supplied to check Namespa https://learn.microsoft.com/powershell/module/az.eventhub/test-azeventhubdisasterrecoveryconfignameavailability #> function Test-AzEventHubDisasterRecoveryConfigNameAvailability { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult])] [CmdletBinding(DefaultParameterSetName='CheckExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Check', Mandatory)] [Parameter(ParameterSetName='CheckExpanded', Mandatory)] + [Parameter(ParameterSetName='CheckViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CheckViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # The Namespace name @@ -68,6 +70,8 @@ param( [Parameter(ParameterSetName='Check', Mandatory)] [Parameter(ParameterSetName='CheckExpanded', Mandatory)] + [Parameter(ParameterSetName='CheckViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CheckViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [System.String] # Name of the resource group within the azure subscription. @@ -75,6 +79,8 @@ param( [Parameter(ParameterSetName='Check')] [Parameter(ParameterSetName='CheckExpanded')] + [Parameter(ParameterSetName='CheckViaJsonFilePath')] + [Parameter(ParameterSetName='CheckViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -87,15 +93,13 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter(ParameterSetName='Check', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='CheckViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityParameter] - # Parameter supplied to check Namespace name availability operation - # To construct, see NOTES section for PARAMETER properties and create a hash table. + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityParameter] + # Parameter supplied to check Namespace name availability operation ${Parameter}, [Parameter(ParameterSetName='CheckExpanded', Mandatory)] @@ -105,6 +109,18 @@ param( # Name to check the namespace name availability ${Name}, + [Parameter(ParameterSetName='CheckViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] + [System.String] + # Path of Json file supplied to the Check operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CheckViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] + [System.String] + # Json string supplied to the Check operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -167,8 +183,10 @@ begin { CheckExpanded = 'Az.EventHub.private\Test-AzEventHubDisasterRecoveryConfigNameAvailability_CheckExpanded'; CheckViaIdentity = 'Az.EventHub.private\Test-AzEventHubDisasterRecoveryConfigNameAvailability_CheckViaIdentity'; CheckViaIdentityExpanded = 'Az.EventHub.private\Test-AzEventHubDisasterRecoveryConfigNameAvailability_CheckViaIdentityExpanded'; + CheckViaJsonFilePath = 'Az.EventHub.private\Test-AzEventHubDisasterRecoveryConfigNameAvailability_CheckViaJsonFilePath'; + CheckViaJsonString = 'Az.EventHub.private\Test-AzEventHubDisasterRecoveryConfigNameAvailability_CheckViaJsonString'; } - if (('Check', 'CheckExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Check', 'CheckExpanded', 'CheckViaJsonFilePath', 'CheckViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/internal/Test-AzEventHubNamespaceNameAvailability.ps1 b/src/EventHub/EventHub.Autorest/internal/Test-AzEventHubNamespaceNameAvailability.ps1 index fa7ece8f9e75..84ee7afa5766 100644 --- a/src/EventHub/EventHub.Autorest/internal/Test-AzEventHubNamespaceNameAvailability.ps1 +++ b/src/EventHub/EventHub.Autorest/internal/Test-AzEventHubNamespaceNameAvailability.ps1 @@ -25,42 +25,24 @@ Check the give Namespace name availability. {{ Add code here }} .Inputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityParameter -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityParameter .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult +Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity Parameter - [Alias ]: The Disaster Recovery configuration name - [ApplicationGroupName ]: The Application Group name - [AuthorizationRuleName ]: The authorization rule name. - [ClusterName ]: The name of the Event Hubs Cluster. - [ConsumerGroupName ]: The consumer group name - [EventHubName ]: The Event Hub name - [Id ]: Resource identity path - [NamespaceName ]: The Namespace name - [PrivateEndpointConnectionName ]: The PrivateEndpointConnection name - [ResourceAssociationName ]: The ResourceAssociation Name - [ResourceGroupName ]: Name of the resource group within the azure subscription. - [SchemaGroupName ]: The Schema Group name - [SubscriptionId ]: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - PARAMETER : Parameter supplied to check Namespace name availability operation Name : Name to check the namespace name availability .Link https://learn.microsoft.com/powershell/module/az.eventhub/test-azeventhubnamespacenameavailability #> function Test-AzEventHubNamespaceNameAvailability { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult])] [CmdletBinding(DefaultParameterSetName='CheckExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='Check')] - [Parameter(ParameterSetName='CheckExpanded')] + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -68,29 +50,30 @@ param( # The subscription ID forms part of the URI for every service call. ${SubscriptionId}, - [Parameter(ParameterSetName='CheckViaIdentity', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='CheckViaIdentityExpanded', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity] - # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - ${InputObject}, - [Parameter(ParameterSetName='Check', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='CheckViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityParameter] - # Parameter supplied to check Namespace name availability operation - # To construct, see NOTES section for PARAMETER properties and create a hash table. + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityParameter] + # Parameter supplied to check Namespace name availability operation ${Parameter}, [Parameter(ParameterSetName='CheckExpanded', Mandatory)] - [Parameter(ParameterSetName='CheckViaIdentityExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] [System.String] # Name to check the namespace name availability ${Name}, + [Parameter(ParameterSetName='CheckViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] + [System.String] + # Path of Json file supplied to the Check operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CheckViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] + [System.String] + # Json string supplied to the Check operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -151,10 +134,10 @@ begin { $mapping = @{ Check = 'Az.EventHub.private\Test-AzEventHubNamespaceNameAvailability_Check'; CheckExpanded = 'Az.EventHub.private\Test-AzEventHubNamespaceNameAvailability_CheckExpanded'; - CheckViaIdentity = 'Az.EventHub.private\Test-AzEventHubNamespaceNameAvailability_CheckViaIdentity'; - CheckViaIdentityExpanded = 'Az.EventHub.private\Test-AzEventHubNamespaceNameAvailability_CheckViaIdentityExpanded'; + CheckViaJsonFilePath = 'Az.EventHub.private\Test-AzEventHubNamespaceNameAvailability_CheckViaJsonFilePath'; + CheckViaJsonString = 'Az.EventHub.private\Test-AzEventHubNamespaceNameAvailability_CheckViaJsonString'; } - if (('Check', 'CheckExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Check', 'CheckExpanded', 'CheckViaJsonFilePath', 'CheckViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EventHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/src/EventHub/EventHub.Autorest/run-module.ps1 b/src/EventHub/EventHub.Autorest/run-module.ps1 index 21c25c3bc506..e5e3aca45374 100644 --- a/src/EventHub/EventHub.Autorest/run-module.ps1 +++ b/src/EventHub/EventHub.Autorest/run-module.ps1 @@ -12,19 +12,19 @@ # 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]$Code) +param([switch]$NotIsolated, [switch]$Code) $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 } $isAzure = $true if($isAzure) { - . (Join-Path $PSScriptRoot 'check-dependencies.ps1') -Isolated -Accounts + . (Join-Path $PSScriptRoot 'check-dependencies.ps1') -NotIsolated -Accounts # Load the latest version of Az.Accounts installed Import-Module -Name Az.Accounts -RequiredVersion (Get-Module -Name Az.Accounts -ListAvailable | Sort-Object -Property Version -Descending)[0].Version } diff --git a/src/EventHub/EventHub.Autorest/test-module.ps1 b/src/EventHub/EventHub.Autorest/test-module.ps1 index 14c3a64d6eb9..82715bbef2de 100644 --- a/src/EventHub/EventHub.Autorest/test-module.ps1 +++ b/src/EventHub/EventHub.Autorest/test-module.ps1 @@ -12,17 +12,17 @@ # 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]$Live, [switch]$Record, [switch]$Playback, [switch]$RegenerateSupportModule, [switch]$UsePreviousConfigForRecord, [string[]]$TestName) +param([switch]$NotIsolated, [switch]$Live, [switch]$Record, [switch]$Playback, [switch]$RegenerateSupportModule, [switch]$UsePreviousConfigForRecord, [string[]]$TestName) $ErrorActionPreference = 'Stop' -if(-not $Isolated) +if(-not $NotIsolated) { Write-Host -ForegroundColor Green 'Creating isolated process...' if ($PSBoundParameters.ContainsKey("TestName")) { $PSBoundParameters["TestName"] = $PSBoundParameters["TestName"] -join "," } $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path - & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated + & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated return } @@ -34,7 +34,7 @@ if ($PSBoundParameters.ContainsKey("TestName") -and ($TestName.count -eq 1) -and $ProgressPreference = 'SilentlyContinue' $baseName = $PSScriptRoot.BaseName $requireResourceModule = (($baseName -ne "Resources") -and ($Record.IsPresent -or $Live.IsPresent)) -. (Join-Path $PSScriptRoot 'check-dependencies.ps1') -Isolated -Accounts:$false -Pester -Resources:$requireResourceModule -RegenerateSupportModule:$RegenerateSupportModule +. (Join-Path $PSScriptRoot 'check-dependencies.ps1') -NotIsolated -Accounts:$false -Pester -Resources:$requireResourceModule -RegenerateSupportModule:$RegenerateSupportModule . ("$PSScriptRoot\test\utils.ps1") if ($requireResourceModule) @@ -95,4 +95,4 @@ try } } -Write-Host -ForegroundColor Green '-------------Done-------------' \ No newline at end of file +Write-Host -ForegroundColor Green '-------------Done-------------' diff --git a/src/EventHub/EventHub.Autorest/test/Approve-AzEventHubPrivateEndpointConnection.Recording.json b/src/EventHub/EventHub.Autorest/test/Approve-AzEventHubPrivateEndpointConnection.Recording.json index cc1574f4c27f..cc01de4884ff 100644 --- a/src/EventHub/EventHub.Autorest/test/Approve-AzEventHubPrivateEndpointConnection.Recording.json +++ b/src/EventHub/EventHub.Autorest/test/Approve-AzEventHubPrivateEndpointConnection.Recording.json @@ -1,17 +1,17 @@ { - "Approve-AzEventHubPrivateEndpointConnection+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections?api-version=2023-01-01-preview+1": { + "Approve-AzEventHubPrivateEndpointConnection+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections?api-version=2023-01-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "3" ], - "x-ms-client-request-id": [ "b70077b7-9716-40a8-a3cd-db386b03bdc4" ], + "x-ms-unique-id": [ "2" ], + "x-ms-client-request-id": [ "2c634b78-c808-4178-be5a-080d31009956" ], "CommandName": [ "Get-AzEventHubPrivateEndpointConnection" ], "FullCommandName": [ "Get-AzEventHubPrivateEndpointConnection_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,38 +22,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-request-id": [ "3c5b3a53-fd1c-4cdb-a209-8ef7bc841fbe" ], - "x-ms-correlation-request-id": [ "3c5b3a53-fd1c-4cdb-a209-8ef7bc841fbe" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074233Z:3c5b3a53-fd1c-4cdb-a209-8ef7bc841fbe" ], + "x-ms-correlation-request-id": [ "cf73cce3-96c7-4d3d-8449-a581b7c46a05" ], + "x-ms-client-request-id": [ "2c634b78-c808-4178-be5a-080d31009956_RP" ], + "x-ms-messaging-activity-id": [ "cb7bb8b1-7a5f-48b8-be24-9888c2264de4" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G11|2024-04-29T12:41:25" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "cf73cce3-96c7-4d3d-8449-a581b7c46a05" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T124125Z:cf73cce3-96c7-4d3d-8449-a581b7c46a05" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 83BAD1FC9EC64B0E9D296C286EE005B7 Ref B: SEL221051504011 Ref C: 2023-09-18T07:42:32Z" ], - "Date": [ "Mon, 18 Sep 2023 07:42:32 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 225189D7270443B8AA54D1F339D4AAE7 Ref B: SEL221051504047 Ref C: 2024-04-29T12:41:24Z" ], + "Date": [ "Mon, 29 Apr 2024 12:41:25 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1413" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/039cd4e6-b8c0-4b3f-a6c2-41d367f808b5\",\"name\":\"039cd4e6-b8c0-4b3f-a6c2-41d367f808b5\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.Network/privateEndpoints/privateEndpoint-qyfutj\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"Hello\"},\"groupIds\":[\"namespace\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956\",\"name\":\"cfdfc4e7-f5a8-465f-82a7-c4a77d84a956\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.Network/privateEndpoints/privateEndpoint-352l4o\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"Hello\"},\"groupIds\":[\"namespace\"]}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/3f4f7599-40f5-43ca-bddc-6527431d9604\",\"name\":\"3f4f7599-40f5-43ca-bddc-6527431d9604\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Network/privateEndpoints/privateEndpoint-i4bc1n\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"Hello\"},\"groupIds\":[\"namespace\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8\",\"name\":\"f6111dc9-7599-48ca-a495-78dc8d8f2aa8\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Network/privateEndpoints/privateEndpoint-2upkxh\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"Hello\"},\"groupIds\":[\"namespace\"]}}]}", "isContentBase64": false } }, - "Approve-AzEventHubPrivateEndpointConnection+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/039cd4e6-b8c0-4b3f-a6c2-41d367f808b5?api-version=2023-01-01-preview+1": { + "Approve-AzEventHubPrivateEndpointConnection+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/3f4f7599-40f5-43ca-bddc-6527431d9604?api-version=2023-01-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/039cd4e6-b8c0-4b3f-a6c2-41d367f808b5?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/3f4f7599-40f5-43ca-bddc-6527431d9604?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "4" ], - "x-ms-client-request-id": [ "27cd4ab9-8df3-4768-bb79-93ed2580d7a1" ], + "x-ms-unique-id": [ "3" ], + "x-ms-client-request-id": [ "e5b1f6d8-693f-4d8a-bf56-0494c7f26637" ], "CommandName": [ "Get-AzEventHubPrivateEndpointConnection" ], "FullCommandName": [ "Get-AzEventHubPrivateEndpointConnection_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -64,30 +68,34 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-request-id": [ "e7f1825c-271b-4882-aab7-8ede45500897" ], - "x-ms-correlation-request-id": [ "e7f1825c-271b-4882-aab7-8ede45500897" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074235Z:e7f1825c-271b-4882-aab7-8ede45500897" ], + "x-ms-correlation-request-id": [ "2d01fa36-1047-4a48-a966-4406f00dea8b" ], + "x-ms-client-request-id": [ "e5b1f6d8-693f-4d8a-bf56-0494c7f26637_RP" ], + "x-ms-messaging-activity-id": [ "1809df32-a51e-4aeb-b871-6799b71bc499" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G9|2024-04-29T12:41:27" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "2d01fa36-1047-4a48-a966-4406f00dea8b" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T124127Z:2d01fa36-1047-4a48-a966-4406f00dea8b" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 0082A8C1A3F34FBDA5C2B62797E65B7E Ref B: SEL221051504011 Ref C: 2023-09-18T07:42:33Z" ], - "Date": [ "Mon, 18 Sep 2023 07:42:34 GMT" ] + "X-MSEdge-Ref": [ "Ref A: FA45E19D56E24615B68E5D7BB4D72EA6 Ref B: SEL221051504047 Ref C: 2024-04-29T12:41:25Z" ], + "Date": [ "Mon, 29 Apr 2024 12:41:26 GMT" ] }, "ContentHeaders": { "Content-Length": [ "700" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/039cd4e6-b8c0-4b3f-a6c2-41d367f808b5\",\"name\":\"039cd4e6-b8c0-4b3f-a6c2-41d367f808b5\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.Network/privateEndpoints/privateEndpoint-qyfutj\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"Hello\"},\"groupIds\":[\"namespace\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/3f4f7599-40f5-43ca-bddc-6527431d9604\",\"name\":\"3f4f7599-40f5-43ca-bddc-6527431d9604\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Network/privateEndpoints/privateEndpoint-i4bc1n\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"Hello\"},\"groupIds\":[\"namespace\"]}}", "isContentBase64": false } }, - "Approve-AzEventHubPrivateEndpointConnection+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/039cd4e6-b8c0-4b3f-a6c2-41d367f808b5?api-version=2023-01-01-preview+2": { + "Approve-AzEventHubPrivateEndpointConnection+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/3f4f7599-40f5-43ca-bddc-6527431d9604?api-version=2023-01-01-preview+2": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/039cd4e6-b8c0-4b3f-a6c2-41d367f808b5?api-version=2023-01-01-preview", - "Content": "{\n \"properties\": {\n \"privateEndpoint\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.Network/privateEndpoints/privateEndpoint-qyfutj\"\n },\n \"privateLinkServiceConnectionState\": {\n \"status\": \"Approved\",\n \"description\": \"\"\n },\n \"provisioningState\": \"Succeeded\"\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/3f4f7599-40f5-43ca-bddc-6527431d9604?api-version=2023-01-01-preview", + "Content": "{\n \"properties\": {\n \"privateEndpoint\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Network/privateEndpoints/privateEndpoint-i4bc1n\"\n },\n \"privateLinkServiceConnectionState\": {\n \"status\": \"Approved\",\n \"description\": \"\"\n },\n \"provisioningState\": \"Succeeded\"\n }\n}", "isContentBase64": false, "Headers": { }, @@ -101,39 +109,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Azure-AsyncOperation": [ "https://management.azure.com:443/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/039cd4e6-b8c0-4b3f-a6c2-41d367f808b5/operationStatus/039cd4e6-b8c0-4b3f-a6c2-41d367f808b5?api-version=2023-01-01-preview\u0026operationType=Update" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-request-id": [ "2198b3f6-57b3-49bf-81f6-6326507dc846" ], - "x-ms-correlation-request-id": [ "2198b3f6-57b3-49bf-81f6-6326507dc846" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074236Z:2198b3f6-57b3-49bf-81f6-6326507dc846" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/3f4f7599-40f5-43ca-bddc-6527431d9604/operationStatus/3f4f7599-40f5-43ca-bddc-6527431d9604?api-version=2023-01-01-preview\u0026operationType=Update\u0026t=638499912897714537\u0026c=MIIHHjCCBgagAwIBAgITfwKV0ZLKqqC5pXYmSwAEApXRkjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjQwMTMwMDQwMDIzWhcNMjUwMTI0MDQwMDIzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL3r9pIz9EqGL7hkIGyCWYf-iGEEIZub-l1wXGgy_4eykuU0789Lfwih45HdE8dSajY8HHOeTJgXtFKRctvEVoY6uS6XqsmYxRdLcsZCY1jmZssBkruWUaRzazDiW010ropZCynXrFQYtvnimKo7qPCDFQ1SjgldweN0esMkyihnPCi0OqGX1c37m1x9xoH51Wr7fCggiJ0RAwSYC1EI610GaFqK0qPfwFSgtFZ1ys38massMV4shrxjx6v4NNUzSpZXoxgl9R3Q-HHYdui5OlstHf0KFLUGmuwTmxaBTIHI75rmkT0po-txoueIZrjj_0w0WcXRaWC_cFf_p5h1T-0CAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTqKaaymikwcTAnKysLzVZjWspAITAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFgd7P819ocZaPnV6LdPqjb2Rdwy1EuWTLLBF1lXOhiBo3d9NAUc-EwGZXFrLdmj7Vsgyk_n9WVTy2CmGaC7pgZUakNc6E4dLaqY72qqyLEXGSYLc9wcmSL28IB8XdmMfaE-GZEf78Pp8g8npE1OZ8AoPWuTOsI3f5cqhSZ0iz4jvnHThUxHBlT8sBlBMN98YhioCq4BRbv9njVHM-udQ71Lq_kKK0yNzphuX3avpuClvsyu8w2bd9a7BqsjiezBU3ij8cRj-FkaTc2DwPV3pXChlf5pNxSGZnvSEXKrYkvEJpwmkkpr1vWR8hXtCnXTfYpIRkWgKeE9mzgic5wFKng\u0026s=n8Luvg_LVEiFxxqr38oCgARiG8SMLTcvwXWsjWLcGXJglr_QUYc7uKlP1y7C7rD0l8T_4Glr-foizNNE-OYLNiEfnCasgkL8OaARPtBlp9uf_0VlRRO3gM-giVKN9IXNTAd_x8jVSFnhFJHsHML_YqRfjJ5pnsPnu3CbDjJqIO7dC6NPirZhqcFlugzSMKptJ2JnIJfKqyIp5dfLxXmftJxTMgAlJaiXodiSuho7zNnAJd4UbfVoopWU0JZMCGpBqleJfkxgHEi22ERR7SvTjQA_-DeJbJVLsguPQJwM7t37vOMA0J57WfBrn8JSe7x9StMdApgiquLjwgGDDsEdyg\u0026h=3tx3JbifeK4FSET7qlo8SJJq7TE1EH_8kue63O21ObA" ], + "x-ms-correlation-request-id": [ "9e7398da-1eda-4433-92f6-906df32fbb38" ], + "x-ms-client-request-id": [ "a5d28cfd-96ab-48bc-a979-d1b594266a45_RP" ], + "x-ms-messaging-activity-id": [ "08f75ebd-3f56-47f8-bc67-5626975bb9a5" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G6|2024-04-29T12:41:29" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "9e7398da-1eda-4433-92f6-906df32fbb38" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T124129Z:9e7398da-1eda-4433-92f6-906df32fbb38" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: DA95D1F67361402FAB21512B09CABF06 Ref B: SEL221051504011 Ref C: 2023-09-18T07:42:35Z" ], - "Date": [ "Mon, 18 Sep 2023 07:42:35 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 1BDF61BB8F4E4B55B02CA53ED1A9D641 Ref B: SEL221051504047 Ref C: 2024-04-29T12:41:27Z" ], + "Date": [ "Mon, 29 Apr 2024 12:41:29 GMT" ] }, "ContentHeaders": { "Content-Length": [ "695" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/039cd4e6-b8c0-4b3f-a6c2-41d367f808b5\",\"name\":\"039cd4e6-b8c0-4b3f-a6c2-41d367f808b5\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Updating\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.Network/privateEndpoints/privateEndpoint-qyfutj\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/3f4f7599-40f5-43ca-bddc-6527431d9604\",\"name\":\"3f4f7599-40f5-43ca-bddc-6527431d9604\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Updating\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Network/privateEndpoints/privateEndpoint-i4bc1n\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}}", "isContentBase64": false } }, - "Approve-AzEventHubPrivateEndpointConnection+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/039cd4e6-b8c0-4b3f-a6c2-41d367f808b5?api-version=2023-01-01-preview+3": { + "Approve-AzEventHubPrivateEndpointConnection+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/3f4f7599-40f5-43ca-bddc-6527431d9604?api-version=2023-01-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/039cd4e6-b8c0-4b3f-a6c2-41d367f808b5?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/3f4f7599-40f5-43ca-bddc-6527431d9604?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "6" ], - "x-ms-client-request-id": [ "6f0768ac-8527-4c91-9803-b55e07514fbe" ], + "x-ms-unique-id": [ "5" ], + "x-ms-client-request-id": [ "5ee37028-b56e-4fe1-879d-ac052d6e6816" ], "CommandName": [ "Get-AzEventHubPrivateEndpointConnection" ], "FullCommandName": [ "Get-AzEventHubPrivateEndpointConnection_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -144,38 +156,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-request-id": [ "437296c5-fb96-4679-bb13-0da0a551041c" ], - "x-ms-correlation-request-id": [ "437296c5-fb96-4679-bb13-0da0a551041c" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074238Z:437296c5-fb96-4679-bb13-0da0a551041c" ], + "x-ms-correlation-request-id": [ "7dc8aa20-d41f-4b1f-b30d-6de1850daab3" ], + "x-ms-client-request-id": [ "5ee37028-b56e-4fe1-879d-ac052d6e6816_RP" ], + "x-ms-messaging-activity-id": [ "d8383f3b-7f74-4c84-be9a-967e83947fa0" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G6|2024-04-29T12:41:30" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "7dc8aa20-d41f-4b1f-b30d-6de1850daab3" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T124130Z:7dc8aa20-d41f-4b1f-b30d-6de1850daab3" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: F5F6786FD3114F5A91140187EA5AC306 Ref B: SEL221051504011 Ref C: 2023-09-18T07:42:36Z" ], - "Date": [ "Mon, 18 Sep 2023 07:42:37 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 76466F7CEA494168BCA8B22AF68AFA2D Ref B: SEL221051504047 Ref C: 2024-04-29T12:41:29Z" ], + "Date": [ "Mon, 29 Apr 2024 12:41:29 GMT" ] }, "ContentHeaders": { "Content-Length": [ "695" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/039cd4e6-b8c0-4b3f-a6c2-41d367f808b5\",\"name\":\"039cd4e6-b8c0-4b3f-a6c2-41d367f808b5\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Updating\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.Network/privateEndpoints/privateEndpoint-qyfutj\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/3f4f7599-40f5-43ca-bddc-6527431d9604\",\"name\":\"3f4f7599-40f5-43ca-bddc-6527431d9604\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Updating\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Network/privateEndpoints/privateEndpoint-i4bc1n\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}}", "isContentBase64": false } }, - "Approve-AzEventHubPrivateEndpointConnection+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/039cd4e6-b8c0-4b3f-a6c2-41d367f808b5?api-version=2023-01-01-preview+4": { + "Approve-AzEventHubPrivateEndpointConnection+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/3f4f7599-40f5-43ca-bddc-6527431d9604?api-version=2023-01-01-preview+4": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/039cd4e6-b8c0-4b3f-a6c2-41d367f808b5?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/3f4f7599-40f5-43ca-bddc-6527431d9604?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "7" ], - "x-ms-client-request-id": [ "f886e818-9ff1-4ab1-a7ff-09e9ca227fc5" ], + "x-ms-unique-id": [ "6" ], + "x-ms-client-request-id": [ "b2cd521f-1069-4ba2-a50b-debb5dc57563" ], "CommandName": [ "Get-AzEventHubPrivateEndpointConnection" ], "FullCommandName": [ "Get-AzEventHubPrivateEndpointConnection_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -186,38 +202,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], - "x-ms-request-id": [ "05848c9d-25de-4e7b-8ae1-1aafba59be15" ], - "x-ms-correlation-request-id": [ "05848c9d-25de-4e7b-8ae1-1aafba59be15" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074251Z:05848c9d-25de-4e7b-8ae1-1aafba59be15" ], + "x-ms-correlation-request-id": [ "d6a45eaa-240a-4ebb-a506-b9856afa60b1" ], + "x-ms-client-request-id": [ "b2cd521f-1069-4ba2-a50b-debb5dc57563_RP" ], + "x-ms-messaging-activity-id": [ "b5e421c7-e434-4b4c-9604-e74c08f8a3a1" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G8|2024-04-29T12:41:42" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "d6a45eaa-240a-4ebb-a506-b9856afa60b1" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T124142Z:d6a45eaa-240a-4ebb-a506-b9856afa60b1" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 9F9E9B8D5A414713A7BD88E1FBE7B90B Ref B: SEL221051504011 Ref C: 2023-09-18T07:42:48Z" ], - "Date": [ "Mon, 18 Sep 2023 07:42:50 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 80C1E5C0FAB74F468CAE89916984C038 Ref B: SEL221051504047 Ref C: 2024-04-29T12:41:40Z" ], + "Date": [ "Mon, 29 Apr 2024 12:41:41 GMT" ] }, "ContentHeaders": { "Content-Length": [ "695" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/039cd4e6-b8c0-4b3f-a6c2-41d367f808b5\",\"name\":\"039cd4e6-b8c0-4b3f-a6c2-41d367f808b5\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Updating\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.Network/privateEndpoints/privateEndpoint-qyfutj\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/3f4f7599-40f5-43ca-bddc-6527431d9604\",\"name\":\"3f4f7599-40f5-43ca-bddc-6527431d9604\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Updating\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Network/privateEndpoints/privateEndpoint-i4bc1n\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}}", "isContentBase64": false } }, - "Approve-AzEventHubPrivateEndpointConnection+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/039cd4e6-b8c0-4b3f-a6c2-41d367f808b5?api-version=2023-01-01-preview+5": { + "Approve-AzEventHubPrivateEndpointConnection+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/3f4f7599-40f5-43ca-bddc-6527431d9604?api-version=2023-01-01-preview+5": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/039cd4e6-b8c0-4b3f-a6c2-41d367f808b5?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/3f4f7599-40f5-43ca-bddc-6527431d9604?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "8" ], - "x-ms-client-request-id": [ "fa5643fc-2fc5-451d-81b0-59e25cf743e6" ], + "x-ms-unique-id": [ "7" ], + "x-ms-client-request-id": [ "fc0414ce-9c47-47a8-aa6d-e6393501d107" ], "CommandName": [ "Get-AzEventHubPrivateEndpointConnection" ], "FullCommandName": [ "Get-AzEventHubPrivateEndpointConnection_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -228,38 +248,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], - "x-ms-request-id": [ "05c226e3-5e6d-4d62-a0d9-19b90b4c9b40" ], - "x-ms-correlation-request-id": [ "05c226e3-5e6d-4d62-a0d9-19b90b4c9b40" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074303Z:05c226e3-5e6d-4d62-a0d9-19b90b4c9b40" ], + "x-ms-correlation-request-id": [ "91489310-8637-40f6-ae57-88656fda585b" ], + "x-ms-client-request-id": [ "fc0414ce-9c47-47a8-aa6d-e6393501d107_RP" ], + "x-ms-messaging-activity-id": [ "4e0c1fb8-cc86-4713-b90d-42517b061173" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G1|2024-04-29T12:41:53" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "91489310-8637-40f6-ae57-88656fda585b" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T124153Z:91489310-8637-40f6-ae57-88656fda585b" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 5235DACB9F894E57B8A9A1A076A52875 Ref B: SEL221051504011 Ref C: 2023-09-18T07:43:01Z" ], - "Date": [ "Mon, 18 Sep 2023 07:43:02 GMT" ] + "X-MSEdge-Ref": [ "Ref A: F6BDF91BB6B94DB78AB41378FE5642AB Ref B: SEL221051504047 Ref C: 2024-04-29T12:41:52Z" ], + "Date": [ "Mon, 29 Apr 2024 12:41:53 GMT" ] }, "ContentHeaders": { "Content-Length": [ "695" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/039cd4e6-b8c0-4b3f-a6c2-41d367f808b5\",\"name\":\"039cd4e6-b8c0-4b3f-a6c2-41d367f808b5\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Updating\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.Network/privateEndpoints/privateEndpoint-qyfutj\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/3f4f7599-40f5-43ca-bddc-6527431d9604\",\"name\":\"3f4f7599-40f5-43ca-bddc-6527431d9604\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Updating\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Network/privateEndpoints/privateEndpoint-i4bc1n\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}}", "isContentBase64": false } }, - "Approve-AzEventHubPrivateEndpointConnection+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/039cd4e6-b8c0-4b3f-a6c2-41d367f808b5?api-version=2023-01-01-preview+6": { + "Approve-AzEventHubPrivateEndpointConnection+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/3f4f7599-40f5-43ca-bddc-6527431d9604?api-version=2023-01-01-preview+6": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/039cd4e6-b8c0-4b3f-a6c2-41d367f808b5?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/3f4f7599-40f5-43ca-bddc-6527431d9604?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "9" ], - "x-ms-client-request-id": [ "ad4a859d-e4fc-4e99-9d67-7c4c3c913cf3" ], + "x-ms-unique-id": [ "8" ], + "x-ms-client-request-id": [ "9038f0c4-7e9c-49d8-bcc7-693a424f2f7a" ], "CommandName": [ "Get-AzEventHubPrivateEndpointConnection" ], "FullCommandName": [ "Get-AzEventHubPrivateEndpointConnection_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -270,38 +294,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-request-id": [ "ab3be034-1c28-425b-844a-bc246292cf97" ], - "x-ms-correlation-request-id": [ "ab3be034-1c28-425b-844a-bc246292cf97" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074314Z:ab3be034-1c28-425b-844a-bc246292cf97" ], + "x-ms-correlation-request-id": [ "c6a284f2-f02e-490e-b626-d2d2be2e2f9d" ], + "x-ms-client-request-id": [ "9038f0c4-7e9c-49d8-bcc7-693a424f2f7a_RP" ], + "x-ms-messaging-activity-id": [ "847f7bde-f0f7-4a5f-9707-ae0f610507e9" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G12|2024-04-29T12:42:05" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "c6a284f2-f02e-490e-b626-d2d2be2e2f9d" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T124205Z:c6a284f2-f02e-490e-b626-d2d2be2e2f9d" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 73BD9CD968C8483381DEBC3BDF7A568F Ref B: SEL221051504011 Ref C: 2023-09-18T07:43:13Z" ], - "Date": [ "Mon, 18 Sep 2023 07:43:13 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 2F51322235C540A884B40E3F961DF7EA Ref B: SEL221051504047 Ref C: 2024-04-29T12:42:03Z" ], + "Date": [ "Mon, 29 Apr 2024 12:42:05 GMT" ] }, "ContentHeaders": { "Content-Length": [ "696" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/039cd4e6-b8c0-4b3f-a6c2-41d367f808b5\",\"name\":\"039cd4e6-b8c0-4b3f-a6c2-41d367f808b5\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.Network/privateEndpoints/privateEndpoint-qyfutj\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/3f4f7599-40f5-43ca-bddc-6527431d9604\",\"name\":\"3f4f7599-40f5-43ca-bddc-6527431d9604\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Network/privateEndpoints/privateEndpoint-i4bc1n\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}}", "isContentBase64": false } }, - "Approve-AzEventHubPrivateEndpointConnection+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956?api-version=2023-01-01-preview+1": { + "Approve-AzEventHubPrivateEndpointConnection+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8?api-version=2023-01-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "10" ], - "x-ms-client-request-id": [ "bfeb4f19-8467-47a3-8792-760837d77b0e" ], + "x-ms-unique-id": [ "9" ], + "x-ms-client-request-id": [ "d8a3c777-6dfb-4119-a8b0-8e65751855a1" ], "CommandName": [ "Get-AzEventHubPrivateEndpointConnection" ], "FullCommandName": [ "Get-AzEventHubPrivateEndpointConnection_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -312,38 +340,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-request-id": [ "55fb1295-cb60-4c7f-8e69-fc198b7de903" ], - "x-ms-correlation-request-id": [ "55fb1295-cb60-4c7f-8e69-fc198b7de903" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074326Z:55fb1295-cb60-4c7f-8e69-fc198b7de903" ], + "x-ms-correlation-request-id": [ "4f2ef45f-1c00-4e51-9469-4285fc734d16" ], + "x-ms-client-request-id": [ "d8a3c777-6dfb-4119-a8b0-8e65751855a1_RP" ], + "x-ms-messaging-activity-id": [ "eed202c4-dcf1-44ce-9696-c8657e670605" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G4|2024-04-29T12:42:17" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "4f2ef45f-1c00-4e51-9469-4285fc734d16" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T124217Z:4f2ef45f-1c00-4e51-9469-4285fc734d16" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: D4510B6E07574B1499E7777B19424DE7 Ref B: SEL221051504011 Ref C: 2023-09-18T07:43:25Z" ], - "Date": [ "Mon, 18 Sep 2023 07:43:25 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 50B9977349AD4696A1FFE5377C2F0A71 Ref B: SEL221051504047 Ref C: 2024-04-29T12:42:15Z" ], + "Date": [ "Mon, 29 Apr 2024 12:42:17 GMT" ] }, "ContentHeaders": { "Content-Length": [ "700" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956\",\"name\":\"cfdfc4e7-f5a8-465f-82a7-c4a77d84a956\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.Network/privateEndpoints/privateEndpoint-352l4o\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"Hello\"},\"groupIds\":[\"namespace\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8\",\"name\":\"f6111dc9-7599-48ca-a495-78dc8d8f2aa8\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Network/privateEndpoints/privateEndpoint-2upkxh\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"Hello\"},\"groupIds\":[\"namespace\"]}}", "isContentBase64": false } }, - "Approve-AzEventHubPrivateEndpointConnection+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956?api-version=2023-01-01-preview+2": { + "Approve-AzEventHubPrivateEndpointConnection+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8?api-version=2023-01-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "11" ], - "x-ms-client-request-id": [ "95973375-4d4f-4f7a-9eb7-00fe384a0850" ], + "x-ms-unique-id": [ "10" ], + "x-ms-client-request-id": [ "f918aa6f-549b-4401-b76d-c2bc4fcf6d9f" ], "CommandName": [ "Get-AzEventHubPrivateEndpointConnection" ], "FullCommandName": [ "Get-AzEventHubPrivateEndpointConnection_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -354,30 +386,34 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], - "x-ms-request-id": [ "be0f7672-1f0d-4852-a133-686d65d54c9e" ], - "x-ms-correlation-request-id": [ "be0f7672-1f0d-4852-a133-686d65d54c9e" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074328Z:be0f7672-1f0d-4852-a133-686d65d54c9e" ], + "x-ms-correlation-request-id": [ "2d68c891-aa56-40d4-83ce-fa01212ee653" ], + "x-ms-client-request-id": [ "f918aa6f-549b-4401-b76d-c2bc4fcf6d9f_RP" ], + "x-ms-messaging-activity-id": [ "5f6fc717-d173-46fb-bf48-ca41df8b3ee0" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G12|2024-04-29T12:42:19" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "2d68c891-aa56-40d4-83ce-fa01212ee653" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240429T124219Z:2d68c891-aa56-40d4-83ce-fa01212ee653" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: CBF016C9CF144E43B496CCD4D152ECC9 Ref B: SEL221051504011 Ref C: 2023-09-18T07:43:27Z" ], - "Date": [ "Mon, 18 Sep 2023 07:43:27 GMT" ] + "X-MSEdge-Ref": [ "Ref A: E710BF86649D46F8A18212107610DD24 Ref B: SEL221051504047 Ref C: 2024-04-29T12:42:17Z" ], + "Date": [ "Mon, 29 Apr 2024 12:42:18 GMT" ] }, "ContentHeaders": { "Content-Length": [ "700" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956\",\"name\":\"cfdfc4e7-f5a8-465f-82a7-c4a77d84a956\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.Network/privateEndpoints/privateEndpoint-352l4o\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"Hello\"},\"groupIds\":[\"namespace\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8\",\"name\":\"f6111dc9-7599-48ca-a495-78dc8d8f2aa8\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Network/privateEndpoints/privateEndpoint-2upkxh\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"Hello\"},\"groupIds\":[\"namespace\"]}}", "isContentBase64": false } }, - "Approve-AzEventHubPrivateEndpointConnection+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956?api-version=2023-01-01-preview+3": { + "Approve-AzEventHubPrivateEndpointConnection+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8?api-version=2023-01-01-preview+3": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956?api-version=2023-01-01-preview", - "Content": "{\n \"properties\": {\n \"privateEndpoint\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.Network/privateEndpoints/privateEndpoint-352l4o\"\n },\n \"privateLinkServiceConnectionState\": {\n \"status\": \"Approved\",\n \"description\": \"Bye\"\n },\n \"provisioningState\": \"Succeeded\"\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8?api-version=2023-01-01-preview", + "Content": "{\n \"properties\": {\n \"privateEndpoint\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Network/privateEndpoints/privateEndpoint-2upkxh\"\n },\n \"privateLinkServiceConnectionState\": {\n \"status\": \"Approved\",\n \"description\": \"Bye\"\n },\n \"provisioningState\": \"Succeeded\"\n }\n}", "isContentBase64": false, "Headers": { }, @@ -391,39 +427,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Azure-AsyncOperation": [ "https://management.azure.com:443/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956/operationStatus/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956?api-version=2023-01-01-preview\u0026operationType=Update" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-request-id": [ "1ab2cdd1-ac25-4660-9e8c-7b446fd363d4" ], - "x-ms-correlation-request-id": [ "1ab2cdd1-ac25-4660-9e8c-7b446fd363d4" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074330Z:1ab2cdd1-ac25-4660-9e8c-7b446fd363d4" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8/operationStatus/f6111dc9-7599-48ca-a495-78dc8d8f2aa8?api-version=2023-01-01-preview\u0026operationType=Update\u0026t=638499913419838611\u0026c=MIIHHjCCBgagAwIBAgITfwKV0ZLKqqC5pXYmSwAEApXRkjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjQwMTMwMDQwMDIzWhcNMjUwMTI0MDQwMDIzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL3r9pIz9EqGL7hkIGyCWYf-iGEEIZub-l1wXGgy_4eykuU0789Lfwih45HdE8dSajY8HHOeTJgXtFKRctvEVoY6uS6XqsmYxRdLcsZCY1jmZssBkruWUaRzazDiW010ropZCynXrFQYtvnimKo7qPCDFQ1SjgldweN0esMkyihnPCi0OqGX1c37m1x9xoH51Wr7fCggiJ0RAwSYC1EI610GaFqK0qPfwFSgtFZ1ys38massMV4shrxjx6v4NNUzSpZXoxgl9R3Q-HHYdui5OlstHf0KFLUGmuwTmxaBTIHI75rmkT0po-txoueIZrjj_0w0WcXRaWC_cFf_p5h1T-0CAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTqKaaymikwcTAnKysLzVZjWspAITAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFgd7P819ocZaPnV6LdPqjb2Rdwy1EuWTLLBF1lXOhiBo3d9NAUc-EwGZXFrLdmj7Vsgyk_n9WVTy2CmGaC7pgZUakNc6E4dLaqY72qqyLEXGSYLc9wcmSL28IB8XdmMfaE-GZEf78Pp8g8npE1OZ8AoPWuTOsI3f5cqhSZ0iz4jvnHThUxHBlT8sBlBMN98YhioCq4BRbv9njVHM-udQ71Lq_kKK0yNzphuX3avpuClvsyu8w2bd9a7BqsjiezBU3ij8cRj-FkaTc2DwPV3pXChlf5pNxSGZnvSEXKrYkvEJpwmkkpr1vWR8hXtCnXTfYpIRkWgKeE9mzgic5wFKng\u0026s=oxxAFcaVf3vdPzyPBgc7ywu9x5yUnopzDcaWEne3FufJM7JrkBLnUGsXNj4PkgDISwWk32KmwOt7_LpjoeOIMg5RlEydvxXTunCZUkuQEx-LxYm71txaGfFAf7za9J5piDqIIL_dUYHuxyMmMnkVntFMfzOitl4Y0W6AwyF2hHsPChJ3_MA-iKEIsf8YXTCl0br5yp3VrON1U3iyFaoxDjLoSfjd4nzreSwkN3OuF8Jnq1kbBrvRnUy6faHXAeZYHqy9r8mYPOAiQ3WHSr-wpM8LSJ_0KHrTGZ7oScm0-XR_CdZNS-ISLXjMoUP8cgtIKhjxuV04h0aZhouLM-HXEQ\u0026h=NEtfzAMCfU0SiJ5UOPMczcx7C7G_TRJP0o7OuTH0njo" ], + "x-ms-correlation-request-id": [ "f2071b66-cde6-4660-a910-094aeba2ae8f" ], + "x-ms-client-request-id": [ "0d07cee0-5dbc-4c29-b62f-0f274335b60f_RP" ], + "x-ms-messaging-activity-id": [ "4ac8672b-714e-401b-96ed-c733f2b8d992" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G13|2024-04-29T12:42:21" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "f2071b66-cde6-4660-a910-094aeba2ae8f" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T124221Z:f2071b66-cde6-4660-a910-094aeba2ae8f" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: BF331C227AFE4DC4A04A6B251548BB3D Ref B: SEL221051504011 Ref C: 2023-09-18T07:43:28Z" ], - "Date": [ "Mon, 18 Sep 2023 07:43:29 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 5BB46347E1AF4BA490135A9FBC2699AD Ref B: SEL221051504047 Ref C: 2024-04-29T12:42:19Z" ], + "Date": [ "Mon, 29 Apr 2024 12:42:21 GMT" ] }, "ContentHeaders": { "Content-Length": [ "698" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956\",\"name\":\"cfdfc4e7-f5a8-465f-82a7-c4a77d84a956\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Updating\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.Network/privateEndpoints/privateEndpoint-352l4o\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8\",\"name\":\"f6111dc9-7599-48ca-a495-78dc8d8f2aa8\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Updating\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Network/privateEndpoints/privateEndpoint-2upkxh\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}", "isContentBase64": false } }, - "Approve-AzEventHubPrivateEndpointConnection+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956?api-version=2023-01-01-preview+4": { + "Approve-AzEventHubPrivateEndpointConnection+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8?api-version=2023-01-01-preview+4": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "13" ], - "x-ms-client-request-id": [ "c2fbaeef-0db5-484d-85b2-4b184df3de86" ], + "x-ms-unique-id": [ "12" ], + "x-ms-client-request-id": [ "84a72212-5977-4efa-b653-095b7496779b" ], "CommandName": [ "Get-AzEventHubPrivateEndpointConnection" ], "FullCommandName": [ "Get-AzEventHubPrivateEndpointConnection_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -434,38 +474,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-request-id": [ "f6af5983-3aaf-41f7-b243-4ee1719a09a0" ], - "x-ms-correlation-request-id": [ "f6af5983-3aaf-41f7-b243-4ee1719a09a0" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074332Z:f6af5983-3aaf-41f7-b243-4ee1719a09a0" ], + "x-ms-correlation-request-id": [ "ddd8b21f-6ad9-4a25-92f1-29803a22bc89" ], + "x-ms-client-request-id": [ "84a72212-5977-4efa-b653-095b7496779b_RP" ], + "x-ms-messaging-activity-id": [ "77fad303-310b-4f8c-9ec7-76d799ab85e9" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-29T12:42:23" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "ddd8b21f-6ad9-4a25-92f1-29803a22bc89" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T124223Z:ddd8b21f-6ad9-4a25-92f1-29803a22bc89" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 03DDFEF373754F36A49AA2D34BE58E32 Ref B: SEL221051504011 Ref C: 2023-09-18T07:43:31Z" ], - "Date": [ "Mon, 18 Sep 2023 07:43:31 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 3B67D4CA393F4314BE440FC135DF8496 Ref B: SEL221051504047 Ref C: 2024-04-29T12:42:22Z" ], + "Date": [ "Mon, 29 Apr 2024 12:42:23 GMT" ] }, "ContentHeaders": { "Content-Length": [ "698" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956\",\"name\":\"cfdfc4e7-f5a8-465f-82a7-c4a77d84a956\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Updating\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.Network/privateEndpoints/privateEndpoint-352l4o\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8\",\"name\":\"f6111dc9-7599-48ca-a495-78dc8d8f2aa8\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Updating\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Network/privateEndpoints/privateEndpoint-2upkxh\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}", "isContentBase64": false } }, - "Approve-AzEventHubPrivateEndpointConnection+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956?api-version=2023-01-01-preview+5": { + "Approve-AzEventHubPrivateEndpointConnection+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8?api-version=2023-01-01-preview+5": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "14" ], - "x-ms-client-request-id": [ "c7e45933-bcd4-4af6-9ea8-a8645fe7f557" ], + "x-ms-unique-id": [ "13" ], + "x-ms-client-request-id": [ "49b9c37d-f691-44c6-8dda-6cccb7c754d5" ], "CommandName": [ "Get-AzEventHubPrivateEndpointConnection" ], "FullCommandName": [ "Get-AzEventHubPrivateEndpointConnection_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -476,38 +520,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-request-id": [ "a0f898ea-1f53-4c96-a230-9f35e6d36779" ], - "x-ms-correlation-request-id": [ "a0f898ea-1f53-4c96-a230-9f35e6d36779" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074344Z:a0f898ea-1f53-4c96-a230-9f35e6d36779" ], + "x-ms-correlation-request-id": [ "a20a54f1-cf8e-4d5a-9874-614a7132f098" ], + "x-ms-client-request-id": [ "49b9c37d-f691-44c6-8dda-6cccb7c754d5_RP" ], + "x-ms-messaging-activity-id": [ "b7ab64b2-1071-4a15-8395-1b6695052b18" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G9|2024-04-29T12:42:35" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "a20a54f1-cf8e-4d5a-9874-614a7132f098" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T124235Z:a20a54f1-cf8e-4d5a-9874-614a7132f098" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: F81A2E3FC91742139D07A5361C54F2DF Ref B: SEL221051504011 Ref C: 2023-09-18T07:43:42Z" ], - "Date": [ "Mon, 18 Sep 2023 07:43:44 GMT" ] + "X-MSEdge-Ref": [ "Ref A: CDBBE239ACC640D98E1EC5F15B10D6A6 Ref B: SEL221051504047 Ref C: 2024-04-29T12:42:33Z" ], + "Date": [ "Mon, 29 Apr 2024 12:42:34 GMT" ] }, "ContentHeaders": { "Content-Length": [ "698" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956\",\"name\":\"cfdfc4e7-f5a8-465f-82a7-c4a77d84a956\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Updating\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.Network/privateEndpoints/privateEndpoint-352l4o\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8\",\"name\":\"f6111dc9-7599-48ca-a495-78dc8d8f2aa8\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Updating\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Network/privateEndpoints/privateEndpoint-2upkxh\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}", "isContentBase64": false } }, - "Approve-AzEventHubPrivateEndpointConnection+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956?api-version=2023-01-01-preview+6": { + "Approve-AzEventHubPrivateEndpointConnection+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8?api-version=2023-01-01-preview+6": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "15" ], - "x-ms-client-request-id": [ "fadc30a5-6e7b-4873-8184-0f43b56647ce" ], + "x-ms-unique-id": [ "14" ], + "x-ms-client-request-id": [ "616e2037-0d66-4c44-8dd0-442339deaf68" ], "CommandName": [ "Get-AzEventHubPrivateEndpointConnection" ], "FullCommandName": [ "Get-AzEventHubPrivateEndpointConnection_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -518,38 +566,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-request-id": [ "dc3ce7f2-6af4-4405-a5d3-0e773c94967c" ], - "x-ms-correlation-request-id": [ "dc3ce7f2-6af4-4405-a5d3-0e773c94967c" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074354Z:dc3ce7f2-6af4-4405-a5d3-0e773c94967c" ], + "x-ms-correlation-request-id": [ "cbcd1e6e-0993-4ae3-9aaa-1242ae4c255c" ], + "x-ms-client-request-id": [ "616e2037-0d66-4c44-8dd0-442339deaf68_RP" ], + "x-ms-messaging-activity-id": [ "07af2505-6488-43f0-9932-f204c05a7e1a" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G11|2024-04-29T12:42:47" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "cbcd1e6e-0993-4ae3-9aaa-1242ae4c255c" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T124247Z:cbcd1e6e-0993-4ae3-9aaa-1242ae4c255c" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 68B0AC7DE17A481998F522010DAAA0EA Ref B: SEL221051504011 Ref C: 2023-09-18T07:43:54Z" ], - "Date": [ "Mon, 18 Sep 2023 07:43:54 GMT" ] + "X-MSEdge-Ref": [ "Ref A: D53308E6C4814F42938C16C2C9FD91B1 Ref B: SEL221051504047 Ref C: 2024-04-29T12:42:45Z" ], + "Date": [ "Mon, 29 Apr 2024 12:42:46 GMT" ] }, "ContentHeaders": { "Content-Length": [ "698" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956\",\"name\":\"cfdfc4e7-f5a8-465f-82a7-c4a77d84a956\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Updating\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.Network/privateEndpoints/privateEndpoint-352l4o\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8\",\"name\":\"f6111dc9-7599-48ca-a495-78dc8d8f2aa8\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Updating\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Network/privateEndpoints/privateEndpoint-2upkxh\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}", "isContentBase64": false } }, - "Approve-AzEventHubPrivateEndpointConnection+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956?api-version=2023-01-01-preview+7": { + "Approve-AzEventHubPrivateEndpointConnection+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8?api-version=2023-01-01-preview+7": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "16" ], - "x-ms-client-request-id": [ "e6ed2363-10b7-40d0-a5d9-98413f0280a1" ], + "x-ms-unique-id": [ "15" ], + "x-ms-client-request-id": [ "68776c6c-2839-443e-88da-dcf49048a0fe" ], "CommandName": [ "Get-AzEventHubPrivateEndpointConnection" ], "FullCommandName": [ "Get-AzEventHubPrivateEndpointConnection_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -560,22 +612,26 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-request-id": [ "ff77c421-c91a-4398-9454-1320c322ed2d" ], - "x-ms-correlation-request-id": [ "ff77c421-c91a-4398-9454-1320c322ed2d" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074406Z:ff77c421-c91a-4398-9454-1320c322ed2d" ], + "x-ms-correlation-request-id": [ "e3f4e724-5e02-48a7-9166-fbec16bbd8c1" ], + "x-ms-client-request-id": [ "68776c6c-2839-443e-88da-dcf49048a0fe_RP" ], + "x-ms-messaging-activity-id": [ "e5bc0ba3-d1ff-45b2-8d83-3e8165f2f3b8" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G3|2024-04-29T12:42:58" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "e3f4e724-5e02-48a7-9166-fbec16bbd8c1" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T124258Z:e3f4e724-5e02-48a7-9166-fbec16bbd8c1" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: AF2AAF8BC6FB4135842D61890FA8869D Ref B: SEL221051504011 Ref C: 2023-09-18T07:44:05Z" ], - "Date": [ "Mon, 18 Sep 2023 07:44:06 GMT" ] + "X-MSEdge-Ref": [ "Ref A: AD7A5B7714D2482E9E18F88EE059120B Ref B: SEL221051504047 Ref C: 2024-04-29T12:42:57Z" ], + "Date": [ "Mon, 29 Apr 2024 12:42:57 GMT" ] }, "ContentHeaders": { "Content-Length": [ "699" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956\",\"name\":\"cfdfc4e7-f5a8-465f-82a7-c4a77d84a956\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.Network/privateEndpoints/privateEndpoint-352l4o\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8\",\"name\":\"f6111dc9-7599-48ca-a495-78dc8d8f2aa8\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Network/privateEndpoints/privateEndpoint-2upkxh\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}", "isContentBase64": false } } diff --git a/src/EventHub/EventHub.Autorest/test/Approve-AzEventHubPrivateEndpointConnection.Tests.ps1 b/src/EventHub/EventHub.Autorest/test/Approve-AzEventHubPrivateEndpointConnection.Tests.ps1 index 19a10708e68a..30611fe2278c 100644 --- a/src/EventHub/EventHub.Autorest/test/Approve-AzEventHubPrivateEndpointConnection.Tests.ps1 +++ b/src/EventHub/EventHub.Autorest/test/Approve-AzEventHubPrivateEndpointConnection.Tests.ps1 @@ -16,7 +16,7 @@ if(($null -eq $TestName) -or ($TestName -contains 'Approve-AzEventHubPrivateEndp Describe 'Approve-AzEventHubPrivateEndpointConnection' { $privateEndpoint = Get-AzEventHubPrivateEndpointConnection -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace - + It 'SetExpanded' { $privateEndpoint[0].ConnectionState | Should -Be "Pending" $privateEndpoint[0].Description | Should -Be "Hello" @@ -27,7 +27,9 @@ Describe 'Approve-AzEventHubPrivateEndpointConnection' { while($firstPrivateEndpoint.ProvisioningState -ne "Succeeded"){ $firstPrivateEndpoint = Get-AzEventHubPrivateEndpointConnection -Name $privateEndpoint[0].Name -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace - Start-TestSleep 10 + if ($TestMode -ne 'playback') { + Start-Sleep 10 + } } } @@ -40,7 +42,9 @@ Describe 'Approve-AzEventHubPrivateEndpointConnection' { while($secondPrivateEndpoint.ProvisioningState -ne "Succeeded"){ $secondPrivateEndpoint = Get-AzEventHubPrivateEndpointConnection -Name $privateEndpoint[1].Name -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace - Start-TestSleep 10 + if ($TestMode -ne 'playback') { + Start-Sleep 10 + } } } } diff --git a/src/EventHub/EventHub.Autorest/test/Deny-AzEventHubPrivateEndpointConnection.Recording.json b/src/EventHub/EventHub.Autorest/test/Deny-AzEventHubPrivateEndpointConnection.Recording.json index 363a9e41ab59..6bbedd7bb798 100644 --- a/src/EventHub/EventHub.Autorest/test/Deny-AzEventHubPrivateEndpointConnection.Recording.json +++ b/src/EventHub/EventHub.Autorest/test/Deny-AzEventHubPrivateEndpointConnection.Recording.json @@ -1,17 +1,17 @@ { - "Deny-AzEventHubPrivateEndpointConnection+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections?api-version=2023-01-01-preview+1": { + "Deny-AzEventHubPrivateEndpointConnection+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections?api-version=2023-01-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "17" ], - "x-ms-client-request-id": [ "3f9b1e59-691e-4733-861d-d070c5deff2b" ], + "x-ms-unique-id": [ "16" ], + "x-ms-client-request-id": [ "66f62442-e39c-4d37-b837-73b014a04cad" ], "CommandName": [ "Get-AzEventHubPrivateEndpointConnection" ], "FullCommandName": [ "Get-AzEventHubPrivateEndpointConnection_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,38 +22,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-request-id": [ "2e004a77-90db-4b61-9817-b8d53999f840" ], - "x-ms-correlation-request-id": [ "2e004a77-90db-4b61-9817-b8d53999f840" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074428Z:2e004a77-90db-4b61-9817-b8d53999f840" ], + "x-ms-correlation-request-id": [ "42293799-93c4-443f-a0bb-9becbaaa31f3" ], + "x-ms-client-request-id": [ "66f62442-e39c-4d37-b837-73b014a04cad_RP" ], + "x-ms-messaging-activity-id": [ "e4754a33-7938-42a7-a14b-b821cf7219d8" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G6|2024-04-29T12:43:24" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "42293799-93c4-443f-a0bb-9becbaaa31f3" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T124324Z:42293799-93c4-443f-a0bb-9becbaaa31f3" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: B2239BB811AF48098D39460DB96F9DD1 Ref B: SEL221051504011 Ref C: 2023-09-18T07:44:26Z" ], - "Date": [ "Mon, 18 Sep 2023 07:44:28 GMT" ] + "X-MSEdge-Ref": [ "Ref A: F0E32741EE884B3E813C5437E5961D88 Ref B: SEL221051504047 Ref C: 2024-04-29T12:43:22Z" ], + "Date": [ "Mon, 29 Apr 2024 12:43:23 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1408" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/039cd4e6-b8c0-4b3f-a6c2-41d367f808b5\",\"name\":\"039cd4e6-b8c0-4b3f-a6c2-41d367f808b5\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.Network/privateEndpoints/privateEndpoint-qyfutj\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956\",\"name\":\"cfdfc4e7-f5a8-465f-82a7-c4a77d84a956\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.Network/privateEndpoints/privateEndpoint-352l4o\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/3f4f7599-40f5-43ca-bddc-6527431d9604\",\"name\":\"3f4f7599-40f5-43ca-bddc-6527431d9604\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Network/privateEndpoints/privateEndpoint-i4bc1n\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8\",\"name\":\"f6111dc9-7599-48ca-a495-78dc8d8f2aa8\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Network/privateEndpoints/privateEndpoint-2upkxh\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}]}", "isContentBase64": false } }, - "Deny-AzEventHubPrivateEndpointConnection+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/039cd4e6-b8c0-4b3f-a6c2-41d367f808b5?api-version=2023-01-01-preview+1": { + "Deny-AzEventHubPrivateEndpointConnection+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/3f4f7599-40f5-43ca-bddc-6527431d9604?api-version=2023-01-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/039cd4e6-b8c0-4b3f-a6c2-41d367f808b5?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/3f4f7599-40f5-43ca-bddc-6527431d9604?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "18" ], - "x-ms-client-request-id": [ "dff114db-60c5-460c-a758-e1ef29c789a6" ], + "x-ms-unique-id": [ "17" ], + "x-ms-client-request-id": [ "a939a519-51c8-4da8-a566-1f606fa7a4f1" ], "CommandName": [ "Get-AzEventHubPrivateEndpointConnection" ], "FullCommandName": [ "Get-AzEventHubPrivateEndpointConnection_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -64,30 +68,34 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], - "x-ms-request-id": [ "1074b14b-b484-4597-bb21-ab6813178ff4" ], - "x-ms-correlation-request-id": [ "1074b14b-b484-4597-bb21-ab6813178ff4" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074430Z:1074b14b-b484-4597-bb21-ab6813178ff4" ], + "x-ms-correlation-request-id": [ "7f636133-5593-4339-891d-b508540a9488" ], + "x-ms-client-request-id": [ "a939a519-51c8-4da8-a566-1f606fa7a4f1_RP" ], + "x-ms-messaging-activity-id": [ "3e262d51-c83a-4225-b1f2-d71a19a73fd4" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G13|2024-04-29T12:43:25" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "7f636133-5593-4339-891d-b508540a9488" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T124325Z:7f636133-5593-4339-891d-b508540a9488" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 8929D37D0EEB4D46874760AD2C56213C Ref B: SEL221051504011 Ref C: 2023-09-18T07:44:28Z" ], - "Date": [ "Mon, 18 Sep 2023 07:44:30 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 5696DF0E39CD49A8BAB98B0812C93942 Ref B: SEL221051504047 Ref C: 2024-04-29T12:43:24Z" ], + "Date": [ "Mon, 29 Apr 2024 12:43:24 GMT" ] }, "ContentHeaders": { "Content-Length": [ "696" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/039cd4e6-b8c0-4b3f-a6c2-41d367f808b5\",\"name\":\"039cd4e6-b8c0-4b3f-a6c2-41d367f808b5\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.Network/privateEndpoints/privateEndpoint-qyfutj\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/3f4f7599-40f5-43ca-bddc-6527431d9604\",\"name\":\"3f4f7599-40f5-43ca-bddc-6527431d9604\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Network/privateEndpoints/privateEndpoint-i4bc1n\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}}", "isContentBase64": false } }, - "Deny-AzEventHubPrivateEndpointConnection+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/039cd4e6-b8c0-4b3f-a6c2-41d367f808b5?api-version=2023-01-01-preview+2": { + "Deny-AzEventHubPrivateEndpointConnection+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/3f4f7599-40f5-43ca-bddc-6527431d9604?api-version=2023-01-01-preview+2": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/039cd4e6-b8c0-4b3f-a6c2-41d367f808b5?api-version=2023-01-01-preview", - "Content": "{\n \"properties\": {\n \"privateEndpoint\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.Network/privateEndpoints/privateEndpoint-qyfutj\"\n },\n \"privateLinkServiceConnectionState\": {\n \"status\": \"Rejected\",\n \"description\": \"\"\n },\n \"provisioningState\": \"Succeeded\"\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/3f4f7599-40f5-43ca-bddc-6527431d9604?api-version=2023-01-01-preview", + "Content": "{\n \"properties\": {\n \"privateEndpoint\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Network/privateEndpoints/privateEndpoint-i4bc1n\"\n },\n \"privateLinkServiceConnectionState\": {\n \"status\": \"Rejected\",\n \"description\": \"\"\n },\n \"provisioningState\": \"Succeeded\"\n }\n}", "isContentBase64": false, "Headers": { }, @@ -101,39 +109,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Azure-AsyncOperation": [ "https://management.azure.com:443/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/039cd4e6-b8c0-4b3f-a6c2-41d367f808b5/operationStatus/039cd4e6-b8c0-4b3f-a6c2-41d367f808b5?api-version=2023-01-01-preview\u0026operationType=Update" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-request-id": [ "58c71684-a020-48ef-9fc0-15d7169b5e54" ], - "x-ms-correlation-request-id": [ "58c71684-a020-48ef-9fc0-15d7169b5e54" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074431Z:58c71684-a020-48ef-9fc0-15d7169b5e54" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/3f4f7599-40f5-43ca-bddc-6527431d9604/operationStatus/3f4f7599-40f5-43ca-bddc-6527431d9604?api-version=2023-01-01-preview\u0026operationType=Update\u0026t=638499914080613988\u0026c=MIIHADCCBeigAwIBAgITfARkblWv9E1UAxL0rgAABGRuVTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMwMDYxMDQ1WhcNMjUwMTI0MDYxMDQ1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL63lNdlvQvkP7LpygshC_1kUR8Go8cQgx8bHhBgpDDVKuiZ9Ac6D19MAApdfH616nszMxe_fI1VBHXniEsjPIV8AXVPDZsYCvRuoo8NS3kXvNixn2PhgEvc7t6mZJpguzRxCvCjQjb129HPMlZfO706DAoq-3Abk2D1ll6oHEIFF-YhjtFxXd-cB4I4sCYZYdG5DFj65hWpQ4wtYur1yA1RMJ8U032dNAijuZrbmCs_Q7P1-y_pCC7VoKqRbeJQhMRROmCpX-TNXW3G9HNh300FJZ-qWZVUJZaa9-gPdJSiDPG41VipfQS_CinB3Zqif61cSyK9AI3YsTsQXtTcR_UCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9DTzFQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA1LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MB0GA1UdDgQWBBRgyIJjirhr5laZASuyXTmIxmTBzjAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAGIGEEgPerVLMQJK1Fk22xrEMyLCfudJmeDIiAi765uzPqt_wmDsdrqpT5yR7rsTQj9D9yYKq4PWalUzuE5QRq1rtTU1dc8FPhkPwX85cYGdXR09ERq9-C-eutCRsjdAXSAcOJW3K1-5fmKCRZyyz74bgucwgUwcP2L2PkiQedpIyTV4u7iYf8SsAmPf_e2bErQYtxk2lNu_26WKVPZczOwS5v9yt6ZQjxJxKVDygkHqUjghX5T6K22gd6d_KXS_ET2uu9Shl7Q9NCQ1Lt12LhDBD8ch5Jky6siBu4P9tSgTHnodazx2wuXj-1eY3Q-Mx3UKOD00XREaD2Gcz-rTEIA\u0026s=AbAuTnwIrzz_bGaGlv_fZjz5Uc3ZEPs2XUN-xEDgIQdJ1xBsQRhlADcPdXVFqFr0f3pJLHVznfOEFeLsYrnS78osXc7rhskbSOxyTDjOAAyqUB6pPzfJv_ZVb-dzjXy83TpiJCVDFRQKxOvS739JRbXBjhw4t6ykAjP8uKYS4YcekP2iKMnleQDN5wn9UyW_xsY0Vwu1xQQJETdGkv4antMlxryiaJSlCewR0hijIQcOIwm93Au3El_1b1wpaNyB-YpcRwGdwFggm6o_qqp0PdgYuef5yAN2FsTfgCu5N1Dobu6irAcIF_FX-taBh56QdUajII8DybM8CYxCi5dwDQ\u0026h=Kt0K1gQ3ZqmsHXkpJNOHQTb0yjXhd1yBESblBHcig1M" ], + "x-ms-correlation-request-id": [ "b1242b14-d894-4220-8bf1-c8f796bafcfd" ], + "x-ms-client-request-id": [ "ebd15e23-c1b7-4714-9c2f-ded9388ad9e7_RP" ], + "x-ms-messaging-activity-id": [ "067f856a-cc94-4e6f-a7f1-02ee1f09f231" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G14|2024-04-29T12:43:27" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-request-id": [ "b1242b14-d894-4220-8bf1-c8f796bafcfd" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240429T124328Z:b1242b14-d894-4220-8bf1-c8f796bafcfd" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 80DC2EF80F4E4BD8962E93421E886B49 Ref B: SEL221051504011 Ref C: 2023-09-18T07:44:30Z" ], - "Date": [ "Mon, 18 Sep 2023 07:44:31 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 5807A7FBD0154086B29118077023E654 Ref B: SEL221051504047 Ref C: 2024-04-29T12:43:25Z" ], + "Date": [ "Mon, 29 Apr 2024 12:43:27 GMT" ] }, "ContentHeaders": { "Content-Length": [ "695" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/039cd4e6-b8c0-4b3f-a6c2-41d367f808b5\",\"name\":\"039cd4e6-b8c0-4b3f-a6c2-41d367f808b5\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Updating\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.Network/privateEndpoints/privateEndpoint-qyfutj\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/3f4f7599-40f5-43ca-bddc-6527431d9604\",\"name\":\"3f4f7599-40f5-43ca-bddc-6527431d9604\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Updating\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Network/privateEndpoints/privateEndpoint-i4bc1n\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}}", "isContentBase64": false } }, - "Deny-AzEventHubPrivateEndpointConnection+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956?api-version=2023-01-01-preview+1": { + "Deny-AzEventHubPrivateEndpointConnection+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8?api-version=2023-01-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "20" ], - "x-ms-client-request-id": [ "014fdac7-d375-4bac-bc02-7ee0fc51c311" ], + "x-ms-unique-id": [ "19" ], + "x-ms-client-request-id": [ "450a86f0-5d92-43bc-9001-461986be62d3" ], "CommandName": [ "Get-AzEventHubPrivateEndpointConnection" ], "FullCommandName": [ "Get-AzEventHubPrivateEndpointConnection_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -144,38 +156,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-request-id": [ "ac0564c9-43ee-456b-8fb7-c0e3c2e69fa4" ], - "x-ms-correlation-request-id": [ "ac0564c9-43ee-456b-8fb7-c0e3c2e69fa4" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074433Z:ac0564c9-43ee-456b-8fb7-c0e3c2e69fa4" ], + "x-ms-correlation-request-id": [ "e70df0b0-2534-4572-a745-804fcc0a6959" ], + "x-ms-client-request-id": [ "450a86f0-5d92-43bc-9001-461986be62d3_RP" ], + "x-ms-messaging-activity-id": [ "f3ed73bc-95eb-4c5f-938b-3104bc4a8156" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G11|2024-04-29T12:43:28" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "e70df0b0-2534-4572-a745-804fcc0a6959" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T124328Z:e70df0b0-2534-4572-a745-804fcc0a6959" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: A38CBA90089F40F694898E3963200CA5 Ref B: SEL221051504011 Ref C: 2023-09-18T07:44:32Z" ], - "Date": [ "Mon, 18 Sep 2023 07:44:33 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 6619CC9E10EC4C96BD26FCEBDC53E497 Ref B: SEL221051504047 Ref C: 2024-04-29T12:43:28Z" ], + "Date": [ "Mon, 29 Apr 2024 12:43:27 GMT" ] }, "ContentHeaders": { "Content-Length": [ "699" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956\",\"name\":\"cfdfc4e7-f5a8-465f-82a7-c4a77d84a956\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.Network/privateEndpoints/privateEndpoint-352l4o\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8\",\"name\":\"f6111dc9-7599-48ca-a495-78dc8d8f2aa8\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Network/privateEndpoints/privateEndpoint-2upkxh\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}", "isContentBase64": false } }, - "Deny-AzEventHubPrivateEndpointConnection+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956?api-version=2023-01-01-preview+2": { + "Deny-AzEventHubPrivateEndpointConnection+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8?api-version=2023-01-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "21" ], - "x-ms-client-request-id": [ "e60414f9-bfe8-45f5-a8a1-b2ae6d929e51" ], + "x-ms-unique-id": [ "20" ], + "x-ms-client-request-id": [ "b7572a13-80dd-49bf-b919-ddea15702139" ], "CommandName": [ "Get-AzEventHubPrivateEndpointConnection" ], "FullCommandName": [ "Get-AzEventHubPrivateEndpointConnection_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -186,30 +202,34 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-request-id": [ "808b9de4-68d8-490d-b51a-74b853ce17e0" ], - "x-ms-correlation-request-id": [ "808b9de4-68d8-490d-b51a-74b853ce17e0" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074435Z:808b9de4-68d8-490d-b51a-74b853ce17e0" ], + "x-ms-correlation-request-id": [ "1da84069-7c06-4d86-a1d3-10fab3186f5f" ], + "x-ms-client-request-id": [ "b7572a13-80dd-49bf-b919-ddea15702139_RP" ], + "x-ms-messaging-activity-id": [ "8fb58bfe-92ba-4178-a475-3330efe0dcae" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G10|2024-04-29T12:43:30" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "1da84069-7c06-4d86-a1d3-10fab3186f5f" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T124330Z:1da84069-7c06-4d86-a1d3-10fab3186f5f" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: BE6C96E86B6E476498AA5FDE74B20491 Ref B: SEL221051504011 Ref C: 2023-09-18T07:44:33Z" ], - "Date": [ "Mon, 18 Sep 2023 07:44:35 GMT" ] + "X-MSEdge-Ref": [ "Ref A: AF80D58E21504D3485DA86E22C111AA5 Ref B: SEL221051504047 Ref C: 2024-04-29T12:43:28Z" ], + "Date": [ "Mon, 29 Apr 2024 12:43:29 GMT" ] }, "ContentHeaders": { "Content-Length": [ "699" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956\",\"name\":\"cfdfc4e7-f5a8-465f-82a7-c4a77d84a956\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.Network/privateEndpoints/privateEndpoint-352l4o\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8\",\"name\":\"f6111dc9-7599-48ca-a495-78dc8d8f2aa8\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Network/privateEndpoints/privateEndpoint-2upkxh\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}", "isContentBase64": false } }, - "Deny-AzEventHubPrivateEndpointConnection+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956?api-version=2023-01-01-preview+3": { + "Deny-AzEventHubPrivateEndpointConnection+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8?api-version=2023-01-01-preview+3": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956?api-version=2023-01-01-preview", - "Content": "{\n \"properties\": {\n \"privateEndpoint\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.Network/privateEndpoints/privateEndpoint-352l4o\"\n },\n \"privateLinkServiceConnectionState\": {\n \"status\": \"Rejected\",\n \"description\": \"Bye\"\n },\n \"provisioningState\": \"Succeeded\"\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8?api-version=2023-01-01-preview", + "Content": "{\n \"properties\": {\n \"privateEndpoint\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Network/privateEndpoints/privateEndpoint-2upkxh\"\n },\n \"privateLinkServiceConnectionState\": {\n \"status\": \"Rejected\",\n \"description\": \"Bye\"\n },\n \"provisioningState\": \"Succeeded\"\n }\n}", "isContentBase64": false, "Headers": { }, @@ -223,23 +243,27 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Azure-AsyncOperation": [ "https://management.azure.com:443/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956/operationStatus/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956?api-version=2023-01-01-preview\u0026operationType=Update" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-request-id": [ "3ca9955c-4b9d-4341-88de-7187fd4f9f5b" ], - "x-ms-correlation-request-id": [ "3ca9955c-4b9d-4341-88de-7187fd4f9f5b" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074436Z:3ca9955c-4b9d-4341-88de-7187fd4f9f5b" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8/operationStatus/f6111dc9-7599-48ca-a495-78dc8d8f2aa8?api-version=2023-01-01-preview\u0026operationType=Update\u0026t=638499914126671205\u0026c=MIIHHjCCBgagAwIBAgITfwKV0ZLKqqC5pXYmSwAEApXRkjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjQwMTMwMDQwMDIzWhcNMjUwMTI0MDQwMDIzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL3r9pIz9EqGL7hkIGyCWYf-iGEEIZub-l1wXGgy_4eykuU0789Lfwih45HdE8dSajY8HHOeTJgXtFKRctvEVoY6uS6XqsmYxRdLcsZCY1jmZssBkruWUaRzazDiW010ropZCynXrFQYtvnimKo7qPCDFQ1SjgldweN0esMkyihnPCi0OqGX1c37m1x9xoH51Wr7fCggiJ0RAwSYC1EI610GaFqK0qPfwFSgtFZ1ys38massMV4shrxjx6v4NNUzSpZXoxgl9R3Q-HHYdui5OlstHf0KFLUGmuwTmxaBTIHI75rmkT0po-txoueIZrjj_0w0WcXRaWC_cFf_p5h1T-0CAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTqKaaymikwcTAnKysLzVZjWspAITAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFgd7P819ocZaPnV6LdPqjb2Rdwy1EuWTLLBF1lXOhiBo3d9NAUc-EwGZXFrLdmj7Vsgyk_n9WVTy2CmGaC7pgZUakNc6E4dLaqY72qqyLEXGSYLc9wcmSL28IB8XdmMfaE-GZEf78Pp8g8npE1OZ8AoPWuTOsI3f5cqhSZ0iz4jvnHThUxHBlT8sBlBMN98YhioCq4BRbv9njVHM-udQ71Lq_kKK0yNzphuX3avpuClvsyu8w2bd9a7BqsjiezBU3ij8cRj-FkaTc2DwPV3pXChlf5pNxSGZnvSEXKrYkvEJpwmkkpr1vWR8hXtCnXTfYpIRkWgKeE9mzgic5wFKng\u0026s=K7EvZSAYz3q98SF0-khBre0fz4zXrCuT5cD3angbefY0efcnsmtuCA5D3GWAhI0bycVdUrAgz9jnwHkH3ZI3Ckw1TQ6fkyPvOCdu819OD94YBfTuJ0rSJeP_WxUxX39zs95xGrCA2IcQVwYycDs9-9leUV7gQ6o301SzubWG5NuVAk2_PY38EuYsK8lD6M0RwhXV54ZCAloGF7m9mmz4uAenNEiD9Psxch-dpWLgh8iMo7D0p65fhXgUE0deeCS0yALvnsb_k3irnRUwwCagyUKgCQzMr7TXJlDbvdjn-M93BKLzADiY5fm8Op4N2HaEUFhwzSVu2nzan2D9w7s6vg\u0026h=aGUFD3oq-VXxyn9oRU_HAxssWMhvvK4hIpQR_JOLLqw" ], + "x-ms-correlation-request-id": [ "a2ac02eb-04bd-45ec-ad3e-5b605b8e283a" ], + "x-ms-client-request-id": [ "8f0f4a07-7048-41d6-86eb-174613338f89_RP" ], + "x-ms-messaging-activity-id": [ "f6014e3c-eef3-401e-83fc-19e30ab8ac1f" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G9|2024-04-29T12:43:32" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "a2ac02eb-04bd-45ec-ad3e-5b605b8e283a" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T124332Z:a2ac02eb-04bd-45ec-ad3e-5b605b8e283a" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: D6E595FB83AF4250A7473C78C4D8A04B Ref B: SEL221051504011 Ref C: 2023-09-18T07:44:35Z" ], - "Date": [ "Mon, 18 Sep 2023 07:44:36 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 4008FA2EA85749BE9E2AE55FBB75B467 Ref B: SEL221051504047 Ref C: 2024-04-29T12:43:30Z" ], + "Date": [ "Mon, 29 Apr 2024 12:43:31 GMT" ] }, "ContentHeaders": { "Content-Length": [ "698" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956\",\"name\":\"cfdfc4e7-f5a8-465f-82a7-c4a77d84a956\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Updating\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.Network/privateEndpoints/privateEndpoint-352l4o\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8\",\"name\":\"f6111dc9-7599-48ca-a495-78dc8d8f2aa8\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Updating\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Network/privateEndpoints/privateEndpoint-2upkxh\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}", "isContentBase64": false } } diff --git a/src/EventHub/EventHub.Autorest/test/Get-AzEventHub.Recording.json b/src/EventHub/EventHub.Autorest/test/Get-AzEventHub.Recording.json index c4d748ae85be..b77aaf3c3bf9 100644 --- a/src/EventHub/EventHub.Autorest/test/Get-AzEventHub.Recording.json +++ b/src/EventHub/EventHub.Autorest/test/Get-AzEventHub.Recording.json @@ -1,17 +1,17 @@ { - "Get-AzEventHub+[NoContext]+List+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs?api-version=2023-01-01-preview+1": { + "Get-AzEventHub+[NoContext]+List+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs?api-version=2023-01-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "23" ], - "x-ms-client-request-id": [ "1b5739c8-0f1b-48e8-9019-fcfcc0e8496e" ], + "x-ms-unique-id": [ "22" ], + "x-ms-client-request-id": [ "e3ad6b91-2f3b-4aeb-bee7-0ac1ac68e161" ], "CommandName": [ "Get-AzEventHub" ], "FullCommandName": [ "Get-AzEventHub_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -23,38 +23,42 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "x-ms-inline-count": [ "" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-request-id": [ "43cbc92a-56c2-4e56-9d59-53fdde122fb3" ], - "x-ms-correlation-request-id": [ "43cbc92a-56c2-4e56-9d59-53fdde122fb3" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074447Z:43cbc92a-56c2-4e56-9d59-53fdde122fb3" ], + "x-ms-correlation-request-id": [ "7f3e63fc-821a-4801-9665-f1e15566a953" ], + "x-ms-client-request-id": [ "e3ad6b91-2f3b-4aeb-bee7-0ac1ac68e161_RP" ], + "x-ms-messaging-activity-id": [ "90878c48-3fa5-48d5-a885-dd14ce4e6c41" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G8|2024-04-29T12:43:48" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "7f3e63fc-821a-4801-9665-f1e15566a953" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T124348Z:7f3e63fc-821a-4801-9665-f1e15566a953" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 680BA4CF1CF94A3289479258E4FAE294 Ref B: SEL221051504011 Ref C: 2023-09-18T07:44:46Z" ], - "Date": [ "Mon, 18 Sep 2023 07:44:47 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 6991F42814234085B6C1C5AA42C7939F Ref B: SEL221051504047 Ref C: 2024-04-29T12:43:46Z" ], + "Date": [ "Mon, 29 Apr 2024 12:43:47 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "545" ], + "Content-Length": [ "543" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventhub504uah\",\"name\":\"eventhub504uah\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs\",\"location\":\"eastus\",\"properties\":{\"retentionDescription\":{\"cleanupPolicy\":\"Delete\",\"retentionTimeInHours\":24},\"messageRetentionInDays\":1,\"partitionCount\":1,\"status\":\"Active\",\"createdAt\":\"2023-09-18T07:33:57.237\",\"updatedAt\":\"2023-09-18T07:34:00.087\",\"partitionIds\":[\"0\"]}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventhub789hmt\",\"name\":\"eventhub789hmt\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs\",\"location\":\"eastus\",\"properties\":{\"retentionDescription\":{\"cleanupPolicy\":\"Delete\",\"retentionTimeInHours\":24},\"messageRetentionInDays\":1,\"partitionCount\":1,\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:37:46.37\",\"updatedAt\":\"2024-04-29T12:37:49.02\",\"partitionIds\":[\"0\"]}}]}", "isContentBase64": false } }, - "Get-AzEventHub+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah?api-version=2023-01-01-preview+1": { + "Get-AzEventHub+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt?api-version=2023-01-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "24" ], - "x-ms-client-request-id": [ "1b98c471-e44f-4cac-9c5f-2a6cc66f42dd" ], + "x-ms-unique-id": [ "23" ], + "x-ms-client-request-id": [ "2206e0d1-4ea2-40b1-8962-c0b81fee1b89" ], "CommandName": [ "Get-AzEventHub" ], "FullCommandName": [ "Get-AzEventHub_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -65,38 +69,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], - "x-ms-request-id": [ "ad61845f-12e0-4595-a816-8b22d28b4855" ], - "x-ms-correlation-request-id": [ "ad61845f-12e0-4595-a816-8b22d28b4855" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074448Z:ad61845f-12e0-4595-a816-8b22d28b4855" ], + "x-ms-correlation-request-id": [ "3455dda1-8eb2-4c28-b946-782a567aa447" ], + "x-ms-client-request-id": [ "2206e0d1-4ea2-40b1-8962-c0b81fee1b89_RP" ], + "x-ms-messaging-activity-id": [ "10e40d79-1e1a-490d-b315-4e72ea4f05dc" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G10|2024-04-29T12:43:49" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "3455dda1-8eb2-4c28-b946-782a567aa447" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T124349Z:3455dda1-8eb2-4c28-b946-782a567aa447" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: E3A7FC8E63CC49EFB3212C7461CBC809 Ref B: SEL221051504011 Ref C: 2023-09-18T07:44:47Z" ], - "Date": [ "Mon, 18 Sep 2023 07:44:48 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 87F7FADF5EA345BB94348C944E4F7B67 Ref B: SEL221051504047 Ref C: 2024-04-29T12:43:48Z" ], + "Date": [ "Mon, 29 Apr 2024 12:43:48 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "533" ], + "Content-Length": [ "531" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah\",\"name\":\"eventHub504uah\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs\",\"location\":\"eastus\",\"properties\":{\"retentionDescription\":{\"cleanupPolicy\":\"Delete\",\"retentionTimeInHours\":24},\"messageRetentionInDays\":1,\"partitionCount\":1,\"status\":\"Active\",\"createdAt\":\"2023-09-18T07:33:57.237\",\"updatedAt\":\"2023-09-18T07:34:00.087\",\"partitionIds\":[\"0\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt\",\"name\":\"eventHub789hmt\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs\",\"location\":\"eastus\",\"properties\":{\"retentionDescription\":{\"cleanupPolicy\":\"Delete\",\"retentionTimeInHours\":24},\"messageRetentionInDays\":1,\"partitionCount\":1,\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:37:46.37\",\"updatedAt\":\"2024-04-29T12:37:49.02\",\"partitionIds\":[\"0\"]}}", "isContentBase64": false } }, - "Get-AzEventHub+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah?api-version=2023-01-01-preview+1": { + "Get-AzEventHub+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt?api-version=2023-01-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "25" ], - "x-ms-client-request-id": [ "2f09fcd9-d394-4628-8766-02f31fd0d1f3" ], + "x-ms-unique-id": [ "24" ], + "x-ms-client-request-id": [ "3dddd712-1646-4c8f-a5e9-c3cde4d481b8" ], "CommandName": [ "Get-AzEventHub" ], "FullCommandName": [ "Get-AzEventHub_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -107,38 +115,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-request-id": [ "8e6b122e-6497-4ac5-885f-fff88062090d" ], - "x-ms-correlation-request-id": [ "8e6b122e-6497-4ac5-885f-fff88062090d" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074448Z:8e6b122e-6497-4ac5-885f-fff88062090d" ], + "x-ms-correlation-request-id": [ "5e925d99-344b-4023-8c1a-f6407d8ded30" ], + "x-ms-client-request-id": [ "3dddd712-1646-4c8f-a5e9-c3cde4d481b8_RP" ], + "x-ms-messaging-activity-id": [ "ef3be676-2b0b-4e6c-ae38-ffae8262fa9b" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-29T12:43:50" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "5e925d99-344b-4023-8c1a-f6407d8ded30" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T124350Z:5e925d99-344b-4023-8c1a-f6407d8ded30" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: EB8162D3207A4EE990A27DB7B6B3A20A Ref B: SEL221051504011 Ref C: 2023-09-18T07:44:48Z" ], - "Date": [ "Mon, 18 Sep 2023 07:44:48 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 5592BCC9FFB1453B91D3A00B37343DFB Ref B: SEL221051504047 Ref C: 2024-04-29T12:43:49Z" ], + "Date": [ "Mon, 29 Apr 2024 12:43:50 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "533" ], + "Content-Length": [ "531" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah\",\"name\":\"eventHub504uah\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs\",\"location\":\"eastus\",\"properties\":{\"retentionDescription\":{\"cleanupPolicy\":\"Delete\",\"retentionTimeInHours\":24},\"messageRetentionInDays\":1,\"partitionCount\":1,\"status\":\"Active\",\"createdAt\":\"2023-09-18T07:33:57.237\",\"updatedAt\":\"2023-09-18T07:34:00.087\",\"partitionIds\":[\"0\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt\",\"name\":\"eventHub789hmt\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs\",\"location\":\"eastus\",\"properties\":{\"retentionDescription\":{\"cleanupPolicy\":\"Delete\",\"retentionTimeInHours\":24},\"messageRetentionInDays\":1,\"partitionCount\":1,\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:37:46.37\",\"updatedAt\":\"2024-04-29T12:37:49.02\",\"partitionIds\":[\"0\"]}}", "isContentBase64": false } }, - "Get-AzEventHub+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah?api-version=2023-01-01-preview+2": { + "Get-AzEventHub+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt?api-version=2023-01-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "26" ], - "x-ms-client-request-id": [ "73d95ba5-f4a6-40c2-8a92-e7051e7c1da7" ], + "x-ms-unique-id": [ "25" ], + "x-ms-client-request-id": [ "045aeeaa-acf7-4b2c-b423-511b41785094" ], "CommandName": [ "Get-AzEventHub" ], "FullCommandName": [ "Get-AzEventHub_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -149,38 +161,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-request-id": [ "f27dae76-4781-4ab3-b687-4ed4e15baa31" ], - "x-ms-correlation-request-id": [ "f27dae76-4781-4ab3-b687-4ed4e15baa31" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074449Z:f27dae76-4781-4ab3-b687-4ed4e15baa31" ], + "x-ms-correlation-request-id": [ "aa0c3299-0cab-443b-abd9-32808413c82d" ], + "x-ms-client-request-id": [ "045aeeaa-acf7-4b2c-b423-511b41785094_RP" ], + "x-ms-messaging-activity-id": [ "f1b694d5-fbd1-4f91-9b14-789bdf2306e2" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-29T12:43:51" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "aa0c3299-0cab-443b-abd9-32808413c82d" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T124351Z:aa0c3299-0cab-443b-abd9-32808413c82d" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: ECAF52C92122451D871894C3F1ADFFBC Ref B: SEL221051504011 Ref C: 2023-09-18T07:44:49Z" ], - "Date": [ "Mon, 18 Sep 2023 07:44:49 GMT" ] + "X-MSEdge-Ref": [ "Ref A: A0FCDEA915A9489EA9346D68BC446DBF Ref B: SEL221051504047 Ref C: 2024-04-29T12:43:50Z" ], + "Date": [ "Mon, 29 Apr 2024 12:43:50 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "533" ], + "Content-Length": [ "531" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah\",\"name\":\"eventHub504uah\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs\",\"location\":\"eastus\",\"properties\":{\"retentionDescription\":{\"cleanupPolicy\":\"Delete\",\"retentionTimeInHours\":24},\"messageRetentionInDays\":1,\"partitionCount\":1,\"status\":\"Active\",\"createdAt\":\"2023-09-18T07:33:57.237\",\"updatedAt\":\"2023-09-18T07:34:00.087\",\"partitionIds\":[\"0\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt\",\"name\":\"eventHub789hmt\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs\",\"location\":\"eastus\",\"properties\":{\"retentionDescription\":{\"cleanupPolicy\":\"Delete\",\"retentionTimeInHours\":24},\"messageRetentionInDays\":1,\"partitionCount\":1,\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:37:46.37\",\"updatedAt\":\"2024-04-29T12:37:49.02\",\"partitionIds\":[\"0\"]}}", "isContentBase64": false } }, - "Get-AzEventHub+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah?api-version=2023-01-01-preview+3": { + "Get-AzEventHub+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt?api-version=2023-01-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "27" ], - "x-ms-client-request-id": [ "cb6e638e-296e-41bb-819b-713bdd36d495" ], + "x-ms-unique-id": [ "26" ], + "x-ms-client-request-id": [ "6605906e-3e40-4ab8-8f90-a39bee4f7b45" ], "CommandName": [ "Get-AzEventHub" ], "FullCommandName": [ "Get-AzEventHub_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -191,22 +207,26 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-request-id": [ "d53024e7-2cc0-45bd-bd69-26fa09e6d73f" ], - "x-ms-correlation-request-id": [ "d53024e7-2cc0-45bd-bd69-26fa09e6d73f" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074450Z:d53024e7-2cc0-45bd-bd69-26fa09e6d73f" ], + "x-ms-correlation-request-id": [ "e8db2ec1-f875-46d7-ab6b-2834785e07a7" ], + "x-ms-client-request-id": [ "6605906e-3e40-4ab8-8f90-a39bee4f7b45_RP" ], + "x-ms-messaging-activity-id": [ "61597b0c-7d2e-400a-a95b-93c613942f6a" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-29T12:43:53" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "e8db2ec1-f875-46d7-ab6b-2834785e07a7" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240429T124353Z:e8db2ec1-f875-46d7-ab6b-2834785e07a7" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 107A2CA90B0F4F4893580189979016AB Ref B: SEL221051504011 Ref C: 2023-09-18T07:44:49Z" ], - "Date": [ "Mon, 18 Sep 2023 07:44:50 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 43C113F48C02445A8ED385FA200B05E5 Ref B: SEL221051504047 Ref C: 2024-04-29T12:43:51Z" ], + "Date": [ "Mon, 29 Apr 2024 12:43:52 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "533" ], + "Content-Length": [ "531" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah\",\"name\":\"eventHub504uah\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs\",\"location\":\"eastus\",\"properties\":{\"retentionDescription\":{\"cleanupPolicy\":\"Delete\",\"retentionTimeInHours\":24},\"messageRetentionInDays\":1,\"partitionCount\":1,\"status\":\"Active\",\"createdAt\":\"2023-09-18T07:33:57.237\",\"updatedAt\":\"2023-09-18T07:34:00.087\",\"partitionIds\":[\"0\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt\",\"name\":\"eventHub789hmt\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs\",\"location\":\"eastus\",\"properties\":{\"retentionDescription\":{\"cleanupPolicy\":\"Delete\",\"retentionTimeInHours\":24},\"messageRetentionInDays\":1,\"partitionCount\":1,\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:37:46.37\",\"updatedAt\":\"2024-04-29T12:37:49.02\",\"partitionIds\":[\"0\"]}}", "isContentBase64": false } } diff --git a/src/EventHub/EventHub.Autorest/test/Get-AzEventHubApplicationGroup.Recording.json b/src/EventHub/EventHub.Autorest/test/Get-AzEventHubApplicationGroup.Recording.json index fb1b8f2f0b42..ab49d53611e5 100644 --- a/src/EventHub/EventHub.Autorest/test/Get-AzEventHubApplicationGroup.Recording.json +++ b/src/EventHub/EventHub.Autorest/test/Get-AzEventHubApplicationGroup.Recording.json @@ -1,17 +1,17 @@ { - "Get-AzEventHubApplicationGroup+[NoContext]+List+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups?api-version=2023-01-01-preview+1": { + "Get-AzEventHubApplicationGroup+[NoContext]+List+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/applicationGroups?api-version=2023-01-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/applicationGroups?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "28" ], - "x-ms-client-request-id": [ "03a4c22b-dfcb-480d-a9eb-c378b3a39d3d" ], + "x-ms-unique-id": [ "27" ], + "x-ms-client-request-id": [ "ec588b8c-682a-4dfb-80b6-4b92eb8d940d" ], "CommandName": [ "Get-AzEventHubApplicationGroup" ], "FullCommandName": [ "Get-AzEventHubApplicationGroup_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,39 +22,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "ba954311-ee05-4815-beb2-27206f3c4b8d_M8SN1_M8SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], - "x-ms-correlation-request-id": [ "45218cb3-b710-49cd-97f8-090d01d150de" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074504Z:45218cb3-b710-49cd-97f8-090d01d150de" ], + "x-ms-correlation-request-id": [ "a98814fe-3906-472c-bf07-8ee804f4e7da" ], + "x-ms-client-request-id": [ "ec588b8c-682a-4dfb-80b6-4b92eb8d940d_RP" ], + "x-ms-messaging-activity-id": [ "3e9c5d2a-cfbe-48fb-a12e-bf33225eb011" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G11|2024-04-29T12:44:09" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "a98814fe-3906-472c-bf07-8ee804f4e7da" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T124409Z:a98814fe-3906-472c-bf07-8ee804f4e7da" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 60D4501C38524F57B575AC4069A5A025 Ref B: SEL221051504011 Ref C: 2023-09-18T07:45:00Z" ], - "Date": [ "Mon, 18 Sep 2023 07:45:04 GMT" ] + "X-MSEdge-Ref": [ "Ref A: C6AFD1FA65004B89B64838E4F6CC7B91 Ref B: SEL221051504047 Ref C: 2024-04-29T12:44:07Z" ], + "Date": [ "Mon, 29 Apr 2024 12:44:08 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "477" ], + "Content-Length": [ "547" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGroupdchk16\",\"name\":\"appGroupdchk16\",\"type\":\"\",\"location\":\"East US\",\"properties\":{\"clientAppGroupIdentifier\":\"NamespaceSASKeyName=RootManageSharedAccessKey\",\"policies\":[{\"type\":\"ThrottlingPolicy\",\"name\":\"t1\",\"metricId\":\"IncomingBytes\",\"rateLimitThreshold\":10234}],\"isEnabled\":true}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/applicationGroups/appGroup3iw8s2\",\"name\":\"appGroup3iw8s2\",\"type\":\"Microsoft.EventHub/Namespaces/ApplicationGroups\",\"location\":\"eastus\",\"properties\":{\"name\":\"appGroup3iw8s2\",\"isEnabled\":true,\"clientAppGroupIdentifier\":\"NamespaceSASKeyName=RootManageSharedAccessKey\",\"policies\":[{\"metricId\":\"IncomingBytes\",\"rateLimitThreshold\":10234,\"type\":\"ThrottlingPolicy\",\"name\":\"t1\"}]}}]}", "isContentBase64": false } }, - "Get-AzEventHubApplicationGroup+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGroupdchk16?api-version=2023-01-01-preview+1": { + "Get-AzEventHubApplicationGroup+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/applicationGroups/appGroup3iw8s2?api-version=2023-01-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGroupdchk16?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/applicationGroups/appGroup3iw8s2?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "29" ], - "x-ms-client-request-id": [ "8ea3b448-c5ba-4311-9528-01f158772b3a" ], + "x-ms-unique-id": [ "28" ], + "x-ms-client-request-id": [ "f478e2b0-73cf-47bf-8c41-21b3a29e8e3c" ], "CommandName": [ "Get-AzEventHubApplicationGroup" ], "FullCommandName": [ "Get-AzEventHubApplicationGroup_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -65,39 +68,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "190af207-3404-4436-9337-730fe27069ca_M1SN1_M1SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], - "x-ms-correlation-request-id": [ "410d1f67-1c92-4c63-84d7-cd1cdb03f68a" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074506Z:410d1f67-1c92-4c63-84d7-cd1cdb03f68a" ], + "x-ms-correlation-request-id": [ "bef7168b-66b7-4865-a13e-45b6186cbf21" ], + "x-ms-client-request-id": [ "f478e2b0-73cf-47bf-8c41-21b3a29e8e3c_RP" ], + "x-ms-messaging-activity-id": [ "1e7dc7df-d1fe-4768-aaf8-1244870c729a" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G14|2024-04-29T12:44:11" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "bef7168b-66b7-4865-a13e-45b6186cbf21" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T124411Z:bef7168b-66b7-4865-a13e-45b6186cbf21" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 3EFFE76AF89F4E1EA1BA82F595F29DB4 Ref B: SEL221051504011 Ref C: 2023-09-18T07:45:05Z" ], - "Date": [ "Mon, 18 Sep 2023 07:45:06 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 0F1F5A9F5E3E491CB6A7561981A24722 Ref B: SEL221051504047 Ref C: 2024-04-29T12:44:09Z" ], + "Date": [ "Mon, 29 Apr 2024 12:44:10 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "465" ], + "Content-Length": [ "535" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGroupdchk16\",\"name\":\"appGroupdchk16\",\"type\":\"\",\"location\":\"East US\",\"properties\":{\"clientAppGroupIdentifier\":\"NamespaceSASKeyName=RootManageSharedAccessKey\",\"policies\":[{\"type\":\"ThrottlingPolicy\",\"name\":\"t1\",\"metricId\":\"IncomingBytes\",\"rateLimitThreshold\":10234}],\"isEnabled\":true}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/applicationGroups/appGroup3iw8s2\",\"name\":\"appGroup3iw8s2\",\"type\":\"Microsoft.EventHub/Namespaces/ApplicationGroups\",\"location\":\"eastus\",\"properties\":{\"name\":\"appGroup3iw8s2\",\"isEnabled\":true,\"clientAppGroupIdentifier\":\"NamespaceSASKeyName=RootManageSharedAccessKey\",\"policies\":[{\"metricId\":\"IncomingBytes\",\"rateLimitThreshold\":10234,\"type\":\"ThrottlingPolicy\",\"name\":\"t1\"}]}}", "isContentBase64": false } }, - "Get-AzEventHubApplicationGroup+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGroupdchk16?api-version=2023-01-01-preview+1": { + "Get-AzEventHubApplicationGroup+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/applicationGroups/appGroup3iw8s2?api-version=2023-01-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGroupdchk16?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/applicationGroups/appGroup3iw8s2?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "30" ], - "x-ms-client-request-id": [ "e899b667-2424-4366-8000-cfda9b46b55c" ], + "x-ms-unique-id": [ "29" ], + "x-ms-client-request-id": [ "0c5e656f-a086-4f2e-b7a7-d5f5b1303117" ], "CommandName": [ "Get-AzEventHubApplicationGroup" ], "FullCommandName": [ "Get-AzEventHubApplicationGroup_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -108,39 +114,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "bd3a475f-37da-4269-ac31-7e7459fc638f_M1SN1_M1SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-correlation-request-id": [ "f5002bb1-5fc4-461a-b006-a68544c49d3d" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074510Z:f5002bb1-5fc4-461a-b006-a68544c49d3d" ], + "x-ms-correlation-request-id": [ "a4160dac-dccf-495d-b4d8-946f9dbc136e" ], + "x-ms-client-request-id": [ "0c5e656f-a086-4f2e-b7a7-d5f5b1303117_RP" ], + "x-ms-messaging-activity-id": [ "89757025-d49a-4174-acad-a9d4e85cde46" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G14|2024-04-29T12:44:11" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-request-id": [ "a4160dac-dccf-495d-b4d8-946f9dbc136e" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T124412Z:a4160dac-dccf-495d-b4d8-946f9dbc136e" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: FEBDAE029F9D49BAB0E45014815CCA4A Ref B: SEL221051504011 Ref C: 2023-09-18T07:45:07Z" ], - "Date": [ "Mon, 18 Sep 2023 07:45:10 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 1D5ED20FD84247EAAF2D0CE2A0F2EA8C Ref B: SEL221051504047 Ref C: 2024-04-29T12:44:11Z" ], + "Date": [ "Mon, 29 Apr 2024 12:44:11 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "465" ], + "Content-Length": [ "535" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGroupdchk16\",\"name\":\"appGroupdchk16\",\"type\":\"\",\"location\":\"East US\",\"properties\":{\"clientAppGroupIdentifier\":\"NamespaceSASKeyName=RootManageSharedAccessKey\",\"policies\":[{\"type\":\"ThrottlingPolicy\",\"name\":\"t1\",\"metricId\":\"IncomingBytes\",\"rateLimitThreshold\":10234}],\"isEnabled\":true}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/applicationGroups/appGroup3iw8s2\",\"name\":\"appGroup3iw8s2\",\"type\":\"Microsoft.EventHub/Namespaces/ApplicationGroups\",\"location\":\"eastus\",\"properties\":{\"name\":\"appGroup3iw8s2\",\"isEnabled\":true,\"clientAppGroupIdentifier\":\"NamespaceSASKeyName=RootManageSharedAccessKey\",\"policies\":[{\"metricId\":\"IncomingBytes\",\"rateLimitThreshold\":10234,\"type\":\"ThrottlingPolicy\",\"name\":\"t1\"}]}}", "isContentBase64": false } }, - "Get-AzEventHubApplicationGroup+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGroupdchk16?api-version=2023-01-01-preview+2": { + "Get-AzEventHubApplicationGroup+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/applicationGroups/appGroup3iw8s2?api-version=2023-01-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGroupdchk16?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/applicationGroups/appGroup3iw8s2?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "31" ], - "x-ms-client-request-id": [ "8e58e2c4-6c8d-4158-b784-eef76cad7f0c" ], + "x-ms-unique-id": [ "30" ], + "x-ms-client-request-id": [ "0a341922-335f-4f94-9fd9-6921e40b1111" ], "CommandName": [ "Get-AzEventHubApplicationGroup" ], "FullCommandName": [ "Get-AzEventHubApplicationGroup_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -151,39 +160,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "57e6b658-3152-4c4d-833a-dcb8cbf07193_M1SN1_M1SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], - "x-ms-correlation-request-id": [ "ff97bbd6-21b5-471f-9def-cfb13d4815f2" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074511Z:ff97bbd6-21b5-471f-9def-cfb13d4815f2" ], + "x-ms-correlation-request-id": [ "73e891b5-6d20-4815-9ecf-183c75089a3f" ], + "x-ms-client-request-id": [ "0a341922-335f-4f94-9fd9-6921e40b1111_RP" ], + "x-ms-messaging-activity-id": [ "e38bf8c2-89b9-45ad-9c2b-f125df62ccec" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G12|2024-04-29T12:44:13" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "73e891b5-6d20-4815-9ecf-183c75089a3f" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T124413Z:73e891b5-6d20-4815-9ecf-183c75089a3f" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: C9DDC5CD3FB04D0E8A56CEF1168D30EE Ref B: SEL221051504011 Ref C: 2023-09-18T07:45:10Z" ], - "Date": [ "Mon, 18 Sep 2023 07:45:11 GMT" ] + "X-MSEdge-Ref": [ "Ref A: AD5E73DE8B3C4D66A40F6E8D023ACB45 Ref B: SEL221051504047 Ref C: 2024-04-29T12:44:12Z" ], + "Date": [ "Mon, 29 Apr 2024 12:44:12 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "465" ], + "Content-Length": [ "535" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGroupdchk16\",\"name\":\"appGroupdchk16\",\"type\":\"\",\"location\":\"East US\",\"properties\":{\"clientAppGroupIdentifier\":\"NamespaceSASKeyName=RootManageSharedAccessKey\",\"policies\":[{\"type\":\"ThrottlingPolicy\",\"name\":\"t1\",\"metricId\":\"IncomingBytes\",\"rateLimitThreshold\":10234}],\"isEnabled\":true}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/applicationGroups/appGroup3iw8s2\",\"name\":\"appGroup3iw8s2\",\"type\":\"Microsoft.EventHub/Namespaces/ApplicationGroups\",\"location\":\"eastus\",\"properties\":{\"name\":\"appGroup3iw8s2\",\"isEnabled\":true,\"clientAppGroupIdentifier\":\"NamespaceSASKeyName=RootManageSharedAccessKey\",\"policies\":[{\"metricId\":\"IncomingBytes\",\"rateLimitThreshold\":10234,\"type\":\"ThrottlingPolicy\",\"name\":\"t1\"}]}}", "isContentBase64": false } }, - "Get-AzEventHubApplicationGroup+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGroupdchk16?api-version=2023-01-01-preview+3": { + "Get-AzEventHubApplicationGroup+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/applicationGroups/appGroup3iw8s2?api-version=2023-01-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGroupdchk16?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/applicationGroups/appGroup3iw8s2?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "32" ], - "x-ms-client-request-id": [ "c828d14f-d900-44bc-a5e7-95fe7c348a42" ], + "x-ms-unique-id": [ "31" ], + "x-ms-client-request-id": [ "e6432078-6ea8-4070-8055-6ea129008bbe" ], "CommandName": [ "Get-AzEventHubApplicationGroup" ], "FullCommandName": [ "Get-AzEventHubApplicationGroup_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -194,23 +206,26 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "187717d7-244a-4edd-be66-5dd8a67d72f9_M7SN1_M7SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-correlation-request-id": [ "244c4eff-8f6c-4204-8920-bc7534949c0e" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074515Z:244c4eff-8f6c-4204-8920-bc7534949c0e" ], + "x-ms-correlation-request-id": [ "b0609367-629b-4fbc-991f-a25c072f53cf" ], + "x-ms-client-request-id": [ "e6432078-6ea8-4070-8055-6ea129008bbe_RP" ], + "x-ms-messaging-activity-id": [ "2f662677-2977-4a3e-9294-1d0a45cc7665" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G11|2024-04-29T12:44:15" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "b0609367-629b-4fbc-991f-a25c072f53cf" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T124415Z:b0609367-629b-4fbc-991f-a25c072f53cf" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: E95C61F8382746349E448FE6ED3B5239 Ref B: SEL221051504011 Ref C: 2023-09-18T07:45:11Z" ], - "Date": [ "Mon, 18 Sep 2023 07:45:15 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 86F09383757542EC94BB39BB2CF9E0DE Ref B: SEL221051504047 Ref C: 2024-04-29T12:44:13Z" ], + "Date": [ "Mon, 29 Apr 2024 12:44:14 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "465" ], + "Content-Length": [ "535" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGroupdchk16\",\"name\":\"appGroupdchk16\",\"type\":\"\",\"location\":\"East US\",\"properties\":{\"clientAppGroupIdentifier\":\"NamespaceSASKeyName=RootManageSharedAccessKey\",\"policies\":[{\"type\":\"ThrottlingPolicy\",\"name\":\"t1\",\"metricId\":\"IncomingBytes\",\"rateLimitThreshold\":10234}],\"isEnabled\":true}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/applicationGroups/appGroup3iw8s2\",\"name\":\"appGroup3iw8s2\",\"type\":\"Microsoft.EventHub/Namespaces/ApplicationGroups\",\"location\":\"eastus\",\"properties\":{\"name\":\"appGroup3iw8s2\",\"isEnabled\":true,\"clientAppGroupIdentifier\":\"NamespaceSASKeyName=RootManageSharedAccessKey\",\"policies\":[{\"metricId\":\"IncomingBytes\",\"rateLimitThreshold\":10234,\"type\":\"ThrottlingPolicy\",\"name\":\"t1\"}]}}", "isContentBase64": false } } diff --git a/src/EventHub/EventHub.Autorest/test/Get-AzEventHubAuthorizationRule.Recording.json b/src/EventHub/EventHub.Autorest/test/Get-AzEventHubAuthorizationRule.Recording.json index e6d9c29315dd..7b2f9219b22e 100644 --- a/src/EventHub/EventHub.Autorest/test/Get-AzEventHubAuthorizationRule.Recording.json +++ b/src/EventHub/EventHub.Autorest/test/Get-AzEventHubAuthorizationRule.Recording.json @@ -1,17 +1,17 @@ { - "Get-AzEventHubAuthorizationRule+[NoContext]+GetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/auth-ruleju0nd3?api-version=2023-01-01-preview+1": { + "Get-AzEventHubAuthorizationRule+[NoContext]+GetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/auth-ruleudhoej?api-version=2023-01-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/auth-ruleju0nd3?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/auth-ruleudhoej?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "33" ], - "x-ms-client-request-id": [ "2a5281c0-5240-4357-8643-450f1cfb11db" ], + "x-ms-unique-id": [ "32" ], + "x-ms-client-request-id": [ "ead3f423-69ef-47b4-8625-34defff8d774" ], "CommandName": [ "Az.EventHub.private\\Get-AzEventHubNamespaceAuthorizationRule_Get" ], "FullCommandName": [ "Get-AzEventHubNamespaceAuthorizationRule_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,38 +22,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], - "x-ms-request-id": [ "1d430844-a983-43a2-ab5a-a6fab262bbed" ], - "x-ms-correlation-request-id": [ "1d430844-a983-43a2-ab5a-a6fab262bbed" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074526Z:1d430844-a983-43a2-ab5a-a6fab262bbed" ], + "x-ms-correlation-request-id": [ "4198abda-1d43-4fb4-bf37-704d6753cd9c" ], + "x-ms-client-request-id": [ "ead3f423-69ef-47b4-8625-34defff8d774_RP" ], + "x-ms-messaging-activity-id": [ "ad0b54d2-9fc5-4ced-b24c-0bb8c818a7c4" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G10|2024-04-29T12:44:30" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "4198abda-1d43-4fb4-bf37-704d6753cd9c" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240429T124430Z:4198abda-1d43-4fb4-bf37-704d6753cd9c" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 6D601C9AA7804E5CAD9BAE376741EB56 Ref B: SEL221051504011 Ref C: 2023-09-18T07:45:25Z" ], - "Date": [ "Mon, 18 Sep 2023 07:45:26 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 6219D2B62F644C899C3A68E53B08859E Ref B: SEL221051504047 Ref C: 2024-04-29T12:44:29Z" ], + "Date": [ "Mon, 29 Apr 2024 12:44:29 GMT" ] }, "ContentHeaders": { "Content-Length": [ "352" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationrules/auth-ruleju0nd3\",\"name\":\"auth-ruleju0nd3\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationrules/auth-ruleudhoej\",\"name\":\"auth-ruleudhoej\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}", "isContentBase64": false } }, - "Get-AzEventHubAuthorizationRule+[NoContext]+GetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules?api-version=2023-01-01-preview+2": { + "Get-AzEventHubAuthorizationRule+[NoContext]+GetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules?api-version=2023-01-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "34" ], - "x-ms-client-request-id": [ "09408b91-0d22-4df1-94a7-a2f9c90b2674" ], + "x-ms-unique-id": [ "33" ], + "x-ms-client-request-id": [ "10560653-fb21-40a4-a0a5-ba76a7c4403d" ], "CommandName": [ "Az.EventHub.private\\Get-AzEventHubNamespaceAuthorizationRule_List" ], "FullCommandName": [ "Get-AzEventHubNamespaceAuthorizationRule_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -64,38 +68,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-request-id": [ "28288c67-50ee-4673-a103-6c7a80999416" ], - "x-ms-correlation-request-id": [ "28288c67-50ee-4673-a103-6c7a80999416" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074528Z:28288c67-50ee-4673-a103-6c7a80999416" ], + "x-ms-correlation-request-id": [ "f14c82ba-e13f-4364-a347-eef8fe0d05b4" ], + "x-ms-client-request-id": [ "10560653-fb21-40a4-a0a5-ba76a7c4403d_RP" ], + "x-ms-messaging-activity-id": [ "4a507bee-40b7-439b-8ae7-b7ac981a9607" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G2|2024-04-29T12:44:32" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "f14c82ba-e13f-4364-a347-eef8fe0d05b4" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T124432Z:f14c82ba-e13f-4364-a347-eef8fe0d05b4" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: C22DB6A12F98493592A91AD7BA69D236 Ref B: SEL221051504011 Ref C: 2023-09-18T07:45:27Z" ], - "Date": [ "Mon, 18 Sep 2023 07:45:28 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 03A0D1AD32444FECBD892C4FA232D88E Ref B: SEL221051504047 Ref C: 2024-04-29T12:44:30Z" ], + "Date": [ "Mon, 29 Apr 2024 12:44:31 GMT" ] }, "ContentHeaders": { "Content-Length": [ "737" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationrules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationrules/auth-ruleju0nd3\",\"name\":\"auth-ruleju0nd3\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationrules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationrules/auth-ruleudhoej\",\"name\":\"auth-ruleudhoej\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}]}", "isContentBase64": false } }, - "Get-AzEventHubAuthorizationRule+[NoContext]+GetExpandedEntity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules/auth-rulepjiaoe?api-version=2023-01-01-preview+1": { + "Get-AzEventHubAuthorizationRule+[NoContext]+GetExpandedEntity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules/auth-rulevanqub?api-version=2023-01-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules/auth-rulepjiaoe?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules/auth-rulevanqub?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "35" ], - "x-ms-client-request-id": [ "4e871aa6-3ce8-4c25-8436-3c05985a5531" ], + "x-ms-unique-id": [ "34" ], + "x-ms-client-request-id": [ "3016ebef-88ea-4a15-b3a1-a33c43bc6479" ], "CommandName": [ "Az.EventHub.private\\Get-AzEventHubAuthorizationRule_Get" ], "FullCommandName": [ "Get-AzEventHubAuthorizationRule_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -106,38 +114,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-request-id": [ "a960ccf7-df40-4ca5-8f31-01d3e6cac08e" ], - "x-ms-correlation-request-id": [ "a960ccf7-df40-4ca5-8f31-01d3e6cac08e" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074528Z:a960ccf7-df40-4ca5-8f31-01d3e6cac08e" ], + "x-ms-correlation-request-id": [ "396a44e7-fb61-41df-8b1f-be1aea9e1dc8" ], + "x-ms-client-request-id": [ "3016ebef-88ea-4a15-b3a1-a33c43bc6479_RP" ], + "x-ms-messaging-activity-id": [ "9ff886df-63b2-4c0e-be1b-e1858b3e6f5e" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G9|2024-04-29T12:44:33" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "396a44e7-fb61-41df-8b1f-be1aea9e1dc8" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240429T124433Z:396a44e7-fb61-41df-8b1f-be1aea9e1dc8" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: DF0F1FE94EFA45ED80BF04E2FD01D47C Ref B: SEL221051504011 Ref C: 2023-09-18T07:45:28Z" ], - "Date": [ "Mon, 18 Sep 2023 07:45:28 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 6E7AD85150484A19B356D1DBD9E84C45 Ref B: SEL221051504047 Ref C: 2024-04-29T12:44:32Z" ], + "Date": [ "Mon, 29 Apr 2024 12:44:32 GMT" ] }, "ContentHeaders": { "Content-Length": [ "387" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationrules/auth-rulepjiaoe\",\"name\":\"auth-rulepjiaoe\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationrules/auth-rulevanqub\",\"name\":\"auth-rulevanqub\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}", "isContentBase64": false } }, - "Get-AzEventHubAuthorizationRule+[NoContext]+GetExpandedEntity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules?api-version=2023-01-01-preview+2": { + "Get-AzEventHubAuthorizationRule+[NoContext]+GetExpandedEntity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules?api-version=2023-01-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "36" ], - "x-ms-client-request-id": [ "27445918-c25e-4c6a-b1a7-4152ac7eda62" ], + "x-ms-unique-id": [ "35" ], + "x-ms-client-request-id": [ "36bd009a-5464-4b31-994c-290680247dcf" ], "CommandName": [ "Az.EventHub.private\\Get-AzEventHubAuthorizationRule_List" ], "FullCommandName": [ "Get-AzEventHubAuthorizationRule_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -148,38 +160,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-request-id": [ "2655375a-14a5-49d8-9c49-3aab14a589fa" ], - "x-ms-correlation-request-id": [ "2655375a-14a5-49d8-9c49-3aab14a589fa" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074530Z:2655375a-14a5-49d8-9c49-3aab14a589fa" ], + "x-ms-correlation-request-id": [ "408282bd-8714-4b21-b3a1-a576dba93090" ], + "x-ms-client-request-id": [ "36bd009a-5464-4b31-994c-290680247dcf_RP" ], + "x-ms-messaging-activity-id": [ "783971f3-e114-4afb-afd7-9603817a66d8" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G13|2024-04-29T12:44:34" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "408282bd-8714-4b21-b3a1-a576dba93090" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T124434Z:408282bd-8714-4b21-b3a1-a576dba93090" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 457933B432BD484DB26CEFB1082719D9 Ref B: SEL221051504011 Ref C: 2023-09-18T07:45:28Z" ], - "Date": [ "Mon, 18 Sep 2023 07:45:30 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 26C49AF70C194F68AD085445FFD534DB Ref B: SEL221051504047 Ref C: 2024-04-29T12:44:33Z" ], + "Date": [ "Mon, 29 Apr 2024 12:44:33 GMT" ] }, "ContentHeaders": { "Content-Length": [ "399" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationrules/auth-rulepjiaoe\",\"name\":\"auth-rulepjiaoe\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationrules/auth-rulevanqub\",\"name\":\"auth-rulevanqub\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}]}", "isContentBase64": false } }, - "Get-AzEventHubAuthorizationRule+[NoContext]+GetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/auth-ruleju0nd3?api-version=2023-01-01-preview+1": { + "Get-AzEventHubAuthorizationRule+[NoContext]+GetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/auth-ruleudhoej?api-version=2023-01-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/auth-ruleju0nd3?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/auth-ruleudhoej?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "37" ], - "x-ms-client-request-id": [ "6988d3bf-311c-45d2-9a93-abcabced6f7b" ], + "x-ms-unique-id": [ "36" ], + "x-ms-client-request-id": [ "eb6e7271-28d5-4cd7-b5ae-028f02d6c945" ], "CommandName": [ "Az.EventHub.private\\Get-AzEventHubNamespaceAuthorizationRule_Get" ], "FullCommandName": [ "Get-AzEventHubNamespaceAuthorizationRule_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -190,38 +206,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], - "x-ms-request-id": [ "6362c0d2-df27-48c8-a827-8b8e07387a6f" ], - "x-ms-correlation-request-id": [ "6362c0d2-df27-48c8-a827-8b8e07387a6f" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074531Z:6362c0d2-df27-48c8-a827-8b8e07387a6f" ], + "x-ms-correlation-request-id": [ "70248de0-a8e0-4e5f-a1ee-f8968930e81f" ], + "x-ms-client-request-id": [ "eb6e7271-28d5-4cd7-b5ae-028f02d6c945_RP" ], + "x-ms-messaging-activity-id": [ "a9eae589-9779-4ce3-bebe-f9c558e7c869" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G3|2024-04-29T12:44:35" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "70248de0-a8e0-4e5f-a1ee-f8968930e81f" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T124435Z:70248de0-a8e0-4e5f-a1ee-f8968930e81f" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: D183B80211EC4545970F40AB5F9E5359 Ref B: SEL221051504011 Ref C: 2023-09-18T07:45:31Z" ], - "Date": [ "Mon, 18 Sep 2023 07:45:31 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 3AE6C683394A472AB91E6033CEE737AE Ref B: SEL221051504047 Ref C: 2024-04-29T12:44:34Z" ], + "Date": [ "Mon, 29 Apr 2024 12:44:34 GMT" ] }, "ContentHeaders": { "Content-Length": [ "352" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationrules/auth-ruleju0nd3\",\"name\":\"auth-ruleju0nd3\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationrules/auth-ruleudhoej\",\"name\":\"auth-ruleudhoej\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}", "isContentBase64": false } }, - "Get-AzEventHubAuthorizationRule+[NoContext]+GetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/auth-ruleju0nd3?api-version=2023-01-01-preview+2": { + "Get-AzEventHubAuthorizationRule+[NoContext]+GetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/auth-ruleudhoej?api-version=2023-01-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/auth-ruleju0nd3?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/auth-ruleudhoej?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "38" ], - "x-ms-client-request-id": [ "9a418371-33e6-4f2c-91c0-eedea75a8592" ], + "x-ms-unique-id": [ "37" ], + "x-ms-client-request-id": [ "9a2c8155-28a0-4fa5-b3b2-83e3bdd0c050" ], "CommandName": [ "Az.EventHub.private\\Get-AzEventHubNamespaceAuthorizationRule_GetViaIdentity" ], "FullCommandName": [ "Get-AzEventHubNamespaceAuthorizationRule_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -232,38 +252,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], - "x-ms-request-id": [ "272605f0-8405-4f88-9e46-27f97cac7cc3" ], - "x-ms-correlation-request-id": [ "272605f0-8405-4f88-9e46-27f97cac7cc3" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074532Z:272605f0-8405-4f88-9e46-27f97cac7cc3" ], + "x-ms-correlation-request-id": [ "e4cbd092-e9b9-44f3-a1af-b20708fd9f33" ], + "x-ms-client-request-id": [ "9a2c8155-28a0-4fa5-b3b2-83e3bdd0c050_RP" ], + "x-ms-messaging-activity-id": [ "67876499-011b-497f-b776-cbdfb5059bdc" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G12|2024-04-29T12:44:36" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "e4cbd092-e9b9-44f3-a1af-b20708fd9f33" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T124437Z:e4cbd092-e9b9-44f3-a1af-b20708fd9f33" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 5132ADFA8C914C26B0A54C7D3791576B Ref B: SEL221051504011 Ref C: 2023-09-18T07:45:32Z" ], - "Date": [ "Mon, 18 Sep 2023 07:45:32 GMT" ] + "X-MSEdge-Ref": [ "Ref A: D6661DBC51A14937BFD45C1F9524BB40 Ref B: SEL221051504047 Ref C: 2024-04-29T12:44:35Z" ], + "Date": [ "Mon, 29 Apr 2024 12:44:36 GMT" ] }, "ContentHeaders": { "Content-Length": [ "352" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationrules/auth-ruleju0nd3\",\"name\":\"auth-ruleju0nd3\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationrules/auth-ruleudhoej\",\"name\":\"auth-ruleudhoej\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}", "isContentBase64": false } }, - "Get-AzEventHubAuthorizationRule+[NoContext]+GetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules/auth-rulepjiaoe?api-version=2023-01-01-preview+3": { + "Get-AzEventHubAuthorizationRule+[NoContext]+GetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules/auth-rulevanqub?api-version=2023-01-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules/auth-rulepjiaoe?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules/auth-rulevanqub?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "39" ], - "x-ms-client-request-id": [ "d66fdf36-d368-4b2c-aeeb-6b9ae7e8d1a0" ], + "x-ms-unique-id": [ "38" ], + "x-ms-client-request-id": [ "7c9f1477-60b6-4400-829a-1277937f9d18" ], "CommandName": [ "Az.EventHub.private\\Get-AzEventHubAuthorizationRule_Get" ], "FullCommandName": [ "Get-AzEventHubAuthorizationRule_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -274,38 +298,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-request-id": [ "32d57613-f074-47bf-b01b-a3bb8267473a" ], - "x-ms-correlation-request-id": [ "32d57613-f074-47bf-b01b-a3bb8267473a" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074534Z:32d57613-f074-47bf-b01b-a3bb8267473a" ], + "x-ms-correlation-request-id": [ "f08ffc9d-cad4-4d02-a8ee-92dc5c258e71" ], + "x-ms-client-request-id": [ "7c9f1477-60b6-4400-829a-1277937f9d18_RP" ], + "x-ms-messaging-activity-id": [ "30bc9ccb-0d0f-44cf-b091-f376ff8f7ce1" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G12|2024-04-29T12:44:37" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "f08ffc9d-cad4-4d02-a8ee-92dc5c258e71" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T124437Z:f08ffc9d-cad4-4d02-a8ee-92dc5c258e71" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: B5B6D2AC4DFF46B684917D5CB7B427C9 Ref B: SEL221051504011 Ref C: 2023-09-18T07:45:33Z" ], - "Date": [ "Mon, 18 Sep 2023 07:45:34 GMT" ] + "X-MSEdge-Ref": [ "Ref A: F8215702AB0A4B859AA1E29B33878AE0 Ref B: SEL221051504047 Ref C: 2024-04-29T12:44:37Z" ], + "Date": [ "Mon, 29 Apr 2024 12:44:36 GMT" ] }, "ContentHeaders": { "Content-Length": [ "387" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationrules/auth-rulepjiaoe\",\"name\":\"auth-rulepjiaoe\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationrules/auth-rulevanqub\",\"name\":\"auth-rulevanqub\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}", "isContentBase64": false } }, - "Get-AzEventHubAuthorizationRule+[NoContext]+GetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules/auth-rulepjiaoe?api-version=2023-01-01-preview+4": { + "Get-AzEventHubAuthorizationRule+[NoContext]+GetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules/auth-rulevanqub?api-version=2023-01-01-preview+4": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules/auth-rulepjiaoe?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules/auth-rulevanqub?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "40" ], - "x-ms-client-request-id": [ "4a87b1cf-345a-4fbf-a290-101a76de301c" ], + "x-ms-unique-id": [ "39" ], + "x-ms-client-request-id": [ "d12cbae5-cc8c-4f61-af31-f8340fc75551" ], "CommandName": [ "Az.EventHub.private\\Get-AzEventHubAuthorizationRule_GetViaIdentity" ], "FullCommandName": [ "Get-AzEventHubAuthorizationRule_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -316,22 +344,26 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], - "x-ms-request-id": [ "171ed4b3-edbe-4013-b163-bae729b8ba4f" ], - "x-ms-correlation-request-id": [ "171ed4b3-edbe-4013-b163-bae729b8ba4f" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074535Z:171ed4b3-edbe-4013-b163-bae729b8ba4f" ], + "x-ms-correlation-request-id": [ "ce059719-b40a-41ba-8bd4-7fc8a8f71de1" ], + "x-ms-client-request-id": [ "d12cbae5-cc8c-4f61-af31-f8340fc75551_RP" ], + "x-ms-messaging-activity-id": [ "62655123-8a90-4f4b-a29f-b1f4fc79d9ba" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G1|2024-04-29T12:44:38" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "ce059719-b40a-41ba-8bd4-7fc8a8f71de1" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T124438Z:ce059719-b40a-41ba-8bd4-7fc8a8f71de1" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: F13E6ACA12BD488F8E90C74576676394 Ref B: SEL221051504011 Ref C: 2023-09-18T07:45:34Z" ], - "Date": [ "Mon, 18 Sep 2023 07:45:34 GMT" ] + "X-MSEdge-Ref": [ "Ref A: CFB83D49302249F6AD5BA29043F6252D Ref B: SEL221051504047 Ref C: 2024-04-29T12:44:37Z" ], + "Date": [ "Mon, 29 Apr 2024 12:44:37 GMT" ] }, "ContentHeaders": { "Content-Length": [ "387" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationrules/auth-rulepjiaoe\",\"name\":\"auth-rulepjiaoe\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationrules/auth-rulevanqub\",\"name\":\"auth-rulevanqub\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}", "isContentBase64": false } } diff --git a/src/EventHub/EventHub.Autorest/test/Get-AzEventHubCluster.Recording.json b/src/EventHub/EventHub.Autorest/test/Get-AzEventHubCluster.Recording.json new file mode 100644 index 000000000000..d7bfd28629d5 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/test/Get-AzEventHubCluster.Recording.json @@ -0,0 +1,276 @@ +{ + "Get-AzEventHubCluster+[NoContext]+List+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/providers/Microsoft.EventHub/clusters?api-version=2023-01-01-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/providers/Microsoft.EventHub/clusters?api-version=2023-01-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "40" ], + "x-ms-client-request-id": [ "fca21e9d-5583-4696-b2ec-c5b34957b08a" ], + "CommandName": [ "Get-AzEventHubCluster" ], + "FullCommandName": [ "Get-AzEventHubCluster_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-original-request-ids": [ "", "", "", "", "", "", "", "", "", "", "", "", "" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], + "x-ms-request-id": [ "df933030-6446-4e8d-be35-025fcba80109" ], + "x-ms-correlation-request-id": [ "df933030-6446-4e8d-be35-025fcba80109" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T124456Z:df933030-6446-4e8d-be35-025fcba80109" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: F5B1203506E84E7F969DF5BEE3DA65DE Ref B: SEL221051504047 Ref C: 2024-04-29T12:44:53Z" ], + "Date": [ "Mon, 29 Apr 2024 12:44:56 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "15561" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.EventHub/clusters/TestClusterAutomatic\",\"name\":\"TestClusterAutomatic\",\"type\":\"microsoft.eventhub/clusters\",\"location\":\"australiaeast\",\"tags\":{\"a\":\"b\"},\"properties\":{\"supportsScaling\":true,\"zoneRedundant\":false,\"createdAt\":\"2022-08-29T09:38:30.453Z\",\"updatedAt\":\"2022-09-13T08:27:24.93Z\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"metricId\":\"PROD-SY3-538\"},\"sku\":{\"name\":\"Dedicated\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/samurp/providers/Microsoft.EventHub/clusters/test-us-central-01\",\"name\":\"test-us-central-01\",\"type\":\"microsoft.eventhub/clusters\",\"location\":\"centralus\",\"tags\":{},\"properties\":{\"supportsScaling\":true,\"zoneRedundant\":false,\"createdAt\":\"2023-05-05T14:55:49.6890113Z\",\"updatedAt\":\"2023-05-05T14:55:51.0333133Z\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"metricId\":\"PROD-DM-V51009\"},\"sku\":{\"name\":\"Dedicated\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ardsouza-test/providers/Microsoft.EventHub/clusters/AzureMessagingGenevaCluster\",\"name\":\"AzureMessagingGenevaCluster\",\"type\":\"microsoft.eventhub/clusters\",\"location\":\"eastasia\",\"properties\":{\"supportsScaling\":true,\"zoneRedundant\":false,\"createdAt\":\"2018-11-20T20:30:55.987Z\",\"updatedAt\":\"2021-10-27T22:51:24.287Z\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"metricId\":\"PROD-HK2-501\"},\"sku\":{\"name\":\"Dedicated\",\"capacity\":8}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.EventHub/clusters/davadhani-cluster54\",\"name\":\"davadhani-cluster54\",\"type\":\"microsoft.eventhub/clusters\",\"location\":\"eastasia\",\"tags\":{},\"properties\":{\"supportsScaling\":true,\"zoneRedundant\":false,\"createdAt\":\"2023-12-06T10:44:52.5050376Z\",\"updatedAt\":\"2023-12-06T10:44:53.5866005Z\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"metricId\":\"PROD-HK-V51016\"},\"sku\":{\"name\":\"Dedicated\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/framborg/providers/Microsoft.EventHub/clusters/test-disk-scaleup-2\",\"name\":\"test-disk-scaleup-2\",\"type\":\"microsoft.eventhub/clusters\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"supportsScaling\":true,\"zoneRedundant\":false,\"createdAt\":\"2023-10-26T01:40:44.1778655Z\",\"updatedAt\":\"2023-10-26T02:30:01.2515025Z\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"metricId\":\"PROD-BL-V51041\"},\"sku\":{\"name\":\"Dedicated\",\"capacity\":8}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/framborg/providers/Microsoft.EventHub/clusters/test-disk-scaleup\",\"name\":\"test-disk-scaleup\",\"type\":\"microsoft.eventhub/clusters\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"supportsScaling\":true,\"zoneRedundant\":false,\"createdAt\":\"2023-10-24T16:14:09.9852457Z\",\"updatedAt\":\"2023-10-24T16:14:34.7232627Z\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"metricId\":\"PROD-BL-V51050\"},\"sku\":{\"name\":\"Dedicated\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/eh-scenarios/providers/Microsoft.EventHub/clusters/mini-kingkong\",\"name\":\"mini-kingkong\",\"type\":\"microsoft.eventhub/clusters\",\"location\":\"eastus\",\"properties\":{\"supportsScaling\":true,\"zoneRedundant\":false,\"createdAt\":\"2023-10-24T23:33:43.4119709Z\",\"updatedAt\":\"2023-10-24T23:33:43.4119709Z\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"metricId\":\"PROD-BL-V51111\"},\"sku\":{\"name\":\"Dedicated\",\"capacity\":14}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EH-LargeMessagePrivatePreview/providers/Microsoft.EventHub/clusters/InternalLMSCluster-PriPreview\",\"name\":\"InternalLMSCluster-PriPreview\",\"type\":\"microsoft.eventhub/clusters\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"supportsScaling\":true,\"zoneRedundant\":false,\"createdAt\":\"2023-07-24T07:18:55.6438536Z\",\"updatedAt\":\"2023-07-24T07:18:56.3480545Z\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"metricId\":\"PROD-BL-V51099\"},\"sku\":{\"name\":\"Dedicated\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/v-ajnavtest/providers/Microsoft.EventHub/clusters/testingSupportscaling\",\"name\":\"testingSupportscaling\",\"type\":\"microsoft.eventhub/clusters\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"supportsScaling\":true,\"zoneRedundant\":false,\"createdAt\":\"2024-04-25T23:53:49.7701174Z\",\"updatedAt\":\"2024-04-26T00:41:10.1203079Z\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"metricId\":\"PROD-BL-V51101\"},\"sku\":{\"name\":\"Dedicated\",\"capacity\":2}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EastUS/providers/Microsoft.EventHub/clusters/BL3-533\",\"name\":\"BL3-533\",\"type\":\"microsoft.eventhub/clusters\",\"location\":\"eastus\",\"properties\":{\"supportsScaling\":true,\"zoneRedundant\":false,\"createdAt\":\"2021-09-13T18:46:33.75Z\",\"updatedAt\":\"2021-09-13T19:12:43.57Z\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"metricId\":\"PROD-BL3-533\"},\"sku\":{\"name\":\"Dedicated\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.EventHub/clusters/davadhani-7068\",\"name\":\"davadhani-7068\",\"type\":\"microsoft.eventhub/clusters\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"supportsScaling\":true,\"zoneRedundant\":false,\"createdAt\":\"2023-12-06T12:02:58.4517107Z\",\"updatedAt\":\"2023-12-06T12:02:59.6240494Z\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"metricId\":\"PROD-BL-V51094\"},\"sku\":{\"name\":\"Dedicated\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EastUS2/providers/Microsoft.EventHub/clusters/BN3-565\",\"name\":\"BN3-565\",\"type\":\"microsoft.eventhub/clusters\",\"location\":\"eastus2\",\"properties\":{\"supportsScaling\":true,\"zoneRedundant\":false,\"createdAt\":\"2020-10-19T17:53:06.153Z\",\"updatedAt\":\"2021-04-27T17:23:45.87Z\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"metricId\":\"PROD-BN3-565\"},\"sku\":{\"name\":\"Dedicated\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/sjrg/providers/Microsoft.EventHub/clusters/sjdedicatedv2eastus2\",\"name\":\"sjdedicatedv2eastus2\",\"type\":\"microsoft.eventhub/clusters\",\"location\":\"eastus2\",\"properties\":{\"supportsScaling\":true,\"zoneRedundant\":false,\"createdAt\":\"2023-07-27T00:25:52.080903Z\",\"updatedAt\":\"2023-07-27T00:25:52.8934682Z\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"metricId\":\"PROD-BN-V51072\"},\"sku\":{\"name\":\"Dedicated\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/sjrg/providers/Microsoft.EventHub/clusters/SchemaRegistryPreviewCluster\",\"name\":\"SchemaRegistryPreviewCluster\",\"type\":\"microsoft.eventhub/clusters\",\"location\":\"eastus2\",\"properties\":{\"supportsScaling\":false,\"zoneRedundant\":false,\"createdAt\":\"2020-05-17T07:24:17.373Z\",\"updatedAt\":\"2020-05-19T05:55:13.237Z\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"metricId\":\"PROD-BN3-556\"},\"sku\":{\"name\":\"Dedicated\",\"capacity\":4}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.EventHub/clusters/testcluster6541\",\"name\":\"testcluster6541\",\"type\":\"microsoft.eventhub/clusters\",\"location\":\"italynorth\",\"tags\":{},\"properties\":{\"supportsScaling\":true,\"zoneRedundant\":false,\"createdAt\":\"2023-12-01T10:43:55.709413Z\",\"updatedAt\":\"2023-12-01T10:43:56.7562858Z\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"metricId\":\"PROD-ITN-V51010\"},\"sku\":{\"name\":\"Dedicated\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/eventhubs-customer-perf-test/providers/Microsoft.EventHub/clusters/kindrasiriCustomerPerf\",\"name\":\"kindrasiriCustomerPerf\",\"type\":\"microsoft.eventhub/clusters\",\"location\":\"southcentralus\",\"tags\":{},\"properties\":{\"supportsScaling\":true,\"zoneRedundant\":false,\"createdAt\":\"2022-12-16T01:36:43.8759944Z\",\"updatedAt\":\"2022-12-16T01:36:43.8759944Z\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"metricId\":\"PROD-SN-V51011\"},\"sku\":{\"name\":\"Dedicated\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/taabtest/providers/Microsoft.EventHub/clusters/taabsncluster\",\"name\":\"taabsncluster\",\"type\":\"microsoft.eventhub/clusters\",\"location\":\"southcentralus\",\"properties\":{\"supportsScaling\":true,\"zoneRedundant\":false,\"createdAt\":\"2023-05-09T23:40:40.9866623Z\",\"updatedAt\":\"2023-05-09T23:40:42.0647983Z\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"metricId\":\"PROD-SN-V51005\"},\"sku\":{\"name\":\"Dedicated\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/rg-cluster-vdll2f42t/providers/Microsoft.EventHub/clusters/eventhubs-clus1-2ell\",\"name\":\"eventhubs-clus1-2ell\",\"type\":\"microsoft.eventhub/clusters\",\"location\":\"southcentralus\",\"tags\":{\"tag2\":\"value2\"},\"properties\":{\"supportsScaling\":true,\"zoneRedundant\":false,\"createdAt\":\"2023-03-13T09:06:39.1253572Z\",\"updatedAt\":\"2023-03-13T09:08:16.291423Z\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"metricId\":\"PROD-SN-V51033\"},\"sku\":{\"name\":\"Dedicated\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EventHubsVNETTestingRG/providers/Microsoft.EventHub/clusters/EventHubsVNetTesting\",\"name\":\"EventHubsVNetTesting\",\"type\":\"microsoft.eventhub/clusters\",\"location\":\"westcentralus\",\"properties\":{\"supportsScaling\":true,\"zoneRedundant\":false,\"createdAt\":\"2020-06-09T16:31:40.27Z\",\"updatedAt\":\"2020-08-18T20:45:24.297Z\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"metricId\":\"PROD-CY4-510\"},\"sku\":{\"name\":\"Dedicated\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/test-migration/providers/Microsoft.EventHub/clusters/cluster1\",\"name\":\"cluster1\",\"type\":\"microsoft.eventhub/clusters\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"supportsScaling\":true,\"zoneRedundant\":false,\"createdAt\":\"2024-03-27T14:16:12.3291446Z\",\"updatedAt\":\"2024-03-27T14:16:13.2354174Z\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"metricId\":\"PROD-BY-V51116\"},\"sku\":{\"name\":\"Dedicated\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/jakeschiller-mhsm/providers/Microsoft.EventHub/clusters/mhsm-dedicated-cluster\",\"name\":\"mhsm-dedicated-cluster\",\"type\":\"microsoft.eventhub/clusters\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"supportsScaling\":true,\"zoneRedundant\":false,\"createdAt\":\"2023-03-20T13:13:37.304229Z\",\"updatedAt\":\"2023-03-20T13:13:38.0073225Z\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"metricId\":\"PROD-BY-V51065\"},\"sku\":{\"name\":\"Dedicated\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ebs-eh-dedicated/providers/Microsoft.EventHub/clusters/ebsehdedicated\",\"name\":\"ebsehdedicated\",\"type\":\"microsoft.eventhub/clusters\",\"location\":\"westus3\",\"tags\":{},\"properties\":{\"supportsScaling\":true,\"zoneRedundant\":false,\"createdAt\":\"2023-07-10T13:41:59.5803173Z\",\"updatedAt\":\"2023-07-24T12:58:25.2152917Z\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"metricId\":\"PROD-USW3-V51019\"},\"sku\":{\"name\":\"Dedicated\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/framborg/providers/Microsoft.EventHub/clusters/sqlumivictim\",\"name\":\"sqlumivictim\",\"type\":\"microsoft.eventhub/clusters\",\"location\":\"centraluseuap\",\"tags\":{},\"properties\":{\"supportsScaling\":true,\"zoneRedundant\":false,\"createdAt\":\"2024-03-21T23:20:44.896755Z\",\"updatedAt\":\"2024-03-21T23:20:46.0686422Z\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"metricId\":\"PROD-CDM-V51001\"},\"sku\":{\"name\":\"Dedicated\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/TestLMS-Saglodha/providers/Microsoft.EventHub/clusters/TestLMS\",\"name\":\"TestLMS\",\"type\":\"microsoft.eventhub/clusters\",\"location\":\"centraluseuap\",\"tags\":{},\"properties\":{\"supportsScaling\":true,\"zoneRedundant\":false,\"createdAt\":\"2024-04-18T16:41:18.7975012Z\",\"updatedAt\":\"2024-04-18T16:41:20.2037713Z\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"metricId\":\"PROD-CDM-V51007\"},\"sku\":{\"name\":\"Dedicated\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/PPGTest/providers/Microsoft.EventHub/clusters/TestLMSCluster0417\",\"name\":\"TestLMSCluster0417\",\"type\":\"microsoft.eventhub/clusters\",\"location\":\"centraluseuap\",\"tags\":{},\"properties\":{\"supportsScaling\":true,\"zoneRedundant\":false,\"createdAt\":\"2024-04-18T23:28:10.9507745Z\",\"updatedAt\":\"2024-04-18T23:28:12.4039204Z\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"metricId\":\"PROD-CDM03-508\"},\"sku\":{\"name\":\"Dedicated\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/PPGTest/providers/Microsoft.EventHub/clusters/TestLMSClusterNew0419\",\"name\":\"TestLMSClusterNew0419\",\"type\":\"microsoft.eventhub/clusters\",\"location\":\"centraluseuap\",\"tags\":{},\"properties\":{\"supportsScaling\":true,\"zoneRedundant\":false,\"createdAt\":\"2024-04-19T16:59:39.6569931Z\",\"updatedAt\":\"2024-04-19T16:59:41.0007613Z\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"metricId\":\"PROD-CDM-V51006\"},\"sku\":{\"name\":\"Dedicated\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups//providers/Microsoft.EventHub/clusters/PROD-CDM03-502\",\"name\":\"PROD-CDM03-502\",\"type\":\"microsoft.eventhub/clusters\",\"location\":\"centraluseuap\",\"properties\":{\"supportsScaling\":true,\"zoneRedundant\":false,\"createdAt\":\"2022-12-02T21:27:38.6457592Z\",\"updatedAt\":\"2022-12-02T21:27:38.6457592Z\",\"provisioningState\":\"Scaling\",\"status\":\"Scaling\",\"metricId\":\"PROD-CDM03-502\"},\"sku\":{\"name\":\"Dedicated\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/clusters/CBN04-503\",\"name\":\"CBN04-503\",\"type\":\"microsoft.eventhub/clusters\",\"location\":\"eastus2euap\",\"properties\":{\"supportsScaling\":true,\"zoneRedundant\":false,\"createdAt\":\"2021-02-09T20:32:22.417Z\",\"updatedAt\":\"2021-02-09T20:32:22.417Z\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"metricId\":\"PROD-CBN04-503\"},\"sku\":{\"name\":\"Dedicated\",\"capacity\":4}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cleanupservice/providers/Microsoft.EventHub/clusters/TestLMSEHCluster0122\",\"name\":\"TestLMSEHCluster0122\",\"type\":\"microsoft.eventhub/clusters\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"supportsScaling\":true,\"zoneRedundant\":false,\"createdAt\":\"2024-01-22T19:22:04.9905968Z\",\"updatedAt\":\"2024-01-22T19:22:06.1223272Z\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"metricId\":\"PROD-CBN-V51010\"},\"sku\":{\"name\":\"Dedicated\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/taabtest/providers/Microsoft.EventHub/clusters/taabcbncluster\",\"name\":\"taabcbncluster\",\"type\":\"microsoft.eventhub/clusters\",\"location\":\"eastus2euap\",\"properties\":{\"supportsScaling\":true,\"zoneRedundant\":false,\"createdAt\":\"2023-04-07T22:51:09.0132382Z\",\"updatedAt\":\"2023-04-07T22:51:10.2163765Z\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"metricId\":\"PROD-CBN-V51000\"},\"sku\":{\"name\":\"Dedicated\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/framborg/providers/Microsoft.EventHub/clusters/framborg-ehc\",\"name\":\"framborg-ehc\",\"type\":\"microsoft.eventhub/clusters\",\"location\":\"spaincentral\",\"properties\":{\"supportsScaling\":true,\"zoneRedundant\":false,\"createdAt\":\"2023-11-06T22:33:25.7747321Z\",\"updatedAt\":\"2023-11-06T22:33:26.3997429Z\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"metricId\":\"PROD-ESC-V51005\"},\"sku\":{\"name\":\"Dedicated\",\"capacity\":1}}]}", + "isContentBase64": false + } + }, + "Get-AzEventHubCluster+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.EventHub/clusters/TestClusterAutomatic?api-version=2023-01-01-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.EventHub/clusters/TestClusterAutomatic?api-version=2023-01-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "41" ], + "x-ms-client-request-id": [ "6e8843c5-1cf5-4e9f-b96e-9291a0191232" ], + "CommandName": [ "Get-AzEventHubCluster" ], + "FullCommandName": [ "Get-AzEventHubCluster_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-correlation-request-id": [ "3a420893-096d-4f0b-8cc6-060903bacfed" ], + "x-ms-client-request-id": [ "6e8843c5-1cf5-4e9f-b96e-9291a0191232_RP" ], + "x-ms-messaging-activity-id": [ "4d161b22-a713-46cf-afbe-0e4e1b475b93" ], + "x-ms-messaging-routing-id": [ "AUSTRALIAEAST|AUSTRALIAEAST|G8|2024-04-29T12:44:56" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], + "x-ms-request-id": [ "3a420893-096d-4f0b-8cc6-060903bacfed" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T124456Z:3a420893-096d-4f0b-8cc6-060903bacfed" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 7882D4287B8F40F69C8390140A77B02C Ref B: SEL221051504047 Ref C: 2024-04-29T12:44:56Z" ], + "Date": [ "Mon, 29 Apr 2024 12:44:56 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "525" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.EventHub/clusters/TestClusterAutomatic\",\"name\":\"TestClusterAutomatic\",\"type\":\"microsoft.eventhub/clusters\",\"location\":\"australiaeast\",\"tags\":{\"a\":\"b\"},\"properties\":{\"supportsScaling\":true,\"zoneRedundant\":false,\"createdAt\":\"2022-08-29T09:38:30.453Z\",\"updatedAt\":\"2022-09-13T08:27:24.93Z\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"metricId\":\"PROD-SY3-538\"},\"sku\":{\"name\":\"Dedicated\",\"capacity\":1}}", + "isContentBase64": false + } + }, + "Get-AzEventHubCluster+[NoContext]+List1+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.EventHub/clusters?api-version=2023-01-01-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.EventHub/clusters?api-version=2023-01-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "42" ], + "x-ms-client-request-id": [ "ec5eb638-b161-4726-8eac-8049582c44af" ], + "CommandName": [ "Get-AzEventHubCluster" ], + "FullCommandName": [ "Get-AzEventHubCluster_List1" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-correlation-request-id": [ "1fb88e36-1c57-4ac3-b706-64e72a915e85" ], + "x-ms-client-request-id": [ "ec5eb638-b161-4726-8eac-8049582c44af_RP" ], + "x-ms-messaging-activity-id": [ "2bb41b81-b005-43c4-8535-2256643f54b5" ], + "x-ms-messaging-routing-id": [ "AUSTRALIAEAST|AUSTRALIAEAST|G13|2024-04-29T12:44:58" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "1fb88e36-1c57-4ac3-b706-64e72a915e85" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T124458Z:1fb88e36-1c57-4ac3-b706-64e72a915e85" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: B50D29AB866C41CF8743192B7841DB02 Ref B: SEL221051504047 Ref C: 2024-04-29T12:44:56Z" ], + "Date": [ "Mon, 29 Apr 2024 12:44:58 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "537" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.EventHub/clusters/TestClusterAutomatic\",\"name\":\"TestClusterAutomatic\",\"type\":\"microsoft.eventhub/clusters\",\"location\":\"australiaeast\",\"tags\":{\"a\":\"b\"},\"properties\":{\"supportsScaling\":true,\"zoneRedundant\":false,\"createdAt\":\"2022-08-29T09:38:30.453Z\",\"updatedAt\":\"2022-09-13T08:27:24.93Z\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"metricId\":\"PROD-SY3-538\"},\"sku\":{\"name\":\"Dedicated\",\"capacity\":1}}]}", + "isContentBase64": false + } + }, + "Get-AzEventHubCluster+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.EventHub/clusters/TestClusterAutomatic?api-version=2023-01-01-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.EventHub/clusters/TestClusterAutomatic?api-version=2023-01-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "43" ], + "x-ms-client-request-id": [ "9bac5c8f-e8cf-4184-9e19-0109a3788445" ], + "CommandName": [ "Get-AzEventHubCluster" ], + "FullCommandName": [ "Get-AzEventHubCluster_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-correlation-request-id": [ "f6709af1-b62c-4b99-973e-ad44b9afa31a" ], + "x-ms-client-request-id": [ "9bac5c8f-e8cf-4184-9e19-0109a3788445_RP" ], + "x-ms-messaging-activity-id": [ "f31adbd2-15a5-49dd-a646-5da6f5d46e59" ], + "x-ms-messaging-routing-id": [ "AUSTRALIAEAST|AUSTRALIAEAST|G1|2024-04-29T12:44:59" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "f6709af1-b62c-4b99-973e-ad44b9afa31a" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T124459Z:f6709af1-b62c-4b99-973e-ad44b9afa31a" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 0AB06C77349D4018ADE0F45CF2B88C94 Ref B: SEL221051504047 Ref C: 2024-04-29T12:44:58Z" ], + "Date": [ "Mon, 29 Apr 2024 12:44:59 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "525" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.EventHub/clusters/TestClusterAutomatic\",\"name\":\"TestClusterAutomatic\",\"type\":\"microsoft.eventhub/clusters\",\"location\":\"australiaeast\",\"tags\":{\"a\":\"b\"},\"properties\":{\"supportsScaling\":true,\"zoneRedundant\":false,\"createdAt\":\"2022-08-29T09:38:30.453Z\",\"updatedAt\":\"2022-09-13T08:27:24.93Z\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"metricId\":\"PROD-SY3-538\"},\"sku\":{\"name\":\"Dedicated\",\"capacity\":1}}", + "isContentBase64": false + } + }, + "Get-AzEventHubCluster+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.EventHub/clusters/TestClusterAutomatic?api-version=2023-01-01-preview+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.EventHub/clusters/TestClusterAutomatic?api-version=2023-01-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "44" ], + "x-ms-client-request-id": [ "6333ba68-85a9-4b20-83f3-9759b79757fb" ], + "CommandName": [ "Get-AzEventHubCluster" ], + "FullCommandName": [ "Get-AzEventHubCluster_GetViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-correlation-request-id": [ "8c95b759-b14e-4825-b628-cb9223fba545" ], + "x-ms-client-request-id": [ "6333ba68-85a9-4b20-83f3-9759b79757fb_RP" ], + "x-ms-messaging-activity-id": [ "85e4cbea-8d00-4195-b4d3-6926ce8a3aba" ], + "x-ms-messaging-routing-id": [ "AUSTRALIAEAST|AUSTRALIAEAST|G8|2024-04-29T12:45:00" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], + "x-ms-request-id": [ "8c95b759-b14e-4825-b628-cb9223fba545" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T124500Z:8c95b759-b14e-4825-b628-cb9223fba545" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 9C741CC60C984B5EA989DCCE0BD88E43 Ref B: SEL221051504047 Ref C: 2024-04-29T12:44:59Z" ], + "Date": [ "Mon, 29 Apr 2024 12:45:00 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "525" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.EventHub/clusters/TestClusterAutomatic\",\"name\":\"TestClusterAutomatic\",\"type\":\"microsoft.eventhub/clusters\",\"location\":\"australiaeast\",\"tags\":{\"a\":\"b\"},\"properties\":{\"supportsScaling\":true,\"zoneRedundant\":false,\"createdAt\":\"2022-08-29T09:38:30.453Z\",\"updatedAt\":\"2022-09-13T08:27:24.93Z\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"metricId\":\"PROD-SY3-538\"},\"sku\":{\"name\":\"Dedicated\",\"capacity\":1}}", + "isContentBase64": false + } + }, + "Get-AzEventHubCluster+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.EventHub/clusters/TestClusterAutomatic?api-version=2023-01-01-preview+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.EventHub/clusters/TestClusterAutomatic?api-version=2023-01-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "45" ], + "x-ms-client-request-id": [ "d6b2a7fc-363f-4e14-95b4-cfecec7a3fbe" ], + "CommandName": [ "Get-AzEventHubCluster" ], + "FullCommandName": [ "Get-AzEventHubCluster_GetViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-correlation-request-id": [ "998f16e4-9267-40e3-9daa-b54e37107e93" ], + "x-ms-client-request-id": [ "d6b2a7fc-363f-4e14-95b4-cfecec7a3fbe_RP" ], + "x-ms-messaging-activity-id": [ "8fc1f1ae-7551-4d30-89d2-103698ee1fdd" ], + "x-ms-messaging-routing-id": [ "AUSTRALIAEAST|AUSTRALIAEAST|G14|2024-04-29T12:45:01" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "998f16e4-9267-40e3-9daa-b54e37107e93" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T124501Z:998f16e4-9267-40e3-9daa-b54e37107e93" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 033C748087834E7ABA3B36AC0DD9FBDB Ref B: SEL221051504047 Ref C: 2024-04-29T12:45:00Z" ], + "Date": [ "Mon, 29 Apr 2024 12:45:01 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "525" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.EventHub/clusters/TestClusterAutomatic\",\"name\":\"TestClusterAutomatic\",\"type\":\"microsoft.eventhub/clusters\",\"location\":\"australiaeast\",\"tags\":{\"a\":\"b\"},\"properties\":{\"supportsScaling\":true,\"zoneRedundant\":false,\"createdAt\":\"2022-08-29T09:38:30.453Z\",\"updatedAt\":\"2022-09-13T08:27:24.93Z\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"metricId\":\"PROD-SY3-538\"},\"sku\":{\"name\":\"Dedicated\",\"capacity\":1}}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/test/Get-AzEventHubCluster.Tests.ps1 b/src/EventHub/EventHub.Autorest/test/Get-AzEventHubCluster.Tests.ps1 index 932a045024ea..0087df5f1684 100644 --- a/src/EventHub/EventHub.Autorest/test/Get-AzEventHubCluster.Tests.ps1 +++ b/src/EventHub/EventHub.Autorest/test/Get-AzEventHubCluster.Tests.ps1 @@ -15,25 +15,25 @@ if(($null -eq $TestName) -or ($TestName -contains 'Get-AzEventHubCluster')) } Describe 'Get-AzEventHubCluster' { - It 'List' -skip { - $listOfCluster = Get-AzEventHubCluster - $listOfCluster.Count | Should -BeGreaterThan 10 + It 'List' { + $listOfCluster = Get-AzEventHubCluster -SubscriptionId $env.clusterSubscriptionId + $listOfCluster.Count | Should -BeGreaterOrEqual 1 } - It 'Get' -skip { - $cluster = Get-AzEventHubCluster -ResourceGroupName $env.clusterResourceGroup -Name $env.createdCluster + It 'Get' { + $cluster = Get-AzEventHubCluster -SubscriptionId $env.clusterSubscriptionId -ResourceGroupName $env.clusterResourceGroup -Name $env.createdCluster $cluster.Name | Should -Be $env.createdCluster $cluster.Capacity | Should -Be 1 $cluster.SkuName | Should -Be "Dedicated" } - It 'List1' -skip { - $listOfCluster = Get-AzEventHubCluster -ResourceGroupName $env.clusterResourceGroup + It 'List1' { + $listOfCluster = Get-AzEventHubCluster -SubscriptionId $env.clusterSubscriptionId -ResourceGroupName $env.clusterResourceGroup $listOfCluster.Count | Should -BeGreaterOrEqual 1 } - It 'GetViaIdentity' -skip { - $cluster = Get-AzEventHubCluster -ResourceGroupName $env.clusterResourceGroup -Name $env.createdCluster + It 'GetViaIdentity' { + $cluster = Get-AzEventHubCluster -SubscriptionId $env.clusterSubscriptionId -ResourceGroupName $env.clusterResourceGroup -Name $env.createdCluster $cluster = Get-AzEventHubCluster -InputObject $cluster $cluster.Name | Should -Be $env.createdCluster diff --git a/src/EventHub/EventHub.Autorest/test/Get-AzEventHubClusterNamespace.Recording.json b/src/EventHub/EventHub.Autorest/test/Get-AzEventHubClusterNamespace.Recording.json index 971e5a3b0f83..d3838654bb5f 100644 --- a/src/EventHub/EventHub.Autorest/test/Get-AzEventHubClusterNamespace.Recording.json +++ b/src/EventHub/EventHub.Autorest/test/Get-AzEventHubClusterNamespace.Recording.json @@ -6,12 +6,12 @@ "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "41" ], - "x-ms-client-request-id": [ "a5b2cc89-0423-45d4-a469-d2f1e3f15070" ], + "x-ms-unique-id": [ "46" ], + "x-ms-client-request-id": [ "9874a02b-aee1-400c-bd70-bdb92e6c61f5" ], "CommandName": [ "Get-AzEventHubClusterNamespace" ], "FullCommandName": [ "Get-AzEventHubClusterNamespace_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,22 +22,26 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-request-id": [ "02045139-909d-4971-b663-46b4eda44b74" ], - "x-ms-correlation-request-id": [ "02045139-909d-4971-b663-46b4eda44b74" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074605Z:02045139-909d-4971-b663-46b4eda44b74" ], + "x-ms-correlation-request-id": [ "432cf1ce-6c89-432f-b7b1-a0f6cd786199" ], + "x-ms-client-request-id": [ "9874a02b-aee1-400c-bd70-bdb92e6c61f5_RP" ], + "x-ms-messaging-activity-id": [ "bd75c819-f751-4030-8e82-9152b32211bf" ], + "x-ms-messaging-routing-id": [ "AUSTRALIAEAST|AUSTRALIAEAST|G9|2024-04-29T12:45:32" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "432cf1ce-6c89-432f-b7b1-a0f6cd786199" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T124532Z:432cf1ce-6c89-432f-b7b1-a0f6cd786199" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 3EC6A748382F42B181B0374AFB47BE0E Ref B: SEL221051504011 Ref C: 2023-09-18T07:46:03Z" ], - "Date": [ "Mon, 18 Sep 2023 07:46:05 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 6D9B1B396B874C039E494B6527CBE341 Ref B: SEL221051504047 Ref C: 2024-04-29T12:45:29Z" ], + "Date": [ "Mon, 29 Apr 2024 12:45:32 GMT" ] }, "ContentHeaders": { "Content-Length": [ "332" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/AutomatedPowershellTesting/providers/Microsoft.Eventhub/namespaces/clusterNamespace2\"},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/AutomatedPowershellTesting/providers/Microsoft.Eventhub/namespaces/clusterNamespace\"}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.EventHub/namespaces/clusterNamespace\"},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.EventHub/namespaces/clusterNamespace2\"}]}", "isContentBase64": false } } diff --git a/src/EventHub/EventHub.Autorest/test/Get-AzEventHubClusterNamespace.Tests.ps1 b/src/EventHub/EventHub.Autorest/test/Get-AzEventHubClusterNamespace.Tests.ps1 index 88254b63d5ba..0df5650e59c3 100644 --- a/src/EventHub/EventHub.Autorest/test/Get-AzEventHubClusterNamespace.Tests.ps1 +++ b/src/EventHub/EventHub.Autorest/test/Get-AzEventHubClusterNamespace.Tests.ps1 @@ -16,7 +16,7 @@ if(($null -eq $TestName) -or ($TestName -contains 'Get-AzEventHubClusterNamespac Describe 'Get-AzEventHubClusterNamespace' { It 'List' { - $listOfNamespaces = Get-AzEventHubClusterNamespace -ResourceGroupName $env.clusterResourceGroup -ClusterName $env.createdCluster + $listOfNamespaces = Get-AzEventHubClusterNamespace -SubscriptionId $env.clusterSubscriptionId -ResourceGroupName $env.clusterResourceGroup -ClusterName $env.createdCluster $listOfNamespaces.Count | Should -Be 2 } } diff --git a/src/EventHub/EventHub.Autorest/test/Get-AzEventHubConsumerGroup.Recording.json b/src/EventHub/EventHub.Autorest/test/Get-AzEventHubConsumerGroup.Recording.json index b90a14d27e5e..659555eeacf2 100644 --- a/src/EventHub/EventHub.Autorest/test/Get-AzEventHubConsumerGroup.Recording.json +++ b/src/EventHub/EventHub.Autorest/test/Get-AzEventHubConsumerGroup.Recording.json @@ -1,17 +1,17 @@ { - "Get-AzEventHubConsumerGroup+[NoContext]+List+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/consumergroups?api-version=2023-01-01-preview+1": { + "Get-AzEventHubConsumerGroup+[NoContext]+List+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/consumergroups?api-version=2023-01-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/consumergroups?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/consumergroups?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "42" ], - "x-ms-client-request-id": [ "b63b4499-e2c7-46cb-8dda-35c080add12c" ], + "x-ms-unique-id": [ "47" ], + "x-ms-client-request-id": [ "7ba15459-ba96-40d4-9260-d7036af653db" ], "CommandName": [ "Get-AzEventHubConsumerGroup" ], "FullCommandName": [ "Get-AzEventHubConsumerGroup_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -23,38 +23,42 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "x-ms-inline-count": [ "" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-request-id": [ "89cbfe46-c224-494e-8ff1-8e9bd1a36f61" ], - "x-ms-correlation-request-id": [ "89cbfe46-c224-494e-8ff1-8e9bd1a36f61" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074624Z:89cbfe46-c224-494e-8ff1-8e9bd1a36f61" ], + "x-ms-correlation-request-id": [ "a89f0d20-63c9-4a2b-bed4-5492b4098027" ], + "x-ms-client-request-id": [ "7ba15459-ba96-40d4-9260-d7036af653db_RP" ], + "x-ms-messaging-activity-id": [ "22e338f0-23aa-4af6-8ff8-1ba10ba8db83" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G7|2024-04-29T12:45:59" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "a89f0d20-63c9-4a2b-bed4-5492b4098027" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T124559Z:a89f0d20-63c9-4a2b-bed4-5492b4098027" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: F2BCCA1802914E9EA3ABECD5E5253073 Ref B: SEL221051504011 Ref C: 2023-09-18T07:46:24Z" ], - "Date": [ "Mon, 18 Sep 2023 07:46:24 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 245ED7C9CAF7490494ED3D49226FEE3B Ref B: SEL221051504047 Ref C: 2024-04-29T12:45:59Z" ], + "Date": [ "Mon, 29 Apr 2024 12:45:59 GMT" ] }, "ContentHeaders": { "Content-Length": [ "419" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/consumergroups/$Default\",\"name\":\"$Default\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/consumergroups\",\"location\":\"eastus\",\"properties\":{\"createdAt\":\"2023-09-18T07:33:57.778Z\",\"updatedAt\":\"2023-09-18T07:33:57.856Z\"}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/consumergroups/$Default\",\"name\":\"$Default\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/consumergroups\",\"location\":\"eastus\",\"properties\":{\"createdAt\":\"2024-04-29T12:37:46.654Z\",\"updatedAt\":\"2024-04-29T12:37:46.685Z\"}}]}", "isContentBase64": false } }, - "Get-AzEventHubConsumerGroup+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/consumergroups/%24Default?api-version=2023-01-01-preview+1": { + "Get-AzEventHubConsumerGroup+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/consumergroups/%24Default?api-version=2023-01-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/consumergroups/%24Default?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/consumergroups/%24Default?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "43" ], - "x-ms-client-request-id": [ "b1f470b4-cdae-4b4f-8181-19190a0d506c" ], + "x-ms-unique-id": [ "48" ], + "x-ms-client-request-id": [ "7afd2e6f-e5cc-4e0c-b31e-42096427db9d" ], "CommandName": [ "Get-AzEventHubConsumerGroup" ], "FullCommandName": [ "Get-AzEventHubConsumerGroup_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -65,38 +69,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], - "x-ms-request-id": [ "eb25ad8b-b670-497c-b51c-83f2ac3c7425" ], - "x-ms-correlation-request-id": [ "eb25ad8b-b670-497c-b51c-83f2ac3c7425" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074626Z:eb25ad8b-b670-497c-b51c-83f2ac3c7425" ], + "x-ms-correlation-request-id": [ "08c4a7bb-47fb-45ef-8059-4b35c7377abe" ], + "x-ms-client-request-id": [ "7afd2e6f-e5cc-4e0c-b31e-42096427db9d_RP" ], + "x-ms-messaging-activity-id": [ "00086228-a1ef-42e1-8fc2-5b5a48147f45" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-29T12:46:01" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "08c4a7bb-47fb-45ef-8059-4b35c7377abe" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T124601Z:08c4a7bb-47fb-45ef-8059-4b35c7377abe" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 0215BE8E649F41E9ABC6DBF57A18AAD7 Ref B: SEL221051504011 Ref C: 2023-09-18T07:46:25Z" ], - "Date": [ "Mon, 18 Sep 2023 07:46:26 GMT" ] + "X-MSEdge-Ref": [ "Ref A: B4A8AB496BCB4148BC11BFEF04F89757 Ref B: SEL221051504047 Ref C: 2024-04-29T12:45:59Z" ], + "Date": [ "Mon, 29 Apr 2024 12:46:01 GMT" ] }, "ContentHeaders": { "Content-Length": [ "407" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/consumergroups/$Default\",\"name\":\"$Default\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/consumergroups\",\"location\":\"eastus\",\"properties\":{\"createdAt\":\"2023-09-18T07:33:57.778Z\",\"updatedAt\":\"2023-09-18T07:33:57.856Z\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/consumergroups/$Default\",\"name\":\"$Default\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/consumergroups\",\"location\":\"eastus\",\"properties\":{\"createdAt\":\"2024-04-29T12:37:46.654Z\",\"updatedAt\":\"2024-04-29T12:37:46.685Z\"}}", "isContentBase64": false } }, - "Get-AzEventHubConsumerGroup+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/consumergroups/%24Default?api-version=2023-01-01-preview+1": { + "Get-AzEventHubConsumerGroup+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/consumergroups/%24Default?api-version=2023-01-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/consumergroups/%24Default?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/consumergroups/%24Default?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "44" ], - "x-ms-client-request-id": [ "ad59f429-9dab-4b87-9c4a-9b0886b29588" ], + "x-ms-unique-id": [ "49" ], + "x-ms-client-request-id": [ "c0cb8773-06a1-4914-8240-c7612b73b0c3" ], "CommandName": [ "Get-AzEventHubConsumerGroup" ], "FullCommandName": [ "Get-AzEventHubConsumerGroup_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -107,38 +115,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], - "x-ms-request-id": [ "49c07dd0-3268-4944-af45-521ed0e87bba" ], - "x-ms-correlation-request-id": [ "49c07dd0-3268-4944-af45-521ed0e87bba" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074627Z:49c07dd0-3268-4944-af45-521ed0e87bba" ], + "x-ms-correlation-request-id": [ "ff3ae55b-e267-4783-873e-1ddb162ea781" ], + "x-ms-client-request-id": [ "c0cb8773-06a1-4914-8240-c7612b73b0c3_RP" ], + "x-ms-messaging-activity-id": [ "11ce14ef-9a1d-4ad8-b4f7-fdddbf1ae8fe" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G7|2024-04-29T12:46:01" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-request-id": [ "ff3ae55b-e267-4783-873e-1ddb162ea781" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T124602Z:ff3ae55b-e267-4783-873e-1ddb162ea781" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: CF5261D2ED464654893F63903E1232C3 Ref B: SEL221051504011 Ref C: 2023-09-18T07:46:26Z" ], - "Date": [ "Mon, 18 Sep 2023 07:46:26 GMT" ] + "X-MSEdge-Ref": [ "Ref A: D4F479FAB22544BD9ED30D4DBC31AE86 Ref B: SEL221051504047 Ref C: 2024-04-29T12:46:01Z" ], + "Date": [ "Mon, 29 Apr 2024 12:46:01 GMT" ] }, "ContentHeaders": { "Content-Length": [ "407" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/consumergroups/$Default\",\"name\":\"$Default\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/consumergroups\",\"location\":\"eastus\",\"properties\":{\"createdAt\":\"2023-09-18T07:33:57.778Z\",\"updatedAt\":\"2023-09-18T07:33:57.856Z\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/consumergroups/$Default\",\"name\":\"$Default\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/consumergroups\",\"location\":\"eastus\",\"properties\":{\"createdAt\":\"2024-04-29T12:37:46.654Z\",\"updatedAt\":\"2024-04-29T12:37:46.685Z\"}}", "isContentBase64": false } }, - "Get-AzEventHubConsumerGroup+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/consumergroups/$Default?api-version=2023-01-01-preview+2": { + "Get-AzEventHubConsumerGroup+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/consumergroups/$Default?api-version=2023-01-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/consumergroups/$Default?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/consumergroups/$Default?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "45" ], - "x-ms-client-request-id": [ "d4dda936-3bb5-4d25-bba7-e5d910ce1b53" ], + "x-ms-unique-id": [ "50" ], + "x-ms-client-request-id": [ "87f0555a-e4dd-465c-a743-272a3378a707" ], "CommandName": [ "Get-AzEventHubConsumerGroup" ], "FullCommandName": [ "Get-AzEventHubConsumerGroup_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -149,38 +161,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], - "x-ms-request-id": [ "417155a4-1576-4005-bbfa-2f5e918e2351" ], - "x-ms-correlation-request-id": [ "417155a4-1576-4005-bbfa-2f5e918e2351" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074628Z:417155a4-1576-4005-bbfa-2f5e918e2351" ], + "x-ms-correlation-request-id": [ "5607a6dd-3212-4280-9ac3-62aadb55e68c" ], + "x-ms-client-request-id": [ "87f0555a-e4dd-465c-a743-272a3378a707_RP" ], + "x-ms-messaging-activity-id": [ "5da63c39-da6a-41e7-a43e-4860f9870e70" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G11|2024-04-29T12:46:03" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "5607a6dd-3212-4280-9ac3-62aadb55e68c" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T124603Z:5607a6dd-3212-4280-9ac3-62aadb55e68c" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 6C6A6DEF2A374329826E2AE9E17C9B0E Ref B: SEL221051504011 Ref C: 2023-09-18T07:46:27Z" ], - "Date": [ "Mon, 18 Sep 2023 07:46:28 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 2784296673FA498AB71688BA5F2EC55C Ref B: SEL221051504047 Ref C: 2024-04-29T12:46:02Z" ], + "Date": [ "Mon, 29 Apr 2024 12:46:03 GMT" ] }, "ContentHeaders": { "Content-Length": [ "407" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/consumergroups/$Default\",\"name\":\"$Default\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/consumergroups\",\"location\":\"eastus\",\"properties\":{\"createdAt\":\"2023-09-18T07:33:57.778Z\",\"updatedAt\":\"2023-09-18T07:33:57.856Z\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/consumergroups/$Default\",\"name\":\"$Default\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/consumergroups\",\"location\":\"eastus\",\"properties\":{\"createdAt\":\"2024-04-29T12:37:46.654Z\",\"updatedAt\":\"2024-04-29T12:37:46.685Z\"}}", "isContentBase64": false } }, - "Get-AzEventHubConsumerGroup+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/consumergroups/$Default?api-version=2023-01-01-preview+3": { + "Get-AzEventHubConsumerGroup+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/consumergroups/$Default?api-version=2023-01-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/consumergroups/$Default?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/consumergroups/$Default?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "46" ], - "x-ms-client-request-id": [ "84067415-8f3d-428b-bea6-bb719be708b4" ], + "x-ms-unique-id": [ "51" ], + "x-ms-client-request-id": [ "d0f16cf4-da71-4106-8fd6-1d0446b50dc8" ], "CommandName": [ "Get-AzEventHubConsumerGroup" ], "FullCommandName": [ "Get-AzEventHubConsumerGroup_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -191,22 +207,26 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], - "x-ms-request-id": [ "0d659cfd-fc64-42b1-8939-31449ac9c588" ], - "x-ms-correlation-request-id": [ "0d659cfd-fc64-42b1-8939-31449ac9c588" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074630Z:0d659cfd-fc64-42b1-8939-31449ac9c588" ], + "x-ms-correlation-request-id": [ "9ce6b527-d1f9-46f1-b277-28a9855d13f0" ], + "x-ms-client-request-id": [ "d0f16cf4-da71-4106-8fd6-1d0446b50dc8_RP" ], + "x-ms-messaging-activity-id": [ "50ed2ab5-74f7-469e-81b7-04cfe1c09d6c" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G11|2024-04-29T12:46:04" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "9ce6b527-d1f9-46f1-b277-28a9855d13f0" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T124604Z:9ce6b527-d1f9-46f1-b277-28a9855d13f0" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 21D802BAB14A47A5AECF82EEEC875980 Ref B: SEL221051504011 Ref C: 2023-09-18T07:46:28Z" ], - "Date": [ "Mon, 18 Sep 2023 07:46:30 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 561974D24D0B417DA2083CEAB26FB61D Ref B: SEL221051504047 Ref C: 2024-04-29T12:46:03Z" ], + "Date": [ "Mon, 29 Apr 2024 12:46:04 GMT" ] }, "ContentHeaders": { "Content-Length": [ "407" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/consumergroups/$Default\",\"name\":\"$Default\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/consumergroups\",\"location\":\"eastus\",\"properties\":{\"createdAt\":\"2023-09-18T07:33:57.778Z\",\"updatedAt\":\"2023-09-18T07:33:57.856Z\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/consumergroups/$Default\",\"name\":\"$Default\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/consumergroups\",\"location\":\"eastus\",\"properties\":{\"createdAt\":\"2024-04-29T12:37:46.654Z\",\"updatedAt\":\"2024-04-29T12:37:46.685Z\"}}", "isContentBase64": false } } diff --git a/src/EventHub/EventHub.Autorest/test/Get-AzEventHubKey.Recording.json b/src/EventHub/EventHub.Autorest/test/Get-AzEventHubKey.Recording.json index 66b5d0abe947..b20f74d88f64 100644 --- a/src/EventHub/EventHub.Autorest/test/Get-AzEventHubKey.Recording.json +++ b/src/EventHub/EventHub.Autorest/test/Get-AzEventHubKey.Recording.json @@ -1,17 +1,17 @@ { - "Get-AzEventHubKey+[NoContext]+GetExpandedNamespace+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/auth-ruleju0nd3/listKeys?api-version=2023-01-01-preview+1": { + "Get-AzEventHubKey+[NoContext]+GetExpandedNamespace+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/auth-ruleudhoej/listKeys?api-version=2023-01-01-preview+1": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/auth-ruleju0nd3/listKeys?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/auth-ruleudhoej/listKeys?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "47" ], - "x-ms-client-request-id": [ "662a93da-3f80-4cb9-9369-3789a167dcb6" ], + "x-ms-unique-id": [ "52" ], + "x-ms-client-request-id": [ "4f0b3d70-7567-43fd-a845-05e587f8ec0e" ], "CommandName": [ "Az.EventHub.private\\Get-AzEventHubNamespaceKey_List" ], "FullCommandName": [ "Get-AzEventHubNamespaceKey_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,38 +22,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-request-id": [ "a64ca90f-8753-45ea-9b05-8eeeea0e200b" ], - "x-ms-correlation-request-id": [ "a64ca90f-8753-45ea-9b05-8eeeea0e200b" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074651Z:a64ca90f-8753-45ea-9b05-8eeeea0e200b" ], + "x-ms-correlation-request-id": [ "fab8bc81-6cbe-4e19-b79b-166884d5060e" ], + "x-ms-client-request-id": [ "4f0b3d70-7567-43fd-a845-05e587f8ec0e_RP" ], + "x-ms-messaging-activity-id": [ "f9a11421-82c2-48e5-a26f-3a658922725b" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-29T12:46:34" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "fab8bc81-6cbe-4e19-b79b-166884d5060e" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T124634Z:fab8bc81-6cbe-4e19-b79b-166884d5060e" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: CC3BD8C64D7C49FC87EE9572359791B0 Ref B: SEL221051504011 Ref C: 2023-09-18T07:46:49Z" ], - "Date": [ "Mon, 18 Sep 2023 07:46:51 GMT" ] + "X-MSEdge-Ref": [ "Ref A: FF029E0B7A754237B2B3AD5765E1951F Ref B: SEL221051504047 Ref C: 2024-04-29T12:46:32Z" ], + "Date": [ "Mon, 29 Apr 2024 12:46:34 GMT" ] }, "ContentHeaders": { "Content-Length": [ "519" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenamed5orf8.servicebus.windows.net/;SharedAccessKeyName=auth-ruleju0nd3;SharedAccessKey=Sanitized\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenamed5orf8.servicebus.windows.net/;SharedAccessKeyName=auth-ruleju0nd3;SharedAccessKey=Sanitized\",\"primaryKey\":\"Sanitized\",\"secondaryKey\":\"Sanitized\",\"keyName\":\"auth-ruleju0nd3\"}", + "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenameeqpx5w.servicebus.windows.net/;SharedAccessKeyName=auth-ruleudhoej;SharedAccessKey=5Fw/dU3UKBtC88lnpoBbKfylCmWVJM3ZI+AEhGWiXbg=\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenameeqpx5w.servicebus.windows.net/;SharedAccessKeyName=auth-ruleudhoej;SharedAccessKey=+9MVU0i390uqIh1w7+lQsa0Qm6cR414iB+AEhObvmas=\",\"primaryKey\":\"5Fw/dU3UKBtC88lnpoBbKfylCmWVJM3ZI+AEhGWiXbg=\",\"secondaryKey\":\"+9MVU0i390uqIh1w7+lQsa0Qm6cR414iB+AEhObvmas=\",\"keyName\":\"auth-ruleudhoej\"}", "isContentBase64": false } }, - "Get-AzEventHubKey+[NoContext]+GetExpandedEntity+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules/auth-rulepjiaoe/listKeys?api-version=2023-01-01-preview+1": { + "Get-AzEventHubKey+[NoContext]+GetExpandedEntity+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules/auth-rulevanqub/listKeys?api-version=2023-01-01-preview+1": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules/auth-rulepjiaoe/listKeys?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules/auth-rulevanqub/listKeys?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "48" ], - "x-ms-client-request-id": [ "9ea411b1-e641-4e53-8377-287756117634" ], + "x-ms-unique-id": [ "53" ], + "x-ms-client-request-id": [ "178ba3e7-ce67-4268-8884-affa6a1f1c86" ], "CommandName": [ "Az.EventHub.private\\Get-AzEventHubKey_List" ], "FullCommandName": [ "Get-AzEventHubKey_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -64,22 +68,26 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], - "x-ms-request-id": [ "1539ff3a-fa55-423f-a098-9e5251178ff4" ], - "x-ms-correlation-request-id": [ "1539ff3a-fa55-423f-a098-9e5251178ff4" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074652Z:1539ff3a-fa55-423f-a098-9e5251178ff4" ], + "x-ms-correlation-request-id": [ "c17a529c-b8b5-42b4-b626-cc16a9ea8f6d" ], + "x-ms-client-request-id": [ "178ba3e7-ce67-4268-8884-affa6a1f1c86_RP" ], + "x-ms-messaging-activity-id": [ "36a59119-d69d-41a7-ad40-c4fce3d2fc82" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G3|2024-04-29T12:46:36" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "c17a529c-b8b5-42b4-b626-cc16a9ea8f6d" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T124636Z:c17a529c-b8b5-42b4-b626-cc16a9ea8f6d" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 13A57D176D1E4B189657814612230306 Ref B: SEL221051504011 Ref C: 2023-09-18T07:46:51Z" ], - "Date": [ "Mon, 18 Sep 2023 07:46:52 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 3EA00C7E4E364E1594E6E43CA5A93D60 Ref B: SEL221051504047 Ref C: 2024-04-29T12:46:34Z" ], + "Date": [ "Mon, 29 Apr 2024 12:46:36 GMT" ] }, "ContentHeaders": { "Content-Length": [ "571" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenamed5orf8.servicebus.windows.net/;SharedAccessKeyName=auth-rulepjiaoe;SharedAccessKey=Sanitized;EntityPath=eventHub504uah\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenamed5orf8.servicebus.windows.net/;SharedAccessKeyName=auth-rulepjiaoe;SharedAccessKey=Sanitized;EntityPath=eventHub504uah\",\"primaryKey\":\"Sanitized\",\"secondaryKey\":\"Sanitized\",\"keyName\":\"auth-rulepjiaoe\"}", + "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenameeqpx5w.servicebus.windows.net/;SharedAccessKeyName=auth-rulevanqub;SharedAccessKey=VsW0oPfgg5VsKOREk0YDRenZfwTBtT7WV+AEhOqC3vc=;EntityPath=eventHub789hmt\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenameeqpx5w.servicebus.windows.net/;SharedAccessKeyName=auth-rulevanqub;SharedAccessKey=1u3LCEtWZqOou9wG1YzpsWrk7lhK6Ug/C+AEhK/TBCM=;EntityPath=eventHub789hmt\",\"primaryKey\":\"VsW0oPfgg5VsKOREk0YDRenZfwTBtT7WV+AEhOqC3vc=\",\"secondaryKey\":\"1u3LCEtWZqOou9wG1YzpsWrk7lhK6Ug/C+AEhK/TBCM=\",\"keyName\":\"auth-rulevanqub\"}", "isContentBase64": false } } diff --git a/src/EventHub/EventHub.Autorest/test/Get-AzEventHubNamespaceV2.Recording.json b/src/EventHub/EventHub.Autorest/test/Get-AzEventHubNamespaceV2.Recording.json index 5d6b918f0c3a..4b7c4108dd06 100644 --- a/src/EventHub/EventHub.Autorest/test/Get-AzEventHubNamespaceV2.Recording.json +++ b/src/EventHub/EventHub.Autorest/test/Get-AzEventHubNamespaceV2.Recording.json @@ -1,17 +1,61 @@ { - "Get-AzEventHubNamespaceV2+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8?api-version=2023-01-01-preview+1": { + "Get-AzEventHubNamespaceV2+[NoContext]+List+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/providers/Microsoft.EventHub/namespaces?api-version=2023-01-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/providers/Microsoft.EventHub/namespaces?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "49" ], - "x-ms-client-request-id": [ "7e3ea47b-7717-41cf-bcda-2555cdca0ceb" ], + "x-ms-unique-id": [ "54" ], + "x-ms-client-request-id": [ "f69659d3-5139-437d-87de-a129d82b7baa" ], + "CommandName": [ "Get-AzEventHubNamespaceV2" ], + "FullCommandName": [ "Get-AzEventHubNamespace_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-original-request-ids": [ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "3c1fb44d-9673-43a9-ac4a-78fb8a6279d8" ], + "x-ms-correlation-request-id": [ "3c1fb44d-9673-43a9-ac4a-78fb8a6279d8" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T124709Z:3c1fb44d-9673-43a9-ac4a-78fb8a6279d8" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 1A4881F31F3C4858B02EC3858754EA81 Ref B: SEL221051504047 Ref C: 2024-04-29T12:47:05Z" ], + "Date": [ "Mon, 29 Apr 2024 12:47:09 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "468760" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-1620/providers/Microsoft.EventHub/namespaces/sdk-NS-8157\",\"name\":\"sdk-NS-8157\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"australiaeast\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-ns-8157\",\"serviceBusEndpoint\":\"https://sdk-NS-8157.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-14T01:09:19.1036599Z\",\"updatedAt\":\"2022-06-14T22:16:50.8086671Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestvj6k4w/providers/Microsoft.EventHub/namespaces/namespaceNamey3cetb\",\"name\":\"namespaceNamey3cetb\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"australiaeast\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamey3cetb\",\"serviceBusEndpoint\":\"https://namespaceNamey3cetb.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-11-16T09:00:32.1613073Z\",\"updatedAt\":\"2024-01-24T02:04:20.5598499Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorest1h85cp/providers/Microsoft.EventHub/namespaces/namespaceName5106ty\",\"name\":\"namespaceName5106ty\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"australiaeast\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacename5106ty\",\"serviceBusEndpoint\":\"https://namespaceName5106ty.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-04-25T07:42:49.2841976Z\",\"updatedAt\":\"2024-04-17T17:15:54.8378786Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-8548/providers/Microsoft.EventHub/namespaces/sdk-NS-3155\",\"name\":\"sdk-NS-3155\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"australiaeast\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-ns-3155\",\"serviceBusEndpoint\":\"https://sdk-NS-3155.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-14T01:36:13.4059826Z\",\"updatedAt\":\"2022-06-14T22:22:30.3913689Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-7674/providers/Microsoft.EventHub/namespaces/sdk-NS-4234\",\"name\":\"sdk-NS-4234\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"australiaeast\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-ns-4234\",\"serviceBusEndpoint\":\"https://sdk-NS-4234.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":10,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-14T01:36:20.5201691Z\",\"updatedAt\":\"2022-06-14T22:22:30.48507Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/manojprasad-rampup/providers/Microsoft.EventHub/namespaces/manojprasad-eventhubs-premium\",\"name\":\"manojprasad-eventhubs-premium\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"australiaeast\",\"tags\":{\"Offload\":\"Yes\"},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:manojprasad-eventhubs-premium\",\"serviceBusEndpoint\":\"https://manojprasad-eventhubs-premium.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-14T01:44:41.5673277Z\",\"updatedAt\":\"2023-12-12T06:49:13.7239257Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorest2wzidh/providers/Microsoft.EventHub/namespaces/namespaceNamecga4ri\",\"name\":\"namespaceNamecga4ri\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"australiaeast\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamecga4ri\",\"serviceBusEndpoint\":\"https://namespaceNamecga4ri.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-02-21T09:55:54.3392966Z\",\"updatedAt\":\"2024-04-17T17:19:00.1272596Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-1201/providers/Microsoft.EventHub/namespaces/sdk-NS-1237\",\"name\":\"sdk-NS-1237\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"australiaeast\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-ns-1237\",\"serviceBusEndpoint\":\"https://sdk-NS-1237.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-13T22:27:52.6395763Z\",\"updatedAt\":\"2022-06-14T22:14:53.825746Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-1248/providers/Microsoft.EventHub/namespaces/sdk-NS-1942\",\"name\":\"sdk-NS-1942\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"australiaeast\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-ns-1942\",\"serviceBusEndpoint\":\"https://sdk-NS-1942.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":10,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-14T01:18:10.2109298Z\",\"updatedAt\":\"2022-06-14T22:18:42.3185796Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-6912/providers/Microsoft.EventHub/namespaces/sdk-NS-4362\",\"name\":\"sdk-NS-4362\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"australiaeast\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-ns-4362\",\"serviceBusEndpoint\":\"https://sdk-NS-4362.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-13T22:27:59.6832825Z\",\"updatedAt\":\"2022-06-14T22:14:53.8413797Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestl6scpx/providers/Microsoft.EventHub/namespaces/namespaceNamepcbf4d\",\"name\":\"namespaceNamepcbf4d\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"australiaeast\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamepcbf4d\",\"serviceBusEndpoint\":\"https://namespaceNamepcbf4d.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-01-30T18:05:43.1045029Z\",\"updatedAt\":\"2024-01-30T18:13:01.1284795Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresttwplox/providers/Microsoft.EventHub/namespaces/namespaceNamehszyu0\",\"name\":\"namespaceNamehszyu0\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"australiaeast\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamehszyu0\",\"serviceBusEndpoint\":\"https://namespaceNamehszyu0.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-02-15T10:47:49.0684967Z\",\"updatedAt\":\"2024-01-24T02:04:20.1379731Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.EventHub/namespaces/clusterNamespace2\",\"name\":\"clusterNamespace2\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"australiaeast\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:clusternamespace2\",\"serviceBusEndpoint\":\"https://clusterNamespace2.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.EventHub/clusters/TestClusterAutomatic\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-08-29T09:49:34.6134032Z\",\"updatedAt\":\"2023-12-12T06:51:56.5140128Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/sjrg/providers/Microsoft.EventHub/namespaces/sjpremiumsy1\",\"name\":\"sjpremiumsy1\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"australiaeast\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sjpremiumsy1\",\"serviceBusEndpoint\":\"https://sjpremiumsy1.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-13T22:17:10.5766403Z\",\"updatedAt\":\"2022-06-14T22:13:00.3250269Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestli7ta1/providers/Microsoft.EventHub/namespaces/namespaceNamepjmcds\",\"name\":\"namespaceNamepjmcds\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"australiaeast\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamepjmcds\",\"serviceBusEndpoint\":\"https://namespaceNamepjmcds.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-09-07T17:02:01.2126015Z\",\"updatedAt\":\"2024-01-24T02:04:20.5598499Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-8663/providers/Microsoft.EventHub/namespaces/sdk-NS-7018\",\"name\":\"sdk-NS-7018\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"australiaeast\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-ns-7018\",\"serviceBusEndpoint\":\"https://sdk-NS-7018.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-13T22:17:27.8757273Z\",\"updatedAt\":\"2022-06-14T22:13:00.3094515Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestulr4o3/providers/Microsoft.EventHub/namespaces/namespaceNameypczvx\",\"name\":\"namespaceNameypczvx\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"australiaeast\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenameypczvx\",\"serviceBusEndpoint\":\"https://namespaceNameypczvx.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-04-17T09:41:42.3918665Z\",\"updatedAt\":\"2024-01-24T02:04:20.4504692Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-6229/providers/Microsoft.EventHub/namespaces/sdk-NS-2302\",\"name\":\"sdk-NS-2302\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"australiaeast\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-ns-2302\",\"serviceBusEndpoint\":\"https://sdk-NS-2302.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-14T01:54:03.0695599Z\",\"updatedAt\":\"2023-12-12T07:00:37.9823294Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorest5oibwu/providers/Microsoft.EventHub/namespaces/namespaceName3dqfes\",\"name\":\"namespaceName3dqfes\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"australiaeast\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacename3dqfes\",\"serviceBusEndpoint\":\"https://namespaceName3dqfes.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-04-17T05:41:20.6621461Z\",\"updatedAt\":\"2024-01-24T02:04:20.4504692Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestk3bhao/providers/Microsoft.EventHub/namespaces/namespaceNamegv74jy\",\"name\":\"namespaceNamegv74jy\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"australiaeast\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamegv74jy\",\"serviceBusEndpoint\":\"https://namespaceNamegv74jy.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-09-11T16:37:55.1851358Z\",\"updatedAt\":\"2024-01-24T02:04:20.5598499Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-1501/providers/Microsoft.EventHub/namespaces/sdk-NS-7852\",\"name\":\"sdk-NS-7852\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"australiaeast\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-ns-7852\",\"serviceBusEndpoint\":\"https://sdk-NS-7852.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":10,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-13T22:17:34.7531846Z\",\"updatedAt\":\"2022-06-14T22:13:00.4032251Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.EventHub/namespaces/clusterNamespace\",\"name\":\"clusterNamespace\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"australiaeast\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:clusternamespace\",\"serviceBusEndpoint\":\"https://clusterNamespace.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.EventHub/clusters/TestClusterAutomatic\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-08-29T09:49:22.6602912Z\",\"updatedAt\":\"2023-12-12T06:53:19.3811456Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ehpremium-perf-test-rg/providers/Microsoft.EventHub/namespaces/ehp-jobobject-test\",\"name\":\"ehp-jobobject-test\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"australiaeast\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ehp-jobobject-test\",\"serviceBusEndpoint\":\"https://ehp-jobobject-test.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-05-16T21:43:34.9814871Z\",\"updatedAt\":\"2023-05-18T21:02:44.1833951Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":2}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-819/providers/Microsoft.EventHub/namespaces/sdk-NS-5670\",\"name\":\"sdk-NS-5670\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"australiaeast\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-ns-5670\",\"serviceBusEndpoint\":\"https://sdk-NS-5670.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-14T01:44:59.3622903Z\",\"updatedAt\":\"2022-06-14T22:24:20.5850263Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestg1sxfy/providers/Microsoft.EventHub/namespaces/namespaceNameyfpo4n\",\"name\":\"namespaceNameyfpo4n\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"australiaeast\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenameyfpo4n\",\"serviceBusEndpoint\":\"https://namespaceNameyfpo4n.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-04-17T13:27:03.6795539Z\",\"updatedAt\":\"2024-01-24T02:04:20.4504692Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestbug61t/providers/Microsoft.EventHub/namespaces/namespaceNamertyd06\",\"name\":\"namespaceNamertyd06\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"australiaeast\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamertyd06\",\"serviceBusEndpoint\":\"https://namespaceNamertyd06.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-09-09T11:05:25.4733833Z\",\"updatedAt\":\"2024-01-24T02:04:20.5598499Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-4534/providers/Microsoft.EventHub/namespaces/sdk-NS-1124\",\"name\":\"sdk-NS-1124\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"australiaeast\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-ns-1124\",\"serviceBusEndpoint\":\"https://sdk-NS-1124.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":10,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-14T01:27:12.0593051Z\",\"updatedAt\":\"2022-06-14T22:20:36.5664047Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-2963/providers/Microsoft.EventHub/namespaces/sdk-NS-1256\",\"name\":\"sdk-NS-1256\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"australiaeast\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-ns-1256\",\"serviceBusEndpoint\":\"https://sdk-NS-1256.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-14T01:45:15.9233674Z\",\"updatedAt\":\"2023-12-12T06:57:11.9075194Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestih6qdc/providers/Microsoft.EventHub/namespaces/namespaceName1pkqho\",\"name\":\"namespaceName1pkqho\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"australiaeast\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacename1pkqho\",\"serviceBusEndpoint\":\"https://namespaceName1pkqho.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-04-25T08:54:23.0949257Z\",\"updatedAt\":\"2024-01-24T02:04:20.544219Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-8202/providers/Microsoft.EventHub/namespaces/sdk-NS-408\",\"name\":\"sdk-NS-408\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"australiaeast\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-ns-408\",\"serviceBusEndpoint\":\"https://sdk-NS-408.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-14T01:54:24.8523461Z\",\"updatedAt\":\"2022-06-14T22:26:12.7924658Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestlgcb3i/providers/Microsoft.EventHub/namespaces/namespaceName3h5ew9\",\"name\":\"namespaceName3h5ew9\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"australiaeast\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacename3h5ew9\",\"serviceBusEndpoint\":\"https://namespaceName3h5ew9.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-02-10T17:22:57.886661Z\",\"updatedAt\":\"2024-01-24T02:04:20.1379731Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestyw30va/providers/Microsoft.EventHub/namespaces/namespaceName3ryekd\",\"name\":\"namespaceName3ryekd\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"australiaeast\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacename3ryekd\",\"serviceBusEndpoint\":\"https://namespaceName3ryekd.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-09-08T07:15:05.9748937Z\",\"updatedAt\":\"2024-01-24T02:04:20.5598499Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestze2j9o/providers/Microsoft.EventHub/namespaces/namespaceNameo3ifl0\",\"name\":\"namespaceNameo3ifl0\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"australiaeast\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenameo3ifl0\",\"serviceBusEndpoint\":\"https://namespaceNameo3ifl0.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-01-23T18:20:38.2629539Z\",\"updatedAt\":\"2024-01-24T02:04:20.5598499Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestlw6caz/providers/Microsoft.EventHub/namespaces/namespaceNamexyehi8\",\"name\":\"namespaceNamexyehi8\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"australiaeast\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamexyehi8\",\"serviceBusEndpoint\":\"https://namespaceNamexyehi8.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-02-13T08:11:54.304025Z\",\"updatedAt\":\"2024-01-24T02:04:20.1379731Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-7877/providers/Microsoft.EventHub/namespaces/sdk-NS-5462\",\"name\":\"sdk-NS-5462\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"australiaeast\",\"tags\":{\"tag1\":\"value1\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-ns-5462\",\"serviceBusEndpoint\":\"https://sdk-NS-5462.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-13T22:17:34.9406847Z\",\"updatedAt\":\"2023-12-12T06:58:52.7585039Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestkf7w1n/providers/Microsoft.EventHub/namespaces/namespaceNameow96n8\",\"name\":\"namespaceNameow96n8\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"australiaeast\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenameow96n8\",\"serviceBusEndpoint\":\"https://namespaceNameow96n8.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-11-22T14:37:21.5074326Z\",\"updatedAt\":\"2024-01-24T02:04:20.5598499Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestyqxw9p/providers/Microsoft.EventHub/namespaces/namespaceNamemi0vxw\",\"name\":\"namespaceNamemi0vxw\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"australiaeast\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamemi0vxw\",\"serviceBusEndpoint\":\"https://namespaceNamemi0vxw.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-04-25T08:05:18.3923555Z\",\"updatedAt\":\"2024-01-24T02:04:20.544219Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestftog8r/providers/Microsoft.EventHub/namespaces/namespaceNameint7de\",\"name\":\"namespaceNameint7de\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"australiaeast\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenameint7de\",\"serviceBusEndpoint\":\"https://namespaceNameint7de.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-04-25T08:31:03.1408025Z\",\"updatedAt\":\"2024-01-24T02:04:20.544219Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/sjrg/providers/Microsoft.EventHub/namespaces/sjehbasic\",\"name\":\"sjehbasic\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"brazilsouth\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sjehbasic\",\"serviceBusEndpoint\":\"https://sjehbasic.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-08T14:12:41.4689701Z\",\"updatedAt\":\"2022-06-08T14:12:41.4689701Z\"},\"sku\":{\"name\":\"Basic\",\"tier\":\"Basic\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ardsouza-test-5-19/providers/Microsoft.EventHub/namespaces/ardsouza-5-19-2020-deleteme-basic\",\"name\":\"ardsouza-5-19-2020-deleteme-basic\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"canadacentral\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ardsouza-5-19-2020-deleteme-basic\",\"serviceBusEndpoint\":\"https://ardsouza-5-19-2020-deleteme-basic.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-03T20:46:23.4988784Z\",\"updatedAt\":\"2022-06-03T20:46:23.4988784Z\"},\"sku\":{\"name\":\"Basic\",\"tier\":\"Basic\",\"capacity\":10}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EastUS2/providers/Microsoft.EventHub/namespaces/ardsouza-canadacentralpremiumnamespace\",\"name\":\"ardsouza-canadacentralpremiumnamespace\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"canadacentral\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ardsouza-canadacentralpremiumnamespace\",\"serviceBusEndpoint\":\"https://ardsouza-canadacentralpremiumnamespace.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-03T22:03:38.0334189Z\",\"updatedAt\":\"2022-06-03T22:03:38.0334189Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/sjrg/providers/Microsoft.EventHub/namespaces/sjpremiumyt\",\"name\":\"sjpremiumyt\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"canadacentral\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sjpremiumyt\",\"serviceBusEndpoint\":\"https://sjpremiumyt.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-03T21:51:16.202131Z\",\"updatedAt\":\"2023-12-08T12:50:48.6743656Z\"},\"identity\":{\"principalId\":\"efba7023-c337-4a6d-b44c-0e4d77fe75ac\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-CanadaEast/providers/Microsoft.EventHub/namespaces/sjnsprodyq1520-1\",\"name\":\"sjnsprodyq1520-1\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"canadaeast\",\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sjnsprodyq1520-1\",\"serviceBusEndpoint\":\"https://sjnsprodyq1520-1.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-04-21T02:08:40.612818Z\",\"updatedAt\":\"2023-04-21T18:08:33.5416288Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-CanadaEast/providers/Microsoft.EventHub/namespaces/sjnsprodyq1520\",\"name\":\"sjnsprodyq1520\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"canadaeast\",\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sjnsprodyq1520\",\"serviceBusEndpoint\":\"https://sjnsprodyq1520.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-04-21T02:00:42.4017179Z\",\"updatedAt\":\"2023-04-21T18:01:03.6948082Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ardsouzazoneredundantbydetaulttest/providers/Microsoft.EventHub/namespaces/NamespaceEventHubStandardNonAzCreate\",\"name\":\"NamespaceEventHubStandardNonAzCreate\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centralindia\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespaceeventhubstandardnonazcreate\",\"serviceBusEndpoint\":\"https://NamespaceEventHubStandardNonAzCreate.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-01-25T00:11:04.1960804Z\",\"updatedAt\":\"2024-01-25T00:33:31.5671249Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/sjrg/providers/Microsoft.EventHub/namespaces/sjcentralindia\",\"name\":\"sjcentralindia\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centralindia\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sjcentralindia\",\"serviceBusEndpoint\":\"https://sjcentralindia.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-09T15:18:17.3930432Z\",\"updatedAt\":\"2022-06-09T15:18:17.3930432Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ardsouzazoneredundantbydetaulttest/providers/Microsoft.EventHub/namespaces/NamespaceEventHubPremiumNonAzCreate\",\"name\":\"NamespaceEventHubPremiumNonAzCreate\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centralindia\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespaceeventhubpremiumnonazcreate\",\"serviceBusEndpoint\":\"https://NamespaceEventHubPremiumNonAzCreate.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-01-25T00:12:34.8372393Z\",\"updatedAt\":\"2024-01-25T17:48:02.0004308Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ardsouzazoneredundantbydetaulttest/providers/Microsoft.EventHub/namespaces/NamespaceEventHubStandardNonAzCreateAfter\",\"name\":\"NamespaceEventHubStandardNonAzCreateAfter\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centralindia\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespaceeventhubstandardnonazcreateafter\",\"serviceBusEndpoint\":\"https://NamespaceEventHubStandardNonAzCreateAfter.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-01-25T00:29:41.0720432Z\",\"updatedAt\":\"2024-01-25T00:30:35.1558913Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ardsouzazoneredundantbydetaulttest/providers/Microsoft.EventHub/namespaces/NamespaceEventHubPremiumNonAzCreateAfter\",\"name\":\"NamespaceEventHubPremiumNonAzCreateAfter\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centralindia\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespaceeventhubpremiumnonazcreateafter\",\"serviceBusEndpoint\":\"https://NamespaceEventHubPremiumNonAzCreateAfter.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-01-25T00:30:11.3259962Z\",\"updatedAt\":\"2024-01-25T00:33:11.2540026Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/zztestrg/providers/Microsoft.EventHub/namespaces/zztest04\",\"name\":\"zztest04\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:zztest04\",\"serviceBusEndpoint\":\"https://zztest04.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-24T23:09:13.7765843Z\",\"updatedAt\":\"2024-02-01T21:04:41.741599Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/jakeschiller-synthetics/providers/Microsoft.EventHub/namespaces/privatelink-ns\",\"name\":\"privatelink-ns\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:privatelink-ns\",\"serviceBusEndpoint\":\"https://privatelink-ns.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-08-04T17:47:28.3591462Z\",\"updatedAt\":\"2024-02-01T02:08:40.4126733Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/jakeschiller-synthetics/providers/Microsoft.EventHub/namespaces/CentralUsVnetNamespace\",\"name\":\"CentralUsVnetNamespace\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:centralusvnetnamespace\",\"serviceBusEndpoint\":\"https://CentralUsVnetNamespace.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-07-11T20:12:45.2702152Z\",\"updatedAt\":\"2024-02-01T01:50:18.9791685Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/klam-rg/providers/Microsoft.EventHub/namespaces/klam-test\",\"name\":\"klam-test\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:klam-test\",\"serviceBusEndpoint\":\"https://klam-test.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-25T00:18:19.7393016Z\",\"updatedAt\":\"2022-06-25T00:18:19.7393016Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cleanupservice/providers/Microsoft.EventHub/namespaces/TestSNPairIssueSec0214\",\"name\":\"TestSNPairIssueSec0214\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testsnpairissuesec0214\",\"serviceBusEndpoint\":\"https://TestSNPairIssueSec0214.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-02-14T21:54:20.1919455Z\",\"updatedAt\":\"2024-02-14T22:01:07.690593Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/samurp/providers/Microsoft.EventHub/namespaces/testNamespace0001\",\"name\":\"testNamespace0001\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testnamespace0001\",\"serviceBusEndpoint\":\"https://testNamespace0001.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/samurp/providers/Microsoft.EventHub/clusters/test-us-central-01\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-05-05T15:10:21.7802939Z\",\"updatedAt\":\"2023-05-05T15:11:15.1591798Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/kindrasiri_eh_premium_benchmarking/providers/Microsoft.EventHub/namespaces/aayushtest1\",\"name\":\"aayushtest1\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:aayushtest1\",\"serviceBusEndpoint\":\"https://aayushtest1.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-06-15T12:40:07.4799623Z\",\"updatedAt\":\"2023-06-15T12:44:10.2768226Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/sjrg/providers/Microsoft.EventHub/namespaces/sjaztest1centralus\",\"name\":\"sjaztest1centralus\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sjaztest1centralus\",\"serviceBusEndpoint\":\"https://sjaztest1centralus.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-24T22:08:16.9717117Z\",\"updatedAt\":\"2022-06-24T22:08:16.9717117Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":2}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/jakeschiller-mhsm/providers/Microsoft.EventHub/namespaces/mhsm-premium-ns\",\"name\":\"mhsm-premium-ns\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"rsakey1\",\"keyVaultUri\":\"https://mhsm-test.managedhsm.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:mhsm-premium-ns\",\"serviceBusEndpoint\":\"https://mhsm-premium-ns.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-03-20T13:14:39.6681307Z\",\"updatedAt\":\"2024-02-01T21:04:24.642497Z\"},\"identity\":{\"principalId\":\"2722643f-6bd2-45c5-91c5-a2989e29b89f\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/shubhatestrg/providers/Microsoft.EventHub/namespaces/uxdemoforsr\",\"name\":\"uxdemoforsr\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:uxdemoforsr\",\"serviceBusEndpoint\":\"https://uxdemoforsr.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-25T00:17:27.7950262Z\",\"updatedAt\":\"2022-06-25T00:17:27.7950262Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.EventHub/namespaces/standard4142\",\"name\":\"standard4142\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:standard4142\",\"serviceBusEndpoint\":\"https://standard4142.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-11-29T14:56:35.3916289Z\",\"updatedAt\":\"2023-11-29T14:57:24.8793839Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/jakeschiller-synthetics/providers/Microsoft.EventHub/namespaces/trusted-services-ns\",\"name\":\"trusted-services-ns\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:trusted-services-ns\",\"serviceBusEndpoint\":\"https://trusted-services-ns.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-08-09T19:42:31.4214049Z\",\"updatedAt\":\"2024-02-01T02:04:51.4079031Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-by3-533-rg/providers/Microsoft.EventHub/namespaces/zztestsecondary\",\"name\":\"zztestsecondary\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:zztestsecondary\",\"serviceBusEndpoint\":\"https://zztestsecondary.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-24T23:09:52.6900426Z\",\"updatedAt\":\"2024-02-01T21:06:42.6699442Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/mmrg6755/providers/Microsoft.EventHub/namespaces/myehkafkadest2349\",\"name\":\"myehkafkadest2349\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:myehkafkadest2349\",\"serviceBusEndpoint\":\"https://myehkafkadest2349.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-25T00:17:16.9177399Z\",\"updatedAt\":\"2022-06-25T00:17:16.9177399Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/lmanickam-migration-testing/providers/Microsoft.EventHub/namespaces/lmanickam-vnet-dr-eh-std-secondary\",\"name\":\"lmanickam-vnet-dr-eh-std-secondary\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:lmanickam-vnet-dr-eh-std-secondary\",\"serviceBusEndpoint\":\"https://lmanickam-vnet-dr-eh-std-secondary.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-05-04T11:43:21.5426968Z\",\"updatedAt\":\"2024-02-01T21:05:42.1903337Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ardsouza-test/providers/Microsoft.EventHub/namespaces/ardsouza-11-06-2023-aztest-centralus\",\"name\":\"ardsouza-11-06-2023-aztest-centralus\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ardsouza-11-06-2023-aztest-centralus\",\"serviceBusEndpoint\":\"https://ardsouza-11-06-2023-aztest-centralus.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-11-06T18:50:10.5345859Z\",\"updatedAt\":\"2023-11-06T18:50:58.1272525Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.EventHub/namespaces/V1GeoDR\",\"name\":\"V1GeoDR\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:v1geodr\",\"serviceBusEndpoint\":\"https://V1GeoDR.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-08-17T05:34:37.8077813Z\",\"updatedAt\":\"2024-02-01T21:05:42.4715869Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/sjrg/providers/Microsoft.EventHub/namespaces/sjpremiumbyokeastasia\",\"name\":\"sjpremiumbyokeastasia\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastasia\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://sjswedencentral.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/sjrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sjuseridentityforbyok\"}}],\"requireInfrastructureEncryption\":false},\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sjpremiumbyokeastasia\",\"serviceBusEndpoint\":\"https://sjpremiumbyokeastasia.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-02-07T19:40:43.1038765Z\",\"updatedAt\":\"2023-12-05T08:10:33.8063568Z\"},\"identity\":{\"principalId\":\"b5004d65-cfac-4172-aa49-2caf9cded3e5\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned, UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/sjrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sjuseridentityforbyok\":{\"clientId\":\"68c08f5d-cff0-4866-96d5-51d141cd96bb\",\"principalId\":\"91123d1e-7b64-489b-a6f7-712cec525809\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/sjrg/providers/Microsoft.EventHub/namespaces/sjtestzone1\",\"name\":\"sjtestzone1\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastasia\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sjtestzone1\",\"serviceBusEndpoint\":\"https://sjtestzone1.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-04-06T20:02:57.3908469Z\",\"updatedAt\":\"2023-04-06T20:03:49.8992963Z\"},\"sku\":{\"name\":\"Basic\",\"tier\":\"Basic\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/framborg/providers/Microsoft.EventHub/namespaces/frambons\",\"name\":\"frambons\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastasia\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:frambons\",\"serviceBusEndpoint\":\"https://frambons.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-09-27T16:07:10.8613435Z\",\"updatedAt\":\"2023-09-27T16:18:04.9032879Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.EventHub/namespaces/davadhani-7151\",\"name\":\"davadhani-7151\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastasia\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:davadhani-7151\",\"serviceBusEndpoint\":\"https://davadhani-7151.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.EventHub/clusters/davadhani-cluster54\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-12-06T10:46:32.4006264Z\",\"updatedAt\":\"2023-12-06T10:48:30.8261568Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.EventHub/namespaces/ali-ea-secondary\",\"name\":\"ali-ea-secondary\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastasia\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ali-ea-secondary\",\"serviceBusEndpoint\":\"https://ali-ea-secondary.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.EventHub/clusters/davadhani-cluster54\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-02-09T23:48:15.0443616Z\",\"updatedAt\":\"2024-02-10T00:31:22.8521215Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EastAsia/providers/Microsoft.EventHub/namespaces/sj-hk2-507\",\"name\":\"sj-hk2-507\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastasia\",\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sj-hk2-507\",\"serviceBusEndpoint\":\"https://sj-hk2-507.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-03T21:24:21.0153467Z\",\"updatedAt\":\"2024-03-26T19:20:50.9028726Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestw2ypj0/providers/Microsoft.EventHub/namespaces/namespaceV2wg7t0u\",\"name\":\"namespaceV2wg7t0u\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev2wg7t0u\",\"serviceBusEndpoint\":\"https://namespaceV2wg7t0u.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":13,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-11-02T15:44:09.383899Z\",\"updatedAt\":\"2024-02-16T01:10:55.4874049Z\"},\"identity\":{\"principalId\":\"87cd899a-5f58-473b-a8bc-49eb6c99541a\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorest38b0od/providers/Microsoft.EventHub/namespaces/namespaceV9or7gev\",\"name\":\"namespaceV9or7gev\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key4\",\"keyVaultUri\":\"https://keyvault-rg1.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key5\",\"keyVaultUri\":\"https://keyvault-rg1.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev9or7gev\",\"serviceBusEndpoint\":\"https://namespaceV9or7gev.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-11-04T06:22:24.4313194Z\",\"updatedAt\":\"2024-02-26T22:02:06.964828Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorest38b0od/providers/Microsoft.EventHub/namespaces/namespaceV46nzd8g\",\"name\":\"namespaceV46nzd8g\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev46nzd8g\",\"serviceBusEndpoint\":\"https://namespaceV46nzd8g.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-11-04T05:50:34.5313073Z\",\"updatedAt\":\"2024-02-16T01:11:00.5501871Z\"},\"identity\":{\"principalId\":\"9712a02f-0481-439b-87a2-69a017752738\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestlgcb3i/providers/Microsoft.EventHub/namespaces/namespaceName6jew2x\",\"name\":\"namespaceName6jew2x\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacename6jew2x\",\"serviceBusEndpoint\":\"https://namespaceName6jew2x.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-02-10T17:22:57.0698913Z\",\"updatedAt\":\"2024-02-16T01:27:22.8129171Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/kindrasiri_eh_benchmark/providers/Microsoft.EventHub/namespaces/sdfsfddsfds\",\"name\":\"sdfsfddsfds\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdfsfddsfds\",\"serviceBusEndpoint\":\"https://sdfsfddsfds.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-05-01T23:40:32.5415089Z\",\"updatedAt\":\"2023-05-01T23:41:24.0933167Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/useridentities/providers/Microsoft.EventHub/namespaces/icm-testing\",\"name\":\"icm-testing\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:icm-testing\",\"serviceBusEndpoint\":\"https://icm-testing.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-29T12:37:34.1630418Z\",\"updatedAt\":\"2022-07-01T21:55:38.9655308Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/PPGTest/providers/Microsoft.EventHub/namespaces/TestNEWEH1011\",\"name\":\"TestNEWEH1011\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testneweh1011\",\"serviceBusEndpoint\":\"https://TestNEWEH1011.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-10-11T20:15:43.4881225Z\",\"updatedAt\":\"2023-10-11T20:16:37.3530829Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-by3-533-rg/providers/Microsoft.EventHub/namespaces/zztestprimary\",\"name\":\"zztestprimary\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:zztestprimary\",\"serviceBusEndpoint\":\"https://zztestprimary.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-30T02:58:46.5028864Z\",\"updatedAt\":\"2024-02-16T01:29:24.2897295Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/testehgeodr2/providers/Microsoft.EventHub/namespaces/testehgeodrprimaryns1\",\"name\":\"testehgeodrprimaryns1\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testehgeodrprimaryns1\",\"serviceBusEndpoint\":\"https://testehgeodrprimaryns1.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":20,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-30T01:21:32.9891564Z\",\"updatedAt\":\"2024-02-16T01:30:24.752731Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":4}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestqjtlai/providers/Microsoft.EventHub/namespaces/namespaceV4djmtpk\",\"name\":\"namespaceV4djmtpk\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4djmtpk\",\"serviceBusEndpoint\":\"https://namespaceV4djmtpk.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-11-04T04:57:37.9802434Z\",\"updatedAt\":\"2024-02-16T01:10:59.8471395Z\"},\"identity\":{\"principalId\":\"7e5b96ec-b047-428c-b3f3-9f7b703d4b8c\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cleanupservice/providers/Microsoft.EventHub/namespaces/TestEHNSSDK0108\",\"name\":\"TestEHNSSDK0108\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"TestKey0407\",\"keyVaultUri\":\"https://testkvnew0407.vault.azure.net\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/PPGTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/TestUAI0412New\"}}],\"requireInfrastructureEncryption\":true},\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testehnssdk0108\",\"serviceBusEndpoint\":\"https://TestEHNSSDK0108.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-01-09T00:28:47.8852902Z\",\"updatedAt\":\"2024-04-03T20:55:10.1999389Z\"},\"identity\":{\"principalId\":\"bf57e6f9-7af4-44eb-8489-de5a76340e46\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned, UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/PPGTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/TestUAI0412New\":{\"clientId\":\"ec83a3e2-bd7b-4e77-bde9-76ec42eb1d6a\",\"principalId\":\"2496443e-0c52-4245-84fb-6ee677269b16\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestl6scpx/providers/Microsoft.EventHub/namespaces/namespaceNamez7nmyt\",\"name\":\"namespaceNamez7nmyt\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamez7nmyt\",\"serviceBusEndpoint\":\"https://namespaceNamez7nmyt.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-01-30T18:05:41.4796521Z\",\"updatedAt\":\"2024-02-16T01:29:24.258476Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/spfabricehubrg0408/providers/Microsoft.EventHub/namespaces/spfabricehubns0408\",\"name\":\"spfabricehubns0408\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:spfabricehubns0408\",\"serviceBusEndpoint\":\"https://spfabricehubns0408.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-08T17:03:13.8189156Z\",\"updatedAt\":\"2024-04-08T17:03:43.9449989Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EH-LargeMessagePrivatePreview/providers/Microsoft.EventHub/namespaces/InternalEHTeamTestNS\",\"name\":\"InternalEHTeamTestNS\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:internalehteamtestns\",\"serviceBusEndpoint\":\"https://InternalEHTeamTestNS.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EH-LargeMessagePrivatePreview/providers/Microsoft.EventHub/clusters/InternalLMSCluster-PriPreview\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-01-03T16:26:39.7235268Z\",\"updatedAt\":\"2024-01-03T16:27:32.5108392Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EH-LargeMessagePrivatePreview/providers/Microsoft.EventHub/namespaces/LogicApps-LargeMessageNS\",\"name\":\"LogicApps-LargeMessageNS\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:logicapps-largemessagens\",\"serviceBusEndpoint\":\"https://LogicApps-LargeMessageNS.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EH-LargeMessagePrivatePreview/providers/Microsoft.EventHub/clusters/InternalLMSCluster-PriPreview\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-08-02T05:45:11.8063541Z\",\"updatedAt\":\"2023-08-02T05:46:04.8138897Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestftog8r/providers/Microsoft.EventHub/namespaces/namespaceNamehdauwy\",\"name\":\"namespaceNamehdauwy\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamehdauwy\",\"serviceBusEndpoint\":\"https://namespaceNamehdauwy.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-04-25T08:31:02.554708Z\",\"updatedAt\":\"2024-02-16T01:27:23.078546Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestulr4o3/providers/Microsoft.EventHub/namespaces/namespaceName8ptdu9\",\"name\":\"namespaceName8ptdu9\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacename8ptdu9\",\"serviceBusEndpoint\":\"https://namespaceName8ptdu9.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-04-17T09:41:41.5120054Z\",\"updatedAt\":\"2024-02-16T01:27:23.078546Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestrwp68j/providers/Microsoft.EventHub/namespaces/namespaceV4frcji7\",\"name\":\"namespaceV4frcji7\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4frcji7\",\"serviceBusEndpoint\":\"https://namespaceV4frcji7.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-11-04T07:47:36.4957509Z\",\"updatedAt\":\"2024-02-16T01:11:01.2700549Z\"},\"identity\":{\"principalId\":\"85d25910-713f-4cdd-8939-dcd15816e916\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestrwp68j/providers/Microsoft.EventHub/namespaces/namespaceV9zvdfun\",\"name\":\"namespaceV9zvdfun\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key4\",\"keyVaultUri\":\"https://keyvault-rg1.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key5\",\"keyVaultUri\":\"https://keyvault-rg1.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev9zvdfun\",\"serviceBusEndpoint\":\"https://namespaceV9zvdfun.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-11-04T08:19:25.2907925Z\",\"updatedAt\":\"2024-02-26T22:03:49.7877802Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/assures-kafka/providers/Microsoft.EventHub/namespaces/ehpartitiontrialcount\",\"name\":\"ehpartitiontrialcount\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ehpartitiontrialcount\",\"serviceBusEndpoint\":\"https://ehpartitiontrialcount.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-24T22:13:23.215792Z\",\"updatedAt\":\"2022-07-01T16:47:22.9776832Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestkf7w1n/providers/Microsoft.EventHub/namespaces/namespaceNamekwrebh\",\"name\":\"namespaceNamekwrebh\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamekwrebh\",\"serviceBusEndpoint\":\"https://namespaceNamekwrebh.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-11-22T14:29:57.7268807Z\",\"updatedAt\":\"2022-11-22T14:31:18.8511402Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EASTUS2EUAP/providers/Microsoft.EventHub/namespaces/pairgeoaskvmssmig\",\"name\":\"pairgeoaskvmssmig\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:pairgeoaskvmssmig\",\"serviceBusEndpoint\":\"https://pairgeoaskvmssmig.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-30T04:33:42.7622294Z\",\"updatedAt\":\"2022-07-02T04:50:06.8830174Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestkf7w1n/providers/Microsoft.EventHub/namespaces/namespaceNamem2bylx\",\"name\":\"namespaceNamem2bylx\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamem2bylx\",\"serviceBusEndpoint\":\"https://namespaceNamem2bylx.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-11-22T14:37:20.1038243Z\",\"updatedAt\":\"2024-02-16T01:28:23.7255974Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/kindrasiri_eh_benchmark/providers/Microsoft.EventHub/namespaces/contoso-premium\",\"name\":\"contoso-premium\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:contoso-premium\",\"serviceBusEndpoint\":\"https://contoso-premium.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-12-12T23:08:25.4699999Z\",\"updatedAt\":\"2022-12-12T23:12:23.4498105Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/kindrasiri_eh_benchmark/providers/Microsoft.EventHub/namespaces/kindrasiri-contoso-std\",\"name\":\"kindrasiri-contoso-std\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:kindrasiri-contoso-std\",\"serviceBusEndpoint\":\"https://kindrasiri-contoso-std.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-07-26T15:01:28.6279236Z\",\"updatedAt\":\"2022-11-07T18:13:24.8104765Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/shubha-test/providers/Microsoft.EventHub/namespaces/namespace912\",\"name\":\"namespace912\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespace912\",\"serviceBusEndpoint\":\"https://namespace912.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-06-26T15:55:50.5465823Z\",\"updatedAt\":\"2024-02-16T01:10:56.0030364Z\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/shubha-test/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity61\":{\"clientId\":\"d43f658d-6d39-44bf-8e61-86a7523422ac\",\"principalId\":\"48253a37-ae9e-4eb5-9ad4-6a32e256f584\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestze2j9o/providers/Microsoft.EventHub/namespaces/namespaceNamexpkujs\",\"name\":\"namespaceNamexpkujs\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamexpkujs\",\"serviceBusEndpoint\":\"https://namespaceNamexpkujs.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-01-23T18:20:39.3660993Z\",\"updatedAt\":\"2024-02-16T01:28:23.7255974Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestgch0kr/providers/Microsoft.EventHub/namespaces/namespaceV7gsvqb0\",\"name\":\"namespaceV7gsvqb0\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev7gsvqb0\",\"serviceBusEndpoint\":\"https://namespaceV7gsvqb0.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-11-04T08:43:49.4234588Z\",\"updatedAt\":\"2024-02-16T01:10:55.5499069Z\"},\"identity\":{\"principalId\":\"40b29a03-2f32-4286-9581-0b783018113b\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":2}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EastUS/providers/Microsoft.EventHub/namespaces/eventhubnamespacepartitioncount\",\"name\":\"eventhubnamespacepartitioncount\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:eventhubnamespacepartitioncount\",\"serviceBusEndpoint\":\"https://eventhubnamespacepartitioncount.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EastUS/providers/Microsoft.EventHub/clusters/BL3-533\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-29T12:35:34.4233107Z\",\"updatedAt\":\"2022-07-01T21:53:03.2793572Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestkf7w1n/providers/Microsoft.EventHub/namespaces/namespaceNamexwh058\",\"name\":\"namespaceNamexwh058\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamexwh058\",\"serviceBusEndpoint\":\"https://namespaceNamexwh058.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-11-22T14:29:57.89876Z\",\"updatedAt\":\"2024-02-16T01:10:53.9248895Z\"},\"identity\":{\"principalId\":\"11fac087-12f8-4492-b4de-076929694d3b\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/shubhatestrg/providers/Microsoft.EventHub/namespaces/tesgeotus\",\"name\":\"tesgeotus\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:tesgeotus\",\"serviceBusEndpoint\":\"https://tesgeotus.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":20,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-24T22:10:14.0845059Z\",\"updatedAt\":\"2024-02-16T01:29:24.3678533Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":7}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestbug61t/providers/Microsoft.EventHub/namespaces/namespaceNamesrzbco\",\"name\":\"namespaceNamesrzbco\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamesrzbco\",\"serviceBusEndpoint\":\"https://namespaceNamesrzbco.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-09-09T11:05:24.5530044Z\",\"updatedAt\":\"2024-02-16T01:28:23.6162196Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/vnet-test/providers/Microsoft.EventHub/namespaces/test-vnet-n1\",\"name\":\"test-vnet-n1\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:test-vnet-n1\",\"serviceBusEndpoint\":\"https://test-vnet-n1.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-06-29T16:33:44.3750173Z\",\"updatedAt\":\"2023-07-05T14:10:41.7441501Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/framborg/providers/Microsoft.EventHub/namespaces/test-disk-scaleup-ns\",\"name\":\"test-disk-scaleup-ns\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:test-disk-scaleup-ns\",\"serviceBusEndpoint\":\"https://test-disk-scaleup-ns.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/framborg/providers/Microsoft.EventHub/clusters/test-disk-scaleup\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-10-24T16:16:34.4841374Z\",\"updatedAt\":\"2023-10-24T16:17:27.0559016Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EastUS/providers/Microsoft.EventHub/namespaces/ParallelTest015\",\"name\":\"ParallelTest015\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:paralleltest015\",\"serviceBusEndpoint\":\"https://ParallelTest015.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-03-15T19:27:21.6880195Z\",\"updatedAt\":\"2023-03-15T19:28:09.1859758Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/manojprasad-rampup/providers/Microsoft.EventHub/namespaces/eventhub-mp-dr\",\"name\":\"eventhub-mp-dr\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{\"Offload\":\"Yes\"},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:eventhub-mp-dr\",\"serviceBusEndpoint\":\"https://eventhub-mp-dr.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":10,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-29T12:38:20.4345706Z\",\"updatedAt\":\"2023-12-05T10:19:18.3076347Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorest2wzidh/providers/Microsoft.EventHub/namespaces/namespaceNamehcws34\",\"name\":\"namespaceNamehcws34\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamehcws34\",\"serviceBusEndpoint\":\"https://namespaceNamehcws34.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-02-21T09:55:51.6081678Z\",\"updatedAt\":\"2024-04-17T17:19:03.6600251Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/sakoppes_test/providers/Microsoft.EventHub/namespaces/SamKoppesTestEHNamespace1\",\"name\":\"SamKoppesTestEHNamespace1\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:samkoppestestehnamespace1\",\"serviceBusEndpoint\":\"https://SamKoppesTestEHNamespace1.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-30T01:21:26.7368381Z\",\"updatedAt\":\"2022-07-02T01:21:02.1090898Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestyw30va/providers/Microsoft.EventHub/namespaces/namespaceNamedpfi8q\",\"name\":\"namespaceNamedpfi8q\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamedpfi8q\",\"serviceBusEndpoint\":\"https://namespaceNamedpfi8q.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-09-08T07:15:05.1487418Z\",\"updatedAt\":\"2024-02-16T01:28:23.6005921Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EastUS/providers/Microsoft.EventHub/namespaces/sjpremiumblvaz704\",\"name\":\"sjpremiumblvaz704\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sjpremiumblvaz704\",\"serviceBusEndpoint\":\"https://sjpremiumblvaz704.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-07-06T17:30:53.1916492Z\",\"updatedAt\":\"2022-09-26T16:21:37.0362717Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/jakeschiller-synthetics/providers/Microsoft.EventHub/namespaces/lindaparalleltesting02\",\"name\":\"lindaparalleltesting02\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:lindaparalleltesting02\",\"serviceBusEndpoint\":\"https://lindaparalleltesting02.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-02-17T19:26:44.8611901Z\",\"updatedAt\":\"2023-02-17T19:27:32.5901792Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestli7ta1/providers/Microsoft.EventHub/namespaces/namespaceNamenr30io\",\"name\":\"namespaceNamenr30io\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamenr30io\",\"serviceBusEndpoint\":\"https://namespaceNamenr30io.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-09-07T17:02:00.238233Z\",\"updatedAt\":\"2024-02-16T01:28:23.6005921Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/kindrasiri_eh_benchmark/providers/Microsoft.EventHub/namespaces/ehpremium2\",\"name\":\"ehpremium2\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ehpremium2\",\"serviceBusEndpoint\":\"https://ehpremium2.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-30T03:01:11.2974681Z\",\"updatedAt\":\"2024-02-16T01:10:55.6436581Z\"},\"identity\":{\"principalId\":\"1314977c-56f4-45b5-91d6-4bfe151adf0f\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned, UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/kindrasiri-eh-demo/providers/Microsoft.ManagedIdentity/userAssignedIdentities/kindrasiri-uami\":{\"clientId\":\"699fa864-9108-4b5c-b11a-1d331a870c28\",\"principalId\":\"b0f65d56-6435-4f1f-9735-44ef79459714\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoreste0vl7h/providers/Microsoft.EventHub/namespaces/namespaceV4atz02c\",\"name\":\"namespaceV4atz02c\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4atz02c\",\"serviceBusEndpoint\":\"https://namespaceV4atz02c.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-11-04T04:33:49.5241032Z\",\"updatedAt\":\"2024-02-16T01:10:59.800178Z\"},\"identity\":{\"principalId\":\"e56110f2-6e04-4065-b237-4b53fcfb0b2d\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorest9apzfj/providers/Microsoft.EventHub/namespaces/namespaceV43me5rs\",\"name\":\"namespaceV43me5rs\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev43me5rs\",\"serviceBusEndpoint\":\"https://namespaceV43me5rs.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-11-04T07:17:14.729231Z\",\"updatedAt\":\"2024-02-16T01:11:01.2232487Z\"},\"identity\":{\"principalId\":\"750a785e-fe7b-44ee-8d11-26dcf6f0dfd8\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/jakeschiller-synthetics/providers/Microsoft.EventHub/namespaces/synthetics-ns\",\"name\":\"synthetics-ns\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{\"jms-for\":\"cache\"},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:synthetics-ns\",\"serviceBusEndpoint\":\"https://synthetics-ns.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-30T04:37:56.2913557Z\",\"updatedAt\":\"2022-07-08T18:29:09.8549413Z\"},\"sku\":{\"name\":\"Basic\",\"tier\":\"Basic\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestqjtlai/providers/Microsoft.EventHub/namespaces/namespaceV7mvbjzp\",\"name\":\"namespaceV7mvbjzp\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev7mvbjzp\",\"serviceBusEndpoint\":\"https://namespaceV7mvbjzp.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-11-04T05:22:01.2130847Z\",\"updatedAt\":\"2024-02-16T01:10:59.8626816Z\"},\"identity\":{\"principalId\":\"4d809bff-a71d-446b-951e-377e81c14f75\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":2}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestqjtlai/providers/Microsoft.EventHub/namespaces/namespaceV8s5eqka\",\"name\":\"namespaceV8s5eqka\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev8s5eqka\",\"serviceBusEndpoint\":\"https://namespaceV8s5eqka.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":13,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-11-04T05:24:44.7681832Z\",\"updatedAt\":\"2022-11-04T05:29:06.6355308Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EH-LargeMessagePrivatePreview/providers/Microsoft.EventHub/namespaces/ADX-LargeMessageNS\",\"name\":\"ADX-LargeMessageNS\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:adx-largemessagens\",\"serviceBusEndpoint\":\"https://ADX-LargeMessageNS.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EH-LargeMessagePrivatePreview/providers/Microsoft.EventHub/clusters/InternalLMSCluster-PriPreview\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-08-02T05:44:51.9623318Z\",\"updatedAt\":\"2023-08-02T05:45:43.2011316Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/pablorod_eastus2euap/providers/Microsoft.EventHub/namespaces/lastTest\",\"name\":\"lastTest\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:lasttest\",\"serviceBusEndpoint\":\"https://lastTest.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-05-02T21:28:34.4744033Z\",\"updatedAt\":\"2023-05-23T17:55:56.7076292Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EH-LargeMessagePrivatePreview/providers/Microsoft.EventHub/namespaces/test-lms-partners-ns\",\"name\":\"test-lms-partners-ns\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:test-lms-partners-ns\",\"serviceBusEndpoint\":\"https://test-lms-partners-ns.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EH-LargeMessagePrivatePreview/providers/Microsoft.EventHub/clusters/InternalLMSCluster-PriPreview\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-07-24T12:52:01.2954584Z\",\"updatedAt\":\"2023-07-24T12:52:53.4588813Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/pablorod_new/providers/Microsoft.EventHub/namespaces/pablorod-eventhub-v2\",\"name\":\"pablorod-eventhub-v2\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:pablorod-eventhub-v2\",\"serviceBusEndpoint\":\"https://pablorod-eventhub-v2.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-12-22T12:59:46.597442Z\",\"updatedAt\":\"2024-02-16T01:28:23.7255974Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestk3bhao/providers/Microsoft.EventHub/namespaces/namespaceNameomfq2x\",\"name\":\"namespaceNameomfq2x\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenameomfq2x\",\"serviceBusEndpoint\":\"https://namespaceNameomfq2x.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-09-11T16:37:55.3247562Z\",\"updatedAt\":\"2024-02-16T01:28:23.6162196Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoreste0vl7h/providers/Microsoft.EventHub/namespaces/namespaceV2kshe9q\",\"name\":\"namespaceV2kshe9q\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev2kshe9q\",\"serviceBusEndpoint\":\"https://namespaceV2kshe9q.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-11-04T04:31:42.2405851Z\",\"updatedAt\":\"2022-11-04T04:44:42.5978009Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/RGName1-2585/providers/Microsoft.EventHub/namespaces/Eh-NamespaceKafka-1116\",\"name\":\"Eh-NamespaceKafka-1116\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:eh-namespacekafka-1116\",\"serviceBusEndpoint\":\"https://Eh-NamespaceKafka-1116.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-30T04:34:02.6535691Z\",\"updatedAt\":\"2022-07-02T04:50:06.711151Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestgch0kr/providers/Microsoft.EventHub/namespaces/namespaceV9ltg9hu\",\"name\":\"namespaceV9ltg9hu\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key4\",\"keyVaultUri\":\"https://keyvault-rg1.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key5\",\"keyVaultUri\":\"https://keyvault-rg1.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key6\",\"keyVaultUri\":\"https://keyvault-rg1.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev9ltg9hu\",\"serviceBusEndpoint\":\"https://namespaceV9ltg9hu.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-11-04T08:51:26.869775Z\",\"updatedAt\":\"2024-02-26T22:01:39.2768795Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EastUS/providers/Microsoft.EventHub/namespaces/al-test-ns\",\"name\":\"al-test-ns\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:al-test-ns\",\"serviceBusEndpoint\":\"https://al-test-ns.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EastUS/providers/Microsoft.EventHub/clusters/BL3-533\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-01-23T23:07:46.8062236Z\",\"updatedAt\":\"2023-06-28T00:09:54.4231196Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName8avljz\",\"name\":\"namespaceName8avljz\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacename8avljz\",\"serviceBusEndpoint\":\"https://namespaceName8avljz.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:36:42.1697023Z\",\"updatedAt\":\"2024-04-29T12:40:07.9626719Z\"},\"identity\":{\"principalId\":\"95bc1d16-654f-4c7a-b29d-01094b522d1a\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/RGName1-2585/providers/Microsoft.EventHub/namespaces/Eventhub-Namespace1-9386\",\"name\":\"Eventhub-Namespace1-9386\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:eventhub-namespace1-9386\",\"serviceBusEndpoint\":\"https://Eventhub-Namespace1-9386.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":10,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-30T04:37:32.2357082Z\",\"updatedAt\":\"2022-07-02T04:54:06.7389707Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.EventHub/namespaces/davadhani-7152\",\"name\":\"davadhani-7152\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:davadhani-7152\",\"serviceBusEndpoint\":\"https://davadhani-7152.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-03-14T09:49:52.7778896Z\",\"updatedAt\":\"2024-03-14T09:50:17.3597949Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestn6v9a8/providers/Microsoft.EventHub/namespaces/namespaceV29jgb40\",\"name\":\"namespaceV29jgb40\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev29jgb40\",\"serviceBusEndpoint\":\"https://namespaceV29jgb40.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-11-04T06:45:42.078648Z\",\"updatedAt\":\"2023-12-05T10:00:02.3282007Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestvj6k4w/providers/Microsoft.EventHub/namespaces/namespaceNamee69ld2\",\"name\":\"namespaceNamee69ld2\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamee69ld2\",\"serviceBusEndpoint\":\"https://namespaceNamee69ld2.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-11-16T09:00:31.1537828Z\",\"updatedAt\":\"2024-02-16T01:28:23.7255974Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t\",\"name\":\"namespaceNameil6w7t\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenameil6w7t\",\"serviceBusEndpoint\":\"https://namespaceNameil6w7t.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:36:41.1305159Z\",\"updatedAt\":\"2024-04-29T12:37:09.083082Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorest5oibwu/providers/Microsoft.EventHub/namespaces/namespaceNamejzobdw\",\"name\":\"namespaceNamejzobdw\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamejzobdw\",\"serviceBusEndpoint\":\"https://namespaceNamejzobdw.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-04-17T05:41:20.1199575Z\",\"updatedAt\":\"2024-02-16T01:27:23.078546Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/RGName1-6612/providers/Microsoft.EventHub/namespaces/Eh-NamespaceKafka-790\",\"name\":\"Eh-NamespaceKafka-790\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:eh-namespacekafka-790\",\"serviceBusEndpoint\":\"https://Eh-NamespaceKafka-790.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-29T12:36:18.470756Z\",\"updatedAt\":\"2022-07-01T21:54:17.34648Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/mmrg6755/providers/Microsoft.EventHub/namespaces/myehkafkasource5061\",\"name\":\"myehkafkasource5061\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:myehkafkasource5061\",\"serviceBusEndpoint\":\"https://myehkafkasource5061.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-29T12:35:31.0952115Z\",\"updatedAt\":\"2022-07-01T21:53:00.7784793Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestlw6caz/providers/Microsoft.EventHub/namespaces/namespaceName3l7n26\",\"name\":\"namespaceName3l7n26\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacename3l7n26\",\"serviceBusEndpoint\":\"https://namespaceName3l7n26.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-02-13T08:11:53.4511915Z\",\"updatedAt\":\"2024-02-16T01:27:22.8285412Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EHResourceGr1/providers/Microsoft.EventHub/namespaces/kasuneventhubs\",\"name\":\"kasuneventhubs\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:kasuneventhubs\",\"serviceBusEndpoint\":\"https://kasuneventhubs.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-24T22:11:36.7079908Z\",\"updatedAt\":\"2022-07-01T16:46:37.960043Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorest38b0od/providers/Microsoft.EventHub/namespaces/namespaceV76oidb8\",\"name\":\"namespaceV76oidb8\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev76oidb8\",\"serviceBusEndpoint\":\"https://namespaceV76oidb8.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-11-04T06:14:51.4720177Z\",\"updatedAt\":\"2024-02-16T01:11:00.5658115Z\"},\"identity\":{\"principalId\":\"f7496860-9ffc-4b9e-adec-bc1bfa2591e0\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":2}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestyqxw9p/providers/Microsoft.EventHub/namespaces/namespaceNameweh0kg\",\"name\":\"namespaceNameweh0kg\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenameweh0kg\",\"serviceBusEndpoint\":\"https://namespaceNameweh0kg.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-04-25T08:05:17.807611Z\",\"updatedAt\":\"2024-02-16T01:27:23.078546Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/jakeschiller-synthetics/providers/Microsoft.EventHub/namespaces/LindaParallelTesting01\",\"name\":\"LindaParallelTesting01\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:lindaparalleltesting01\",\"serviceBusEndpoint\":\"https://LindaParallelTesting01.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-02-17T19:24:31.7974486Z\",\"updatedAt\":\"2023-02-17T19:25:19.3403755Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/rgDataMigration1114/providers/Microsoft.EventHub/namespaces/spehubns11143\",\"name\":\"spehubns11143\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:spehubns11143\",\"serviceBusEndpoint\":\"https://spehubns11143.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":7,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-11-14T19:40:12.273956Z\",\"updatedAt\":\"2023-12-05T10:30:03.8647211Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestrwp68j/providers/Microsoft.EventHub/namespaces/namespaceV8s6tm2x\",\"name\":\"namespaceV8s6tm2x\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev8s6tm2x\",\"serviceBusEndpoint\":\"https://namespaceV8s6tm2x.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":13,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-11-04T08:14:35.8350701Z\",\"updatedAt\":\"2022-11-04T08:18:56.734764Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/framborg/providers/Microsoft.EventHub/namespaces/vmupdatetestforai\",\"name\":\"vmupdatetestforai\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:vmupdatetestforai\",\"serviceBusEndpoint\":\"https://vmupdatetestforai.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/framborg/providers/Microsoft.EventHub/clusters/test-disk-scaleup-2\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-10-26T01:45:57.4979349Z\",\"updatedAt\":\"2023-10-26T01:46:52.4895564Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EH-LargeMessagePrivatePreview/providers/Microsoft.EventHub/namespaces/ASA-LargeMessageNS\",\"name\":\"ASA-LargeMessageNS\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:asa-largemessagens\",\"serviceBusEndpoint\":\"https://ASA-LargeMessageNS.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EH-LargeMessagePrivatePreview/providers/Microsoft.EventHub/clusters/InternalLMSCluster-PriPreview\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-08-02T05:44:56.2905659Z\",\"updatedAt\":\"2023-08-02T05:45:47.5763389Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestqjtlai/providers/Microsoft.EventHub/namespaces/namespaceV9yfjvgm\",\"name\":\"namespaceV9yfjvgm\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key4\",\"keyVaultUri\":\"https://keyvault-rg1.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key5\",\"keyVaultUri\":\"https://keyvault-rg1.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev9yfjvgm\",\"serviceBusEndpoint\":\"https://namespaceV9yfjvgm.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-11-04T05:29:36.0975276Z\",\"updatedAt\":\"2024-02-26T22:02:30.0004621Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestih6qdc/providers/Microsoft.EventHub/namespaces/namespaceNametaxuo9\",\"name\":\"namespaceNametaxuo9\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenametaxuo9\",\"serviceBusEndpoint\":\"https://namespaceNametaxuo9.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-04-25T08:54:22.1372939Z\",\"updatedAt\":\"2024-02-16T01:27:23.078546Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/PS-Testing/providers/Microsoft.EventHub/namespaces/Namespace1-8436\",\"name\":\"Namespace1-8436\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespace1-8436\",\"serviceBusEndpoint\":\"https://Namespace1-8436.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-09-18T14:10:38.9206707Z\",\"updatedAt\":\"2022-09-18T14:17:06.9094453Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w\",\"name\":\"namespaceNameeqpx5w\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenameeqpx5w\",\"serviceBusEndpoint\":\"https://namespaceNameeqpx5w.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:36:41.1774488Z\",\"updatedAt\":\"2024-04-29T12:37:29.3508153Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorest1h85cp/providers/Microsoft.EventHub/namespaces/namespaceNamebxrna9\",\"name\":\"namespaceNamebxrna9\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamebxrna9\",\"serviceBusEndpoint\":\"https://namespaceNamebxrna9.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-04-25T07:42:48.1121214Z\",\"updatedAt\":\"2024-04-17T17:15:59.3167905Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestn6v9a8/providers/Microsoft.EventHub/namespaces/namespaceV44fxoqc\",\"name\":\"namespaceV44fxoqc\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev44fxoqc\",\"serviceBusEndpoint\":\"https://namespaceV44fxoqc.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-11-04T06:47:49.8012592Z\",\"updatedAt\":\"2024-02-16T01:11:00.6439393Z\"},\"identity\":{\"principalId\":\"708ffa00-c768-4392-b5cc-6e82ecdbf758\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/jakeschiller-synthetics/providers/Microsoft.EventHub/namespaces/lindaparalleltesting03\",\"name\":\"lindaparalleltesting03\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:lindaparalleltesting03\",\"serviceBusEndpoint\":\"https://lindaparalleltesting03.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-02-17T19:27:08.2699137Z\",\"updatedAt\":\"2023-02-17T19:27:56.6461554Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresttwplox/providers/Microsoft.EventHub/namespaces/namespaceNamejwk3q0\",\"name\":\"namespaceNamejwk3q0\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamejwk3q0\",\"serviceBusEndpoint\":\"https://namespaceNamejwk3q0.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-02-15T10:47:48.2672033Z\",\"updatedAt\":\"2024-02-16T01:27:22.8129171Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/pablorod_new/providers/Microsoft.EventHub/namespaces/upsellTest\",\"name\":\"upsellTest\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:upselltest\",\"serviceBusEndpoint\":\"https://upsellTest.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-04-13T15:11:31.4384217Z\",\"updatedAt\":\"2023-05-20T00:03:51.3383409Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/RGName1-6612/providers/Microsoft.EventHub/namespaces/Eventhub-Namespace1-6356\",\"name\":\"Eventhub-Namespace1-6356\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:eventhub-namespace1-6356\",\"serviceBusEndpoint\":\"https://Eventhub-Namespace1-6356.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":10,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-28T19:39:17.3155348Z\",\"updatedAt\":\"2022-07-01T20:12:18.6180518Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/RGName1-8/providers/Microsoft.EventHub/namespaces/test-cluster-eh\",\"name\":\"test-cluster-eh\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:test-cluster-eh\",\"serviceBusEndpoint\":\"https://test-cluster-eh.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":8,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-29T23:49:02.1570241Z\",\"updatedAt\":\"2022-07-01T23:41:24.759384Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/spehubrg/providers/Microsoft.EventHub/namespaces/spehubns0427\",\"name\":\"spehubns0427\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:spehubns0427\",\"serviceBusEndpoint\":\"https://spehubns0427.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-27T21:01:08.4381933Z\",\"updatedAt\":\"2024-04-27T21:01:40.2737221Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorest38b0od/providers/Microsoft.EventHub/namespaces/namespaceV8974rqx\",\"name\":\"namespaceV8974rqx\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev8974rqx\",\"serviceBusEndpoint\":\"https://namespaceV8974rqx.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":13,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-11-04T06:17:33.5922549Z\",\"updatedAt\":\"2022-11-04T06:21:54.6968203Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/spehubrg/providers/Microsoft.EventHub/namespaces/spcotosoehubns0423\",\"name\":\"spcotosoehubns0423\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:spcotosoehubns0423\",\"serviceBusEndpoint\":\"https://spcotosoehubns0423.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-23T16:57:28.3292083Z\",\"updatedAt\":\"2024-04-23T16:58:00.939238Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestgch0kr/providers/Microsoft.EventHub/namespaces/namespaceV8h0957g\",\"name\":\"namespaceV8h0957g\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev8h0957g\",\"serviceBusEndpoint\":\"https://namespaceV8h0957g.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":13,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-11-04T08:46:32.1554134Z\",\"updatedAt\":\"2022-11-04T08:51:08.2317904Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.EventHub/namespaces/davadhani8772\",\"name\":\"davadhani8772\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:davadhani8772\",\"serviceBusEndpoint\":\"https://davadhani8772.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.EventHub/clusters/davadhani-7068\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-12-06T12:05:57.7432962Z\",\"updatedAt\":\"2023-12-06T12:07:18.1324316Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/pablorod_eastus2euap/providers/Microsoft.EventHub/namespaces/test3456\",\"name\":\"test3456\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:test3456\",\"serviceBusEndpoint\":\"https://test3456.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-05-01T16:17:59.5873664Z\",\"updatedAt\":\"2023-05-19T16:06:16.2190712Z\"},\"sku\":{\"name\":\"Basic\",\"tier\":\"Basic\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestrwp68j/providers/Microsoft.EventHub/namespaces/namespaceV7d6jbq4\",\"name\":\"namespaceV7d6jbq4\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev7d6jbq4\",\"serviceBusEndpoint\":\"https://namespaceV7d6jbq4.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-11-04T08:11:53.3595388Z\",\"updatedAt\":\"2024-02-16T01:11:01.3013499Z\"},\"identity\":{\"principalId\":\"207482f9-23ce-4cdd-a309-59f66b9b8dcf\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":2}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EastUS/providers/Microsoft.EventHub/namespaces/assures-autoinflateissue\",\"name\":\"assures-autoinflateissue\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:assures-autoinflateissue\",\"serviceBusEndpoint\":\"https://assures-autoinflateissue.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EastUS/providers/Microsoft.EventHub/clusters/BL3-533\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-30T04:32:33.7296385Z\",\"updatedAt\":\"2022-07-02T04:48:09.4766205Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/PS-Testing/providers/Microsoft.EventHub/namespaces/Namespace2-5939\",\"name\":\"Namespace2-5939\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://ps-test-kv1.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://ps-test-kv1.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespace2-5939\",\"serviceBusEndpoint\":\"https://Namespace2-5939.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-09-18T14:18:33.902169Z\",\"updatedAt\":\"2024-02-16T01:10:59.2689233Z\"},\"identity\":{\"principalId\":\"0479c9d3-3ead-47fe-b927-ea46bf1dc0d9\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/abhigarg-publicnetworkaccess-cbn/providers/Microsoft.EventHub/namespaces/abhigarg-ns-main-2024-03-13-alias\",\"name\":\"abhigarg-ns-main-2024-03-13-alias\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:abhigarg-ns-main-2024-03-13-alias\",\"serviceBusEndpoint\":\"https://abhigarg-ns-main-2024-03-13-alias.servicebus.windows.net:443/\",\"alternateName\":\"abhigarg-ns-main-2024-03-13-alt\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-03-13T18:37:34.0647238Z\",\"updatedAt\":\"2024-03-20T22:48:22.4669448Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/PS-Testing/providers/Microsoft.EventHub/namespaces/Namespace1-1230\",\"name\":\"Namespace1-1230\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespace1-1230\",\"serviceBusEndpoint\":\"https://Namespace1-1230.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-09-18T14:06:43.4923076Z\",\"updatedAt\":\"2024-02-16T01:10:59.2376736Z\"},\"identity\":{\"principalId\":\"b126f1d3-9177-4cdb-95ac-4f3ef3df2c70\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/saglodha-benchmarkingRG/providers/Microsoft.EventHub/namespaces/saglodha-Basic\",\"name\":\"saglodha-Basic\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:saglodha-basic\",\"serviceBusEndpoint\":\"https://saglodha-Basic.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-05-16T08:34:01.4694957Z\",\"updatedAt\":\"2023-05-16T08:34:53.3818133Z\"},\"sku\":{\"name\":\"Basic\",\"tier\":\"Basic\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorest9apzfj/providers/Microsoft.EventHub/namespaces/namespaceV2s8bi5k\",\"name\":\"namespaceV2s8bi5k\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev2s8bi5k\",\"serviceBusEndpoint\":\"https://namespaceV2s8bi5k.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-11-04T07:15:06.4617293Z\",\"updatedAt\":\"2022-11-04T07:15:55.7203384Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/pablorod_eastus2euap/providers/Microsoft.EventHub/namespaces/pablorodBuild\",\"name\":\"pablorodBuild\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:pablorodbuild\",\"serviceBusEndpoint\":\"https://pablorodBuild.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-05-22T18:05:23.3170065Z\",\"updatedAt\":\"2023-05-22T18:06:14.1146715Z\"},\"sku\":{\"name\":\"Basic\",\"tier\":\"Basic\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/spehubrg/providers/Microsoft.EventHub/namespaces/spehubpremns\",\"name\":\"spehubpremns\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:spehubpremns\",\"serviceBusEndpoint\":\"https://spehubpremns.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-24T22:10:15.2408014Z\",\"updatedAt\":\"2024-02-16T01:28:23.6943407Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EH-LargeMessagePrivatePreview/providers/Microsoft.EventHub/namespaces/FunctionApp-LargeMessageNS\",\"name\":\"FunctionApp-LargeMessageNS\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:functionapp-largemessagens\",\"serviceBusEndpoint\":\"https://FunctionApp-LargeMessageNS.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EH-LargeMessagePrivatePreview/providers/Microsoft.EventHub/clusters/InternalLMSCluster-PriPreview\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-08-02T05:45:40.83861Z\",\"updatedAt\":\"2023-08-02T05:46:34.7374214Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/useridentities/providers/Microsoft.EventHub/namespaces/icmtest-1\",\"name\":\"icmtest-1\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:icmtest-1\",\"serviceBusEndpoint\":\"https://icmtest-1.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-30T03:01:40.392276Z\",\"updatedAt\":\"2022-07-02T03:07:16.409788Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/JG-EH-Test-RG/providers/Microsoft.EventHub/namespaces/JG-SecondaryNameSpace-Test\",\"name\":\"JG-SecondaryNameSpace-Test\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:jg-secondarynamespace-test\",\"serviceBusEndpoint\":\"https://JG-SecondaryNameSpace-Test.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-30T03:02:55.853196Z\",\"updatedAt\":\"2024-02-16T01:28:23.6943407Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestg1sxfy/providers/Microsoft.EventHub/namespaces/namespaceNamebp1n40\",\"name\":\"namespaceNamebp1n40\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamebp1n40\",\"serviceBusEndpoint\":\"https://namespaceNamebp1n40.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-04-17T13:27:03.6023459Z\",\"updatedAt\":\"2024-02-16T01:27:23.078546Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/sharmavijay-la-verification/providers/Microsoft.EventHub/namespaces/prem-EH-la-testing\",\"name\":\"prem-EH-la-testing\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:prem-eh-la-testing\",\"serviceBusEndpoint\":\"https://prem-EH-la-testing.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-05-31T17:01:55.8780045Z\",\"updatedAt\":\"2023-05-31T17:03:10.4138289Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/kindrasiri_eh_benchmark/providers/Microsoft.EventHub/namespaces/aayushrestest\",\"name\":\"aayushrestest\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:aayushrestest\",\"serviceBusEndpoint\":\"https://aayushrestest.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-06-14T08:09:36.4792362Z\",\"updatedAt\":\"2023-06-14T08:13:23.5691887Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/test-yogeshg/providers/Microsoft.EventHub/namespaces/test-yogesh-su\",\"name\":\"test-yogesh-su\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:test-yogesh-su\",\"serviceBusEndpoint\":\"https://test-yogesh-su.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-12-11T01:55:48.9421594Z\",\"updatedAt\":\"2023-12-11T02:55:02.8329242Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":4}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/asrast/providers/Microsoft.EventHub/namespaces/ADX-EG-ashstorageadx\",\"name\":\"ADX-EG-ashstorageadx\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:adx-eg-ashstorageadx\",\"serviceBusEndpoint\":\"https://ADX-EG-ashstorageadx.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-04-04T23:55:04.046811Z\",\"updatedAt\":\"2023-04-04T23:55:51.1075011Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EastUS2/providers/Microsoft.EventHub/namespaces/vmss-migration-geodrnamespace-2\",\"name\":\"vmss-migration-geodrnamespace-2\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:vmss-migration-geodrnamespace-2\",\"serviceBusEndpoint\":\"https://vmss-migration-geodrnamespace-2.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EastUS2/providers/Microsoft.EventHub/clusters/BN3-565\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-05-09T01:04:00.6518116Z\",\"updatedAt\":\"2024-02-21T22:49:28.791787Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/assures-geodr-prod/providers/Microsoft.EventHub/namespaces/geodr-secondary-1\",\"name\":\"geodr-secondary-1\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:geodr-secondary-1\",\"serviceBusEndpoint\":\"https://geodr-secondary-1.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-18T03:26:34.8375237Z\",\"updatedAt\":\"2024-02-21T22:50:29.3554839Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/hmlam-tmp/providers/Microsoft.EventHub/namespaces/hmlam-test-sstd\",\"name\":\"hmlam-test-sstd\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:hmlam-test-sstd\",\"serviceBusEndpoint\":\"https://hmlam-test-sstd.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-03-16T18:02:53.4503026Z\",\"updatedAt\":\"2024-03-16T18:14:46.6887596Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/testeventhubRG-7639/providers/Microsoft.EventHub/namespaces/testnamespacemgmt6714\",\"name\":\"testnamespacemgmt6714\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testnamespacemgmt6714\",\"serviceBusEndpoint\":\"https://testnamespacemgmt6714.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-09-14T09:56:47.1727725Z\",\"updatedAt\":\"2024-02-02T05:51:35.0698717Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EastUS2/providers/Microsoft.EventHub/namespaces/hmlam-testns\",\"name\":\"hmlam-testns\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:hmlam-testns\",\"serviceBusEndpoint\":\"https://hmlam-testns.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EastUS2/providers/Microsoft.EventHub/clusters/BN3-565\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-11-14T02:58:08.9906136Z\",\"updatedAt\":\"2023-11-14T02:58:59.2819594Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/testeventhubRG-2009/providers/Microsoft.EventHub/namespaces/testnamespacemgmt3597\",\"name\":\"testnamespacemgmt3597\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testnamespacemgmt3597\",\"serviceBusEndpoint\":\"https://testnamespacemgmt3597.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-01-09T16:04:34.853918Z\",\"updatedAt\":\"2023-01-09T16:05:27.9700327Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/testeventhubRG-6375/providers/Microsoft.EventHub/namespaces/testnamespacemgmt4836\",\"name\":\"testnamespacemgmt4836\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testnamespacemgmt4836\",\"serviceBusEndpoint\":\"https://testnamespacemgmt4836.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-12-09T05:49:01.7315177Z\",\"updatedAt\":\"2024-02-21T22:13:26.9046581Z\"},\"identity\":{\"principalId\":\"59ed8484-e3b3-4a13-9abd-da83320bf541\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EastUS2/providers/Microsoft.EventHub/namespaces/configupdateautoscalede\",\"name\":\"configupdateautoscalede\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2\",\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:configupdateautoscalede\",\"serviceBusEndpoint\":\"https://configupdateautoscalede.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/dd52f8c6-29c1-4634-9921-868a442a2d7a/resourceGroups/rg-ehc-test24-eastus2-1/providers/Microsoft.EventHub/clusters/test24-bn-eh\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-18T00:48:53.2658932Z\",\"updatedAt\":\"2022-06-23T21:46:28.2320987Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":2}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EastUS2/providers/Microsoft.EventHub/namespaces/assureslibrdkafcit\",\"name\":\"assureslibrdkafcit\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:assureslibrdkafcit\",\"serviceBusEndpoint\":\"https://assureslibrdkafcit.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EastUS2/providers/Microsoft.EventHub/clusters/BN3-565\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-18T02:48:09.2473754Z\",\"updatedAt\":\"2022-06-23T22:40:36.821469Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EastUS2/providers/Microsoft.EventHub/namespaces/assures-maxcapacitythrottlededicatedcheck\",\"name\":\"assures-maxcapacitythrottlededicatedcheck\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2\",\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:assures-maxcapacitythrottlededicatedcheck\",\"serviceBusEndpoint\":\"https://assures-maxcapacitythrottlededicatedcheck.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/dd52f8c6-29c1-4634-9921-868a442a2d7a/resourceGroups/rg-ehc-test24-eastus2-1/providers/Microsoft.EventHub/clusters/test24-bn-eh\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-23T20:27:28.957862Z\",\"updatedAt\":\"2022-06-23T23:22:59.5704116Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/testeventhubRG-504/providers/Microsoft.EventHub/namespaces/testnamespacemgmt512\",\"name\":\"testnamespacemgmt512\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testnamespacemgmt512\",\"serviceBusEndpoint\":\"https://testnamespacemgmt512.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-12-09T09:57:40.7790773Z\",\"updatedAt\":\"2022-12-09T09:58:32.5294478Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/testeventhubRG-7637/providers/Microsoft.EventHub/namespaces/testnamespacemgmt7858\",\"name\":\"testnamespacemgmt7858\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testnamespacemgmt7858\",\"serviceBusEndpoint\":\"https://testnamespacemgmt7858.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-04-04T11:49:43.5980748Z\",\"updatedAt\":\"2023-04-04T11:50:34.5935277Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EastUS2/providers/Microsoft.EventHub/namespaces/autoinflateissuens\",\"name\":\"autoinflateissuens\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:autoinflateissuens\",\"serviceBusEndpoint\":\"https://autoinflateissuens.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EastUS2/providers/Microsoft.EventHub/clusters/BN3-565\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-18T00:48:12.8809869Z\",\"updatedAt\":\"2022-06-23T21:46:18.7920821Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/testeventhubRG-4936/providers/Microsoft.EventHub/namespaces/testnamespacemgmt2563\",\"name\":\"testnamespacemgmt2563\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testnamespacemgmt2563\",\"serviceBusEndpoint\":\"https://testnamespacemgmt2563.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-07-09T06:50:05.243281Z\",\"updatedAt\":\"2022-07-09T06:50:53.7602081Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.EventHub/namespaces/testGeoDR12\",\"name\":\"testGeoDR12\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testgeodr12\",\"serviceBusEndpoint\":\"https://testGeoDR12.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-08-15T11:13:01.9648928Z\",\"updatedAt\":\"2024-02-21T22:51:29.4369642Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EastUS2/providers/Microsoft.EventHub/namespaces/newehdedicatedhub001\",\"name\":\"newehdedicatedhub001\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2\",\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:newehdedicatedhub001\",\"serviceBusEndpoint\":\"https://newehdedicatedhub001.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/dd52f8c6-29c1-4634-9921-868a442a2d7a/resourceGroups/rg-ehc-test24-eastus2-1/providers/Microsoft.EventHub/clusters/test24-bn-eh\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-18T00:48:29.994212Z\",\"updatedAt\":\"2022-06-23T21:46:36.6090143Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EastUS2/providers/Microsoft.EventHub/namespaces/assures-autoinflatecheckdedicated\",\"name\":\"assures-autoinflatecheckdedicated\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2\",\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:assures-autoinflatecheckdedicated\",\"serviceBusEndpoint\":\"https://assures-autoinflatecheckdedicated.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/dd52f8c6-29c1-4634-9921-868a442a2d7a/resourceGroups/rg-ehc-test24-eastus2-1/providers/Microsoft.EventHub/clusters/test24-bn-eh\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-18T00:48:53.2502734Z\",\"updatedAt\":\"2022-06-23T21:46:28.2164729Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/kindrasiri-eh-demo/providers/Microsoft.EventHub/namespaces/toll-data-event-hubs-ns\",\"name\":\"toll-data-event-hubs-ns\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:toll-data-event-hubs-ns\",\"serviceBusEndpoint\":\"https://toll-data-event-hubs-ns.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-08-29T00:26:22.6798828Z\",\"updatedAt\":\"2023-08-29T00:27:40.4686793Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/RGName1-8/providers/Microsoft.EventHub/namespaces/Eh-NamespaceKafka-1199\",\"name\":\"Eh-NamespaceKafka-1199\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:eh-namespacekafka-1199\",\"serviceBusEndpoint\":\"https://Eh-NamespaceKafka-1199.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-17T22:27:38.6132877Z\",\"updatedAt\":\"2022-06-23T21:09:13.3077125Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/testeventhubRG-9925/providers/Microsoft.EventHub/namespaces/testnamespacemgmt7664\",\"name\":\"testnamespacemgmt7664\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testnamespacemgmt7664\",\"serviceBusEndpoint\":\"https://testnamespacemgmt7664.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-09-12T07:28:54.3382226Z\",\"updatedAt\":\"2024-02-02T06:27:10.7211041Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/testeventhubRG-7386/providers/Microsoft.EventHub/namespaces/testnamespacemgmt8244\",\"name\":\"testnamespacemgmt8244\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testnamespacemgmt8244\",\"serviceBusEndpoint\":\"https://testnamespacemgmt8244.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-09-14T08:42:31.0594621Z\",\"updatedAt\":\"2024-02-02T06:21:39.650774Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/testeventhubRG-8569/providers/Microsoft.EventHub/namespaces/testnamespacemgmt6423\",\"name\":\"testnamespacemgmt6423\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testnamespacemgmt6423\",\"serviceBusEndpoint\":\"https://testnamespacemgmt6423.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-01-08T12:16:55.4886708Z\",\"updatedAt\":\"2023-01-08T12:18:13.3461619Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/sjrg/providers/Microsoft.EventHub/namespaces/sjdedicatedv2bnv51072\",\"name\":\"sjdedicatedv2bnv51072\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sjdedicatedv2bnv51072\",\"serviceBusEndpoint\":\"https://sjdedicatedv2bnv51072.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/sjrg/providers/Microsoft.EventHub/clusters/sjdedicatedv2eastus2\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-07-27T01:21:20.4724012Z\",\"updatedAt\":\"2023-07-27T01:22:14.8806296Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EastUS2/providers/Microsoft.EventHub/namespaces/vmss-migration-geodrnamespace-1\",\"name\":\"vmss-migration-geodrnamespace-1\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:vmss-migration-geodrnamespace-1\",\"serviceBusEndpoint\":\"https://vmss-migration-geodrnamespace-1.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EastUS2/providers/Microsoft.EventHub/clusters/BN3-565\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-05-09T01:03:49.3234641Z\",\"updatedAt\":\"2024-02-21T22:49:28.791787Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/sjrg/providers/Microsoft.EventHub/namespaces/sjschemaregistry1\",\"name\":\"sjschemaregistry1\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sjschemaregistry1\",\"serviceBusEndpoint\":\"https://sjschemaregistry1.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/sjrg/providers/Microsoft.EventHub/clusters/SchemaRegistryPreviewCluster\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-18T03:25:37.4518611Z\",\"updatedAt\":\"2022-06-23T22:58:32.9931584Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/RGName1-8/providers/Microsoft.EventHub/namespaces/Eventhub-Namespace1-6258\",\"name\":\"Eventhub-Namespace1-6258\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:eventhub-namespace1-6258\",\"serviceBusEndpoint\":\"https://Eventhub-Namespace1-6258.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":10,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-18T00:07:29.3764648Z\",\"updatedAt\":\"2022-06-23T21:28:52.0393302Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/testeventhubRG-9423/providers/Microsoft.EventHub/namespaces/testnamespacemgmt8613\",\"name\":\"testnamespacemgmt8613\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testnamespacemgmt8613\",\"serviceBusEndpoint\":\"https://testnamespacemgmt8613.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-09-12T06:28:09.484382Z\",\"updatedAt\":\"2022-09-12T06:29:00.0206954Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/hmlam-tmp/providers/Microsoft.EventHub/namespaces/hmlam-eastus2\",\"name\":\"hmlam-eastus2\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:hmlam-eastus2\",\"serviceBusEndpoint\":\"https://hmlam-eastus2.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-08-30T04:53:47.5821799Z\",\"updatedAt\":\"2023-08-30T04:54:34.3921863Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/testeventhubRG-5686/providers/Microsoft.EventHub/namespaces/testnamespacemgmt9011\",\"name\":\"testnamespacemgmt9011\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testnamespacemgmt9011\",\"serviceBusEndpoint\":\"https://testnamespacemgmt9011.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-12-22T09:32:05.4140412Z\",\"updatedAt\":\"2022-12-22T09:32:53.1481772Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/testeventhubRG-8071/providers/Microsoft.EventHub/namespaces/testnamespacemgmt38959\",\"name\":\"testnamespacemgmt38959\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testnamespacemgmt38959\",\"serviceBusEndpoint\":\"https://testnamespacemgmt38959.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-04-05T04:50:07.5678497Z\",\"updatedAt\":\"2023-04-05T04:51:00.2411626Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/testeventhubRG-4421/providers/Microsoft.EventHub/namespaces/testnamespacemgmt5892\",\"name\":\"testnamespacemgmt5892\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testnamespacemgmt5892\",\"serviceBusEndpoint\":\"https://testnamespacemgmt5892.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-01-07T14:58:38.1753384Z\",\"updatedAt\":\"2023-01-07T14:59:46.3251141Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/testeventhubRG-6348/providers/Microsoft.EventHub/namespaces/testnamespacemgmt356\",\"name\":\"testnamespacemgmt356\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testnamespacemgmt356\",\"serviceBusEndpoint\":\"https://testnamespacemgmt356.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-01-09T07:02:04.8254747Z\",\"updatedAt\":\"2023-01-09T07:03:31.1785319Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/sjrg/providers/Microsoft.EventHub/namespaces/ns-e986d7b8-b13f-458e-962a-9ff31fc95b45\",\"name\":\"ns-e986d7b8-b13f-458e-962a-9ff31fc95b45\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ns-e986d7b8-b13f-458e-962a-9ff31fc95b45\",\"serviceBusEndpoint\":\"https://ns-e986d7b8-b13f-458e-962a-9ff31fc95b45.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":4,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/sjrg/providers/Microsoft.EventHub/clusters/SchemaRegistryPreviewCluster\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-04-26T16:58:38.3574926Z\",\"updatedAt\":\"2023-04-26T16:59:26.4020393Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/rg-sr-bugbash/providers/Microsoft.EventHub/namespaces/sr-bugbash\",\"name\":\"sr-bugbash\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sr-bugbash\",\"serviceBusEndpoint\":\"https://sr-bugbash.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/sjrg/providers/Microsoft.EventHub/clusters/SchemaRegistryPreviewCluster\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-18T02:10:22.5168353Z\",\"updatedAt\":\"2024-02-02T06:25:05.4479144Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.EventHub/namespaces/pec514141\",\"name\":\"pec514141\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"francecentral\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:pec514141\",\"serviceBusEndpoint\":\"https://pec514141.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-11-13T11:07:51.7980269Z\",\"updatedAt\":\"2023-12-01T12:03:31.9717339Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.EventHub/namespaces/davadhani6771\",\"name\":\"davadhani6771\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"israelcentral\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:davadhani6771\",\"serviceBusEndpoint\":\"https://davadhani6771.servicebus.windows.net:443/\",\"alternateName\":\"nishanth\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-12-12T10:09:23.1604038Z\",\"updatedAt\":\"2023-12-12T10:09:49.1448797Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.EventHub/namespaces/davadhani6772\",\"name\":\"davadhani6772\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"israelcentral\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:davadhani6772\",\"serviceBusEndpoint\":\"https://davadhani6772.servicebus.windows.net:443/\",\"alternateName\":\"nishanth\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-12-12T10:16:27.3994652Z\",\"updatedAt\":\"2023-12-12T10:16:55.4477358Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.EventHub/namespaces/davadhani6779\",\"name\":\"davadhani6779\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"israelcentral\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:davadhani6779\",\"serviceBusEndpoint\":\"https://davadhani6779.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-12-12T10:18:58.8798041Z\",\"updatedAt\":\"2023-12-12T10:26:59.8635527Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-ItalyNorth/providers/Microsoft.EventHub/namespaces/ardsouza-ITN-VAZ50000-1\",\"name\":\"ardsouza-ITN-VAZ50000-1\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"italynorth\",\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ardsouza-itn-vaz50000-1\",\"serviceBusEndpoint\":\"https://ardsouza-ITN-VAZ50000-1.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-05-19T21:51:34.5632835Z\",\"updatedAt\":\"2023-05-19T21:52:30.153882Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.EventHub/namespaces/basic4960\",\"name\":\"basic4960\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"italynorth\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:basic4960\",\"serviceBusEndpoint\":\"https://basic4960.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-08-20T06:14:42.0316323Z\",\"updatedAt\":\"2023-12-01T12:08:18.5565605Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.EventHub/namespaces/prem4960\",\"name\":\"prem4960\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"italynorth\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:prem4960\",\"serviceBusEndpoint\":\"https://prem4960.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-08-22T16:10:16.8521311Z\",\"updatedAt\":\"2023-08-22T16:11:06.8927991Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-ItalyNorth/providers/Microsoft.EventHub/namespaces/mytestnsitalynorth-5-30-2023\",\"name\":\"mytestnsitalynorth-5-30-2023\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"italynorth\",\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:mytestnsitalynorth-5-30-2023\",\"serviceBusEndpoint\":\"https://mytestnsitalynorth-5-30-2023.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-05-30T20:30:53.9124156Z\",\"updatedAt\":\"2023-05-30T20:31:49.7303527Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.EventHub/namespaces/standard3141\",\"name\":\"standard3141\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"italynorth\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:standard3141\",\"serviceBusEndpoint\":\"https://standard3141.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.EventHub/clusters/testcluster6541\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-12-01T10:47:05.4553662Z\",\"updatedAt\":\"2023-12-01T10:47:47.3050448Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ardsouza-ehpremium-testing/providers/Microsoft.EventHub/namespaces/ardsouza-ehpremium-test-japaneast\",\"name\":\"ardsouza-ehpremium-test-japaneast\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"japaneast\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ardsouza-ehpremium-test-japaneast\",\"serviceBusEndpoint\":\"https://ardsouza-ehpremium-test-japaneast.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-04T00:24:23.9847779Z\",\"updatedAt\":\"2022-06-04T00:24:23.9847779Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/saglodha-benchmarkingRG/providers/Microsoft.EventHub/namespaces/testsaglodha\",\"name\":\"testsaglodha\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"japaneast\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testsaglodha\",\"serviceBusEndpoint\":\"https://testsaglodha.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-11-22T07:18:31.7501926Z\",\"updatedAt\":\"2022-11-22T07:19:23.2788028Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/assures-kafka/providers/Microsoft.EventHub/namespaces/lgissuekafka\",\"name\":\"lgissuekafka\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"japanwest\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:lgissuekafka\",\"serviceBusEndpoint\":\"https://lgissuekafka.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-06-05T21:14:49.9642455Z\",\"updatedAt\":\"2023-06-05T21:15:44.7849228Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":2}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/JustResource/providers/Microsoft.EventHub/namespaces/JustEH\",\"name\":\"JustEH\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"japanwest\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:justeh\",\"serviceBusEndpoint\":\"https://JustEH.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-09T14:54:34.5699263Z\",\"updatedAt\":\"2022-06-09T14:54:34.5699263Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":2}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.EventHub/namespaces/ns-9817\",\"name\":\"ns-9817\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"mexicocentral\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ns-9817\",\"serviceBusEndpoint\":\"https://ns-9817.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-12-01T05:14:25.5865578Z\",\"updatedAt\":\"2023-12-01T05:15:00.0564717Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/framborg/providers/Microsoft.EventHub/namespaces/framborg-mxc-ehs\",\"name\":\"framborg-mxc-ehs\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"mexicocentral\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:framborg-mxc-ehs\",\"serviceBusEndpoint\":\"https://framborg-mxc-ehs.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-10-31T04:24:30.6129336Z\",\"updatedAt\":\"2023-10-31T04:25:14.4724706Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps5087/providers/Microsoft.EventHub/namespaces/Eventhub-Namespace-8612\",\"name\":\"Eventhub-Namespace-8612\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"northcentralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:eventhub-namespace-8612\",\"serviceBusEndpoint\":\"https://Eventhub-Namespace-8612.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-20T08:48:42.8133198Z\",\"updatedAt\":\"2023-12-05T20:07:45.2324841Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cli_test_eh_alias6jvgu26fjlaqgwa2yiiqz2p6ija2csdq2yqesanu7wbaprrlfcgl2rwgql/providers/Microsoft.EventHub/namespaces/eh-nsclijz7lw5vi3t67\",\"name\":\"eh-nsclijz7lw5vi3t67\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"northcentralus\",\"tags\":{\"{tag2: value2,\":\"\",\"tag1: value1}\":\"\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:eh-nsclijz7lw5vi3t67\",\"serviceBusEndpoint\":\"https://eh-nsclijz7lw5vi3t67.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-12-15T15:29:06.9488989Z\",\"updatedAt\":\"2023-12-15T15:31:21.0029745Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cli_test_eh_alias3uyfew6xjnhughpzp5z66hnwfgwkhakeobp5wcp2idybhmu7dva3lcxqrv/providers/Microsoft.EventHub/namespaces/eh-nsclij44ej5w4dpgw\",\"name\":\"eh-nsclij44ej5w4dpgw\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"northcentralus\",\"tags\":{\"{tag2: value2,\":\"\",\"tag1: value1}\":\"\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:eh-nsclij44ej5w4dpgw\",\"serviceBusEndpoint\":\"https://eh-nsclij44ej5w4dpgw.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-12-15T14:28:49.6138451Z\",\"updatedAt\":\"2023-12-15T14:31:19.5637832Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cli_test_eh_aliasdnp3whbvrxc7tevthwk7ptr4knqeetwf2k7x2givgwhvn2o5kpcly6jung/providers/Microsoft.EventHub/namespaces/eh-nsclikzwulaw67vhn\",\"name\":\"eh-nsclikzwulaw67vhn\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"northcentralus\",\"tags\":{\"{tag2: value2,\":\"\",\"tag1: value1}\":\"\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:eh-nsclikzwulaw67vhn\",\"serviceBusEndpoint\":\"https://eh-nsclikzwulaw67vhn.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-05-03T10:48:37.484075Z\",\"updatedAt\":\"2023-12-05T20:07:45.2324841Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps2185/providers/Microsoft.EventHub/namespaces/Eventhub-Namespace-8587\",\"name\":\"Eventhub-Namespace-8587\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"northcentralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:eventhub-namespace-8587\",\"serviceBusEndpoint\":\"https://Eventhub-Namespace-8587.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-19T11:34:14.8032161Z\",\"updatedAt\":\"2023-12-05T20:07:45.2324841Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cli_test_eh_aliasudc6vwfpygfs3qtjz344cgxmvivvvq5jkjrcjhr442ht7kd2rc3kavhxxg/providers/Microsoft.EventHub/namespaces/eh-nsclin645hmsjctly\",\"name\":\"eh-nsclin645hmsjctly\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"northcentralus\",\"tags\":{\"{tag2: value2,\":\"\",\"tag1: value1}\":\"\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:eh-nsclin645hmsjctly\",\"serviceBusEndpoint\":\"https://eh-nsclin645hmsjctly.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-05-03T10:16:16.1722542Z\",\"updatedAt\":\"2023-12-05T20:07:45.2324841Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-ResourceGroup-5005/providers/Microsoft.EventHub/namespaces/sdk-NS1-815\",\"name\":\"sdk-NS1-815\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"northcentralus\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-ns1-815\",\"serviceBusEndpoint\":\"https://sdk-NS1-815.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-10T10:25:52.6510292Z\",\"updatedAt\":\"2023-12-05T05:38:51.8986285Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/sjrg/providers/Microsoft.EventHub/namespaces/sjpremiumbyoknorthcentralus\",\"name\":\"sjpremiumbyoknorthcentralus\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"northcentralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sjpremiumbyoknorthcentralus\",\"serviceBusEndpoint\":\"https://sjpremiumbyoknorthcentralus.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-02-07T19:52:09.9531802Z\",\"updatedAt\":\"2023-12-05T20:06:53.247037Z\"},\"identity\":{\"principalId\":\"c0599cff-ff28-48c6-99c1-ac306748e75e\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/test-migration/providers/Microsoft.EventHub/namespaces/namespace23\",\"name\":\"namespace23\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"northcentralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespace23\",\"serviceBusEndpoint\":\"https://namespace23.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-02-16T06:58:41.0944081Z\",\"updatedAt\":\"2024-02-16T07:17:17.850621Z\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/test-migration/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity21\":{\"clientId\":\"841f37c5-ea98-4d6d-8050-6f7abe71156c\",\"principalId\":\"254040d1-f73a-44df-883e-7fafb336d71b\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-ResourceGroup-2261/providers/Microsoft.EventHub/namespaces/sdk-NS1-703\",\"name\":\"sdk-NS1-703\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"northcentralus\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-ns1-703\",\"serviceBusEndpoint\":\"https://sdk-NS1-703.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-10T09:27:28.6836537Z\",\"updatedAt\":\"2023-12-05T05:35:55.9155874Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cli_test_eh_aliasi4gowzbjjxatb3iuh7l4u543v54enhox6qxa62ptzwnwi4hszghkc3spe7/providers/Microsoft.EventHub/namespaces/eh-nsclipnncodh5i4di\",\"name\":\"eh-nsclipnncodh5i4di\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"northcentralus\",\"tags\":{\"{tag2: value2,\":\"\",\"tag1: value1}\":\"\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:eh-nsclipnncodh5i4di\",\"serviceBusEndpoint\":\"https://eh-nsclipnncodh5i4di.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-05-03T10:24:05.5931317Z\",\"updatedAt\":\"2023-12-05T20:07:45.2324841Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/kindrasiri_eh_benchmark/providers/Microsoft.EventHub/namespaces/sayan-geodr\",\"name\":\"sayan-geodr\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"northcentralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sayan-geodr\",\"serviceBusEndpoint\":\"https://sayan-geodr.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-22T07:18:13.4819576Z\",\"updatedAt\":\"2023-12-05T05:37:23.3885097Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/pranjitTest/providers/Microsoft.EventHub/namespaces/pranjitTestMsi2\",\"name\":\"pranjitTestMsi2\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"northcentralus\",\"tags\":{\"abc\":\"def\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:pranjittestmsi2\",\"serviceBusEndpoint\":\"https://pranjitTestMsi2.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-16T19:28:49.7418491Z\",\"updatedAt\":\"2024-04-16T19:34:23.4389186Z\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/Subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Damorg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/davadhani-test-id\":{\"clientId\":\"7737d121-7ec3-4b49-8fb2-0347cb8464f8\",\"principalId\":\"aaeae2c9-0cee-4141-ac97-f186026cc13c\"}}},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-ResourceGroup-5461/providers/Microsoft.EventHub/namespaces/sdk-NS1-6213\",\"name\":\"sdk-NS1-6213\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"northcentralus\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-ns1-6213\",\"serviceBusEndpoint\":\"https://sdk-NS1-6213.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-10T09:34:35.9722608Z\",\"updatedAt\":\"2023-12-05T05:37:02.3726189Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-ResourceGroup-28/providers/Microsoft.EventHub/namespaces/sdk-NS1-6774\",\"name\":\"sdk-NS1-6774\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"northcentralus\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-ns1-6774\",\"serviceBusEndpoint\":\"https://sdk-NS1-6774.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-10T10:23:04.857523Z\",\"updatedAt\":\"2023-12-05T05:38:26.6610265Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cli_test_eh_aliasqmezh5w35eizn4gin3dgfa4eoashfbx4ep7e6taurmp3nytnbkvgawng3r/providers/Microsoft.EventHub/namespaces/eh-nsclitj6xsibuibpp\",\"name\":\"eh-nsclitj6xsibuibpp\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"northcentralus\",\"tags\":{\"{tag2: value2,\":\"\",\"tag1: value1}\":\"\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:eh-nsclitj6xsibuibpp\",\"serviceBusEndpoint\":\"https://eh-nsclitj6xsibuibpp.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-12-15T14:34:21.7990169Z\",\"updatedAt\":\"2023-12-15T14:36:55.25215Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps6429/providers/Microsoft.EventHub/namespaces/Eventhub-Namespace-2928\",\"name\":\"Eventhub-Namespace-2928\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"northcentralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:eventhub-namespace-2928\",\"serviceBusEndpoint\":\"https://Eventhub-Namespace-2928.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-19T11:26:08.3685244Z\",\"updatedAt\":\"2023-12-05T20:07:45.2324841Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cli_test_eh_aliasj26pbrfoqm43woiv5rghzag4neengztkn5324xww6ntshti365flyujqqv/providers/Microsoft.EventHub/namespaces/eh-nsclimefkxgglgjo3\",\"name\":\"eh-nsclimefkxgglgjo3\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"northcentralus\",\"tags\":{\"{tag1: value1,\":\"\",\"tag2: value2}\":\"\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:eh-nsclimefkxgglgjo3\",\"serviceBusEndpoint\":\"https://eh-nsclimefkxgglgjo3.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-12-15T15:45:32.0486963Z\",\"updatedAt\":\"2023-12-15T15:47:48.0239795Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/RGName1-1468/providers/Microsoft.EventHub/namespaces/Eventhub-Namespace4-7774\",\"name\":\"Eventhub-Namespace4-7774\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"northeurope\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:eventhub-namespace4-7774\",\"serviceBusEndpoint\":\"https://Eventhub-Namespace4-7774.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":12,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-07-07T12:41:49.9618916Z\",\"updatedAt\":\"2024-01-29T23:55:50.1991222Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/clemensvtest/providers/Microsoft.EventHub/namespaces/clemensv8\",\"name\":\"clemensv8\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"northeurope\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:clemensv8\",\"serviceBusEndpoint\":\"https://clemensv8.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-23T22:41:30.0009587Z\",\"updatedAt\":\"2022-06-23T22:41:30.0009587Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/RGName1-7462/providers/Microsoft.EventHub/namespaces/Eventhub-Namespace4-1579\",\"name\":\"Eventhub-Namespace4-1579\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"northeurope\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:eventhub-namespace4-1579\",\"serviceBusEndpoint\":\"https://Eventhub-Namespace4-1579.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":12,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-07-07T12:41:31.7691024Z\",\"updatedAt\":\"2024-01-29T23:51:46.1804121Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestrwp68j/providers/Microsoft.EventHub/namespaces/namespaceV5m20bol\",\"name\":\"namespaceV5m20bol\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"northeurope\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key4\",\"keyVaultUri\":\"https://keyvault-rg1.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key5\",\"keyVaultUri\":\"https://keyvault-rg1.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5m20bol\",\"serviceBusEndpoint\":\"https://namespaceV5m20bol.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-11-04T07:55:17.6034588Z\",\"updatedAt\":\"2024-02-08T21:27:58.1465198Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestn6v9a8/providers/Microsoft.EventHub/namespaces/namespaceV5cumjp2\",\"name\":\"namespaceV5cumjp2\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"northeurope\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key4\",\"keyVaultUri\":\"https://keyvault-rg1.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key5\",\"keyVaultUri\":\"https://keyvault-rg1.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5cumjp2\",\"serviceBusEndpoint\":\"https://namespaceV5cumjp2.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-11-04T06:55:29.549299Z\",\"updatedAt\":\"2024-02-08T21:27:18.0639839Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorest38b0od/providers/Microsoft.EventHub/namespaces/namespaceV5bulrtg\",\"name\":\"namespaceV5bulrtg\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"northeurope\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key4\",\"keyVaultUri\":\"https://keyvault-rg1.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key5\",\"keyVaultUri\":\"https://keyvault-rg1.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5bulrtg\",\"serviceBusEndpoint\":\"https://namespaceV5bulrtg.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-11-04T05:58:18.4323154Z\",\"updatedAt\":\"2024-02-08T21:26:59.5687288Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestqjtlai/providers/Microsoft.EventHub/namespaces/namespaceV5g8as1f\",\"name\":\"namespaceV5g8as1f\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"northeurope\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key4\",\"keyVaultUri\":\"https://keyvault-rg1.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key5\",\"keyVaultUri\":\"https://keyvault-rg1.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5g8as1f\",\"serviceBusEndpoint\":\"https://namespaceV5g8as1f.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-11-04T05:05:19.2833389Z\",\"updatedAt\":\"2024-02-08T21:27:36.7151024Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorest9apzfj/providers/Microsoft.EventHub/namespaces/namespaceV5mew75u\",\"name\":\"namespaceV5mew75u\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"northeurope\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key4\",\"keyVaultUri\":\"https://keyvault-rg1.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key5\",\"keyVaultUri\":\"https://keyvault-rg1.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5mew75u\",\"serviceBusEndpoint\":\"https://namespaceV5mew75u.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-11-04T07:24:54.981264Z\",\"updatedAt\":\"2024-02-08T21:28:11.1240128Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/RGName1-936/providers/Microsoft.EventHub/namespaces/Eventhub-Namespace4-5902\",\"name\":\"Eventhub-Namespace4-5902\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"northeurope\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:eventhub-namespace4-5902\",\"serviceBusEndpoint\":\"https://Eventhub-Namespace4-5902.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":12,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-07-07T11:03:03.0861225Z\",\"updatedAt\":\"2024-01-29T23:57:36.7231359Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/PS-Testing/providers/Microsoft.EventHub/namespaces/Namespace1-4355\",\"name\":\"Namespace1-4355\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"northeurope\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://ps-test-kv1.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://ps-test-kv1.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key1\",\"keyVaultUri\":\"https://ps-test-kv2.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":false},\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespace1-4355\",\"serviceBusEndpoint\":\"https://Namespace1-4355.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-09-18T14:27:17.5138036Z\",\"updatedAt\":\"2024-01-31T19:07:54.7975133Z\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{\"clientId\":\"38a989a1-3fab-4015-b546-cbcf7a67aa89\",\"principalId\":\"624205aa-192c-4303-9606-990d06cbd997\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{\"clientId\":\"440d7336-c408-4327-ad13-10a4e71aad64\",\"principalId\":\"1bdb6af0-4284-47f4-b049-94aa2868d90b\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/clemensvtest/providers/Microsoft.EventHub/namespaces/clemensv6\",\"name\":\"clemensv6\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"northeurope\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:clemensv6\",\"serviceBusEndpoint\":\"https://clemensv6.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-23T23:15:26.7042845Z\",\"updatedAt\":\"2022-06-23T23:15:26.7042845Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ardsouza-ehpremium-testing/providers/Microsoft.EventHub/namespaces/ardsouza-ehpremium-test-norwayeast\",\"name\":\"ardsouza-ehpremium-test-norwayeast\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"norwayeast\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ardsouza-ehpremium-test-norwayeast\",\"serviceBusEndpoint\":\"https://ardsouza-ehpremium-test-norwayeast.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-23T21:21:51.1435469Z\",\"updatedAt\":\"2024-01-25T00:26:22.4159029Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":2}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ardsouza-test/providers/Microsoft.EventHub/namespaces/ardsouza-2-14-2023-p-1\",\"name\":\"ardsouza-2-14-2023-p-1\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"polandcentral\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ardsouza-2-14-2023-p-1\",\"serviceBusEndpoint\":\"https://ardsouza-2-14-2023-p-1.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-02-15T01:30:59.4203995Z\",\"updatedAt\":\"2023-02-15T01:31:53.4317551Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.EventHub/namespaces/qatarcentral123\",\"name\":\"qatarcentral123\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"qatarcentral\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:qatarcentral123\",\"serviceBusEndpoint\":\"https://qatarcentral123.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-11-11T06:46:24.9015186Z\",\"updatedAt\":\"2023-11-11T06:47:23.6533733Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/eventhubs-customer-perf-test/providers/Microsoft.EventHub/namespaces/perf-namespace\",\"name\":\"perf-namespace\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"southcentralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:perf-namespace\",\"serviceBusEndpoint\":\"https://perf-namespace.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/eventhubs-customer-perf-test/providers/Microsoft.EventHub/clusters/kindrasiriCustomerPerf\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-01-03T16:30:52.8230702Z\",\"updatedAt\":\"2023-01-03T16:31:45.4331173Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/pablorod_new/providers/Microsoft.EventHub/namespaces/teamMeeting\",\"name\":\"teamMeeting\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"southcentralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:teammeeting\",\"serviceBusEndpoint\":\"https://teamMeeting.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-05-26T21:02:37.2099944Z\",\"updatedAt\":\"2024-01-26T01:01:42.0485893Z\"},\"identity\":{\"principalId\":\"8dc12278-bf89-4a5a-928c-940b9aaf20e0\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned, UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/pablorod_new/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PabloUserIdentity1\":{\"clientId\":\"b7babf4d-77c2-4f34-b732-21979335ec3b\",\"principalId\":\"4f35105e-862d-4eba-9c2c-e3aea1978fc8\"}}},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cli_test_eh_aliasj26pbrfoqm43woiv5rghzag4neengztkn5324xww6ntshti365flyujqqv/providers/Microsoft.EventHub/namespaces/eh-nsclidir22r47sfrj\",\"name\":\"eh-nsclidir22r47sfrj\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"southcentralus\",\"tags\":{\"{tag1: value1,\":\"\",\"tag2: value2}\":\"\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:eh-nsclidir22r47sfrj\",\"serviceBusEndpoint\":\"https://eh-nsclidir22r47sfrj.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-12-15T15:44:16.9452803Z\",\"updatedAt\":\"2024-01-26T01:01:57.7309421Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/kindrasiri_eh_benchmark/providers/Microsoft.EventHub/namespaces/kindrasiri-basic\",\"name\":\"kindrasiri-basic\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"southcentralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:kindrasiri-basic\",\"serviceBusEndpoint\":\"https://kindrasiri-basic.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-11-08T01:05:17.6838971Z\",\"updatedAt\":\"2022-11-08T01:06:09.2256753Z\"},\"sku\":{\"name\":\"Basic\",\"tier\":\"Basic\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cli_test_eh_alias3uyfew6xjnhughpzp5z66hnwfgwkhakeobp5wcp2idybhmu7dva3lcxqrv/providers/Microsoft.EventHub/namespaces/eh-nsclim5y3p4t4yj24\",\"name\":\"eh-nsclim5y3p4t4yj24\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"southcentralus\",\"tags\":{\"{tag2: value2,\":\"\",\"tag1: value1}\":\"\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:eh-nsclim5y3p4t4yj24\",\"serviceBusEndpoint\":\"https://eh-nsclim5y3p4t4yj24.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-12-15T14:27:36.375527Z\",\"updatedAt\":\"2024-01-26T01:01:57.7309421Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-ResourceGroup-28/providers/Microsoft.EventHub/namespaces/sdk-NS1-2563\",\"name\":\"sdk-NS1-2563\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"southcentralus\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-ns1-2563\",\"serviceBusEndpoint\":\"https://sdk-NS1-2563.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-10T10:21:43.7570663Z\",\"updatedAt\":\"2023-12-05T06:55:35.6387715Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/eventhubs-customer-perf-test/providers/Microsoft.EventHub/namespaces/testnssaglodha\",\"name\":\"testnssaglodha\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"southcentralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testnssaglodha\",\"serviceBusEndpoint\":\"https://testnssaglodha.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/eventhubs-customer-perf-test/providers/Microsoft.EventHub/clusters/kindrasiriCustomerPerf\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-04-04T14:02:29.3999254Z\",\"updatedAt\":\"2023-09-04T11:55:40.4213573Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":2}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cli_test_eh_aliasqmezh5w35eizn4gin3dgfa4eoashfbx4ep7e6taurmp3nytnbkvgawng3r/providers/Microsoft.EventHub/namespaces/eh-nscliup53rv2e3hbx\",\"name\":\"eh-nscliup53rv2e3hbx\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"southcentralus\",\"tags\":{\"{tag2: value2,\":\"\",\"tag1: value1}\":\"\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:eh-nscliup53rv2e3hbx\",\"serviceBusEndpoint\":\"https://eh-nscliup53rv2e3hbx.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-12-15T14:33:06.9608969Z\",\"updatedAt\":\"2024-01-26T01:01:57.7309421Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cli_test_eh_alias6jvgu26fjlaqgwa2yiiqz2p6ija2csdq2yqesanu7wbaprrlfcgl2rwgql/providers/Microsoft.EventHub/namespaces/eh-nscli5wg6y7sftw3d\",\"name\":\"eh-nscli5wg6y7sftw3d\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"southcentralus\",\"tags\":{\"{tag2: value2,\":\"\",\"tag1: value1}\":\"\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:eh-nscli5wg6y7sftw3d\",\"serviceBusEndpoint\":\"https://eh-nscli5wg6y7sftw3d.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-12-15T15:27:57.627864Z\",\"updatedAt\":\"2024-01-26T01:01:57.7309421Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps6429/providers/Microsoft.EventHub/namespaces/Eventhub-Namespace-8041\",\"name\":\"Eventhub-Namespace-8041\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"southcentralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:eventhub-namespace-8041\",\"serviceBusEndpoint\":\"https://Eventhub-Namespace-8041.servicebus.windows.net:443/\",\"alternateName\":\"AlternateName8626\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-19T11:24:55.4101969Z\",\"updatedAt\":\"2024-01-26T01:01:57.7153189Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestn6v9a8/providers/Microsoft.EventHub/namespaces/namespaceV3b1zg2t\",\"name\":\"namespaceV3b1zg2t\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"southcentralus\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3b1zg2t\",\"serviceBusEndpoint\":\"https://namespaceV3b1zg2t.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":18,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-11-04T06:46:45.65145Z\",\"updatedAt\":\"2022-11-04T06:47:37.7432219Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":10}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoreste0vl7h/providers/Microsoft.EventHub/namespaces/namespaceV3qnuc4h\",\"name\":\"namespaceV3qnuc4h\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"southcentralus\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3qnuc4h\",\"serviceBusEndpoint\":\"https://namespaceV3qnuc4h.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":18,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-11-04T04:32:45.4135557Z\",\"updatedAt\":\"2022-11-04T04:33:37.775736Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":10}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorest38b0od/providers/Microsoft.EventHub/namespaces/namespaceV3tw42yr\",\"name\":\"namespaceV3tw42yr\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"southcentralus\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3tw42yr\",\"serviceBusEndpoint\":\"https://namespaceV3tw42yr.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":18,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-11-04T05:49:30.2079431Z\",\"updatedAt\":\"2022-11-04T05:50:18.990745Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":10}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/yamlin-test/providers/Microsoft.EventHub/namespaces/yamlin-standardTest\",\"name\":\"yamlin-standardTest\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"southcentralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:yamlin-standardtest\",\"serviceBusEndpoint\":\"https://yamlin-standardTest.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-03-21T23:06:16.4278965Z\",\"updatedAt\":\"2024-03-21T23:06:43.9341682Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/pablorod_test2/providers/Microsoft.EventHub/namespaces/pablorod-auth-test\",\"name\":\"pablorod-auth-test\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"southcentralus\",\"tags\":{\"tag1\":\"tag1Value\",\"a\":\"a\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:pablorod-auth-test\",\"serviceBusEndpoint\":\"https://pablorod-auth-test.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-02-15T16:46:47.948814Z\",\"updatedAt\":\"2023-11-05T01:12:19.4713294Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cli_test_eh_aliasudc6vwfpygfs3qtjz344cgxmvivvvq5jkjrcjhr442ht7kd2rc3kavhxxg/providers/Microsoft.EventHub/namespaces/eh-nscliastn3dwksitr\",\"name\":\"eh-nscliastn3dwksitr\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"southcentralus\",\"tags\":{\"{tag2: value2,\":\"\",\"tag1: value1}\":\"\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:eh-nscliastn3dwksitr\",\"serviceBusEndpoint\":\"https://eh-nscliastn3dwksitr.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-05-03T10:14:03.1961195Z\",\"updatedAt\":\"2024-01-26T01:01:57.7309421Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestqjtlai/providers/Microsoft.EventHub/namespaces/namespaceV348lzpf\",\"name\":\"namespaceV348lzpf\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"southcentralus\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev348lzpf\",\"serviceBusEndpoint\":\"https://namespaceV348lzpf.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":18,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-11-04T04:56:33.9732449Z\",\"updatedAt\":\"2022-11-04T04:57:23.2319917Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":10}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cli_test_eh_aliasi4gowzbjjxatb3iuh7l4u543v54enhox6qxa62ptzwnwi4hszghkc3spe7/providers/Microsoft.EventHub/namespaces/eh-nscliw53aqep64nys\",\"name\":\"eh-nscliw53aqep64nys\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"southcentralus\",\"tags\":{\"{tag2: value2,\":\"\",\"tag1: value1}\":\"\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:eh-nscliw53aqep64nys\",\"serviceBusEndpoint\":\"https://eh-nscliw53aqep64nys.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-05-03T10:21:53.5724132Z\",\"updatedAt\":\"2024-01-26T01:01:57.7153189Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/yamlin-test/providers/Microsoft.EventHub/namespaces/yam-testcrud\",\"name\":\"yam-testcrud\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"southcentralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:yam-testcrud\",\"serviceBusEndpoint\":\"https://yam-testcrud.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-17T16:42:53.3677099Z\",\"updatedAt\":\"2024-04-17T16:52:18.9849804Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":4}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/taabtest/providers/Microsoft.EventHub/namespaces/taabtestsnns\",\"name\":\"taabtestsnns\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"southcentralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:taabtestsnns\",\"serviceBusEndpoint\":\"https://taabtestsnns.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/taabtest/providers/Microsoft.EventHub/clusters/taabsncluster\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-05-10T16:42:56.1674602Z\",\"updatedAt\":\"2023-05-10T16:43:49.175968Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/eventhubs-customer-perf-test/providers/Microsoft.EventHub/namespaces/santiago-perf-test\",\"name\":\"santiago-perf-test\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"southcentralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:santiago-perf-test\",\"serviceBusEndpoint\":\"https://santiago-perf-test.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/eventhubs-customer-perf-test/providers/Microsoft.EventHub/clusters/kindrasiriCustomerPerf\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-03-15T20:28:21.607112Z\",\"updatedAt\":\"2023-03-15T20:29:10.5057429Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps2185/providers/Microsoft.EventHub/namespaces/Eventhub-Namespace-9762\",\"name\":\"Eventhub-Namespace-9762\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"southcentralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:eventhub-namespace-9762\",\"serviceBusEndpoint\":\"https://Eventhub-Namespace-9762.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-19T11:32:58.7858767Z\",\"updatedAt\":\"2024-01-26T01:01:57.5121878Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cli_test_eh_aliasdnp3whbvrxc7tevthwk7ptr4knqeetwf2k7x2givgwhvn2o5kpcly6jung/providers/Microsoft.EventHub/namespaces/eh-nscliperwwtnfj54p\",\"name\":\"eh-nscliperwwtnfj54p\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"southcentralus\",\"tags\":{\"{tag2: value2,\":\"\",\"tag1: value1}\":\"\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:eh-nscliperwwtnfj54p\",\"serviceBusEndpoint\":\"https://eh-nscliperwwtnfj54p.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-05-03T10:46:40.8738557Z\",\"updatedAt\":\"2024-01-26T01:01:57.7153189Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/rg-cluster-vdll2f42t/providers/Microsoft.EventHub/namespaces/eventhubs-nsclid2oun\",\"name\":\"eventhubs-nsclid2oun\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"southcentralus\",\"tags\":{\"{tag1\":\"value1}\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:eventhubs-nsclid2oun\",\"serviceBusEndpoint\":\"https://eventhubs-nsclid2oun.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/rg-cluster-vdll2f42t/providers/Microsoft.EventHub/clusters/eventhubs-clus1-2ell\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-03-13T09:07:12.5646076Z\",\"updatedAt\":\"2023-03-13T09:08:08.1136508Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorest9apzfj/providers/Microsoft.EventHub/namespaces/namespaceV38w0dro\",\"name\":\"namespaceV38w0dro\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"southcentralus\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev38w0dro\",\"serviceBusEndpoint\":\"https://namespaceV38w0dro.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":18,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-11-04T07:16:09.6196856Z\",\"updatedAt\":\"2022-11-04T07:17:01.0257305Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":10}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/test-migration/providers/Microsoft.EventHub/namespaces/eventhub21\",\"name\":\"eventhub21\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"southcentralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:eventhub21\",\"serviceBusEndpoint\":\"https://eventhub21.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-02-16T06:56:27.9038228Z\",\"updatedAt\":\"2024-02-16T07:17:19.4293229Z\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/test-migration/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity21\":{\"clientId\":\"841f37c5-ea98-4d6d-8050-6f7abe71156c\",\"principalId\":\"254040d1-f73a-44df-883e-7fafb336d71b\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-8000/providers/Microsoft.EventHub/namespaces/sdk-NS-3397\",\"name\":\"sdk-NS-3397\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"southcentralus\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-ns-3397\",\"serviceBusEndpoint\":\"https://sdk-NS-3397.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-02T21:27:04.09009Z\",\"updatedAt\":\"2022-06-10T21:16:53.3007136Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps5087/providers/Microsoft.EventHub/namespaces/Eventhub-Namespace-1354\",\"name\":\"Eventhub-Namespace-1354\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"southcentralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:eventhub-namespace-1354\",\"serviceBusEndpoint\":\"https://Eventhub-Namespace-1354.servicebus.windows.net:443/\",\"alternateName\":\"AlternateName4085\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-20T08:47:29.0486955Z\",\"updatedAt\":\"2024-01-26T01:01:57.6059403Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestrwp68j/providers/Microsoft.EventHub/namespaces/namespaceV3mpjsaq\",\"name\":\"namespaceV3mpjsaq\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"southcentralus\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3mpjsaq\",\"serviceBusEndpoint\":\"https://namespaceV3mpjsaq.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":18,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-11-04T07:46:32.214475Z\",\"updatedAt\":\"2022-11-04T07:47:19.7082815Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":10}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"name\":\"namespaceName7pzlta\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"southcentralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacename7pzlta\",\"serviceBusEndpoint\":\"https://namespaceName7pzlta.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:36:41.2194019Z\",\"updatedAt\":\"2024-04-29T12:37:13.1304921Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ardsouza-westeurope-test/providers/Microsoft.EventHub/namespaces/ardsouza-07-2021-capture-adls2test\",\"name\":\"ardsouza-07-2021-capture-adls2test\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"southeastasia\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ardsouza-07-2021-capture-adls2test\",\"serviceBusEndpoint\":\"https://ardsouza-07-2021-capture-adls2test.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-24T20:46:20.0001448Z\",\"updatedAt\":\"2022-06-24T20:46:20.0001448Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EastAsia/providers/Microsoft.EventHub/namespaces/sj-hk2-507-secondary\",\"name\":\"sj-hk2-507-secondary\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"southeastasia\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sj-hk2-507-secondary\",\"serviceBusEndpoint\":\"https://sj-hk2-507-secondary.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-24T20:55:28.7792035Z\",\"updatedAt\":\"2024-02-23T00:39:57.5730062Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-SouthIndia/providers/Microsoft.EventHub/namespaces/sjpremiumma\",\"name\":\"sjpremiumma\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"southindia\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key2\",\"keyVaultUri\":\"https://sjswedencentral.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sjpremiumma\",\"serviceBusEndpoint\":\"https://sjpremiumma.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-08-10T02:37:00.2921645Z\",\"updatedAt\":\"2023-12-05T19:16:08.8365294Z\"},\"identity\":{\"principalId\":\"90eede18-8d6a-43f9-b585-317861a9580e\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/sjrg/providers/Microsoft.EventHub/namespaces/sjsouthindia\",\"name\":\"sjsouthindia\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"southindia\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sjsouthindia\",\"serviceBusEndpoint\":\"https://sjsouthindia.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-03T23:40:49.6488612Z\",\"updatedAt\":\"2022-06-03T23:40:49.6488612Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/sjrg/providers/Microsoft.EventHub/namespaces/sjpremiumswedencentral\",\"name\":\"sjpremiumswedencentral\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"swedencentral\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sjpremiumswedencentral\",\"serviceBusEndpoint\":\"https://sjpremiumswedencentral.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-02-07T00:13:01.1649342Z\",\"updatedAt\":\"2023-02-07T00:14:15.0669783Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/sjrg/providers/Microsoft.EventHub/namespaces/sjpremiumswedencentralbyok\",\"name\":\"sjpremiumswedencentralbyok\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"swedencentral\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://sjswedencentral.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sjpremiumswedencentralbyok\",\"serviceBusEndpoint\":\"https://sjpremiumswedencentralbyok.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-02-07T18:39:10.1728687Z\",\"updatedAt\":\"2024-01-25T20:50:12.4305602Z\"},\"identity\":{\"principalId\":\"0c5b186e-90c1-4e66-b222-717422937269\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/sjrg/providers/Microsoft.EventHub/namespaces/sjpremiumchn\",\"name\":\"sjpremiumchn\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"switzerlandnorth\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sjpremiumchn\",\"serviceBusEndpoint\":\"https://sjpremiumchn.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-08T03:28:34.3652773Z\",\"updatedAt\":\"2022-06-08T03:28:34.3652773Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.EventHub/namespaces/testpec5441\",\"name\":\"testpec5441\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"uksouth\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testpec5441\",\"serviceBusEndpoint\":\"https://testpec5441.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-11-06T06:52:01.7434513Z\",\"updatedAt\":\"2023-11-06T06:52:52.1461035Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.EventHub/namespaces/testpec7666\",\"name\":\"testpec7666\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"uksouth\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testpec7666\",\"serviceBusEndpoint\":\"https://testpec7666.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-11-02T07:47:42.0918533Z\",\"updatedAt\":\"2023-11-02T07:48:37.9162372Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/sjrg/providers/Microsoft.EventHub/namespaces/sjpremiumuksouthnew\",\"name\":\"sjpremiumuksouthnew\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"uksouth\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sjpremiumuksouthnew\",\"serviceBusEndpoint\":\"https://sjpremiumuksouthnew.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-10-05T05:55:36.3511688Z\",\"updatedAt\":\"2022-10-05T05:57:14.2969908Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/sjrg/providers/Microsoft.EventHub/namespaces/sjpremiumuksouth\",\"name\":\"sjpremiumuksouth\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"uksouth\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sjpremiumuksouth\",\"serviceBusEndpoint\":\"https://sjpremiumuksouth.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-08-24T01:47:59.9846958Z\",\"updatedAt\":\"2024-02-29T21:26:25.5718961Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":2}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/xcrg/providers/Microsoft.EventHub/namespaces/ehp-test-uks\",\"name\":\"ehp-test-uks\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"uksouth\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ehp-test-uks\",\"serviceBusEndpoint\":\"https://ehp-test-uks.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-09-06T18:08:56.3907884Z\",\"updatedAt\":\"2023-12-05T03:04:03.9766105Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ardsouza-ehpremium-testing/providers/Microsoft.EventHub/namespaces/ardsouza-ehpremium-test-uksouth\",\"name\":\"ardsouza-ehpremium-test-uksouth\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"uksouth\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ardsouza-ehpremium-test-uksouth\",\"serviceBusEndpoint\":\"https://ardsouza-ehpremium-test-uksouth.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-10T23:45:33.3124466Z\",\"updatedAt\":\"2022-07-22T21:45:09.4194901Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EventHubsVNETTestingRG/providers/Microsoft.EventHub/namespaces/sayan-ns-20\",\"name\":\"sayan-ns-20\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westcentralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sayan-ns-20\",\"serviceBusEndpoint\":\"https://sayan-ns-20.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EventHubsVNETTestingRG/providers/Microsoft.EventHub/clusters/EventHubsVNetTesting\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-11-07T13:40:54.5713667Z\",\"updatedAt\":\"2022-11-07T13:41:49.7084Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EventHubsVNETTestingRG/providers/Microsoft.EventHub/namespaces/sayan-ns-3\",\"name\":\"sayan-ns-3\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westcentralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sayan-ns-3\",\"serviceBusEndpoint\":\"https://sayan-ns-3.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EventHubsVNETTestingRG/providers/Microsoft.EventHub/clusters/EventHubsVNetTesting\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-10-07T08:14:43.2783311Z\",\"updatedAt\":\"2022-10-07T08:15:37.4593758Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EventHubsVNETTestingRG/providers/Microsoft.EventHub/namespaces/testehnew0301\",\"name\":\"testehnew0301\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westcentralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testehnew0301\",\"serviceBusEndpoint\":\"https://testehnew0301.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EventHubsVNETTestingRG/providers/Microsoft.EventHub/clusters/EventHubsVNetTesting\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-03-02T04:56:56.2231918Z\",\"updatedAt\":\"2023-03-02T04:57:44.3037083Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EventHubsVNETTestingRG/providers/Microsoft.EventHub/namespaces/sayan-ns-101\",\"name\":\"sayan-ns-101\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westcentralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sayan-ns-101\",\"serviceBusEndpoint\":\"https://sayan-ns-101.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EventHubsVNETTestingRG/providers/Microsoft.EventHub/clusters/EventHubsVNetTesting\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-03-30T12:59:36.521142Z\",\"updatedAt\":\"2023-03-30T13:00:30.5531767Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.EventHub/namespaces/westcentralus7656\",\"name\":\"westcentralus7656\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westcentralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:westcentralus7656\",\"serviceBusEndpoint\":\"https://westcentralus7656.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-11-09T11:24:12.5113404Z\",\"updatedAt\":\"2023-11-09T11:25:06.6235513Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/jakeschiller-synthetics/providers/Microsoft.EventHub/namespaces/VNetFail\",\"name\":\"VNetFail\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westcentralus\",\"tags\":{\"jms-for\":\"canary\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:vnetfail\",\"serviceBusEndpoint\":\"https://VNetFail.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-07-07T21:42:13.1585496Z\",\"updatedAt\":\"2023-12-04T15:45:18.3542893Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.EventHub/namespaces/westus6151\",\"name\":\"westus6151\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westcentralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:westus6151\",\"serviceBusEndpoint\":\"https://westus6151.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-11-09T08:30:32.9621355Z\",\"updatedAt\":\"2023-11-09T08:31:20.5559471Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EventHubsVNETTestingRG/providers/Microsoft.EventHub/namespaces/sayan-ns-2\",\"name\":\"sayan-ns-2\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westcentralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sayan-ns-2\",\"serviceBusEndpoint\":\"https://sayan-ns-2.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EventHubsVNETTestingRG/providers/Microsoft.EventHub/clusters/EventHubsVNetTesting\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-10-07T07:21:29.3704041Z\",\"updatedAt\":\"2022-10-07T07:22:18.408788Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EventHubsVNETTestingRG/providers/Microsoft.EventHub/namespaces/sayan-ns-4\",\"name\":\"sayan-ns-4\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westcentralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sayan-ns-4\",\"serviceBusEndpoint\":\"https://sayan-ns-4.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EventHubsVNETTestingRG/providers/Microsoft.EventHub/clusters/EventHubsVNetTesting\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-10-08T13:02:13.2138552Z\",\"updatedAt\":\"2022-10-08T13:03:05.4515828Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EventHubsVNETTestingRG/providers/Microsoft.EventHub/namespaces/testEhNS0208\",\"name\":\"testEhNS0208\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westcentralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"TestKey0407\",\"keyVaultUri\":\"https://testkvnew0407.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/PPGTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/TestUAI0506\"}}],\"requireInfrastructureEncryption\":false},\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testehns0208\",\"serviceBusEndpoint\":\"https://testEhNS0208.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EventHubsVNETTestingRG/providers/Microsoft.EventHub/clusters/EventHubsVNetTesting\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-05-16T23:01:29.9545258Z\",\"updatedAt\":\"2023-12-04T20:01:37.2629268Z\"},\"identity\":{\"principalId\":\"932c046c-a12d-4b92-bd79-4b7fbe8fe747\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned, UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/1196a38f-8e8a-4916-9056-787c19a53125/resourcegroups/PPGTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/TestUAI0301\":{\"clientId\":\"f7ae771e-2e70-40bd-9b52-114444b878fd\",\"principalId\":\"44871a36-a818-45ee-9420-bfb7cca2619c\"},\"/subscriptions/1196a38f-8e8a-4916-9056-787c19a53125/resourcegroups/PPGTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/Test-UA-MSI-0202\":{\"clientId\":\"023d6819-2030-49df-b110-a7284ea1b9ad\",\"principalId\":\"09b541fb-5692-411d-9df9-54639bfcbf73\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/PPGTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/TestUAI0412New\":{\"clientId\":\"ec83a3e2-bd7b-4e77-bde9-76ec42eb1d6a\",\"principalId\":\"2496443e-0c52-4245-84fb-6ee677269b16\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/PPGTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/TestUAI0506\":{\"clientId\":\"40578752-05e9-4b8b-bdc4-f07e960571e0\",\"principalId\":\"406cc555-ce08-485a-a5a6-ef1ccc5e7bec\"}}},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-WestCentralUS/providers/Microsoft.EventHub/namespaces/aswin-dest-mm2\",\"name\":\"aswin-dest-mm2\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westcentralus\",\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:aswin-dest-mm2\",\"serviceBusEndpoint\":\"https://aswin-dest-mm2.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EventHubsVNETTestingRG/providers/Microsoft.EventHub/clusters/EventHubsVNetTesting\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-10-18T19:41:24.0461865Z\",\"updatedAt\":\"2023-12-04T15:53:16.4739143Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/dorothytest/providers/Microsoft.EventHub/namespaces/vnetehtest\",\"name\":\"vnetehtest\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westcentralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:vnetehtest\",\"serviceBusEndpoint\":\"https://vnetehtest.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-05-16T22:58:33.12699Z\",\"updatedAt\":\"2022-05-19T16:54:18.6021539Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EventHubsVNETTestingRG/providers/Microsoft.EventHub/namespaces/EHTLSNew0505\",\"name\":\"EHTLSNew0505\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westcentralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ehtlsnew0505\",\"serviceBusEndpoint\":\"https://EHTLSNew0505.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EventHubsVNETTestingRG/providers/Microsoft.EventHub/clusters/EventHubsVNetTesting\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-05-16T23:02:06.1401459Z\",\"updatedAt\":\"2022-05-17T23:22:01.1124518Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/sjrg/providers/Microsoft.EventHub/namespaces/sjschemaregistry\",\"name\":\"sjschemaregistry\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westcentralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sjschemaregistry\",\"serviceBusEndpoint\":\"https://sjschemaregistry.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-05-17T18:19:19.008327Z\",\"updatedAt\":\"2022-05-19T17:28:45.6638878Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EventHubsVNETTestingRG/providers/Microsoft.EventHub/namespaces/ali-bypass-test\",\"name\":\"ali-bypass-test\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westcentralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"al-key\",\"keyVaultUri\":\"https://ali-kv.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/dbedb4e0-40e6-4145-81f3-f1314c150774/resourcegroups/alitest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ali-id-1\"}}],\"requireInfrastructureEncryption\":false},\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ali-bypass-test\",\"serviceBusEndpoint\":\"https://ali-bypass-test.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EventHubsVNETTestingRG/providers/Microsoft.EventHub/clusters/EventHubsVNetTesting\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-05-17T18:19:02.4757613Z\",\"updatedAt\":\"2023-12-04T20:01:37.4034354Z\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/dbedb4e0-40e6-4145-81f3-f1314c150774/resourcegroups/alitest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ali-id-1\":{\"clientId\":\"16bc3fc1-8bc8-46a4-bd4d-583104db7d9a\",\"principalId\":\"6b03c867-9188-427a-a440-2d0e624c95cb\"}}},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EventHubsVNETTestingRG/providers/Microsoft.EventHub/namespaces/testencypt0128\",\"name\":\"testencypt0128\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westcentralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"testkey\",\"keyVaultUri\":\"https://testrbac0113.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testencypt0128\",\"serviceBusEndpoint\":\"https://testencypt0128.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EventHubsVNETTestingRG/providers/Microsoft.EventHub/clusters/EventHubsVNetTesting\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-05-16T23:00:31.2082799Z\",\"updatedAt\":\"2023-12-04T20:01:37.3722386Z\"},\"identity\":{\"principalId\":\"e9d041e2-62a8-41c8-9b88-71031dbf2695\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-WestCentralUS/providers/Microsoft.EventHub/namespaces/yamlin-mm21\",\"name\":\"yamlin-mm21\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westcentralus\",\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:yamlin-mm21\",\"serviceBusEndpoint\":\"https://yamlin-mm21.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EventHubsVNETTestingRG/providers/Microsoft.EventHub/clusters/EventHubsVNetTesting\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-02-10T08:04:34.1390399Z\",\"updatedAt\":\"2023-02-10T08:05:23.6607109Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EventHubsVNETTestingRG/providers/Microsoft.EventHub/namespaces/aswin-mirror-destns\",\"name\":\"aswin-mirror-destns\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westcentralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:aswin-mirror-destns\",\"serviceBusEndpoint\":\"https://aswin-mirror-destns.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EventHubsVNETTestingRG/providers/Microsoft.EventHub/clusters/EventHubsVNetTesting\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-10-10T20:14:39.4742863Z\",\"updatedAt\":\"2022-10-10T20:15:29.4467056Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EventHubsVNETTestingRG/providers/Microsoft.EventHub/namespaces/sj-westcentralus\",\"name\":\"sj-westcentralus\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westcentralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sj-westcentralus\",\"serviceBusEndpoint\":\"https://sj-westcentralus.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EventHubsVNETTestingRG/providers/Microsoft.EventHub/clusters/EventHubsVNetTesting\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-05-16T22:59:55.9875549Z\",\"updatedAt\":\"2022-05-19T16:59:09.0503496Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EventHubsVNETTestingRG/providers/Microsoft.EventHub/namespaces/testNSWOAZ1220\",\"name\":\"testNSWOAZ1220\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westcentralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testnswoaz1220\",\"serviceBusEndpoint\":\"https://testNSWOAZ1220.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EventHubsVNETTestingRG/providers/Microsoft.EventHub/clusters/EventHubsVNetTesting\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-12-21T01:53:43.1757214Z\",\"updatedAt\":\"2022-12-21T01:54:39.7010704Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/SaglodhaRG/providers/Microsoft.EventHub/namespaces/EventHubsPremium-saglodha\",\"name\":\"EventHubsPremium-saglodha\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westcentralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:eventhubspremium-saglodha\",\"serviceBusEndpoint\":\"https://EventHubsPremium-saglodha.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-03-06T17:32:20.9502289Z\",\"updatedAt\":\"2024-03-06T17:33:10.810149Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EventHubsVNETTestingRG/providers/Microsoft.EventHub/namespaces/sayan-ns-500\",\"name\":\"sayan-ns-500\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westcentralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sayan-ns-500\",\"serviceBusEndpoint\":\"https://sayan-ns-500.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EventHubsVNETTestingRG/providers/Microsoft.EventHub/clusters/EventHubsVNetTesting\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-03-30T13:35:06.8738521Z\",\"updatedAt\":\"2023-03-30T13:36:00.8175349Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/kindrasiri_eh_benchmark/providers/Microsoft.EventHub/namespaces/justtesting1\",\"name\":\"justtesting1\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westcentralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:justtesting1\",\"serviceBusEndpoint\":\"https://justtesting1.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-08-22T06:09:40.9691251Z\",\"updatedAt\":\"2023-08-22T06:10:51.1990165Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EventHubsVNETTestingRG/providers/Microsoft.EventHub/namespaces/ToBeRemovedNS\",\"name\":\"ToBeRemovedNS\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westcentralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"mykey12\",\"keyVaultUri\":\"https://sayan-kv-1.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:toberemovedns\",\"serviceBusEndpoint\":\"https://ToBeRemovedNS.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EventHubsVNETTestingRG/providers/Microsoft.EventHub/clusters/EventHubsVNetTesting\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-03-15T04:28:40.2623524Z\",\"updatedAt\":\"2023-12-04T20:01:37.4503115Z\"},\"identity\":{\"principalId\":\"54596660-8ffe-4fdb-94e4-2a5383682a37\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/asabench-cesarme/providers/Microsoft.EventHub/namespaces/msgnamespacekpi\",\"name\":\"msgnamespacekpi\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westcentralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:msgnamespacekpi\",\"serviceBusEndpoint\":\"https://msgnamespacekpi.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":40,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-08-23T05:40:45.9272768Z\",\"updatedAt\":\"2023-12-04T15:45:45.9227173Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":31}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/jakeschiller-synthetics/providers/Microsoft.EventHub/namespaces/VNetPass\",\"name\":\"VNetPass\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westcentralus\",\"tags\":{\"jms-for\":\"canary\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:vnetpass\",\"serviceBusEndpoint\":\"https://VNetPass.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-07-07T21:41:46.0980117Z\",\"updatedAt\":\"2023-12-04T15:50:18.295747Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.EventHub/namespaces/test1264\",\"name\":\"test1264\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westcentralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:test1264\",\"serviceBusEndpoint\":\"https://test1264.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":10,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-09-09T05:08:43.6367663Z\",\"updatedAt\":\"2023-12-04T20:04:25.0622295Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/abhigarg-publicnetworkaccess-cbn/providers/Microsoft.EventHub/namespaces/ardsouza-1-10-2024-namespaceskuvalidation-2\",\"name\":\"ardsouza-1-10-2024-namespaceskuvalidation-2\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westcentralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ardsouza-1-10-2024-namespaceskuvalidation-2\",\"serviceBusEndpoint\":\"https://ardsouza-1-10-2024-namespaceskuvalidation-2.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-01-11T02:11:37.724932Z\",\"updatedAt\":\"2024-01-11T06:11:38.3593998Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":60}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EventHubsVNETTestingRG/providers/Microsoft.EventHub/namespaces/TestAppGroups\",\"name\":\"TestAppGroups\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westcentralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testappgroups\",\"serviceBusEndpoint\":\"https://TestAppGroups.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/EventHubsVNETTestingRG/providers/Microsoft.EventHub/clusters/EventHubsVNetTesting\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-05-16T22:58:51.2887558Z\",\"updatedAt\":\"2023-12-04T15:49:38.9967075Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/sjrg/providers/Microsoft.EventHub/namespaces/ns-8e2e31bc-bfc3-452d-85c8-7b6c13957cc6\",\"name\":\"ns-8e2e31bc-bfc3-452d-85c8-7b6c13957cc6\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westeurope\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ns-8e2e31bc-bfc3-452d-85c8-7b6c13957cc6\",\"serviceBusEndpoint\":\"https://ns-8e2e31bc-bfc3-452d-85c8-7b6c13957cc6.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":4,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-04-26T22:54:14.7790873Z\",\"updatedAt\":\"2023-04-26T22:55:04.7612136Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.EventHub/namespaces/davadhani5026\",\"name\":\"davadhani5026\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westeurope\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:davadhani5026\",\"serviceBusEndpoint\":\"https://davadhani5026.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-12-12T10:58:50.8113648Z\",\"updatedAt\":\"2023-12-12T11:03:26.2459366Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/brdillow/providers/Microsoft.EventHub/namespaces/brdillow-sync-test\",\"name\":\"brdillow-sync-test\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westeurope\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:brdillow-sync-test\",\"serviceBusEndpoint\":\"https://brdillow-sync-test.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-27T19:23:29.5940921Z\",\"updatedAt\":\"2022-06-27T19:23:29.5940921Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.EventHub/namespaces/davadhani4026\",\"name\":\"davadhani4026\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westeurope\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:davadhani4026\",\"serviceBusEndpoint\":\"https://davadhani4026.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-12-12T10:58:02.0214315Z\",\"updatedAt\":\"2023-12-12T10:58:59.7667047Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/test-migration/providers/Microsoft.EventHub/namespaces/eventhub29821\",\"name\":\"eventhub29821\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westeurope\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:eventhub29821\",\"serviceBusEndpoint\":\"https://eventhub29821.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-03-11T14:17:13.0053216Z\",\"updatedAt\":\"2024-03-11T14:18:02.9485219Z\"},\"sku\":{\"name\":\"Basic\",\"tier\":\"Basic\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.EventHub/namespaces/davadhani-prem5641\",\"name\":\"davadhani-prem5641\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westeurope\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:davadhani-prem5641\",\"serviceBusEndpoint\":\"https://davadhani-prem5641.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-12-08T10:45:26.184701Z\",\"updatedAt\":\"2023-12-08T10:46:42.8712852Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.EventHub/namespaces/test-tu-sync2\",\"name\":\"test-tu-sync2\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westeurope\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:test-tu-sync2\",\"serviceBusEndpoint\":\"https://test-tu-sync2.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-10-18T09:55:28.2409701Z\",\"updatedAt\":\"2023-10-18T09:56:18.4045353Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/manojprasad-rampup/providers/Microsoft.EventHub/namespaces/eventhub-nmp\",\"name\":\"eventhub-nmp\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\",\"Offload\":\"Yes\"},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:eventhub-nmp\",\"serviceBusEndpoint\":\"https://eventhub-nmp.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":10,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-09T21:20:24.1164924Z\",\"updatedAt\":\"2024-02-23T19:43:31.9241424Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/RGName176/providers/Microsoft.EventHub/namespaces/Eventhub-Namespace-8714\",\"name\":\"Eventhub-Namespace-8714\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:eventhub-namespace-8714\",\"serviceBusEndpoint\":\"https://Eventhub-Namespace-8714.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-09T22:09:07.0458879Z\",\"updatedAt\":\"2022-06-09T22:09:07.0458879Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/mmrg4193/providers/Microsoft.EventHub/namespaces/myehkafkasource28074\",\"name\":\"myehkafkasource28074\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:myehkafkasource28074\",\"serviceBusEndpoint\":\"https://myehkafkasource28074.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-09T21:18:58.5579721Z\",\"updatedAt\":\"2022-06-09T21:18:58.5579721Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.EventHub/namespaces/testns5111\",\"name\":\"testns5111\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testns5111\",\"serviceBusEndpoint\":\"https://testns5111.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-11-06T15:18:05.7546004Z\",\"updatedAt\":\"2023-11-06T15:26:23.8109133Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/RSG9576/providers/Microsoft.EventHub/namespaces/Eventhub-Namespace-4612\",\"name\":\"Eventhub-Namespace-4612\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:eventhub-namespace-4612\",\"serviceBusEndpoint\":\"https://Eventhub-Namespace-4612.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-09T21:18:32.9599416Z\",\"updatedAt\":\"2022-06-09T21:18:32.9599416Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/JG-EH-Test-RG/providers/Microsoft.EventHub/namespaces/Jg-standard\",\"name\":\"Jg-standard\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:jg-standard\",\"serviceBusEndpoint\":\"https://Jg-standard.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-12-07T15:57:48.6948885Z\",\"updatedAt\":\"2022-12-07T15:58:43.7583625Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/RGName176/providers/Microsoft.EventHub/namespaces/Eh-NamespaceKafka-1278\",\"name\":\"Eh-NamespaceKafka-1278\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:eh-namespacekafka-1278\",\"serviceBusEndpoint\":\"https://Eh-NamespaceKafka-1278.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-09T23:49:55.4971469Z\",\"updatedAt\":\"2022-06-09T23:49:55.4971469Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/assures-kafka/providers/Microsoft.EventHub/namespaces/amqpkafkaissue\",\"name\":\"amqpkafkaissue\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:amqpkafkaissue\",\"serviceBusEndpoint\":\"https://amqpkafkaissue.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-10-31T19:56:20.8449818Z\",\"updatedAt\":\"2022-10-31T19:57:10.2478203Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":6}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/RSG770/providers/Microsoft.EventHub/namespaces/Eventhub-Namespace-4098\",\"name\":\"Eventhub-Namespace-4098\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:eventhub-namespace-4098\",\"serviceBusEndpoint\":\"https://Eventhub-Namespace-4098.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-10T01:36:41.4764431Z\",\"updatedAt\":\"2022-06-10T01:36:41.4764431Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/assures-kafka/providers/Microsoft.EventHub/namespaces/ehpartitioncounttrial\",\"name\":\"ehpartitioncounttrial\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ehpartitioncounttrial\",\"serviceBusEndpoint\":\"https://ehpartitioncounttrial.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-10T02:31:27.5842338Z\",\"updatedAt\":\"2022-06-10T02:31:27.5842338Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":2}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/brdillow/providers/Microsoft.EventHub/namespaces/brdillow-archivetest\",\"name\":\"brdillow-archivetest\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:brdillow-archivetest\",\"serviceBusEndpoint\":\"https://brdillow-archivetest.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":15,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-11-18T00:45:05.2068302Z\",\"updatedAt\":\"2022-11-18T00:45:55.3827628Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":4}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/JG-EH-Test-RG/providers/Microsoft.EventHub/namespaces/jg-premium\",\"name\":\"jg-premium\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:jg-premium\",\"serviceBusEndpoint\":\"https://jg-premium.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-02-02T17:48:30.9174475Z\",\"updatedAt\":\"2023-02-02T17:49:44.3872339Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.EventHub/namespaces/samplenamespacedamo\",\"name\":\"samplenamespacedamo\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:samplenamespacedamo\",\"serviceBusEndpoint\":\"https://samplenamespacedamo.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":10,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-09T23:49:02.0262613Z\",\"updatedAt\":\"2024-02-23T19:43:32.0335243Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-WestUS/providers/Microsoft.EventHub/namespaces/autoinflateiss2ns\",\"name\":\"autoinflateiss2ns\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:autoinflateiss2ns\",\"serviceBusEndpoint\":\"https://autoinflateiss2ns.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":6,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-09T22:08:37.3243875Z\",\"updatedAt\":\"2022-06-09T22:08:37.3243875Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/capturerg/providers/Microsoft.EventHub/namespaces/testSAS\",\"name\":\"testSAS\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testsas\",\"serviceBusEndpoint\":\"https://testSAS.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-09T22:07:08.8253987Z\",\"updatedAt\":\"2022-06-09T22:07:08.8253987Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/mmrg4193/providers/Microsoft.EventHub/namespaces/myehkafkadest19690\",\"name\":\"myehkafkadest19690\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:myehkafkadest19690\",\"serviceBusEndpoint\":\"https://myehkafkadest19690.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-09T23:48:14.5028864Z\",\"updatedAt\":\"2022-06-09T23:48:14.5028864Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/anway-westus-kusto-rg/providers/Microsoft.EventHub/namespaces/ADX-EG-servicebusint7logs\",\"name\":\"ADX-EG-servicebusint7logs\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:adx-eg-servicebusint7logs\",\"serviceBusEndpoint\":\"https://ADX-EG-servicebusint7logs.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-07-14T23:30:44.8077265Z\",\"updatedAt\":\"2023-07-14T23:31:38.4194012Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/abhigarg-publicnetworkaccess-cbn/providers/Microsoft.EventHub/namespaces/abhigarg-ns-new1-2024-03-13-sec\",\"name\":\"abhigarg-ns-new1-2024-03-13-sec\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:abhigarg-ns-new1-2024-03-13-sec\",\"serviceBusEndpoint\":\"https://abhigarg-ns-new1-2024-03-13-sec.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-03-13T18:46:52.001323Z\",\"updatedAt\":\"2024-03-13T19:03:48.2027971Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/JG-EH-Test-RG/providers/Microsoft.EventHub/namespaces/JG-Test-Namespace-GeoDr\",\"name\":\"JG-Test-Namespace-GeoDr\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:jg-test-namespace-geodr\",\"serviceBusEndpoint\":\"https://JG-Test-Namespace-GeoDr.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-09T21:19:36.4204623Z\",\"updatedAt\":\"2024-02-23T19:43:31.9397701Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/RSG2226/providers/Microsoft.EventHub/namespaces/Eventhub-Namespace-6210\",\"name\":\"Eventhub-Namespace-6210\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:eventhub-namespace-6210\",\"serviceBusEndpoint\":\"https://Eventhub-Namespace-6210.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-10T00:45:23.8917575Z\",\"updatedAt\":\"2022-06-10T00:45:23.8917575Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/jakeschiller-mhsm/providers/Microsoft.EventHub/namespaces/mhsm-dedicated-ns\",\"name\":\"mhsm-dedicated-ns\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:mhsm-dedicated-ns\",\"serviceBusEndpoint\":\"https://mhsm-dedicated-ns.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/jakeschiller-mhsm/providers/Microsoft.EventHub/clusters/mhsm-dedicated-cluster\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-03-20T14:27:57.6778006Z\",\"updatedAt\":\"2024-02-23T19:20:36.0046873Z\"},\"identity\":{\"principalId\":\"4f18faa9-2776-48e6-b735-0d073c193d88\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/assures-kafka/providers/Microsoft.EventHub/namespaces/kafka-perf-decrease\",\"name\":\"kafka-perf-decrease\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:kafka-perf-decrease\",\"serviceBusEndpoint\":\"https://kafka-perf-decrease.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-09T23:50:14.5463138Z\",\"updatedAt\":\"2022-06-09T23:50:14.5463138Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/test-migration/providers/Microsoft.EventHub/namespaces/eventhub2231\",\"name\":\"eventhub2231\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:eventhub2231\",\"serviceBusEndpoint\":\"https://eventhub2231.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/test-migration/providers/Microsoft.EventHub/clusters/cluster1\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-03-27T14:19:42.5938662Z\",\"updatedAt\":\"2024-03-27T14:20:24.4391957Z\"},\"sku\":{\"name\":\"Basic\",\"tier\":\"Basic\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/RSG8229/providers/Microsoft.EventHub/namespaces/Eventhub-Namespace-8628\",\"name\":\"Eventhub-Namespace-8628\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:eventhub-namespace-8628\",\"serviceBusEndpoint\":\"https://Eventhub-Namespace-8628.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-16T06:09:06.4335781Z\",\"updatedAt\":\"2024-02-23T03:15:19.1438001Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/RSG7473/providers/Microsoft.EventHub/namespaces/Eventhub-Namespace-7104\",\"name\":\"Eventhub-Namespace-7104\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:eventhub-namespace-7104\",\"serviceBusEndpoint\":\"https://Eventhub-Namespace-7104.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-19T11:45:32.2234935Z\",\"updatedAt\":\"2024-02-23T02:57:13.2905324Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-CentralUSEUAP/providers/Microsoft.EventHub/namespaces/hmlam-westus-another\",\"name\":\"hmlam-westus-another\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:hmlam-westus-another\",\"serviceBusEndpoint\":\"https://hmlam-westus-another.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-10-11T17:57:17.9563687Z\",\"updatedAt\":\"2024-02-23T19:43:32.0335243Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-2124/providers/Microsoft.EventHub/namespaces/sdk-NS-4527\",\"name\":\"sdk-NS-4527\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-ns-4527\",\"serviceBusEndpoint\":\"https://sdk-NS-4527.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":10,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-09T18:12:14.9567157Z\",\"updatedAt\":\"2022-06-09T20:38:44.1413635Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/kindrasiri-synapse-test-rg/providers/Microsoft.EventHub/namespaces/azuremsgtest\",\"name\":\"azuremsgtest\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:azuremsgtest\",\"serviceBusEndpoint\":\"https://azuremsgtest.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-09T22:07:30.4976868Z\",\"updatedAt\":\"2022-06-09T22:07:30.4976868Z\"},\"sku\":{\"name\":\"Basic\",\"tier\":\"Basic\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/lmanickam-migration-testing/providers/Microsoft.EventHub/namespaces/lmanickam-vnet-dr-eh-std-secondary-centraluseuap\",\"name\":\"lmanickam-vnet-dr-eh-std-secondary-centraluseuap\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:lmanickam-vnet-dr-eh-std-secondary-centraluseuap\",\"serviceBusEndpoint\":\"https://lmanickam-vnet-dr-eh-std-secondary-centraluseuap.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-05-04T11:53:43.5215717Z\",\"updatedAt\":\"2024-02-23T19:42:30.7500359Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/shubhatestrg/providers/Microsoft.EventHub/namespaces/testgeotusec\",\"name\":\"testgeotusec\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testgeotusec\",\"serviceBusEndpoint\":\"https://testgeotusec.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":20,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-10T01:37:31.0907973Z\",\"updatedAt\":\"2024-02-23T19:44:32.6326882Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":7}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EastUS2/providers/Microsoft.EventHub/namespaces/newfinalautosctest\",\"name\":\"newfinalautosctest\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:newfinalautosctest\",\"serviceBusEndpoint\":\"https://newfinalautosctest.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":2,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-09T18:10:42.2005284Z\",\"updatedAt\":\"2022-06-09T20:36:53.6378231Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":2}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/srtests/providers/Microsoft.EventHub/namespaces/srtests-p\",\"name\":\"srtests-p\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:srtests-p\",\"serviceBusEndpoint\":\"https://srtests-p.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-06-16T20:37:36.2716809Z\",\"updatedAt\":\"2024-04-17T19:40:40.3454888Z\"},\"identity\":{\"principalId\":\"5557a48d-9cf5-4f2b-b920-53d526bb7e26\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/assures-kafka/providers/Microsoft.EventHub/namespaces/randomtryingnamespace\",\"name\":\"randomtryingnamespace\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:randomtryingnamespace\",\"serviceBusEndpoint\":\"https://randomtryingnamespace.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":6,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-09T18:11:44.8932201Z\",\"updatedAt\":\"2022-06-09T20:38:14.4053668Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":2}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/testehgeodr2/providers/Microsoft.EventHub/namespaces/testehgeodrsecondaryns1\",\"name\":\"testehgeodrsecondaryns1\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testehgeodrsecondaryns1\",\"serviceBusEndpoint\":\"https://testehgeodrsecondaryns1.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":20,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-09T23:47:23.8137392Z\",\"updatedAt\":\"2024-02-23T19:44:32.7108108Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":4}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/assures-kafka/providers/Microsoft.EventHub/namespaces/eventhub-kafka-stress-data\",\"name\":\"eventhub-kafka-stress-data\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:eventhub-kafka-stress-data\",\"serviceBusEndpoint\":\"https://eventhub-kafka-stress-data.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-11-15T19:21:27.6638271Z\",\"updatedAt\":\"2022-11-15T19:22:16.6877041Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":40}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/RSG2226/providers/Microsoft.EventHub/namespaces/Eventhub-Namespace2-3209\",\"name\":\"Eventhub-Namespace2-3209\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:eventhub-namespace2-3209\",\"serviceBusEndpoint\":\"https://Eventhub-Namespace2-3209.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-09T22:08:51.7332838Z\",\"updatedAt\":\"2022-06-09T22:08:51.7332838Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/assures-kafka/providers/Microsoft.EventHub/namespaces/stnsconnectcomp\",\"name\":\"stnsconnectcomp\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:stnsconnectcomp\",\"serviceBusEndpoint\":\"https://stnsconnectcomp.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-10-17T17:59:48.5913497Z\",\"updatedAt\":\"2022-10-17T18:00:42.7685276Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":3}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/namespaces/hhrmasternamens\",\"name\":\"hhrmasternamens\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:hhrmasternamens\",\"serviceBusEndpoint\":\"https://hhrmasternamens.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-04-04T19:19:58.5472805Z\",\"updatedAt\":\"2023-04-04T19:20:48.8603812Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EASTUS2EUAP/providers/Microsoft.EventHub/namespaces/askgedorsecondaryvmmg001\",\"name\":\"askgedorsecondaryvmmg001\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:askgedorsecondaryvmmg001\",\"serviceBusEndpoint\":\"https://askgedorsecondaryvmmg001.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-24T23:46:42.7836993Z\",\"updatedAt\":\"2024-02-01T22:49:49.4823991Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/srtests/providers/Microsoft.EventHub/namespaces/srtests\",\"name\":\"srtests\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:srtests\",\"serviceBusEndpoint\":\"https://srtests.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-24T23:06:48.857273Z\",\"updatedAt\":\"2023-12-05T06:04:47.7377788Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-6828/providers/Microsoft.EventHub/namespaces/sdk-NS-2916\",\"name\":\"sdk-NS-2916\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus2\",\"tags\":{\"tag1\":\"value1\",\"tag2\":\"value2\"},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sdk-ns-2916\",\"serviceBusEndpoint\":\"https://sdk-NS-2916.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":10,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-24T23:44:41.8747738Z\",\"updatedAt\":\"2022-06-24T23:44:41.8747738Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/PPGTest/providers/Microsoft.EventHub/namespaces/TestEHAppGroups0614\",\"name\":\"TestEHAppGroups0614\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testehappgroups0614\",\"serviceBusEndpoint\":\"https://TestEHAppGroups0614.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-06-14T22:10:54.371971Z\",\"updatedAt\":\"2024-03-18T16:27:27.5192385Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ardsouza-ehpremium-testing/providers/Microsoft.EventHub/namespaces/ardsouza-ehpremium-test-westus2\",\"name\":\"ardsouza-ehpremium-test-westus2\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ardsouza-ehpremium-test-westus2\",\"serviceBusEndpoint\":\"https://ardsouza-ehpremium-test-westus2.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-25T00:25:06.331477Z\",\"updatedAt\":\"2022-06-25T00:25:06.331477Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EASTUS2EUAP/providers/Microsoft.EventHub/namespaces/assures-secondary-ns\",\"name\":\"assures-secondary-ns\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:assures-secondary-ns\",\"serviceBusEndpoint\":\"https://assures-secondary-ns.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-24T20:27:35.046731Z\",\"updatedAt\":\"2022-06-24T20:27:35.046731Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/srtests/providers/Microsoft.EventHub/namespaces/srtests-s\",\"name\":\"srtests-s\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:srtests-s\",\"serviceBusEndpoint\":\"https://srtests-s.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-02-13T18:52:40.9420198Z\",\"updatedAt\":\"2024-02-13T18:53:54.2432446Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/assures-kafka/providers/Microsoft.EventHub/namespaces/networkingloadfedexissue\",\"name\":\"networkingloadfedexissue\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:networkingloadfedexissue\",\"serviceBusEndpoint\":\"https://networkingloadfedexissue.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-24T21:05:37.0676556Z\",\"updatedAt\":\"2022-06-24T21:05:37.0676556Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/zztestrg/providers/Microsoft.EventHub/namespaces/zztest03\",\"name\":\"zztest03\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:zztest03\",\"serviceBusEndpoint\":\"https://zztest03.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-24T21:06:43.5172829Z\",\"updatedAt\":\"2024-02-01T22:49:49.4355227Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EASTUS2EUAP/providers/Microsoft.EventHub/namespaces/nssecondaryaskvmssmig\",\"name\":\"nssecondaryaskvmssmig\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:nssecondaryaskvmssmig\",\"serviceBusEndpoint\":\"https://nssecondaryaskvmssmig.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-24T22:28:52.9533126Z\",\"updatedAt\":\"2022-06-24T22:28:52.9533126Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/assures-kafka/providers/Microsoft.EventHub/namespaces/assures-txn01\",\"name\":\"assures-txn01\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:assures-txn01\",\"serviceBusEndpoint\":\"https://assures-txn01.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":5,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-24T19:44:47.7246908Z\",\"updatedAt\":\"2024-04-24T19:45:17.0188711Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":2}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/sjrg/providers/Microsoft.EventHub/namespaces/sjwestus2\",\"name\":\"sjwestus2\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sjwestus2\",\"serviceBusEndpoint\":\"https://sjwestus2.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-24T23:45:02.3843675Z\",\"updatedAt\":\"2022-06-24T23:45:02.3843675Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/namespaces/asksecondarygeodr003\",\"name\":\"asksecondarygeodr003\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:asksecondarygeodr003\",\"serviceBusEndpoint\":\"https://asksecondarygeodr003.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-24T23:46:26.1996271Z\",\"updatedAt\":\"2022-06-24T23:46:26.1996271Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/spehubrg/providers/Microsoft.EventHub/namespaces/spehbupremsecondaryns\",\"name\":\"spehbupremsecondaryns\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:spehbupremsecondaryns\",\"serviceBusEndpoint\":\"https://spehbupremsecondaryns.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-25T00:25:28.9283242Z\",\"updatedAt\":\"2024-02-01T22:51:50.6617085Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ehtests/providers/Microsoft.EventHub/namespaces/ehtests-eh\",\"name\":\"ehtests-eh\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ehtests-eh\",\"serviceBusEndpoint\":\"https://ehtests-eh.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-10-25T15:50:28.0380374Z\",\"updatedAt\":\"2023-10-25T15:56:58.6788559Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/robece-preignite2023/providers/Microsoft.EventHub/namespaces/robece-preignite2023\",\"name\":\"robece-preignite2023\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:robece-preignite2023\",\"serviceBusEndpoint\":\"https://robece-preignite2023.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-11-10T02:14:03.2896716Z\",\"updatedAt\":\"2023-11-10T02:14:52.0942588Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/assures-kafka/providers/Microsoft.EventHub/namespaces/stress-kafka-perfcounters\",\"name\":\"stress-kafka-perfcounters\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:stress-kafka-perfcounters\",\"serviceBusEndpoint\":\"https://stress-kafka-perfcounters.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-11-14T19:42:39.3696454Z\",\"updatedAt\":\"2022-11-14T19:43:29.1171817Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":40}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Ardsouza-MoveTest-WestEurope-Dest-1/providers/Microsoft.EventHub/namespaces/ehspringboot\",\"name\":\"ehspringboot\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ehspringboot\",\"serviceBusEndpoint\":\"https://ehspringboot.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-24T22:27:25.4385326Z\",\"updatedAt\":\"2022-06-24T22:27:25.4385326Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/assures-kafka/providers/Microsoft.EventHub/namespaces/Asdfnamesp\",\"name\":\"Asdfnamesp\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:asdfnamesp\",\"serviceBusEndpoint\":\"https://Asdfnamesp.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-07-27T20:46:22.0653559Z\",\"updatedAt\":\"2023-07-27T20:47:11.9202942Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/PPGTest/providers/Microsoft.EventHub/namespaces/TestMSIEHDataGenIssue0811\",\"name\":\"TestMSIEHDataGenIssue0811\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"testkey0306\",\"keyVaultUri\":\"https://testkv0306.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":true},\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testmsiehdatagenissue0811\",\"serviceBusEndpoint\":\"https://TestMSIEHDataGenIssue0811.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-08-11T16:34:08.6452743Z\",\"updatedAt\":\"2023-08-11T16:44:23.0938602Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/PPGTest/providers/Microsoft.EventHub/namespaces/TestEHExplorer0201\",\"name\":\"TestEHExplorer0201\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testehexplorer0201\",\"serviceBusEndpoint\":\"https://TestEHExplorer0201.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-02-01T20:54:58.131912Z\",\"updatedAt\":\"2024-04-03T21:24:30.2482975Z\"},\"identity\":{\"principalId\":\"107f8163-102b-4424-8428-91c121c9d40d\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned, UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/managedidentitytest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userassigned\":{\"clientId\":\"f295b2b4-8837-4bad-9f44-070fa1a854d9\",\"principalId\":\"c23c3c9c-04df-4cd0-8ca8-e859610c9431\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/PPGTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/TestUAI0412New\":{\"clientId\":\"ec83a3e2-bd7b-4e77-bde9-76ec42eb1d6a\",\"principalId\":\"2496443e-0c52-4245-84fb-6ee677269b16\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/PPGTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/TestUAI0506\":{\"clientId\":\"40578752-05e9-4b8b-bdc4-f07e960571e0\",\"principalId\":\"406cc555-ce08-485a-a5a6-ef1ccc5e7bec\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ardsouza-test-5-19/providers/Microsoft.EventHub/namespaces/ardsouza-westus-2-ehprem\",\"name\":\"ardsouza-westus-2-ehprem\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ardsouza-westus-2-ehprem\",\"serviceBusEndpoint\":\"https://ardsouza-westus-2-ehprem.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-24T22:27:55.7749968Z\",\"updatedAt\":\"2022-06-24T22:27:55.7749968Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":2}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AmirDesignersDemo/providers/Microsoft.EventHub/namespaces/amirdesignerdemo\",\"name\":\"amirdesignerdemo\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:amirdesignerdemo\",\"serviceBusEndpoint\":\"https://amirdesignerdemo.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-07-18T23:31:49.1415005Z\",\"updatedAt\":\"2023-12-05T06:09:10.4541764Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EASTUS2EUAP/providers/Microsoft.EventHub/namespaces/assures-westus2geodrvmssmg002\",\"name\":\"assures-westus2geodrvmssmg002\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:assures-westus2geodrvmssmg002\",\"serviceBusEndpoint\":\"https://assures-westus2geodrvmssmg002.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-24T21:06:18.9535278Z\",\"updatedAt\":\"2022-06-24T21:06:18.9535278Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/rg-eldert-implementing-an-event-sourcing-strategy-on-azure/providers/Microsoft.EventHub/namespaces/implementing-event-sourcing-strategy\",\"name\":\"implementing-event-sourcing-strategy\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus2\",\"tags\":{\"CreationDate\":\"28-03-2021\",\"Project\":\"Implementing an Event Sourcing strategy on Azure\",\"Purpose\":\"Session\"},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:implementing-event-sourcing-strategy\",\"serviceBusEndpoint\":\"https://implementing-event-sourcing-strategy.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-25T00:26:15.0499646Z\",\"updatedAt\":\"2023-12-05T05:47:58.6808122Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/assures-geodr-prod/providers/Microsoft.EventHub/namespaces/geodr-primary\",\"name\":\"geodr-primary\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:geodr-primary\",\"serviceBusEndpoint\":\"https://geodr-primary.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-24T23:06:17.3769242Z\",\"updatedAt\":\"2022-06-24T23:06:17.3769242Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cesar-cdc/providers/Microsoft.EventHub/namespaces/cesar-prod-geotest\",\"name\":\"cesar-prod-geotest\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:cesar-prod-geotest\",\"serviceBusEndpoint\":\"https://cesar-prod-geotest.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-21T02:40:12.7574948Z\",\"updatedAt\":\"2024-04-21T02:40:37.9768418Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/sjrg/providers/Microsoft.EventHub/namespaces/sjwestus21\",\"name\":\"sjwestus21\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus2\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sjwestus21\",\"serviceBusEndpoint\":\"https://sjwestus21.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-24T23:46:08.5047468Z\",\"updatedAt\":\"2022-06-24T23:46:08.5047468Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/robece-playground/providers/Microsoft.EventHub/namespaces/robece-nseh01\",\"name\":\"robece-nseh01\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus3\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:robece-nseh01\",\"serviceBusEndpoint\":\"https://robece-nseh01.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-04-12T10:28:04.1176559Z\",\"updatedAt\":\"2023-04-12T10:28:56.9785942Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":4}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/jfgEvtHbsRsrcGrp1/providers/Microsoft.EventHub/namespaces/tridentEventHubsDemo\",\"name\":\"tridentEventHubsDemo\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus3\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:tridenteventhubsdemo\",\"serviceBusEndpoint\":\"https://tridentEventHubsDemo.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":5,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-04-04T00:17:35.025843Z\",\"updatedAt\":\"2023-04-04T00:18:22.6370461Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/suparame-rg/providers/Microsoft.EventHub/namespaces/suparame-testeh\",\"name\":\"suparame-testeh\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus3\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:suparame-testeh\",\"serviceBusEndpoint\":\"https://suparame-testeh.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-01-29T21:28:27.2992249Z\",\"updatedAt\":\"2023-01-29T21:29:20.9753886Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ebs-eh-dedicated/providers/Microsoft.EventHub/namespaces/ebsehns1\",\"name\":\"ebsehns1\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus3\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ebsehns1\",\"serviceBusEndpoint\":\"https://ebsehns1.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ebs-eh-dedicated/providers/Microsoft.EventHub/clusters/ebsehdedicated\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-07-10T13:46:17.5851461Z\",\"updatedAt\":\"2023-07-10T13:47:15.0186446Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/compytest-wus3-rg/providers/Microsoft.EventHub/namespaces/compytest-wus3\",\"name\":\"compytest-wus3\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus3\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:compytest-wus3\",\"serviceBusEndpoint\":\"https://compytest-wus3.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-05-03T22:25:57.104209Z\",\"updatedAt\":\"2023-05-18T15:48:28.0190866Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ardsouza-ehpremium-testing/providers/Microsoft.EventHub/namespaces/ardsouza-ehpremium-test-westus3\",\"name\":\"ardsouza-ehpremium-test-westus3\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus3\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ardsouza-ehpremium-test-westus3\",\"serviceBusEndpoint\":\"https://ardsouza-ehpremium-test-westus3.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-24T22:07:52.3465147Z\",\"updatedAt\":\"2022-06-24T23:28:41.5377606Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ebs-eh-dedicated/providers/Microsoft.EventHub/namespaces/throughput\",\"name\":\"throughput\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus3\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:throughput\",\"serviceBusEndpoint\":\"https://throughput.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ebs-eh-dedicated/providers/Microsoft.EventHub/clusters/ebsehdedicated\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-08-01T13:43:30.9617822Z\",\"updatedAt\":\"2023-08-01T13:44:22.3912583Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cleanupservice/providers/Microsoft.EventHub/namespaces/TestNSPairIssuePrim0214\",\"name\":\"TestNSPairIssuePrim0214\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"westus3\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testnspairissueprim0214\",\"serviceBusEndpoint\":\"https://TestNSPairIssuePrim0214.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-02-14T21:53:34.2727477Z\",\"updatedAt\":\"2024-02-14T22:01:15.2171421Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/PPGTest/providers/Microsoft.EventHub/namespaces/TestCaptureMSI0403\",\"name\":\"TestCaptureMSI0403\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centraluseuap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testcapturemsi0403\",\"serviceBusEndpoint\":\"https://TestCaptureMSI0403.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-04-04T03:07:04.609377Z\",\"updatedAt\":\"2023-10-17T18:05:16.2114153Z\"},\"identity\":{\"principalId\":\"7133c348-2f7e-4976-a50c-453e7a371960\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-CentralUSEUAP/providers/Microsoft.EventHub/namespaces/ministress-01\",\"name\":\"ministress-01\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centraluseuap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ministress-01\",\"serviceBusEndpoint\":\"https://ministress-01.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-06-07T21:52:35.7803202Z\",\"updatedAt\":\"2023-09-17T21:07:25.3605513Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":40}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.EventHub/namespaces/davadhani252923\",\"name\":\"davadhani252923\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centraluseuap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:davadhani252923\",\"serviceBusEndpoint\":\"https://davadhani252923.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-01-10T10:02:03.5054618Z\",\"updatedAt\":\"2024-01-10T10:02:31.8827611Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/jakeschiller-synthetics/providers/Microsoft.EventHub/namespaces/IpFiltersFail\",\"name\":\"IpFiltersFail\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centraluseuap\",\"tags\":{\"jms-for\":\"canary\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ipfiltersfail\",\"serviceBusEndpoint\":\"https://IpFiltersFail.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-07-21T23:10:50.0339912Z\",\"updatedAt\":\"2023-11-14T11:15:06.3551848Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/jakeschiller-synthetics/providers/Microsoft.EventHub/namespaces/IpFiltersPass\",\"name\":\"IpFiltersPass\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centraluseuap\",\"tags\":{\"jms-for\":\"canary\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ipfilterspass\",\"serviceBusEndpoint\":\"https://IpFiltersPass.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-07-21T22:26:37.8639108Z\",\"updatedAt\":\"2023-09-17T20:54:57.6080319Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-CentralUSEUAP/providers/Microsoft.EventHub/namespaces/PROD-CDM03-502-migration-test-2\",\"name\":\"PROD-CDM03-502-migration-test-2\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centraluseuap\",\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:prod-cdm03-502-migration-test-2\",\"serviceBusEndpoint\":\"https://PROD-CDM03-502-migration-test-2.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-03-24T06:35:41.9795555Z\",\"updatedAt\":\"2023-03-24T16:28:15.8234985Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/assures-kafka/providers/Microsoft.EventHub/namespaces/randnslgtest\",\"name\":\"randnslgtest\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centraluseuap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:randnslgtest\",\"serviceBusEndpoint\":\"https://randnslgtest.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-10-14T19:47:48.6468882Z\",\"updatedAt\":\"2023-09-17T21:19:50.774629Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":3}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-CentralUSEUAP/providers/Microsoft.EventHub/namespaces/sjpremiumcdm\",\"name\":\"sjpremiumcdm\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centraluseuap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sjpremiumcdm\",\"serviceBusEndpoint\":\"https://sjpremiumcdm.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-02-16T20:22:21.9679194Z\",\"updatedAt\":\"2023-11-14T11:18:19.8947577Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":16}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/PPGTest/providers/Microsoft.EventHub/namespaces/TestEHSys0705\",\"name\":\"TestEHSys0705\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centraluseuap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testehsys0705\",\"serviceBusEndpoint\":\"https://TestEHSys0705.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-04-28T01:18:38.1821018Z\",\"updatedAt\":\"2022-05-02T17:59:53.1695688Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":2}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-CentralUSEUAP/providers/Microsoft.EventHub/namespaces/PROD-CDM03-503-EH-M1\",\"name\":\"PROD-CDM03-503-EH-M1\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centraluseuap\",\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:prod-cdm03-503-eh-m1\",\"serviceBusEndpoint\":\"https://PROD-CDM03-503-EH-M1.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/40e5fd58-ce60-45e4-8488-5f8e86fb0c29/resourceGroups/default-eventhub-centraluseuap/providers/Microsoft.EventHub/clusters/iothub_sp1_centraluseuap\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-03-21T05:01:56.207217Z\",\"updatedAt\":\"2023-09-17T21:16:31.753547Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/PPGTest/providers/Microsoft.EventHub/namespaces/TestLMSNS0419\",\"name\":\"TestLMSNS0419\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centraluseuap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testlmsns0419\",\"serviceBusEndpoint\":\"https://TestLMSNS0419.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/PPGTest/providers/Microsoft.EventHub/clusters/TestLMSClusterNew0419\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-19T21:58:28.696567Z\",\"updatedAt\":\"2024-04-19T21:59:02.5409418Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-CentralUSEUAP/providers/Microsoft.EventHub/namespaces/sjcdm03-ministress-01\",\"name\":\"sjcdm03-ministress-01\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centraluseuap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sjcdm03-ministress-01\",\"serviceBusEndpoint\":\"https://sjcdm03-ministress-01.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":1,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-04-12T15:56:36.0952423Z\",\"updatedAt\":\"2023-08-30T19:47:28.0316403Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.EventHub/namespaces/testpec7813\",\"name\":\"testpec7813\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centraluseuap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testpec7813\",\"serviceBusEndpoint\":\"https://testpec7813.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-10-10T17:28:17.4043296Z\",\"updatedAt\":\"2023-10-17T14:01:00.2443498Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":4}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/PPGTest/providers/Microsoft.EventHub/namespaces/TestMSIRRPScenarioEH0906\",\"name\":\"TestMSIRRPScenarioEH0906\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centraluseuap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testmsirrpscenarioeh0906\",\"serviceBusEndpoint\":\"https://TestMSIRRPScenarioEH0906.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-09-06T16:57:13.5219009Z\",\"updatedAt\":\"2023-09-06T18:05:55.5683026Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-CentralUSEUAP/providers/Microsoft.EventHub/namespaces/PROD-CDM03-502-migration-test-4\",\"name\":\"PROD-CDM03-502-migration-test-4\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centraluseuap\",\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:prod-cdm03-502-migration-test-4\",\"serviceBusEndpoint\":\"https://PROD-CDM03-502-migration-test-4.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-03-24T16:49:32.7591721Z\",\"updatedAt\":\"2023-03-24T16:50:22.6256331Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/PPGTest/providers/Microsoft.EventHub/namespaces/TestEGSysT1230\",\"name\":\"TestEGSysT1230\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centraluseuap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testegsyst1230\",\"serviceBusEndpoint\":\"https://TestEGSysT1230.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-04-28T01:18:41.6040138Z\",\"updatedAt\":\"2023-11-28T23:22:39.420264Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.EventHub/namespaces/testpec4809\",\"name\":\"testpec4809\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centraluseuap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testpec4809\",\"serviceBusEndpoint\":\"https://testpec4809.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-10-18T18:05:30.3993271Z\",\"updatedAt\":\"2023-10-18T18:05:58.6277577Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/namespaces/temp-c\",\"name\":\"temp-c\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centraluseuap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:temp-c\",\"serviceBusEndpoint\":\"https://temp-c.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-08-28T17:33:17.0100573Z\",\"updatedAt\":\"2023-09-17T21:04:12.6599826Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.EventHub/namespaces/davadhani7135\",\"name\":\"davadhani7135\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centraluseuap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:davadhani7135\",\"serviceBusEndpoint\":\"https://davadhani7135.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-12-18T14:34:32.3238095Z\",\"updatedAt\":\"2023-12-18T14:35:53.8132989Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.EventHub/namespaces/testns6511\",\"name\":\"testns6511\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centraluseuap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testns6511\",\"serviceBusEndpoint\":\"https://testns6511.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-11-07T09:04:45.1925075Z\",\"updatedAt\":\"2024-01-17T09:19:44.4694607Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.EventHub/namespaces/testpec4561\",\"name\":\"testpec4561\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centraluseuap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testpec4561\",\"serviceBusEndpoint\":\"https://testpec4561.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-10-06T07:07:38.2931061Z\",\"updatedAt\":\"2023-10-06T07:08:07.3090871Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-CentralUSEUAP/providers/Microsoft.EventHub/namespaces/sjpremiumcdmcompact\",\"name\":\"sjpremiumcdmcompact\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centraluseuap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sjpremiumcdmcompact\",\"serviceBusEndpoint\":\"https://sjpremiumcdmcompact.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-02-16T21:48:48.611092Z\",\"updatedAt\":\"2023-11-14T11:20:24.9515476Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":16}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.EventHub/namespaces/davadhani14026\",\"name\":\"davadhani14026\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centraluseuap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:davadhani14026\",\"serviceBusEndpoint\":\"https://davadhani14026.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-12-22T10:15:22.7483587Z\",\"updatedAt\":\"2023-12-22T10:16:59.766527Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/PPGTest/providers/Microsoft.EventHub/namespaces/TestEHMSIRRP0906PUT\",\"name\":\"TestEHMSIRRP0906PUT\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centraluseuap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testehmsirrp0906put\",\"serviceBusEndpoint\":\"https://TestEHMSIRRP0906PUT.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-09-06T19:32:51.843143Z\",\"updatedAt\":\"2023-10-03T14:06:26.5799756Z\"},\"identity\":{\"principalId\":\"e041bf5e-cbee-43ab-8824-1f27a82aeecd\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/framborg/providers/Microsoft.EventHub/namespaces/sqlvictimns\",\"name\":\"sqlvictimns\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centraluseuap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sqlvictimns\",\"serviceBusEndpoint\":\"https://sqlvictimns.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/framborg/providers/Microsoft.EventHub/clusters/sqlumivictim\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-08T18:08:53.4389486Z\",\"updatedAt\":\"2024-04-08T18:09:28.8847424Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/sjrg/providers/Microsoft.EventHub/namespaces/sjcueuap\",\"name\":\"sjcueuap\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centraluseuap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sjcueuap\",\"serviceBusEndpoint\":\"https://sjcueuap.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":40,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-04-28T01:18:37.8852248Z\",\"updatedAt\":\"2023-11-14T11:19:01.5213808Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/PPGTest/providers/Microsoft.EventHub/namespaces/TestEHMSIRRP0906PATCH\",\"name\":\"TestEHMSIRRP0906PATCH\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centraluseuap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testehmsirrp0906patch\",\"serviceBusEndpoint\":\"https://TestEHMSIRRP0906PATCH.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-09-06T19:32:24.3739304Z\",\"updatedAt\":\"2023-10-03T14:06:26.5487271Z\"},\"identity\":{\"principalId\":\"87539bb9-e9c2-4a63-960b-6ce8ae44a157\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.EventHub/namespaces/testpec8181\",\"name\":\"testpec8181\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centraluseuap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testpec8181\",\"serviceBusEndpoint\":\"https://testpec8181.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-10-31T05:16:39.626934Z\",\"updatedAt\":\"2023-10-31T05:17:06.9108588Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-CentralUSEUAP/providers/Microsoft.EventHub/namespaces/PROD-CDM03-502-migration-test-3\",\"name\":\"PROD-CDM03-502-migration-test-3\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centraluseuap\",\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:prod-cdm03-502-migration-test-3\",\"serviceBusEndpoint\":\"https://PROD-CDM03-502-migration-test-3.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-03-24T06:36:40.239411Z\",\"updatedAt\":\"2023-03-24T16:28:06.8077756Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-CentralUSEUAP/providers/Microsoft.EventHub/namespaces/yamlin-pltest\",\"name\":\"yamlin-pltest\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centraluseuap\",\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:yamlin-pltest\",\"serviceBusEndpoint\":\"https://yamlin-pltest.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-04-24T23:17:05.9774193Z\",\"updatedAt\":\"2023-09-17T20:59:32.7726084Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-CentralUSEUAP/providers/Microsoft.EventHub/namespaces/sjcdm03502-ministress-1\",\"name\":\"sjcdm03502-ministress-1\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centraluseuap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sjcdm03502-ministress-1\",\"serviceBusEndpoint\":\"https://sjcdm03502-ministress-1.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":40,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-04-25T01:19:53.758164Z\",\"updatedAt\":\"2023-09-17T21:08:41.571474Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":40}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.EventHub/namespaces/davadhani-canary-secondary\",\"name\":\"davadhani-canary-secondary\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centraluseuap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:davadhani-canary-secondary\",\"serviceBusEndpoint\":\"https://davadhani-canary-secondary.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-12-13T09:22:16.039032Z\",\"updatedAt\":\"2024-03-14T09:55:40.9636594Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/PPGTest/providers/Microsoft.EventHub/namespaces/TestEHCan0426\",\"name\":\"TestEHCan0426\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centraluseuap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testehcan0426\",\"serviceBusEndpoint\":\"https://TestEHCan0426.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-04-26T19:24:50.0896428Z\",\"updatedAt\":\"2023-09-17T21:11:49.1751474Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-CentralUSEUAP/providers/Microsoft.EventHub/namespaces/drdrillPrimary08022021\",\"name\":\"drdrillPrimary08022021\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centraluseuap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:drdrillprimary08022021\",\"serviceBusEndpoint\":\"https://drdrillPrimary08022021.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-04-28T01:18:49.8540553Z\",\"updatedAt\":\"2023-09-05T18:54:12.8175972Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-CentralUSEUAP/providers/Microsoft.EventHub/namespaces/PROD-CDM03-502-migration-test-5\",\"name\":\"PROD-CDM03-502-migration-test-5\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centraluseuap\",\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:prod-cdm03-502-migration-test-5\",\"serviceBusEndpoint\":\"https://PROD-CDM03-502-migration-test-5.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-03-24T16:58:55.8202963Z\",\"updatedAt\":\"2023-09-17T21:07:27.2512476Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/lmanickam-migration-testing/providers/Microsoft.EventHub/namespaces/lmanickam-vnet-dr-eh-std-primary-centraluseuap\",\"name\":\"lmanickam-vnet-dr-eh-std-primary-centraluseuap\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centraluseuap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:lmanickam-vnet-dr-eh-std-primary-centraluseuap\",\"serviceBusEndpoint\":\"https://lmanickam-vnet-dr-eh-std-primary-centraluseuap.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-05-04T11:49:04.5421811Z\",\"updatedAt\":\"2023-09-05T18:54:12.8175972Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-CentralUSEUAP/providers/Microsoft.EventHub/namespaces/ministress-cdm03501-2\",\"name\":\"ministress-cdm03501-2\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centraluseuap\",\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ministress-cdm03501-2\",\"serviceBusEndpoint\":\"https://ministress-cdm03501-2.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-08-02T00:47:35.2177234Z\",\"updatedAt\":\"2022-08-02T00:58:54.5894797Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":20}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-CentralUSEUAP/providers/Microsoft.EventHub/namespaces/PROD-CDM03-502-migration-test-1\",\"name\":\"PROD-CDM03-502-migration-test-1\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"centraluseuap\",\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:prod-cdm03-502-migration-test-1\",\"serviceBusEndpoint\":\"https://PROD-CDM03-502-migration-test-1.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-03-24T04:19:42.1512032Z\",\"updatedAt\":\"2023-09-17T21:41:57.0851022Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/namespaces/assures-persist-ns-01\",\"name\":\"assures-persist-ns-01\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:assures-persist-ns-01\",\"serviceBusEndpoint\":\"https://assures-persist-ns-01.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/clusters/CBN04-503\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-09-18T19:52:27.5400528Z\",\"updatedAt\":\"2023-09-18T19:53:21.7631846Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/namespaces/newnsasknamesp0003\",\"name\":\"newnsasknamesp0003\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:newnsasknamesp0003\",\"serviceBusEndpoint\":\"https://newnsasknamesp0003.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/clusters/CBN04-503\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-04-28T01:30:57.2587659Z\",\"updatedAt\":\"2022-07-26T22:44:46.435011Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/assures-kafka/providers/Microsoft.EventHub/namespaces/nulgnamesp\",\"name\":\"nulgnamesp\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:nulgnamesp\",\"serviceBusEndpoint\":\"https://nulgnamesp.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-10-14T19:44:28.7527844Z\",\"updatedAt\":\"2022-10-14T19:45:17.3028652Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":3}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EASTUS2EUAP/providers/Microsoft.EventHub/namespaces/sr-playground-4\",\"name\":\"sr-playground-4\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sr-playground-4\",\"serviceBusEndpoint\":\"https://sr-playground-4.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/clusters/CBN04-503\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-12-01T21:54:54.7180007Z\",\"updatedAt\":\"2023-11-14T10:51:57.5026591Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/lmanickam-migration-testing/providers/Microsoft.EventHub/namespaces/lmanickam-vnet-dr-eh-std-primary\",\"name\":\"lmanickam-vnet-dr-eh-std-primary\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:lmanickam-vnet-dr-eh-std-primary\",\"serviceBusEndpoint\":\"https://lmanickam-vnet-dr-eh-std-primary.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-05-04T11:39:06.09361Z\",\"updatedAt\":\"2023-10-09T18:35:59.3834614Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EASTUS2EUAP/providers/Microsoft.EventHub/namespaces/sarama-gw-fix-verify\",\"name\":\"sarama-gw-fix-verify\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sarama-gw-fix-verify\",\"serviceBusEndpoint\":\"https://sarama-gw-fix-verify.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-04-28T01:30:50.5551478Z\",\"updatedAt\":\"2022-07-26T22:36:01.6085996Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EASTUS2EUAP/providers/Microsoft.EventHub/namespaces/assures-geodrvmssmg002\",\"name\":\"assures-geodrvmssmg002\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:assures-geodrvmssmg002\",\"serviceBusEndpoint\":\"https://assures-geodrvmssmg002.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/clusters/CBN04-503\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-04-28T01:31:00.9931684Z\",\"updatedAt\":\"2022-07-26T22:39:46.1220824Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/disablelocalauth/providers/Microsoft.EventHub/namespaces/ardsouza-disablelocalauth-canary-test1\",\"name\":\"ardsouza-disablelocalauth-canary-test1\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ardsouza-disablelocalauth-canary-test1\",\"serviceBusEndpoint\":\"https://ardsouza-disablelocalauth-canary-test1.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-04-28T01:30:53.4149859Z\",\"updatedAt\":\"2022-07-26T22:39:35.5580744Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EASTUS2EUAP/providers/Microsoft.EventHub/namespaces/assures-nsformig2\",\"name\":\"assures-nsformig2\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:assures-nsformig2\",\"serviceBusEndpoint\":\"https://assures-nsformig2.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/clusters/CBN04-503\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-04-28T01:31:00.6337907Z\",\"updatedAt\":\"2022-07-26T22:28:38.6067349Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/namespaces/jg-canary\",\"name\":\"jg-canary\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:jg-canary\",\"serviceBusEndpoint\":\"https://jg-canary.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-02-23T20:01:48.095055Z\",\"updatedAt\":\"2023-02-23T20:11:00.3747324Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EASTUS2EUAP/providers/Microsoft.EventHub/namespaces/pablorod-fourth-zone-test\",\"name\":\"pablorod-fourth-zone-test\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:pablorod-fourth-zone-test\",\"serviceBusEndpoint\":\"https://pablorod-fourth-zone-test.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions//resourceGroups//providers/Microsoft.EventHub/clusters/PROD-CBN-VAZ505\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-03-28T13:54:36.9170358Z\",\"updatedAt\":\"2024-03-28T13:55:52.661563Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/namespaces/ali-rrp-testing\",\"name\":\"ali-rrp-testing\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ali-rrp-testing\",\"serviceBusEndpoint\":\"https://ali-rrp-testing.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/clusters/CBN04-503\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-11-07T23:53:30.9900109Z\",\"updatedAt\":\"2022-11-09T20:56:59.8234221Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/namespaces/TestKC1017\",\"name\":\"TestKC1017\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testkc1017\",\"serviceBusEndpoint\":\"https://TestKC1017.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/clusters/CBN04-503\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-10-17T23:29:29.2489488Z\",\"updatedAt\":\"2022-10-17T23:30:19.1147465Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/namespaces/assures-createehfailtst\",\"name\":\"assures-createehfailtst\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:assures-createehfailtst\",\"serviceBusEndpoint\":\"https://assures-createehfailtst.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/clusters/CBN04-503\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-04-28T01:31:05.3057043Z\",\"updatedAt\":\"2022-07-26T22:31:13.0972571Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/sharmavijay-la-verification/providers/Microsoft.EventHub/namespaces/karankesri-eh-stand-la-test\",\"name\":\"karankesri-eh-stand-la-test\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:karankesri-eh-stand-la-test\",\"serviceBusEndpoint\":\"https://karankesri-eh-stand-la-test.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":7,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-03-31T05:53:42.7496995Z\",\"updatedAt\":\"2023-05-02T10:04:02.3680119Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EASTUS2EUAP/providers/Microsoft.EventHub/namespaces/zzcbn04503test\",\"name\":\"zzcbn04503test\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:zzcbn04503test\",\"serviceBusEndpoint\":\"https://zzcbn04503test.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/clusters/CBN04-503\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-01-17T16:26:06.4646411Z\",\"updatedAt\":\"2023-11-14T10:44:33.7018202Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/namespaces/ali-byok-test\",\"name\":\"ali-byok-test\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://ali-hsm-kv.managedhsm.azure.net/\"}],\"requireInfrastructureEncryption\":false},\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ali-byok-test\",\"serviceBusEndpoint\":\"https://ali-byok-test.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/clusters/CBN04-503\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-01-26T21:16:33.0051388Z\",\"updatedAt\":\"2024-04-25T01:25:21.5461954Z\"},\"identity\":{\"principalId\":\"e1af5867-b78b-44b5-929f-4aa7270d6da2\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/namespaces/askprimarygeodr003\",\"name\":\"askprimarygeodr003\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:askprimarygeodr003\",\"serviceBusEndpoint\":\"https://askprimarygeodr003.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/clusters/CBN04-503\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-04-28T01:30:56.3993825Z\",\"updatedAt\":\"2022-07-26T22:39:45.4966581Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/namespaces/aaidletest1\",\"name\":\"aaidletest1\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:aaidletest1\",\"serviceBusEndpoint\":\"https://aaidletest1.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/clusters/CBN04-503\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-10-02T01:54:58.8488996Z\",\"updatedAt\":\"2023-10-02T01:55:51.087593Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EASTUS2EUAP/providers/Microsoft.EventHub/namespaces/yamlin-mm20\",\"name\":\"yamlin-mm20\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:yamlin-mm20\",\"serviceBusEndpoint\":\"https://yamlin-mm20.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/clusters/CBN04-503\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-02-10T08:00:26.9116004Z\",\"updatedAt\":\"2023-02-10T08:01:16.4940977Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/namespaces/yamlin-testrepro\",\"name\":\"yamlin-testrepro\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:yamlin-testrepro\",\"serviceBusEndpoint\":\"https://yamlin-testrepro.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-01-20T00:23:10.8448595Z\",\"updatedAt\":\"2023-10-12T20:19:47.8742336Z\"},\"identity\":{\"principalId\":\"8fc643d3-c4bf-4bda-8cf5-2eeaf583d112\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EASTUS2EUAP/providers/Microsoft.EventHub/namespaces/compcontopsku\",\"name\":\"compcontopsku\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:compcontopsku\",\"serviceBusEndpoint\":\"https://compcontopsku.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-10-17T18:21:34.0404214Z\",\"updatedAt\":\"2023-11-14T10:48:10.6092507Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EASTUS2EUAP/providers/Microsoft.EventHub/namespaces/assures-newnsformig\",\"name\":\"assures-newnsformig\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:assures-newnsformig\",\"serviceBusEndpoint\":\"https://assures-newnsformig.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/clusters/CBN04-503\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-04-28T01:30:58.0868983Z\",\"updatedAt\":\"2022-07-26T22:31:13.441003Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.EventHub/namespaces/davadhani-canary-primary\",\"name\":\"davadhani-canary-primary\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:davadhani-canary-primary\",\"serviceBusEndpoint\":\"https://davadhani-canary-primary.servicebus.windows.net:443/\",\"alternateName\":\"davadhani6989\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-12-13T09:20:16.5012182Z\",\"updatedAt\":\"2024-03-18T05:04:52.1569074Z\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/damorg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/davadhani-test-id\":{\"clientId\":\"7737d121-7ec3-4b49-8fb2-0347cb8464f8\",\"principalId\":\"aaeae2c9-0cee-4141-ac97-f186026cc13c\"}}},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/robece01rsgp/providers/Microsoft.EventHub/namespaces/robece01hbns\",\"name\":\"robece01hbns\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:robece01hbns\",\"serviceBusEndpoint\":\"https://robece01hbns.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":20,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-04-27T17:18:40.2012448Z\",\"updatedAt\":\"2023-04-27T17:57:20.9516504Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EASTUS2EUAP/providers/Microsoft.EventHub/namespaces/aswin-source-mm2\",\"name\":\"aswin-source-mm2\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:aswin-source-mm2\",\"serviceBusEndpoint\":\"https://aswin-source-mm2.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/clusters/CBN04-503\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-10-18T19:42:03.9464Z\",\"updatedAt\":\"2023-11-14T10:48:20.5312392Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/namespaces/protobuf-sdk-tests\",\"name\":\"protobuf-sdk-tests\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:protobuf-sdk-tests\",\"serviceBusEndpoint\":\"https://protobuf-sdk-tests.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/clusters/CBN04-503\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-11-06T22:53:32.3428991Z\",\"updatedAt\":\"2023-11-06T22:54:12.0470687Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/nkokitkar-rg/providers/Microsoft.EventHub/namespaces/nkehs-1\",\"name\":\"nkehs-1\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:nkehs-1\",\"serviceBusEndpoint\":\"https://nkehs-1.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-26T19:05:47.6218109Z\",\"updatedAt\":\"2024-04-26T19:06:14.7336975Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":2}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/namespaces/assures-cgissue-test\",\"name\":\"assures-cgissue-test\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:assures-cgissue-test\",\"serviceBusEndpoint\":\"https://assures-cgissue-test.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/clusters/CBN04-503\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-04-28T01:30:55.3994465Z\",\"updatedAt\":\"2022-07-26T22:39:44.2300658Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/namespaces/aswin-mirror-sourcens\",\"name\":\"aswin-mirror-sourcens\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:aswin-mirror-sourcens\",\"serviceBusEndpoint\":\"https://aswin-mirror-sourcens.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/clusters/CBN04-503\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-10-10T20:14:58.2492414Z\",\"updatedAt\":\"2022-10-10T20:15:53.2155656Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EASTUS2EUAP/providers/Microsoft.EventHub/namespaces/assures-migvmssnamesp0001\",\"name\":\"assures-migvmssnamesp0001\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:assures-migvmssnamesp0001\",\"serviceBusEndpoint\":\"https://assures-migvmssnamesp0001.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/clusters/CBN04-503\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-04-28T01:30:55.6181271Z\",\"updatedAt\":\"2022-07-26T22:21:15.5072785Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/namespaces/hmlam-compression\",\"name\":\"hmlam-compression\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:hmlam-compression\",\"serviceBusEndpoint\":\"https://hmlam-compression.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/clusters/CBN04-503\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-10-22T03:42:05.2907635Z\",\"updatedAt\":\"2023-10-22T03:42:49.5292586Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/namespaces/assures-secondary-geodr-0002\",\"name\":\"assures-secondary-geodr-0002\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:assures-secondary-geodr-0002\",\"serviceBusEndpoint\":\"https://assures-secondary-geodr-0002.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/clusters/CBN04-503\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-04-28T01:31:01.0087952Z\",\"updatedAt\":\"2023-10-09T18:35:59.3834614Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EASTUS2EUAP/providers/Microsoft.EventHub/namespaces/yamlin-mm2a\",\"name\":\"yamlin-mm2a\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:yamlin-mm2a\",\"serviceBusEndpoint\":\"https://yamlin-mm2a.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/clusters/CBN04-503\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-02-10T04:11:33.5021739Z\",\"updatedAt\":\"2023-11-03T03:54:33.7809512Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/DisablePublicAccesTesting/providers/Microsoft.EventHub/namespaces/DisablePublicAccessTesting-EHStandard\",\"name\":\"DisablePublicAccessTesting-EHStandard\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:disablepublicaccesstesting-ehstandard\",\"serviceBusEndpoint\":\"https://DisablePublicAccessTesting-EHStandard.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-04-28T01:30:52.2270338Z\",\"updatedAt\":\"2023-10-11T02:34:01.2415943Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/rob01rsgp/providers/Microsoft.EventHub/namespaces/rob01hbns\",\"name\":\"rob01hbns\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:rob01hbns\",\"serviceBusEndpoint\":\"https://rob01hbns.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":20,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-04-25T23:33:08.323767Z\",\"updatedAt\":\"2023-04-25T23:33:28.8864252Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/PPGTest/providers/Microsoft.EventHub/namespaces/TestEHCanSec0426\",\"name\":\"TestEHCanSec0426\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testehcansec0426\",\"serviceBusEndpoint\":\"https://TestEHCanSec0426.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-04-26T19:58:09.4094357Z\",\"updatedAt\":\"2023-04-26T19:58:33.8133639Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.EventHub/namespaces/testtusync\",\"name\":\"testtusync\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testtusync\",\"serviceBusEndpoint\":\"https://testtusync.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-10-17T14:02:15.7380937Z\",\"updatedAt\":\"2023-10-17T14:04:14.719152Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":5}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/namespaces/mirror-sourcens\",\"name\":\"mirror-sourcens\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:mirror-sourcens\",\"serviceBusEndpoint\":\"https://mirror-sourcens.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/clusters/CBN04-503\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-10-10T20:08:39.8492112Z\",\"updatedAt\":\"2022-10-10T20:09:29.8897817Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/namespaces/testEHKC1205\",\"name\":\"testEHKC1205\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testehkc1205\",\"serviceBusEndpoint\":\"https://testEHKC1205.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-12-05T20:59:05.1922263Z\",\"updatedAt\":\"2022-12-05T20:59:50.7238562Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EASTUS2EUAP/providers/Microsoft.EventHub/namespaces/yamin-teststress\",\"name\":\"yamin-teststress\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:yamin-teststress\",\"serviceBusEndpoint\":\"https://yamin-teststress.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/clusters/CBN04-503\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-12-14T19:27:13.0787176Z\",\"updatedAt\":\"2023-11-14T10:44:49.0715452Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/disablelocalauth/providers/Microsoft.EventHub/namespaces/ardsouza-disablelocalauth-canary-test2\",\"name\":\"ardsouza-disablelocalauth-canary-test2\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":true,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ardsouza-disablelocalauth-canary-test2\",\"serviceBusEndpoint\":\"https://ardsouza-disablelocalauth-canary-test2.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-04-28T01:31:00.7119148Z\",\"updatedAt\":\"2022-07-26T22:21:12.0696881Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/namespaces/sayan-ns-1\",\"name\":\"sayan-ns-1\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sayan-ns-1\",\"serviceBusEndpoint\":\"https://sayan-ns-1.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/clusters/CBN04-503\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-10-06T07:17:19.3376818Z\",\"updatedAt\":\"2022-10-06T07:18:42.7935726Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/dsms-test-rg/providers/Microsoft.EventHub/namespaces/dsmstesteh\",\"name\":\"dsmstesteh\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:dsmstesteh\",\"serviceBusEndpoint\":\"https://dsmstesteh.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-08-22T17:16:47.1733697Z\",\"updatedAt\":\"2023-11-14T10:49:37.6076793Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EASTUS2EUAP/providers/Microsoft.EventHub/namespaces/yamlin-test365\",\"name\":\"yamlin-test365\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:yamlin-test365\",\"serviceBusEndpoint\":\"https://yamlin-test365.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/clusters/CBN04-503\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-02-22T01:36:30.6845792Z\",\"updatedAt\":\"2023-02-22T01:37:24.0592367Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EASTUS2EUAP/providers/Microsoft.EventHub/namespaces/eastus2-namespacepl001\",\"name\":\"eastus2-namespacepl001\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:eastus2-namespacepl001\",\"serviceBusEndpoint\":\"https://eastus2-namespacepl001.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/clusters/CBN04-503\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-04-28T01:30:56.3837594Z\",\"updatedAt\":\"2022-07-26T22:39:44.8862555Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/namespaces/nodesrissuecli\",\"name\":\"nodesrissuecli\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:nodesrissuecli\",\"serviceBusEndpoint\":\"https://nodesrissuecli.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-02-23T20:04:10.3854568Z\",\"updatedAt\":\"2023-02-23T20:13:17.592361Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/namespaces/clemen-test-eh-sa\",\"name\":\"clemen-test-eh-sa\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:clemen-test-eh-sa\",\"serviceBusEndpoint\":\"https://clemen-test-eh-sa.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-04-28T01:30:53.5556674Z\",\"updatedAt\":\"2023-10-09T17:44:32.8621582Z\"},\"identity\":{\"principalId\":\"b4b473dd-8d23-45ab-9f29-deee83baf0b1\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EASTUS2EUAP/providers/Microsoft.EventHub/namespaces/assures-geodrvmssmg001\",\"name\":\"assures-geodrvmssmg001\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:assures-geodrvmssmg001\",\"serviceBusEndpoint\":\"https://assures-geodrvmssmg001.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-04-28T01:31:19.2280259Z\",\"updatedAt\":\"2023-10-09T18:35:59.3834614Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/namespaces/assures-cgissue-test-2\",\"name\":\"assures-cgissue-test-2\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:assures-cgissue-test-2\",\"serviceBusEndpoint\":\"https://assures-cgissue-test-2.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/clusters/CBN04-503\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-04-28T01:30:56.2743845Z\",\"updatedAt\":\"2022-07-26T22:48:16.8921158Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EASTUS2EUAP/providers/Microsoft.EventHub/namespaces/prod-cbn04-503-sjtest\",\"name\":\"prod-cbn04-503-sjtest\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:prod-cbn04-503-sjtest\",\"serviceBusEndpoint\":\"https://prod-cbn04-503-sjtest.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/clusters/CBN04-503\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-11-10T21:19:42.2589024Z\",\"updatedAt\":\"2023-11-10T21:20:42.5960029Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/namespaces/taknamespacevmsmig001\",\"name\":\"taknamespacevmsmig001\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:taknamespacevmsmig001\",\"serviceBusEndpoint\":\"https://taknamespacevmsmig001.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/clusters/CBN04-503\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-04-28T01:30:57.9775191Z\",\"updatedAt\":\"2022-07-26T22:48:13.5946674Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Synthetics/providers/Microsoft.EventHub/namespaces/TEST-ABC-501-EHSynthetic\",\"name\":\"TEST-ABC-501-EHSynthetic\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:test-abc-501-ehsynthetic\",\"serviceBusEndpoint\":\"https://TEST-ABC-501-EHSynthetic.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-05-26T21:32:09.5718164Z\",\"updatedAt\":\"2023-11-14T10:50:58.5671083Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EASTUS2EUAP/providers/Microsoft.EventHub/namespaces/sr-playground-2\",\"name\":\"sr-playground-2\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sr-playground-2\",\"serviceBusEndpoint\":\"https://sr-playground-2.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/clusters/CBN04-503\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-12-01T21:54:33.2490493Z\",\"updatedAt\":\"2023-11-14T10:51:04.0923874Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/namespaces/assures-comp-dest-mm2\",\"name\":\"assures-comp-dest-mm2\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:assures-comp-dest-mm2\",\"serviceBusEndpoint\":\"https://assures-comp-dest-mm2.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/clusters/CBN04-503\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-10-19T20:22:40.5087357Z\",\"updatedAt\":\"2022-10-19T20:23:34.5994587Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/namespaces/comptestns\",\"name\":\"comptestns\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:comptestns\",\"serviceBusEndpoint\":\"https://comptestns.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/clusters/CBN04-503\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-09-29T23:01:40.9910832Z\",\"updatedAt\":\"2023-04-04T17:59:19.2090015Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/namespaces/assures-connect-compact-issue\",\"name\":\"assures-connect-compact-issue\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:assures-connect-compact-issue\",\"serviceBusEndpoint\":\"https://assures-connect-compact-issue.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/clusters/CBN04-503\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-11-07T21:39:14.3225057Z\",\"updatedAt\":\"2022-11-07T21:40:07.3341181Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/assures-kafka/providers/Microsoft.EventHub/namespaces/compacttopictestns\",\"name\":\"compacttopictestns\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:compacttopictestns\",\"serviceBusEndpoint\":\"https://compacttopictestns.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-09-29T22:27:27.4399493Z\",\"updatedAt\":\"2022-09-29T22:28:18.1956862Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":10}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/namespaces/charvakkafkatest\",\"name\":\"charvakkafkatest\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:charvakkafkatest\",\"serviceBusEndpoint\":\"https://charvakkafkatest.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/clusters/CBN04-503\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-09-27T10:55:26.0770858Z\",\"updatedAt\":\"2022-09-27T10:56:18.8721946Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EASTUS2EUAP/providers/Microsoft.EventHub/namespaces/assuresprtgeoprim\",\"name\":\"assuresprtgeoprim\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:assuresprtgeoprim\",\"serviceBusEndpoint\":\"https://assuresprtgeoprim.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-04-28T01:31:00.2900363Z\",\"updatedAt\":\"2023-10-09T18:35:59.3834614Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EASTUS2EUAP/providers/Microsoft.EventHub/namespaces/sr-playground-1\",\"name\":\"sr-playground-1\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sr-playground-1\",\"serviceBusEndpoint\":\"https://sr-playground-1.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/clusters/CBN04-503\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-12-01T21:54:20.7488906Z\",\"updatedAt\":\"2023-11-14T10:50:29.1091725Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/namespaces/ali-repro-primary-cbn\",\"name\":\"ali-repro-primary-cbn\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ali-repro-primary-cbn\",\"serviceBusEndpoint\":\"https://ali-repro-primary-cbn.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/clusters/CBN04-503\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-02-14T17:33:06.7786218Z\",\"updatedAt\":\"2024-02-15T00:11:55.608138Z\"},\"identity\":{\"principalId\":\"1cfe146d-8b95-4084-817b-a5c70d51cf3d\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EASTUS2EUAP/providers/Microsoft.EventHub/namespaces/hmlam-cbn04-504\",\"name\":\"hmlam-cbn04-504\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:hmlam-cbn04-504\",\"serviceBusEndpoint\":\"https://hmlam-cbn04-504.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-04-28T01:31:07.6026556Z\",\"updatedAt\":\"2023-10-09T18:35:59.3834614Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EASTUS2EUAP/providers/Microsoft.EventHub/namespaces/assures-nsformig3\",\"name\":\"assures-nsformig3\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:assures-nsformig3\",\"serviceBusEndpoint\":\"https://assures-nsformig3.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/clusters/CBN04-503\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-04-28T01:30:56.3837594Z\",\"updatedAt\":\"2022-07-26T22:39:45.4497298Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/namespaces/asknamespacepltestportal\",\"name\":\"asknamespacepltestportal\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:asknamespacepltestportal\",\"serviceBusEndpoint\":\"https://asknamespacepltestportal.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/clusters/CBN04-503\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-04-28T01:31:01.8056766Z\",\"updatedAt\":\"2022-07-26T22:44:44.0912615Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/namespaces/assures-primary-geodr-0001\",\"name\":\"assures-primary-geodr-0001\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:assures-primary-geodr-0001\",\"serviceBusEndpoint\":\"https://assures-primary-geodr-0001.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/clusters/CBN04-503\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-04-28T01:31:25.1032361Z\",\"updatedAt\":\"2022-07-26T22:25:05.3183474Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/namespaces/camnamespace1234\",\"name\":\"camnamespace1234\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:camnamespace1234\",\"serviceBusEndpoint\":\"https://camnamespace1234.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/clusters/CBN04-503\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-04-28T01:30:55.6025004Z\",\"updatedAt\":\"2022-07-26T22:21:13.9916734Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/sjrgcbn/providers/Microsoft.EventHub/namespaces/sjcbnstandard\",\"name\":\"sjcbnstandard\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sjcbnstandard\",\"serviceBusEndpoint\":\"https://sjcbnstandard.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-04-28T01:30:58.6182061Z\",\"updatedAt\":\"2022-07-26T22:24:56.2924591Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/namespaces/freetrialnamespace\",\"name\":\"freetrialnamespace\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:freetrialnamespace\",\"serviceBusEndpoint\":\"https://freetrialnamespace.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/clusters/CBN04-503\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-04-28T01:30:57.9931467Z\",\"updatedAt\":\"2022-07-26T22:48:17.7208324Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EASTUS2EUAP/providers/Microsoft.EventHub/namespaces/sr-playground-3\",\"name\":\"sr-playground-3\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:sr-playground-3\",\"serviceBusEndpoint\":\"https://sr-playground-3.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/clusters/CBN04-503\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-12-01T21:54:45.0460046Z\",\"updatedAt\":\"2023-11-14T10:45:00.2455784Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/namespaces/repltestlg\",\"name\":\"repltestlg\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:repltestlg\",\"serviceBusEndpoint\":\"https://repltestlg.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/clusters/CBN04-503\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-10-14T19:34:09.0180125Z\",\"updatedAt\":\"2022-10-14T19:35:00.544167Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Default-EventHub-EASTUS2EUAP/providers/Microsoft.EventHub/namespaces/drdrillSecondary08022021\",\"name\":\"drdrillSecondary08022021\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:drdrillsecondary08022021\",\"serviceBusEndpoint\":\"https://drdrillSecondary08022021.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-04-28T01:30:51.5239052Z\",\"updatedAt\":\"2022-07-26T22:21:08.8655847Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cleanupservice/providers/Microsoft.EventHub/namespaces/TestEHNS0122\",\"name\":\"TestEHNS0122\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testehns0122\",\"serviceBusEndpoint\":\"https://TestEHNS0122.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/cleanupservice/providers/Microsoft.EventHub/clusters/TestLMSEHCluster0122\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-01-22T19:25:53.4288669Z\",\"updatedAt\":\"2024-01-22T19:26:32.8601093Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/namespaces/TestAppGroups0929\",\"name\":\"TestAppGroups0929\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus2euap\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:testappgroups0929\",\"serviceBusEndpoint\":\"https://TestAppGroups0929.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/prod-cbn04-503-533-rg/providers/Microsoft.EventHub/clusters/CBN04-503\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2022-09-29T15:57:00.7287194Z\",\"updatedAt\":\"2022-09-29T15:57:52.74942Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/framborg/providers/Microsoft.EventHub/namespaces/frmalaysia\",\"name\":\"frmalaysia\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"malaysiasouth\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:frmalaysia\",\"serviceBusEndpoint\":\"https://frmalaysia.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-05-11T03:17:48.2706581Z\",\"updatedAt\":\"2023-05-11T03:18:46.9463387Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ardsouza-ehpremium-testing/providers/Microsoft.EventHub/namespaces/ardsouza-eh-premium-test-deleteme\",\"name\":\"ardsouza-eh-premium-test-deleteme\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"norwaywest\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ardsouza-eh-premium-test-deleteme\",\"serviceBusEndpoint\":\"https://ardsouza-eh-premium-test-deleteme.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-12-18T17:35:35.0035644Z\",\"updatedAt\":\"2023-12-18T17:36:47.0241449Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/framborg/providers/Microsoft.EventHub/namespaces/framborg-esc-ehs\",\"name\":\"framborg-esc-ehs\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"spaincentral\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:framborg-esc-ehs\",\"serviceBusEndpoint\":\"https://framborg-esc-ehs.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-10-20T08:48:59.8150888Z\",\"updatedAt\":\"2023-10-20T08:49:37.3470923Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/framborg/providers/Microsoft.EventHub/namespaces/framborg-esc-ehs-nz\",\"name\":\"framborg-esc-ehs-nz\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"spaincentral\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:framborg-esc-ehs-nz\",\"serviceBusEndpoint\":\"https://framborg-esc-ehs-nz.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-10-20T18:45:04.9211214Z\",\"updatedAt\":\"2023-10-20T18:45:33.0378935Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/damorg/providers/Microsoft.EventHub/namespaces/standard4141\",\"name\":\"standard4141\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"spaincentral\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:standard4141\",\"serviceBusEndpoint\":\"https://standard4141.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-11-29T14:47:43.0140095Z\",\"updatedAt\":\"2023-11-29T15:31:03.8271678Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/framborg/providers/Microsoft.EventHub/namespaces/framborg-esc-ehs-nzr\",\"name\":\"framborg-esc-ehs-nzr\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"spaincentral\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:framborg-esc-ehs-nzr\",\"serviceBusEndpoint\":\"https://framborg-esc-ehs-nzr.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-10-20T18:31:35.5642605Z\",\"updatedAt\":\"2023-10-20T18:32:15.6900674Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/framborg/providers/Microsoft.EventHub/namespaces/framborg-twn-ehd\",\"name\":\"framborg-twn-ehd\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"taiwannorth\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:framborg-twn-ehd\",\"serviceBusEndpoint\":\"https://framborg-twn-ehd.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"clusterArmId\":\"/subscriptions/d10bb4a1-c560-4381-8dff-9a32a26b226d/resourceGroups/rg-streaming/providers/Microsoft.EventHub/clusters/input-streaming-am1twn-black-taiwannorth\",\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-12-12T06:46:46.956229Z\",\"updatedAt\":\"2023-12-12T06:47:30.1724079Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/kevx-rg/providers/Microsoft.EventHub/namespaces/kevxehns-taiwannorth-1\",\"name\":\"kevxehns-taiwannorth-1\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"taiwannorth\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:kevxehns-taiwannorth-1\",\"serviceBusEndpoint\":\"https://kevxehns-taiwannorth-1.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-16T21:10:59.2793527Z\",\"updatedAt\":\"2024-04-16T21:24:33.7247976Z\"},\"identity\":{\"principalId\":\"9411ba53-8fbb-43bf-9193-affc46ebe412\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/framborg/providers/Microsoft.EventHub/namespaces/framborg-twn-ehs\",\"name\":\"framborg-twn-ehs\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"taiwannorth\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:framborg-twn-ehs\",\"serviceBusEndpoint\":\"https://framborg-twn-ehs.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-12-12T06:46:59.799983Z\",\"updatedAt\":\"2023-12-12T06:47:42.5474449Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/alitest/providers/Microsoft.EventHub/namespaces/ali-validation-primary\",\"name\":\"ali-validation-primary\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"taiwannorth\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ali-validation-primary\",\"serviceBusEndpoint\":\"https://ali-validation-primary.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-16T17:56:14.4542197Z\",\"updatedAt\":\"2024-04-16T19:20:58.8608986Z\"},\"identity\":{\"principalId\":\"410a10b5-63f1-48e6-9a6a-e9a890c9351c\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned, UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/PPGTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/TestUAI0506\":{\"clientId\":\"40578752-05e9-4b8b-bdc4-f07e960571e0\",\"principalId\":\"406cc555-ce08-485a-a5a6-ef1ccc5e7bec\"}}},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/pranjitTest/providers/Microsoft.EventHub/namespaces/pranjitTestMSI\",\"name\":\"pranjitTestMSI\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"taiwannorth\",\"tags\":{\"abc\":\"ghi\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:pranjittestmsi\",\"serviceBusEndpoint\":\"https://pranjitTestMSI.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-16T15:46:04.7453668Z\",\"updatedAt\":\"2024-04-16T19:16:12.8528466Z\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/damorg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/davadhani-test-id\":{\"clientId\":\"7737d121-7ec3-4b49-8fb2-0347cb8464f8\",\"principalId\":\"aaeae2c9-0cee-4141-ac97-f186026cc13c\"}}},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/kevx-rg/providers/Microsoft.EventHub/namespaces/kevxehns-taiwannorth-2\",\"name\":\"kevxehns-taiwannorth-2\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"taiwannorth\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:kevxehns-taiwannorth-2\",\"serviceBusEndpoint\":\"https://kevxehns-taiwannorth-2.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-16T21:26:58.3031168Z\",\"updatedAt\":\"2024-04-16T21:31:15.8498852Z\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/a7861e0a-b024-45c8-bd2b-a584228a3f0a/resourcegroups/kevx-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/kevxmi-wcus\":{\"clientId\":\"d07b99be-8faf-4798-b40d-343d7ef97ee6\",\"principalId\":\"54518d54-4fd1-4b2e-962a-5e800f38f33a\"}}},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/kevx-rg/providers/Microsoft.EventHub/namespaces/kevxehns-taiwannorthwest-1\",\"name\":\"kevxehns-taiwannorthwest-1\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"taiwannorthwest\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:kevxehns-taiwannorthwest-1\",\"serviceBusEndpoint\":\"https://kevxehns-taiwannorthwest-1.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-16T21:20:54.3838763Z\",\"updatedAt\":\"2024-04-16T21:24:39.1668051Z\"},\"identity\":{\"principalId\":\"d27f5994-af04-46c1-b275-9c7359b16a67\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/leander-test-taiwannorthwest/providers/Microsoft.EventHub/namespaces/leandertesttaiwan\",\"name\":\"leandertesttaiwan\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"taiwannorthwest\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:leandertesttaiwan\",\"serviceBusEndpoint\":\"https://leandertesttaiwan.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-16T16:46:30.8411098Z\",\"updatedAt\":\"2024-04-17T10:10:26.533751Z\"},\"identity\":{\"principalId\":\"8478429f-7254-49de-89f5-4b589ba5fb4e\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/framborg/providers/Microsoft.EventHub/namespaces/framborg-twnw-ehs\",\"name\":\"framborg-twnw-ehs\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"taiwannorthwest\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:framborg-twnw-ehs\",\"serviceBusEndpoint\":\"https://framborg-twnw-ehs.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2023-12-11T23:22:27.2576428Z\",\"updatedAt\":\"2023-12-11T23:23:10.8044869Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/alitest/providers/Microsoft.EventHub/namespaces/ali-validation-secondary\",\"name\":\"ali-validation-secondary\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"taiwannorthwest\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:ali-validation-secondary\",\"serviceBusEndpoint\":\"https://ali-validation-secondary.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-16T17:57:05.2262619Z\",\"updatedAt\":\"2024-04-16T19:28:43.2265977Z\"},\"identity\":{\"principalId\":\"a2435f8d-f9dc-4ae0-990a-7d3673a42edc\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned, UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI3\":{\"clientId\":\"2f7b4ce2-15fb-4ca0-9c25-9e13b53d1435\",\"principalId\":\"51258ba9-6eed-4ad3-8409-d79d69442d4a\"}}},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/kevx-rg/providers/Microsoft.EventHub/namespaces/kevxehns-taiwannorthwest-2\",\"name\":\"kevxehns-taiwannorthwest-2\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"taiwannorthwest\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:kevxehns-taiwannorthwest-2\",\"serviceBusEndpoint\":\"https://kevxehns-taiwannorthwest-2.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-16T21:28:03.6133012Z\",\"updatedAt\":\"2024-04-16T21:31:15.8259216Z\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/a7861e0a-b024-45c8-bd2b-a584228a3f0a/resourcegroups/kevx-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/kevxmi-wcus\":{\"clientId\":\"d07b99be-8faf-4798-b40d-343d7ef97ee6\",\"principalId\":\"54518d54-4fd1-4b2e-962a-5e800f38f33a\"}}},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}}]}", + "isContentBase64": false + } + }, + "Get-AzEventHubNamespaceV2+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w?api-version=2023-01-01-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w?api-version=2023-01-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "55" ], + "x-ms-client-request-id": [ "e154e501-004d-4a5c-84fc-80e949c04cd8" ], "CommandName": [ "Get-AzEventHubNamespaceV2" ], "FullCommandName": [ "Get-AzEventHubNamespace_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,39 +66,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "4bcb2be6-1003-43f7-9b62-3cdf3423923a_M5CH3_M5CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], - "x-ms-correlation-request-id": [ "81943d84-caae-43e3-aa38-3e9b4515cccf" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074713Z:81943d84-caae-43e3-aa38-3e9b4515cccf" ], + "x-ms-correlation-request-id": [ "7ec92f7b-971b-499e-9b30-89311680236a" ], + "x-ms-client-request-id": [ "e154e501-004d-4a5c-84fc-80e949c04cd8_RP" ], + "x-ms-messaging-activity-id": [ "687f73db-1615-4f35-a6b3-a1a56d7487dc" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G9|2024-04-29T12:47:11" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "7ec92f7b-971b-499e-9b30-89311680236a" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T124711Z:7ec92f7b-971b-499e-9b30-89311680236a" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 8868548D50AF4A0A9BC64F5D0D0D0D74 Ref B: SEL221051504011 Ref C: 2023-09-18T07:47:11Z" ], - "Date": [ "Mon, 18 Sep 2023 07:47:13 GMT" ] + "X-MSEdge-Ref": [ "Ref A: DA38940C7EB440BCAFE54CB7612D503A Ref B: SEL221051504047 Ref C: 2024-04-29T12:47:09Z" ], + "Date": [ "Mon, 29 Apr 2024 12:47:11 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "2218" ], + "Content-Length": [ "2224" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8\",\"name\":\"namespaceNamed5orf8\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"privateEndpointConnections\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/039cd4e6-b8c0-4b3f-a6c2-41d367f808b5\",\"name\":\"039cd4e6-b8c0-4b3f-a6c2-41d367f808b5\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"East US\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.Network/privateEndpoints/privateEndpoint-qyfutj\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956\",\"name\":\"cfdfc4e7-f5a8-465f-82a7-c4a77d84a956\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"East US\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.Network/privateEndpoints/privateEndpoint-352l4o\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}],\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamed5orf8\",\"createdAt\":\"2023-09-18T07:32:30.42Z\",\"updatedAt\":\"2023-09-18T07:33:53.993Z\",\"serviceBusEndpoint\":\"https://namespaceNamed5orf8.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w\",\"name\":\"namespaceNameeqpx5w\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"privateEndpointConnections\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/3f4f7599-40f5-43ca-bddc-6527431d9604\",\"name\":\"3f4f7599-40f5-43ca-bddc-6527431d9604\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Network/privateEndpoints/privateEndpoint-i4bc1n\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8\",\"name\":\"f6111dc9-7599-48ca-a495-78dc8d8f2aa8\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Network/privateEndpoints/privateEndpoint-2upkxh\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenameeqpx5w\",\"serviceBusEndpoint\":\"https://namespaceNameeqpx5w.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:36:41.1774488Z\",\"updatedAt\":\"2024-04-29T12:37:29.3508153Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "Get-AzEventHubNamespaceV2+[NoContext]+List1+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces?api-version=2023-01-01-preview+1": { + "Get-AzEventHubNamespaceV2+[NoContext]+List1+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces?api-version=2023-01-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "50" ], - "x-ms-client-request-id": [ "7cd1ad18-578f-431b-91ab-ce64cf5cef81" ], + "x-ms-unique-id": [ "56" ], + "x-ms-client-request-id": [ "f78c34dd-c398-4cab-874e-147ba2a02023" ], "CommandName": [ "Get-AzEventHubNamespaceV2" ], "FullCommandName": [ "Get-AzEventHubNamespace_List1" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -65,39 +112,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "e6a83c1a-7241-41e8-8e77-3d7b029311a4_M6SN1_M6SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], - "x-ms-correlation-request-id": [ "d408a5b9-4790-4f5d-87f5-3718a3dfe9d4" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074713Z:d408a5b9-4790-4f5d-87f5-3718a3dfe9d4" ], + "x-ms-original-request-ids": [ "", "" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "e52e62b2-b0e7-4e7d-81b2-f361664cd01e" ], + "x-ms-correlation-request-id": [ "e52e62b2-b0e7-4e7d-81b2-f361664cd01e" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T124713Z:e52e62b2-b0e7-4e7d-81b2-f361664cd01e" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 9998CA6A49A34B1AB6CFB301566E2952 Ref B: SEL221051504011 Ref C: 2023-09-18T07:47:13Z" ], - "Date": [ "Mon, 18 Sep 2023 07:47:13 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 3FF0E428FD484AA4A147C3E6EA37E83C Ref B: SEL221051504047 Ref C: 2024-04-29T12:47:11Z" ], + "Date": [ "Mon, 29 Apr 2024 12:47:12 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "4707" ], + "Content-Length": [ "3350" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8\",\"name\":\"namespaceNamed5orf8\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"privateEndpointConnections\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/privateEndpointConnections/039cd4e6-b8c0-4b3f-a6c2-41d367f808b5\",\"name\":\"039cd4e6-b8c0-4b3f-a6c2-41d367f808b5\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"East US\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.Network/privateEndpoints/privateEndpoint-qyfutj\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956\",\"name\":\"cfdfc4e7-f5a8-465f-82a7-c4a77d84a956\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"East US\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.Network/privateEndpoints/privateEndpoint-352l4o\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}],\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamed5orf8\",\"createdAt\":\"2023-09-18T07:32:30.42Z\",\"updatedAt\":\"2023-09-18T07:33:53.993Z\",\"serviceBusEndpoint\":\"https://namespaceNamed5orf8.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s\",\"name\":\"namespaceNamewze84s\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"07331995-dc52-4f9b-898b-98ac4f0f5c53\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamewze84s\",\"createdAt\":\"2023-09-18T07:32:31.713Z\",\"updatedAt\":\"2023-09-18T07:39:50.78Z\",\"serviceBusEndpoint\":\"https://namespaceNamewze84s.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8\",\"name\":\"namespaceNamejwm6p8\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamejwm6p8\",\"createdAt\":\"2023-09-18T07:40:21.923Z\",\"updatedAt\":\"2023-09-18T07:41:10.1Z\",\"serviceBusEndpoint\":\"https://namespaceNamejwm6p8.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"name\":\"namespaceNameyr61dz\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"Australia East\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenameyr61dz\",\"createdAt\":\"2023-09-18T07:40:22.723Z\",\"updatedAt\":\"2023-09-18T07:41:13.68Z\",\"serviceBusEndpoint\":\"https://namespaceNameyr61dz.servicebus.windows.net:443/\",\"status\":\"Active\"}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName8avljz\",\"name\":\"namespaceName8avljz\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacename8avljz\",\"serviceBusEndpoint\":\"https://namespaceName8avljz.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:36:42.1697023Z\",\"updatedAt\":\"2024-04-29T12:40:07.9626719Z\"},\"identity\":{\"principalId\":\"95bc1d16-654f-4c7a-b29d-01094b522d1a\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t\",\"name\":\"namespaceNameil6w7t\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenameil6w7t\",\"serviceBusEndpoint\":\"https://namespaceNameil6w7t.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:36:41.1305159Z\",\"updatedAt\":\"2024-04-29T12:37:09.083082Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w\",\"name\":\"namespaceNameeqpx5w\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenameeqpx5w\",\"serviceBusEndpoint\":\"https://namespaceNameeqpx5w.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:36:41.1774488Z\",\"updatedAt\":\"2024-04-29T12:37:29.3508153Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"name\":\"namespaceName7pzlta\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"southcentralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacename7pzlta\",\"serviceBusEndpoint\":\"https://namespaceName7pzlta.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:36:41.2194019Z\",\"updatedAt\":\"2024-04-29T12:37:13.1304921Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}}]}", "isContentBase64": false } }, - "Get-AzEventHubNamespaceV2+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8?api-version=2023-01-01-preview+1": { + "Get-AzEventHubNamespaceV2+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w?api-version=2023-01-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "51" ], - "x-ms-client-request-id": [ "8d493261-403f-4f5e-90ef-a2c3acbffe77" ], + "x-ms-unique-id": [ "57" ], + "x-ms-client-request-id": [ "67cf3e36-d9f5-4720-9cca-aaf7be323e45" ], "CommandName": [ "Get-AzEventHubNamespaceV2" ], "FullCommandName": [ "Get-AzEventHubNamespace_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -108,39 +156,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "1ab5baf6-39c0-43a3-a8e5-c5fb22085222_M6CH3_M6CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-correlation-request-id": [ "3ac3399d-be92-4214-b73e-29cdee4bf283" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074715Z:3ac3399d-be92-4214-b73e-29cdee4bf283" ], + "x-ms-correlation-request-id": [ "d640bbb4-92b9-4fd1-8bf3-8d1f3003b337" ], + "x-ms-client-request-id": [ "67cf3e36-d9f5-4720-9cca-aaf7be323e45_RP" ], + "x-ms-messaging-activity-id": [ "6ccf3110-748d-4019-b25c-1cb1e620f0ec" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-29T12:47:14" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "d640bbb4-92b9-4fd1-8bf3-8d1f3003b337" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T124714Z:d640bbb4-92b9-4fd1-8bf3-8d1f3003b337" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: B06282DB998C49C18FEE45F33FB4402A Ref B: SEL221051504011 Ref C: 2023-09-18T07:47:14Z" ], - "Date": [ "Mon, 18 Sep 2023 07:47:15 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 8FCC0B860D8341D9A464AAA5449E8A9A Ref B: SEL221051504047 Ref C: 2024-04-29T12:47:13Z" ], + "Date": [ "Mon, 29 Apr 2024 12:47:14 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "2218" ], + "Content-Length": [ "2224" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8\",\"name\":\"namespaceNamed5orf8\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"privateEndpointConnections\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/039cd4e6-b8c0-4b3f-a6c2-41d367f808b5\",\"name\":\"039cd4e6-b8c0-4b3f-a6c2-41d367f808b5\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"East US\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.Network/privateEndpoints/privateEndpoint-qyfutj\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956\",\"name\":\"cfdfc4e7-f5a8-465f-82a7-c4a77d84a956\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"East US\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.Network/privateEndpoints/privateEndpoint-352l4o\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}],\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamed5orf8\",\"createdAt\":\"2023-09-18T07:32:30.42Z\",\"updatedAt\":\"2023-09-18T07:33:53.993Z\",\"serviceBusEndpoint\":\"https://namespaceNamed5orf8.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w\",\"name\":\"namespaceNameeqpx5w\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"privateEndpointConnections\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/3f4f7599-40f5-43ca-bddc-6527431d9604\",\"name\":\"3f4f7599-40f5-43ca-bddc-6527431d9604\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Network/privateEndpoints/privateEndpoint-i4bc1n\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8\",\"name\":\"f6111dc9-7599-48ca-a495-78dc8d8f2aa8\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Network/privateEndpoints/privateEndpoint-2upkxh\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenameeqpx5w\",\"serviceBusEndpoint\":\"https://namespaceNameeqpx5w.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:36:41.1774488Z\",\"updatedAt\":\"2024-04-29T12:37:29.3508153Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "Get-AzEventHubNamespaceV2+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8?api-version=2023-01-01-preview+2": { + "Get-AzEventHubNamespaceV2+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w?api-version=2023-01-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "52" ], - "x-ms-client-request-id": [ "2c154258-3937-4ef9-a4ab-915f71668e3a" ], + "x-ms-unique-id": [ "58" ], + "x-ms-client-request-id": [ "14353e17-860e-4008-9e64-3492c0a85da6" ], "CommandName": [ "Get-AzEventHubNamespaceV2" ], "FullCommandName": [ "Get-AzEventHubNamespace_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -151,23 +202,26 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "879e3b6a-daa3-4ccb-8a69-fb7a24b9ba36_M4CH3_M4CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], - "x-ms-correlation-request-id": [ "9657165f-0e58-4ec0-b15d-d99ceb4332b8" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074716Z:9657165f-0e58-4ec0-b15d-d99ceb4332b8" ], + "x-ms-correlation-request-id": [ "1f865b77-b0d8-4772-a45d-c64531fd423c" ], + "x-ms-client-request-id": [ "14353e17-860e-4008-9e64-3492c0a85da6_RP" ], + "x-ms-messaging-activity-id": [ "b9dfe9d0-ffa0-464a-817d-61b0407ea1fa" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G9|2024-04-29T12:47:16" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "1f865b77-b0d8-4772-a45d-c64531fd423c" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T124716Z:1f865b77-b0d8-4772-a45d-c64531fd423c" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: BFD1079A227B4B268668D4EC54823792 Ref B: SEL221051504011 Ref C: 2023-09-18T07:47:15Z" ], - "Date": [ "Mon, 18 Sep 2023 07:47:15 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 807B9232633A437EA4A0B7D9CA727FB0 Ref B: SEL221051504047 Ref C: 2024-04-29T12:47:14Z" ], + "Date": [ "Mon, 29 Apr 2024 12:47:16 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "2218" ], + "Content-Length": [ "2224" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8\",\"name\":\"namespaceNamed5orf8\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"privateEndpointConnections\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/039cd4e6-b8c0-4b3f-a6c2-41d367f808b5\",\"name\":\"039cd4e6-b8c0-4b3f-a6c2-41d367f808b5\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"East US\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.Network/privateEndpoints/privateEndpoint-qyfutj\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956\",\"name\":\"cfdfc4e7-f5a8-465f-82a7-c4a77d84a956\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"East US\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.Network/privateEndpoints/privateEndpoint-352l4o\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}],\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamed5orf8\",\"createdAt\":\"2023-09-18T07:32:30.42Z\",\"updatedAt\":\"2023-09-18T07:33:53.993Z\",\"serviceBusEndpoint\":\"https://namespaceNamed5orf8.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w\",\"name\":\"namespaceNameeqpx5w\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"privateEndpointConnections\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/3f4f7599-40f5-43ca-bddc-6527431d9604\",\"name\":\"3f4f7599-40f5-43ca-bddc-6527431d9604\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Network/privateEndpoints/privateEndpoint-i4bc1n\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8\",\"name\":\"f6111dc9-7599-48ca-a495-78dc8d8f2aa8\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Network/privateEndpoints/privateEndpoint-2upkxh\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenameeqpx5w\",\"serviceBusEndpoint\":\"https://namespaceNameeqpx5w.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:36:41.1774488Z\",\"updatedAt\":\"2024-04-29T12:37:29.3508153Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } } diff --git a/src/EventHub/EventHub.Autorest/test/Get-AzEventHubNamespaceV2.Tests.ps1 b/src/EventHub/EventHub.Autorest/test/Get-AzEventHubNamespaceV2.Tests.ps1 index 49f5eb802398..7801e1be18c8 100644 --- a/src/EventHub/EventHub.Autorest/test/Get-AzEventHubNamespaceV2.Tests.ps1 +++ b/src/EventHub/EventHub.Autorest/test/Get-AzEventHubNamespaceV2.Tests.ps1 @@ -15,8 +15,9 @@ if(($null -eq $TestName) -or ($TestName -contains 'Get-AzEventHubNamespaceV2')) } Describe 'Get-AzEventHubNamespaceV2' { - It 'List' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw + It 'List' { + $listOfNamespaces = Get-AzEventHubNamespaceV2 + $listOfNamespaces.Count | Should -BeGreaterOrEqual 2 } It 'Get' { diff --git a/src/EventHub/EventHub.Autorest/test/Get-AzEventHubNetworkRuleSet.Recording.json b/src/EventHub/EventHub.Autorest/test/Get-AzEventHubNetworkRuleSet.Recording.json index ade7fe499010..b1e4c5697543 100644 --- a/src/EventHub/EventHub.Autorest/test/Get-AzEventHubNetworkRuleSet.Recording.json +++ b/src/EventHub/EventHub.Autorest/test/Get-AzEventHubNetworkRuleSet.Recording.json @@ -1,17 +1,17 @@ { - "Get-AzEventHubNetworkRuleSet+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/networkRuleSets/default?api-version=2023-01-01-preview+1": { + "Get-AzEventHubNetworkRuleSet+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/networkRuleSets/default?api-version=2023-01-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/networkRuleSets/default?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/networkRuleSets/default?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "53" ], - "x-ms-client-request-id": [ "e5f49397-76b3-437f-ae0a-bb9deefd4163" ], + "x-ms-unique-id": [ "59" ], + "x-ms-client-request-id": [ "b2f04f72-be31-40df-8867-51d5f2134d3a" ], "CommandName": [ "Get-AzEventHubNetworkRuleSet" ], "FullCommandName": [ "Get-AzEventHubNetworkRuleSet_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,22 +22,26 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-request-id": [ "c1911423-306c-4a3c-b607-28a49635ec29" ], - "x-ms-correlation-request-id": [ "c1911423-306c-4a3c-b607-28a49635ec29" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074728Z:c1911423-306c-4a3c-b607-28a49635ec29" ], + "x-ms-correlation-request-id": [ "3c09efc4-8b05-4a49-a090-62c0f0d570b8" ], + "x-ms-client-request-id": [ "b2f04f72-be31-40df-8867-51d5f2134d3a_RP" ], + "x-ms-messaging-activity-id": [ "986e308c-51ea-4c4f-b5c7-9eb94bda32d5" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G6|2024-04-29T12:47:32" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "3c09efc4-8b05-4a49-a090-62c0f0d570b8" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T124732Z:3c09efc4-8b05-4a49-a090-62c0f0d570b8" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: F9145B3E20164DF5806A46AC75061B05 Ref B: SEL221051504011 Ref C: 2023-09-18T07:47:26Z" ], - "Date": [ "Mon, 18 Sep 2023 07:47:28 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 42280D38A59245F0AA3C753A152122DB Ref B: SEL221051504047 Ref C: 2024-04-29T12:47:30Z" ], + "Date": [ "Mon, 29 Apr 2024 12:47:32 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "456" ], + "Content-Length": [ "424" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/networkrulesets/default\",\"name\":\"default\",\"type\":\"Microsoft.EventHub/Namespaces/NetworkRuleSets\",\"location\":\"eastus\",\"properties\":{\"publicNetworkAccess\":\"Enabled\",\"defaultAction\":\"Allow\",\"virtualNetworkRules\":[],\"ipRules\":[],\"trustedServiceAccessEnabled\":false,\"provisioningState\":\"Succeeded\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/networkrulesets/default\",\"name\":\"default\",\"type\":\"Microsoft.EventHub/Namespaces/NetworkRuleSets\",\"location\":\"eastus\",\"properties\":{\"publicNetworkAccess\":\"Enabled\",\"defaultAction\":\"Allow\",\"virtualNetworkRules\":[],\"ipRules\":[],\"trustedServiceAccessEnabled\":false}}", "isContentBase64": false } } diff --git a/src/EventHub/EventHub.Autorest/test/Get-AzEventHubPrivateEndpointConnection.Recording.json b/src/EventHub/EventHub.Autorest/test/Get-AzEventHubPrivateEndpointConnection.Recording.json index 1592b9eb6c9f..ad7fe3a8a424 100644 --- a/src/EventHub/EventHub.Autorest/test/Get-AzEventHubPrivateEndpointConnection.Recording.json +++ b/src/EventHub/EventHub.Autorest/test/Get-AzEventHubPrivateEndpointConnection.Recording.json @@ -1,17 +1,17 @@ { - "Get-AzEventHubPrivateEndpointConnection+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections?api-version=2023-01-01-preview+1": { + "Get-AzEventHubPrivateEndpointConnection+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections?api-version=2023-01-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "54" ], - "x-ms-client-request-id": [ "a545c2ad-dbd9-4e78-a3fc-b79798330960" ], + "x-ms-unique-id": [ "60" ], + "x-ms-client-request-id": [ "9452cc84-f7b4-4e04-b6ec-ce75e59a59ed" ], "CommandName": [ "Get-AzEventHubPrivateEndpointConnection" ], "FullCommandName": [ "Get-AzEventHubPrivateEndpointConnection_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,38 +22,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], - "x-ms-request-id": [ "af3a2599-1543-4f8c-ac77-70b8adf5a5ab" ], - "x-ms-correlation-request-id": [ "af3a2599-1543-4f8c-ac77-70b8adf5a5ab" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074740Z:af3a2599-1543-4f8c-ac77-70b8adf5a5ab" ], + "x-ms-correlation-request-id": [ "a3ceae94-1589-49f3-89bb-b0d1ff61415d" ], + "x-ms-client-request-id": [ "9452cc84-f7b4-4e04-b6ec-ce75e59a59ed_RP" ], + "x-ms-messaging-activity-id": [ "d7f112e0-0d6a-484c-97cd-e79d472abbc8" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G2|2024-04-29T12:47:48" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "a3ceae94-1589-49f3-89bb-b0d1ff61415d" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T124748Z:a3ceae94-1589-49f3-89bb-b0d1ff61415d" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: B4770D5A47264CA2AC937BF9C2FFAEFE Ref B: SEL221051504011 Ref C: 2023-09-18T07:47:38Z" ], - "Date": [ "Mon, 18 Sep 2023 07:47:39 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 90929108DBA746C8AC7ACB7950D91D9E Ref B: SEL221051504047 Ref C: 2024-04-29T12:47:46Z" ], + "Date": [ "Mon, 29 Apr 2024 12:47:48 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1408" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/039cd4e6-b8c0-4b3f-a6c2-41d367f808b5\",\"name\":\"039cd4e6-b8c0-4b3f-a6c2-41d367f808b5\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.Network/privateEndpoints/privateEndpoint-qyfutj\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956\",\"name\":\"cfdfc4e7-f5a8-465f-82a7-c4a77d84a956\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.Network/privateEndpoints/privateEndpoint-352l4o\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/3f4f7599-40f5-43ca-bddc-6527431d9604\",\"name\":\"3f4f7599-40f5-43ca-bddc-6527431d9604\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Network/privateEndpoints/privateEndpoint-i4bc1n\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8\",\"name\":\"f6111dc9-7599-48ca-a495-78dc8d8f2aa8\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Network/privateEndpoints/privateEndpoint-2upkxh\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}]}", "isContentBase64": false } }, - "Get-AzEventHubPrivateEndpointConnection+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/039cd4e6-b8c0-4b3f-a6c2-41d367f808b5?api-version=2023-01-01-preview+1": { + "Get-AzEventHubPrivateEndpointConnection+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/3f4f7599-40f5-43ca-bddc-6527431d9604?api-version=2023-01-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/039cd4e6-b8c0-4b3f-a6c2-41d367f808b5?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/3f4f7599-40f5-43ca-bddc-6527431d9604?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "55" ], - "x-ms-client-request-id": [ "60516684-946f-447f-ae9d-d3fcea8daf8c" ], + "x-ms-unique-id": [ "61" ], + "x-ms-client-request-id": [ "62ad5ac0-d647-4796-8d26-36aa830f494f" ], "CommandName": [ "Get-AzEventHubPrivateEndpointConnection" ], "FullCommandName": [ "Get-AzEventHubPrivateEndpointConnection_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -64,38 +68,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], - "x-ms-request-id": [ "b72b28a7-61c3-4017-bf3e-60ffe343b7d6" ], - "x-ms-correlation-request-id": [ "b72b28a7-61c3-4017-bf3e-60ffe343b7d6" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074741Z:b72b28a7-61c3-4017-bf3e-60ffe343b7d6" ], + "x-ms-correlation-request-id": [ "a12b564b-e62c-4ef2-9fcd-1569497a6c18" ], + "x-ms-client-request-id": [ "62ad5ac0-d647-4796-8d26-36aa830f494f_RP" ], + "x-ms-messaging-activity-id": [ "1a14e184-c4c2-4d6f-8bdd-21fa244b1061" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G7|2024-04-29T12:47:49" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "a12b564b-e62c-4ef2-9fcd-1569497a6c18" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T124749Z:a12b564b-e62c-4ef2-9fcd-1569497a6c18" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: DCECD292FFCE4ACD863B17F81F1ABBEF Ref B: SEL221051504011 Ref C: 2023-09-18T07:47:40Z" ], - "Date": [ "Mon, 18 Sep 2023 07:47:41 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 20655EB589C94ACDA0BE728536AFA7FC Ref B: SEL221051504047 Ref C: 2024-04-29T12:47:48Z" ], + "Date": [ "Mon, 29 Apr 2024 12:47:49 GMT" ] }, "ContentHeaders": { "Content-Length": [ "696" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/039cd4e6-b8c0-4b3f-a6c2-41d367f808b5\",\"name\":\"039cd4e6-b8c0-4b3f-a6c2-41d367f808b5\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.Network/privateEndpoints/privateEndpoint-qyfutj\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/3f4f7599-40f5-43ca-bddc-6527431d9604\",\"name\":\"3f4f7599-40f5-43ca-bddc-6527431d9604\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Network/privateEndpoints/privateEndpoint-i4bc1n\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}}", "isContentBase64": false } }, - "Get-AzEventHubPrivateEndpointConnection+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956?api-version=2023-01-01-preview+1": { + "Get-AzEventHubPrivateEndpointConnection+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8?api-version=2023-01-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "56" ], - "x-ms-client-request-id": [ "0aa50f59-3974-4b67-910c-a2f5b8e26c89" ], + "x-ms-unique-id": [ "62" ], + "x-ms-client-request-id": [ "eace2fea-4e05-4f9d-9e5a-8db3d2c0fd92" ], "CommandName": [ "Get-AzEventHubPrivateEndpointConnection" ], "FullCommandName": [ "Get-AzEventHubPrivateEndpointConnection_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -106,38 +114,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-request-id": [ "5eb946dc-6626-41cd-9826-ef514e2a757c" ], - "x-ms-correlation-request-id": [ "5eb946dc-6626-41cd-9826-ef514e2a757c" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074743Z:5eb946dc-6626-41cd-9826-ef514e2a757c" ], + "x-ms-correlation-request-id": [ "be7c4593-0d2a-40ee-b626-95a79b929705" ], + "x-ms-client-request-id": [ "eace2fea-4e05-4f9d-9e5a-8db3d2c0fd92_RP" ], + "x-ms-messaging-activity-id": [ "6ad350f2-fb6a-4d18-b2aa-ee8dee814622" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G1|2024-04-29T12:47:51" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "be7c4593-0d2a-40ee-b626-95a79b929705" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T124751Z:be7c4593-0d2a-40ee-b626-95a79b929705" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 612E2080E8894E28B55B35A302AA60B2 Ref B: SEL221051504011 Ref C: 2023-09-18T07:47:42Z" ], - "Date": [ "Mon, 18 Sep 2023 07:47:43 GMT" ] + "X-MSEdge-Ref": [ "Ref A: C22BB9DFBDDF4AE1B874799FBBEE2A2D Ref B: SEL221051504047 Ref C: 2024-04-29T12:47:49Z" ], + "Date": [ "Mon, 29 Apr 2024 12:47:51 GMT" ] }, "ContentHeaders": { "Content-Length": [ "699" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956\",\"name\":\"cfdfc4e7-f5a8-465f-82a7-c4a77d84a956\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.Network/privateEndpoints/privateEndpoint-352l4o\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8\",\"name\":\"f6111dc9-7599-48ca-a495-78dc8d8f2aa8\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Network/privateEndpoints/privateEndpoint-2upkxh\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}", "isContentBase64": false } }, - "Get-AzEventHubPrivateEndpointConnection+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956?api-version=2023-01-01-preview+2": { + "Get-AzEventHubPrivateEndpointConnection+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8?api-version=2023-01-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "57" ], - "x-ms-client-request-id": [ "52fbf8c3-bc6d-481a-8a3d-a5764dd04621" ], + "x-ms-unique-id": [ "63" ], + "x-ms-client-request-id": [ "692dcdee-2586-4297-937b-ff88295adfe3" ], "CommandName": [ "Get-AzEventHubPrivateEndpointConnection" ], "FullCommandName": [ "Get-AzEventHubPrivateEndpointConnection_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -148,22 +160,26 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], - "x-ms-request-id": [ "d5b759b9-1442-409b-bc48-f66b888c38f9" ], - "x-ms-correlation-request-id": [ "d5b759b9-1442-409b-bc48-f66b888c38f9" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074745Z:d5b759b9-1442-409b-bc48-f66b888c38f9" ], + "x-ms-correlation-request-id": [ "19d848a1-518b-4f04-848d-ddfd93fbe146" ], + "x-ms-client-request-id": [ "692dcdee-2586-4297-937b-ff88295adfe3_RP" ], + "x-ms-messaging-activity-id": [ "af3f069e-b7cf-4533-ab66-dd77db96786f" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G10|2024-04-29T12:47:53" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "19d848a1-518b-4f04-848d-ddfd93fbe146" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240429T124753Z:19d848a1-518b-4f04-848d-ddfd93fbe146" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 8205FA1DBF0442C2AEAA9189EBCC011A Ref B: SEL221051504011 Ref C: 2023-09-18T07:47:43Z" ], - "Date": [ "Mon, 18 Sep 2023 07:47:45 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 4F350FFF93D34C72BC8885A8DD8A0433 Ref B: SEL221051504047 Ref C: 2024-04-29T12:47:51Z" ], + "Date": [ "Mon, 29 Apr 2024 12:47:52 GMT" ] }, "ContentHeaders": { "Content-Length": [ "699" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956\",\"name\":\"cfdfc4e7-f5a8-465f-82a7-c4a77d84a956\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.Network/privateEndpoints/privateEndpoint-352l4o\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8\",\"name\":\"f6111dc9-7599-48ca-a495-78dc8d8f2aa8\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Network/privateEndpoints/privateEndpoint-2upkxh\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}", "isContentBase64": false } } diff --git a/src/EventHub/EventHub.Autorest/test/Get-AzEventHubPrivateLink.Recording.json b/src/EventHub/EventHub.Autorest/test/Get-AzEventHubPrivateLink.Recording.json index d68d645ebf2e..e0bf68b3e480 100644 --- a/src/EventHub/EventHub.Autorest/test/Get-AzEventHubPrivateLink.Recording.json +++ b/src/EventHub/EventHub.Autorest/test/Get-AzEventHubPrivateLink.Recording.json @@ -1,17 +1,63 @@ { - "Get-AzEventHubPrivateLink+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateLinkResources?api-version=2023-01-01-preview+1": { + "Get-AzEventHubPrivateLink+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w?api-version=2023-01-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateLinkResources?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "58" ], - "x-ms-client-request-id": [ "94ab9919-d597-4d65-86db-ad885dc4d236" ], + "x-ms-unique-id": [ "64" ], + "x-ms-client-request-id": [ "671a69e1-acd8-4d0f-9218-c5696bff612b" ], + "CommandName": [ "Get-AzEventHubNamespaceV2" ], + "FullCommandName": [ "Get-AzEventHubNamespace_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-correlation-request-id": [ "21d8f3ea-599d-46ba-b8f2-e4d9bbc36cc4" ], + "x-ms-client-request-id": [ "671a69e1-acd8-4d0f-9218-c5696bff612b_RP" ], + "x-ms-messaging-activity-id": [ "4947851c-d395-4a35-b702-0c9dc6f26722" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-29T12:48:09" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "21d8f3ea-599d-46ba-b8f2-e4d9bbc36cc4" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T124809Z:21d8f3ea-599d-46ba-b8f2-e4d9bbc36cc4" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 4A84B943AFAD4C35A25B5BC0947B534C Ref B: SEL221051504047 Ref C: 2024-04-29T12:48:07Z" ], + "Date": [ "Mon, 29 Apr 2024 12:48:08 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "2224" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w\",\"name\":\"namespaceNameeqpx5w\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"privateEndpointConnections\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/3f4f7599-40f5-43ca-bddc-6527431d9604\",\"name\":\"3f4f7599-40f5-43ca-bddc-6527431d9604\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Network/privateEndpoints/privateEndpoint-i4bc1n\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8\",\"name\":\"f6111dc9-7599-48ca-a495-78dc8d8f2aa8\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Network/privateEndpoints/privateEndpoint-2upkxh\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenameeqpx5w\",\"serviceBusEndpoint\":\"https://namespaceNameeqpx5w.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:36:41.1774488Z\",\"updatedAt\":\"2024-04-29T12:37:29.3508153Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", + "isContentBase64": false + } + }, + "Get-AzEventHubPrivateLink+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateLinkResources?api-version=2023-01-01-preview+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateLinkResources?api-version=2023-01-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "65" ], + "x-ms-client-request-id": [ "7f2e0da8-d305-4c7d-9750-d02fa43ca0ca" ], "CommandName": [ "Get-AzEventHubPrivateLink" ], "FullCommandName": [ "Get-AzEventHubPrivateLink_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,23 +68,26 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "37d4271c-0789-482e-a8cb-176cc79cddc4_M1CH3_M1CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], - "x-ms-correlation-request-id": [ "77ce5218-6eb7-4aed-81f0-6b9ffbf8c8a7" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074755Z:77ce5218-6eb7-4aed-81f0-6b9ffbf8c8a7" ], + "x-ms-correlation-request-id": [ "0ececfc7-5798-4666-9b98-024938b186e8" ], + "x-ms-client-request-id": [ "7f2e0da8-d305-4c7d-9750-d02fa43ca0ca_RP" ], + "x-ms-messaging-activity-id": [ "8f26b010-9e65-47e3-9243-3dcd39db0797" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-29T12:48:10" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "0ececfc7-5798-4666-9b98-024938b186e8" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T124810Z:0ececfc7-5798-4666-9b98-024938b186e8" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: DF2EB57CE2174FB9BF0D0E2E9F7E7A8E Ref B: SEL221051504011 Ref C: 2023-09-18T07:47:55Z" ], - "Date": [ "Mon, 18 Sep 2023 07:47:55 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 36B934E9CC4C456A9614A088B8CC171D Ref B: SEL221051504047 Ref C: 2024-04-29T12:48:09Z" ], + "Date": [ "Mon, 29 Apr 2024 12:48:10 GMT" ] }, "ContentHeaders": { "Content-Length": [ "412" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateLinkResources/namespace\",\"name\":\"namespace\",\"type\":\"Microsoft.EventHub/namespaces/privateLinkResources\",\"properties\":{\"groupId\":\"namespace\",\"requiredMembers\":[\"namespace\"],\"requiredZoneNames\":[\"privatelink.servicebus.windows.net\"]}}]}", + "Content": "{\"value\":[{\"id\":\"subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateLinkResources/namespace\",\"name\":\"namespace\",\"type\":\"Microsoft.EventHub/namespaces/privateLinkResources\",\"properties\":{\"groupId\":\"namespace\",\"requiredMembers\":[\"namespace\"],\"requiredZoneNames\":[\"privatelink.servicebus.windows.net\"]}}]}", "isContentBase64": false } } diff --git a/src/EventHub/EventHub.Autorest/test/Get-AzEventHubPrivateLink.Tests.ps1 b/src/EventHub/EventHub.Autorest/test/Get-AzEventHubPrivateLink.Tests.ps1 index 53353235512e..e275a6a3249b 100644 --- a/src/EventHub/EventHub.Autorest/test/Get-AzEventHubPrivateLink.Tests.ps1 +++ b/src/EventHub/EventHub.Autorest/test/Get-AzEventHubPrivateLink.Tests.ps1 @@ -13,10 +13,11 @@ while(-not $mockingPath) { Describe 'Get-AzEventHubPrivateLink' { It 'Get' { + $namespace = Get-AzEventHubNamespaceV2 -ResourceGroupName $env.resourceGroup -Name $env.namespace $privateLink = Get-AzEventHubPrivateLink -NamespaceName $env.namespace -ResourceGroupName $env.resourceGroup $privateLink.Name | Should -Be "namespace" $privateLink.GroupId | Should -Be "namespace" $privateLink.RequiredMember[0] | Should -Be "namespace" - $privateLink.RequiredZoneName[0] | Should -Be "privatelink.servicebus.windows.net" + $privateLink.RequiredZoneName[0] | Should -Be $([System.Uri]$namespace.ServiceBusEndpoint).Host.ToLower().Replace($env.namespace.ToLower(), 'privatelink') } } diff --git a/src/EventHub/EventHub.Autorest/test/Get-AzEventHubSchemaGroup.Recording.json b/src/EventHub/EventHub.Autorest/test/Get-AzEventHubSchemaGroup.Recording.json index 2684a092dbc4..5a0fe6d004d9 100644 --- a/src/EventHub/EventHub.Autorest/test/Get-AzEventHubSchemaGroup.Recording.json +++ b/src/EventHub/EventHub.Autorest/test/Get-AzEventHubSchemaGroup.Recording.json @@ -1,17 +1,17 @@ { - "Get-AzEventHubSchemaGroup+[NoContext]+List+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/schemagroups?api-version=2023-01-01-preview+1": { + "Get-AzEventHubSchemaGroup+[NoContext]+List+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/schemagroups?api-version=2023-01-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/schemagroups?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/schemagroups?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "59" ], - "x-ms-client-request-id": [ "dd6b4b43-6ba7-481c-88e5-ccf0e1851bac" ], + "x-ms-unique-id": [ "66" ], + "x-ms-client-request-id": [ "f757ebdc-be7e-4a9c-aac0-41630d3a5322" ], "CommandName": [ "Get-AzEventHubSchemaGroup" ], "FullCommandName": [ "Get-AzEventHubSchemaGroup_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,40 +22,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-inline-count": [ "1" ], - "x-ms-request-id": [ "f7fe7edd-193d-4b9e-82f4-7f8fc58cbdeb_M2CH3_M2CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-correlation-request-id": [ "c03bc5d1-a67d-49ab-b898-5d6ff32fa075" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074815Z:c03bc5d1-a67d-49ab-b898-5d6ff32fa075" ], + "x-ms-correlation-request-id": [ "760bcbe0-a304-4d39-895e-f20f69d07525" ], + "x-ms-client-request-id": [ "f757ebdc-be7e-4a9c-aac0-41630d3a5322_RP" ], + "x-ms-messaging-activity-id": [ "8c2af152-10fb-4d2e-9f8b-9320be83cc84" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G2|2024-04-29T12:48:40" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "760bcbe0-a304-4d39-895e-f20f69d07525" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T124840Z:760bcbe0-a304-4d39-895e-f20f69d07525" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 2904033DB0BC403AAF9EA6E401B83505 Ref B: SEL221051504011 Ref C: 2023-09-18T07:48:14Z" ], - "Date": [ "Mon, 18 Sep 2023 07:48:15 GMT" ] + "X-MSEdge-Ref": [ "Ref A: BD63EB38DB714D0AA978ECA5F36BE2B4 Ref B: SEL221051504047 Ref C: 2024-04-29T12:48:38Z" ], + "Date": [ "Mon, 29 Apr 2024 12:48:39 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "529" ], + "Content-Length": [ "528" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/schemagroups/schemaGroup7ezg61\",\"name\":\"schemaGroup7ezg61\",\"type\":\"Microsoft.EventHub/Namespaces/SchemaGroups\",\"location\":\"East US\",\"properties\":{\"updatedAtUtc\":\"2023-09-18T07:33:57.9643951Z\",\"createdAtUtc\":\"2023-09-18T07:33:57.9643951Z\",\"eTag\":\"651e6768-196f-4185-ac96-35a60e489169\",\"groupProperties\":{},\"schemaCompatibility\":\"None\",\"schemaType\":\"Avro\"}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/schemaGroups/schemaGroup3yt1fv\",\"name\":\"schemaGroup3yt1fv\",\"type\":\"Microsoft.EventHub/namespaces/schemagroups\",\"location\":\"eastus\",\"properties\":{\"updatedAtUtc\":\"2024-04-29T12:37:46.2299017Z\",\"createdAtUtc\":\"2024-04-29T12:37:46.2299017Z\",\"eTag\":\"8533af18-f093-448f-8c0b-bf44a0f46475\",\"groupProperties\":{},\"schemaCompatibility\":\"None\",\"schemaType\":\"Avro\"}}]}", "isContentBase64": false } }, - "Get-AzEventHubSchemaGroup+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/schemagroups/schemaGroup7ezg61?api-version=2023-01-01-preview+1": { + "Get-AzEventHubSchemaGroup+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/schemagroups/schemaGroup3yt1fv?api-version=2023-01-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/schemagroups/schemaGroup7ezg61?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/schemagroups/schemaGroup3yt1fv?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "60" ], - "x-ms-client-request-id": [ "b78f7435-009d-44c0-8ec9-f9d575fae079" ], + "x-ms-unique-id": [ "67" ], + "x-ms-client-request-id": [ "9ff29a8c-6aa0-4c65-90a7-f55f8e1ea175" ], "CommandName": [ "Get-AzEventHubSchemaGroup" ], "FullCommandName": [ "Get-AzEventHubSchemaGroup_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -66,39 +68,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "0013fff1-3d48-47ee-8923-7a0fec9b9cb1_M3SN1_M3SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], - "x-ms-correlation-request-id": [ "c175370e-8c76-4b66-812d-1317994a0853" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074817Z:c175370e-8c76-4b66-812d-1317994a0853" ], + "x-ms-correlation-request-id": [ "3cbdcd52-251c-4f77-9101-9359f29278b6" ], + "x-ms-client-request-id": [ "9ff29a8c-6aa0-4c65-90a7-f55f8e1ea175_RP" ], + "x-ms-messaging-activity-id": [ "bd970ccc-8eed-4d87-9a79-bdfa80ab2a00" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G10|2024-04-29T12:48:42" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "3cbdcd52-251c-4f77-9101-9359f29278b6" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T124842Z:3cbdcd52-251c-4f77-9101-9359f29278b6" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 2D6DCBE8A0234AF19955C77ADF7C1A31 Ref B: SEL221051504011 Ref C: 2023-09-18T07:48:16Z" ], - "Date": [ "Mon, 18 Sep 2023 07:48:16 GMT" ] + "X-MSEdge-Ref": [ "Ref A: FD22D4EDB1C946CFAC6B158D69789E92 Ref B: SEL221051504047 Ref C: 2024-04-29T12:48:40Z" ], + "Date": [ "Mon, 29 Apr 2024 12:48:42 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "517" ], + "Content-Length": [ "516" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/schemagroups/schemaGroup7ezg61\",\"name\":\"schemaGroup7ezg61\",\"type\":\"Microsoft.EventHub/Namespaces/SchemaGroups\",\"location\":\"East US\",\"properties\":{\"updatedAtUtc\":\"2023-09-18T07:33:57.9643951Z\",\"createdAtUtc\":\"2023-09-18T07:33:57.9643951Z\",\"eTag\":\"651e6768-196f-4185-ac96-35a60e489169\",\"groupProperties\":{},\"schemaCompatibility\":\"None\",\"schemaType\":\"Avro\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/schemaGroups/schemaGroup3yt1fv\",\"name\":\"schemaGroup3yt1fv\",\"type\":\"Microsoft.EventHub/namespaces/schemagroups\",\"location\":\"eastus\",\"properties\":{\"updatedAtUtc\":\"2024-04-29T12:37:46.2299017Z\",\"createdAtUtc\":\"2024-04-29T12:37:46.2299017Z\",\"eTag\":\"8533af18-f093-448f-8c0b-bf44a0f46475\",\"groupProperties\":{},\"schemaCompatibility\":\"None\",\"schemaType\":\"Avro\"}}", "isContentBase64": false } }, - "Get-AzEventHubSchemaGroup+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/schemagroups/schemaGroup7ezg61?api-version=2023-01-01-preview+1": { + "Get-AzEventHubSchemaGroup+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/schemagroups/schemaGroup3yt1fv?api-version=2023-01-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/schemagroups/schemaGroup7ezg61?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/schemagroups/schemaGroup3yt1fv?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "61" ], - "x-ms-client-request-id": [ "ed374361-8760-4486-9fc3-e99a3cf19714" ], + "x-ms-unique-id": [ "68" ], + "x-ms-client-request-id": [ "322d0c6a-386b-46a7-9082-d4524961d605" ], "CommandName": [ "Get-AzEventHubSchemaGroup" ], "FullCommandName": [ "Get-AzEventHubSchemaGroup_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -109,39 +114,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "1260b95a-8f71-4067-83c1-3a7707296c6a_M5SN1_M5SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], - "x-ms-correlation-request-id": [ "3845609a-cdc7-495a-b8e0-59f0eb693236" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074818Z:3845609a-cdc7-495a-b8e0-59f0eb693236" ], + "x-ms-correlation-request-id": [ "0650dbc1-4a53-4890-ac84-6f65268b40b7" ], + "x-ms-client-request-id": [ "322d0c6a-386b-46a7-9082-d4524961d605_RP" ], + "x-ms-messaging-activity-id": [ "2b19cac1-78b1-449a-b306-aa8058101757" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G3|2024-04-29T12:48:44" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "0650dbc1-4a53-4890-ac84-6f65268b40b7" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T124844Z:0650dbc1-4a53-4890-ac84-6f65268b40b7" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 4C536C1A3B4543B3B51D2F1E39B0AA89 Ref B: SEL221051504011 Ref C: 2023-09-18T07:48:17Z" ], - "Date": [ "Mon, 18 Sep 2023 07:48:18 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 2CB67AEC828842848B4AC0E3399FD730 Ref B: SEL221051504047 Ref C: 2024-04-29T12:48:42Z" ], + "Date": [ "Mon, 29 Apr 2024 12:48:43 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "517" ], + "Content-Length": [ "516" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/schemagroups/schemaGroup7ezg61\",\"name\":\"schemaGroup7ezg61\",\"type\":\"Microsoft.EventHub/Namespaces/SchemaGroups\",\"location\":\"East US\",\"properties\":{\"updatedAtUtc\":\"2023-09-18T07:33:57.9643951Z\",\"createdAtUtc\":\"2023-09-18T07:33:57.9643951Z\",\"eTag\":\"651e6768-196f-4185-ac96-35a60e489169\",\"groupProperties\":{},\"schemaCompatibility\":\"None\",\"schemaType\":\"Avro\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/schemaGroups/schemaGroup3yt1fv\",\"name\":\"schemaGroup3yt1fv\",\"type\":\"Microsoft.EventHub/namespaces/schemagroups\",\"location\":\"eastus\",\"properties\":{\"updatedAtUtc\":\"2024-04-29T12:37:46.2299017Z\",\"createdAtUtc\":\"2024-04-29T12:37:46.2299017Z\",\"eTag\":\"8533af18-f093-448f-8c0b-bf44a0f46475\",\"groupProperties\":{},\"schemaCompatibility\":\"None\",\"schemaType\":\"Avro\"}}", "isContentBase64": false } }, - "Get-AzEventHubSchemaGroup+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/schemagroups/schemaGroup7ezg61?api-version=2023-01-01-preview+2": { + "Get-AzEventHubSchemaGroup+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/schemagroups/schemaGroup3yt1fv?api-version=2023-01-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/schemagroups/schemaGroup7ezg61?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/schemagroups/schemaGroup3yt1fv?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "62" ], - "x-ms-client-request-id": [ "e94ea4a1-af85-4886-ab70-d03208fc1fe9" ], + "x-ms-unique-id": [ "69" ], + "x-ms-client-request-id": [ "ddf834f7-07b0-4c5b-ab90-abb7ed18a8f5" ], "CommandName": [ "Get-AzEventHubSchemaGroup" ], "FullCommandName": [ "Get-AzEventHubSchemaGroup_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -152,23 +160,26 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "df10240c-54a7-4b2d-ad8d-71cdd616d430_M2SN1_M2SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-correlation-request-id": [ "17618b77-eaa4-495c-8498-4a581fdf9e20" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074820Z:17618b77-eaa4-495c-8498-4a581fdf9e20" ], + "x-ms-correlation-request-id": [ "b2025bf2-0faf-4e98-a020-2a3d12d2ca2a" ], + "x-ms-client-request-id": [ "ddf834f7-07b0-4c5b-ab90-abb7ed18a8f5_RP" ], + "x-ms-messaging-activity-id": [ "b6a105e0-b46a-43f8-b2f0-71f8e4a2819e" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G3|2024-04-29T12:48:46" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], + "x-ms-request-id": [ "b2025bf2-0faf-4e98-a020-2a3d12d2ca2a" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T124846Z:b2025bf2-0faf-4e98-a020-2a3d12d2ca2a" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 9BF33A8E0CC549919FB902D0692018B5 Ref B: SEL221051504011 Ref C: 2023-09-18T07:48:18Z" ], - "Date": [ "Mon, 18 Sep 2023 07:48:19 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 2F16BA42CD9C400C970866CF54010A8F Ref B: SEL221051504047 Ref C: 2024-04-29T12:48:44Z" ], + "Date": [ "Mon, 29 Apr 2024 12:48:45 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "517" ], + "Content-Length": [ "516" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/schemagroups/schemaGroup7ezg61\",\"name\":\"schemaGroup7ezg61\",\"type\":\"Microsoft.EventHub/Namespaces/SchemaGroups\",\"location\":\"East US\",\"properties\":{\"updatedAtUtc\":\"2023-09-18T07:33:57.9643951Z\",\"createdAtUtc\":\"2023-09-18T07:33:57.9643951Z\",\"eTag\":\"651e6768-196f-4185-ac96-35a60e489169\",\"groupProperties\":{},\"schemaCompatibility\":\"None\",\"schemaType\":\"Avro\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/schemaGroups/schemaGroup3yt1fv\",\"name\":\"schemaGroup3yt1fv\",\"type\":\"Microsoft.EventHub/namespaces/schemagroups\",\"location\":\"eastus\",\"properties\":{\"updatedAtUtc\":\"2024-04-29T12:37:46.2299017Z\",\"createdAtUtc\":\"2024-04-29T12:37:46.2299017Z\",\"eTag\":\"8533af18-f093-448f-8c0b-bf44a0f46475\",\"groupProperties\":{},\"schemaCompatibility\":\"None\",\"schemaType\":\"Avro\"}}", "isContentBase64": false } } diff --git a/src/EventHub/EventHub.Autorest/test/New-AzEventHub.Recording.json b/src/EventHub/EventHub.Autorest/test/New-AzEventHub.Recording.json index c02a761bf044..738bced5bef1 100644 --- a/src/EventHub/EventHub.Autorest/test/New-AzEventHub.Recording.json +++ b/src/EventHub/EventHub.Autorest/test/New-AzEventHub.Recording.json @@ -1,357 +1,59 @@ { - "New-AzEventHub+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo?api-version=2023-01-01-preview+1": { + "New-AzEventHub+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV14e6stf?api-version=2023-01-01-preview+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo?api-version=2023-01-01-preview", - "Content": "{\n \"location\": \"eastus\",\n \"sku\": {\n \"name\": \"Premium\",\n \"tier\": \"Premium\"\n },\n \"identity\": {\n \"type\": \"UserAssigned\",\n \"userAssignedIdentities\": {\n \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\": {\n }\n }\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV14e6stf?api-version=2023-01-01-preview", + "Content": "{\n \"location\": \"eastus\",\n \"sku\": {\n \"name\": \"Premium\",\n \"tier\": \"Premium\"\n },\n \"identity\": {\n \"type\": \"UserAssigned\",\n \"userAssignedIdentities\": {\n \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi2\": {\n }\n }\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "346" ] + "Content-Length": [ "365" ] } }, "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "be9907d3-776e-4bfd-b8b2-e1ed8b59d165_M1CH3_M1CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ "49" ], - "x-ms-correlation-request-id": [ "bbe6540a-c36c-4c64-9562-1b60cebbeca0" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074837Z:bbe6540a-c36c-4c64-9562-1b60cebbeca0" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 3EF4CA8B59674C52A27E9056B82E8097 Ref B: SEL221051504011 Ref C: 2023-09-18T07:48:29Z" ], - "Date": [ "Mon, 18 Sep 2023 07:48:37 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "818" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo\",\"name\":\"namespaceV19d35wo\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Created\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev19d35wo\",\"createdAt\":\"2023-09-18T07:48:36.533Z\",\"updatedAt\":\"2023-09-18T07:48:36.533Z\",\"serviceBusEndpoint\":\"https://namespaceV19d35wo.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "New-AzEventHub+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo?api-version=2023-01-01-preview+2": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "64" ], - "x-ms-client-request-id": [ "e3905e97-eb1a-49ea-a68e-3ebeb17df398" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "586829b4-24b8-4a71-836d-5464bdd42a0b_M0CH3_M0CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], - "x-ms-correlation-request-id": [ "ba8cd6b6-cd25-4ee1-b669-d286ef9c8c0e" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074908Z:ba8cd6b6-cd25-4ee1-b669-d286ef9c8c0e" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 819370998DD54F36A3509CFDE97A5D88 Ref B: SEL221051504011 Ref C: 2023-09-18T07:49:07Z" ], - "Date": [ "Mon, 18 Sep 2023 07:49:08 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1014" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo\",\"name\":\"namespaceV19d35wo\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev19d35wo\",\"createdAt\":\"2023-09-18T07:48:36.533Z\",\"updatedAt\":\"2023-09-18T07:48:36.533Z\",\"serviceBusEndpoint\":\"https://namespaceV19d35wo.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "New-AzEventHub+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo?api-version=2023-01-01-preview+3": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "65" ], - "x-ms-client-request-id": [ "e3905e97-eb1a-49ea-a68e-3ebeb17df398" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "6e6307d9-1721-4bdb-bc98-d4db9b089c7a_M9CH3_M9CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], - "x-ms-correlation-request-id": [ "8206029e-3eff-457f-a5af-9d48b444a2f6" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T074939Z:8206029e-3eff-457f-a5af-9d48b444a2f6" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 34169B5BBFAF4676B1385D4F28C9D049 Ref B: SEL221051504011 Ref C: 2023-09-18T07:49:38Z" ], - "Date": [ "Mon, 18 Sep 2023 07:49:38 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1014" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo\",\"name\":\"namespaceV19d35wo\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev19d35wo\",\"createdAt\":\"2023-09-18T07:48:36.533Z\",\"updatedAt\":\"2023-09-18T07:48:36.533Z\",\"serviceBusEndpoint\":\"https://namespaceV19d35wo.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "New-AzEventHub+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo?api-version=2023-01-01-preview+4": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "66" ], - "x-ms-client-request-id": [ "e3905e97-eb1a-49ea-a68e-3ebeb17df398" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "805f4b98-6424-4b27-8390-5eb350f42418_M8CH3_M8CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-correlation-request-id": [ "261fd1fc-59a4-429e-8ff5-69ffba8ef9b3" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T075011Z:261fd1fc-59a4-429e-8ff5-69ffba8ef9b3" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 7F266CE00EBB4A35B876F666F1D783FF Ref B: SEL221051504011 Ref C: 2023-09-18T07:50:09Z" ], - "Date": [ "Mon, 18 Sep 2023 07:50:10 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1014" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo\",\"name\":\"namespaceV19d35wo\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev19d35wo\",\"createdAt\":\"2023-09-18T07:48:36.533Z\",\"updatedAt\":\"2023-09-18T07:48:36.533Z\",\"serviceBusEndpoint\":\"https://namespaceV19d35wo.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "New-AzEventHub+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo?api-version=2023-01-01-preview+5": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "67" ], - "x-ms-client-request-id": [ "e3905e97-eb1a-49ea-a68e-3ebeb17df398" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "1792048f-6a12-45e2-97c2-fea3445b80a5_M6CH3_M6CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], - "x-ms-correlation-request-id": [ "663632e2-056a-41e8-b00d-8da44d9fc354" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T075041Z:663632e2-056a-41e8-b00d-8da44d9fc354" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: E246B0BE3BBA45B8BF04D506F00CEDF5 Ref B: SEL221051504011 Ref C: 2023-09-18T07:50:41Z" ], - "Date": [ "Mon, 18 Sep 2023 07:50:41 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1014" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo\",\"name\":\"namespaceV19d35wo\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev19d35wo\",\"createdAt\":\"2023-09-18T07:48:36.533Z\",\"updatedAt\":\"2023-09-18T07:48:36.533Z\",\"serviceBusEndpoint\":\"https://namespaceV19d35wo.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "New-AzEventHub+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo?api-version=2023-01-01-preview+6": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "68" ], - "x-ms-client-request-id": [ "e3905e97-eb1a-49ea-a68e-3ebeb17df398" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "b9947d53-e60f-42ba-85dc-f4dfb975c302_M1SN1_M1SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], - "x-ms-correlation-request-id": [ "fb929ed8-9ad4-4b92-8c99-761211cdff52" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T075112Z:fb929ed8-9ad4-4b92-8c99-761211cdff52" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: D3BA442A3C4F41B3A780BD905D0F8733 Ref B: SEL221051504011 Ref C: 2023-09-18T07:51:11Z" ], - "Date": [ "Mon, 18 Sep 2023 07:51:11 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1014" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo\",\"name\":\"namespaceV19d35wo\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev19d35wo\",\"createdAt\":\"2023-09-18T07:48:36.533Z\",\"updatedAt\":\"2023-09-18T07:48:36.533Z\",\"serviceBusEndpoint\":\"https://namespaceV19d35wo.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "New-AzEventHub+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo?api-version=2023-01-01-preview+7": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "69" ], - "x-ms-client-request-id": [ "e3905e97-eb1a-49ea-a68e-3ebeb17df398" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "979d1aae-6f12-43b0-b311-a17efaa53259_M8CH3_M8CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], - "x-ms-correlation-request-id": [ "976aaff0-601e-40c6-b1cd-8c00e13da80d" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T075143Z:976aaff0-601e-40c6-b1cd-8c00e13da80d" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: AF6F8351E4544A46A80B4E275365AF4F Ref B: SEL221051504011 Ref C: 2023-09-18T07:51:42Z" ], - "Date": [ "Mon, 18 Sep 2023 07:51:42 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1010" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo\",\"name\":\"namespaceV19d35wo\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev19d35wo\",\"createdAt\":\"2023-09-18T07:48:36.533Z\",\"updatedAt\":\"2023-09-18T07:51:13.443Z\",\"serviceBusEndpoint\":\"https://namespaceV19d35wo.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzEventHub+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo?api-version=2023-01-01-preview+8": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "70" ], - "x-ms-client-request-id": [ "e3905e97-eb1a-49ea-a68e-3ebeb17df398" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, + "StatusCode": 201, "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "74b357d3-3765-4877-89e6-6266c2bc32dc_M6CH3_M6CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], - "x-ms-correlation-request-id": [ "ee7ae876-40a6-4e25-a818-c86249784ec1" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T075214Z:ee7ae876-40a6-4e25-a818-c86249784ec1" ], + "x-ms-correlation-request-id": [ "185ee1d2-37ee-4d41-9fa4-38c7cd457fb9" ], + "x-ms-client-request-id": [ "3a366b20-6061-4c62-807f-8f1c3b543166_RP" ], + "x-ms-messaging-activity-id": [ "4715defd-dbff-45e4-b81b-fd9d4dccb77e" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G12|2024-04-29T12:49:02" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "49" ], + "x-ms-request-id": [ "185ee1d2-37ee-4d41-9fa4-38c7cd457fb9" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T124902Z:185ee1d2-37ee-4d41-9fa4-38c7cd457fb9" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 331C1BE1438B490B8033A632FFEB970D Ref B: SEL221051504011 Ref C: 2023-09-18T07:52:13Z" ], - "Date": [ "Mon, 18 Sep 2023 07:52:14 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 83E97C5774DF4D5DB8438629DB35E927 Ref B: SEL221051504047 Ref C: 2024-04-29T12:48:57Z" ], + "Date": [ "Mon, 29 Apr 2024 12:49:02 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1010" ], + "Content-Length": [ "1130" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo\",\"name\":\"namespaceV19d35wo\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev19d35wo\",\"createdAt\":\"2023-09-18T07:48:36.533Z\",\"updatedAt\":\"2023-09-18T07:51:13.443Z\",\"serviceBusEndpoint\":\"https://namespaceV19d35wo.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV14e6stf\",\"name\":\"namespaceV14e6stf\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev14e6stf\",\"serviceBusEndpoint\":\"https://namespaceV14e6stf.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Creating\",\"status\":\"Creating\",\"createdAt\":\"2024-04-29T12:49:02.5300323Z\",\"updatedAt\":\"2024-04-29T12:49:02.5300323Z\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi2\":{\"clientId\":\"5c5159b2-689b-4fb3-9412-010709a20a7f\",\"principalId\":\"14f2ac9f-e580-4c60-b26b-f46704cedfd4\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "New-AzEventHub+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo?api-version=2023-01-01-preview+9": { + "New-AzEventHub+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV14e6stf?api-version=2023-01-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV14e6stf?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], "x-ms-unique-id": [ "71" ], - "x-ms-client-request-id": [ "e3905e97-eb1a-49ea-a68e-3ebeb17df398" ], + "x-ms-client-request-id": [ "3a366b20-6061-4c62-807f-8f1c3b543166" ], "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ] }, "ContentHeaders": { } @@ -361,40 +63,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "68ea640d-69bf-42da-9d3e-caa20fbd2eff_M0SN1_M0SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-correlation-request-id": [ "7954287e-c31a-4e4f-86f4-ebe655ebc6b8" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T075245Z:7954287e-c31a-4e4f-86f4-ebe655ebc6b8" ], + "x-ms-correlation-request-id": [ "5d83ad8d-a6a4-40d0-9440-8ce6868ed9ec" ], + "x-ms-client-request-id": [ "3a366b20-6061-4c62-807f-8f1c3b543166_RP" ], + "x-ms-messaging-activity-id": [ "a0e2c35d-1749-4fe3-afd5-360674df7de9" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G11|2024-04-29T12:49:34" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-request-id": [ "5d83ad8d-a6a4-40d0-9440-8ce6868ed9ec" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T124934Z:5d83ad8d-a6a4-40d0-9440-8ce6868ed9ec" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 51A88BE6560E44E588934A318F3A9A60 Ref B: SEL221051504011 Ref C: 2023-09-18T07:52:44Z" ], - "Date": [ "Mon, 18 Sep 2023 07:52:44 GMT" ] + "X-MSEdge-Ref": [ "Ref A: AFA53AFED30D478C9CB0ED95E97563B9 Ref B: SEL221051504047 Ref C: 2024-04-29T12:49:32Z" ], + "Date": [ "Mon, 29 Apr 2024 12:49:34 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1010" ], + "Content-Length": [ "1162" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo\",\"name\":\"namespaceV19d35wo\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev19d35wo\",\"createdAt\":\"2023-09-18T07:48:36.533Z\",\"updatedAt\":\"2023-09-18T07:51:13.443Z\",\"serviceBusEndpoint\":\"https://namespaceV19d35wo.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV14e6stf\",\"name\":\"namespaceV14e6stf\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev14e6stf\",\"serviceBusEndpoint\":\"https://namespaceV14e6stf.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Creating\",\"status\":\"Creating\",\"createdAt\":\"2024-04-29T12:49:02.5300323Z\",\"updatedAt\":\"2024-04-29T12:49:02.5300323Z\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi2\":{\"clientId\":\"5c5159b2-689b-4fb3-9412-010709a20a7f\",\"principalId\":\"14f2ac9f-e580-4c60-b26b-f46704cedfd4\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "New-AzEventHub+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo?api-version=2023-01-01-preview+10": { + "New-AzEventHub+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV14e6stf?api-version=2023-01-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV14e6stf?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], "x-ms-unique-id": [ "72" ], - "x-ms-client-request-id": [ "e3905e97-eb1a-49ea-a68e-3ebeb17df398" ], + "x-ms-client-request-id": [ "3a366b20-6061-4c62-807f-8f1c3b543166" ], "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ] }, "ContentHeaders": { } @@ -404,126 +109,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "fd893b13-eece-4e22-8b4e-e15845851e68_M6CH3_M6CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-correlation-request-id": [ "4fbb5c75-baa5-46eb-856c-dddbc1600533" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T075317Z:4fbb5c75-baa5-46eb-856c-dddbc1600533" ], + "x-ms-correlation-request-id": [ "1b076d3e-0122-4546-b458-44e1a7fe6644" ], + "x-ms-client-request-id": [ "3a366b20-6061-4c62-807f-8f1c3b543166_RP" ], + "x-ms-messaging-activity-id": [ "cf862fac-f272-4893-9027-a566c25e67f2" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G11|2024-04-29T12:50:06" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-request-id": [ "1b076d3e-0122-4546-b458-44e1a7fe6644" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T125006Z:1b076d3e-0122-4546-b458-44e1a7fe6644" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 96A8031A9C1D4A2AAB2FD6505D10E48F Ref B: SEL221051504011 Ref C: 2023-09-18T07:53:15Z" ], - "Date": [ "Mon, 18 Sep 2023 07:53:16 GMT" ] + "X-MSEdge-Ref": [ "Ref A: F8F419DC5E014FD094BD54C985D48C4F Ref B: SEL221051504047 Ref C: 2024-04-29T12:50:04Z" ], + "Date": [ "Mon, 29 Apr 2024 12:50:05 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1010" ], + "Content-Length": [ "1161" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo\",\"name\":\"namespaceV19d35wo\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev19d35wo\",\"createdAt\":\"2023-09-18T07:48:36.533Z\",\"updatedAt\":\"2023-09-18T07:51:13.443Z\",\"serviceBusEndpoint\":\"https://namespaceV19d35wo.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV14e6stf\",\"name\":\"namespaceV14e6stf\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev14e6stf\",\"serviceBusEndpoint\":\"https://namespaceV14e6stf.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:49:02.5300323Z\",\"updatedAt\":\"2024-04-29T12:49:53.4003505Z\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi2\":{\"clientId\":\"5c5159b2-689b-4fb3-9412-010709a20a7f\",\"principalId\":\"14f2ac9f-e580-4c60-b26b-f46704cedfd4\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "New-AzEventHub+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo?api-version=2023-01-01-preview+11": { + "New-AzEventHub+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV14e6stf?api-version=2023-01-01-preview+4": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV14e6stf?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], "x-ms-unique-id": [ "73" ], - "x-ms-client-request-id": [ "e3905e97-eb1a-49ea-a68e-3ebeb17df398" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "647765d5-ba19-45d7-ac67-1a58e40f82fd_M3CH3_M3CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], - "x-ms-correlation-request-id": [ "e6435a07-42d2-420a-b1aa-80ef2671a33c" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T075347Z:e6435a07-42d2-420a-b1aa-80ef2671a33c" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 5D83A21EA7E24C5F86191B9C8BA0FB66 Ref B: SEL221051504011 Ref C: 2023-09-18T07:53:47Z" ], - "Date": [ "Mon, 18 Sep 2023 07:53:46 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1010" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo\",\"name\":\"namespaceV19d35wo\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev19d35wo\",\"createdAt\":\"2023-09-18T07:48:36.533Z\",\"updatedAt\":\"2023-09-18T07:51:13.443Z\",\"serviceBusEndpoint\":\"https://namespaceV19d35wo.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzEventHub+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo?api-version=2023-01-01-preview+12": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "74" ], - "x-ms-client-request-id": [ "e3905e97-eb1a-49ea-a68e-3ebeb17df398" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "26daf42a-9001-4744-a0ed-c3054b74d31d_M5SN1_M5SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], - "x-ms-correlation-request-id": [ "0dfd1407-bd5e-4fd1-8674-a838eb58d0db" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T075418Z:0dfd1407-bd5e-4fd1-8674-a838eb58d0db" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: D6D519CFBC704ED5B757D675EE42E8E9 Ref B: SEL221051504011 Ref C: 2023-09-18T07:54:17Z" ], - "Date": [ "Mon, 18 Sep 2023 07:54:17 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1010" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo\",\"name\":\"namespaceV19d35wo\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev19d35wo\",\"createdAt\":\"2023-09-18T07:48:36.533Z\",\"updatedAt\":\"2023-09-18T07:51:13.443Z\",\"serviceBusEndpoint\":\"https://namespaceV19d35wo.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzEventHub+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo?api-version=2023-01-01-preview+13": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "75" ], - "x-ms-client-request-id": [ "e3905e97-eb1a-49ea-a68e-3ebeb17df398" ], + "x-ms-client-request-id": [ "3a366b20-6061-4c62-807f-8f1c3b543166" ], "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ] }, "ContentHeaders": { } @@ -533,159 +155,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "e0567b50-3720-4e81-9fcb-20f5a0f98aa4_M5CH3_M5CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], - "x-ms-correlation-request-id": [ "0615a8a6-cd61-4f40-b6d7-0ac37d6fe5ad" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T075449Z:0615a8a6-cd61-4f40-b6d7-0ac37d6fe5ad" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: C663050C2A18444BB5211BDE994742AA Ref B: SEL221051504011 Ref C: 2023-09-18T07:54:48Z" ], - "Date": [ "Mon, 18 Sep 2023 07:54:48 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1010" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo\",\"name\":\"namespaceV19d35wo\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev19d35wo\",\"createdAt\":\"2023-09-18T07:48:36.533Z\",\"updatedAt\":\"2023-09-18T07:51:13.443Z\",\"serviceBusEndpoint\":\"https://namespaceV19d35wo.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzEventHub+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo?api-version=2023-01-01-preview+14": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "76" ], - "x-ms-client-request-id": [ "e3905e97-eb1a-49ea-a68e-3ebeb17df398" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "1a9f1333-0653-4a44-bcdb-fcf55170a5e7_M0CH3_M0CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], - "x-ms-correlation-request-id": [ "1793a084-c26b-4941-b1a2-9b1a7d14ff3f" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T075520Z:1793a084-c26b-4941-b1a2-9b1a7d14ff3f" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 8D9841F8B904424197D457C030250207 Ref B: SEL221051504011 Ref C: 2023-09-18T07:55:19Z" ], - "Date": [ "Mon, 18 Sep 2023 07:55:19 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1010" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo\",\"name\":\"namespaceV19d35wo\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev19d35wo\",\"createdAt\":\"2023-09-18T07:48:36.533Z\",\"updatedAt\":\"2023-09-18T07:51:13.443Z\",\"serviceBusEndpoint\":\"https://namespaceV19d35wo.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzEventHub+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo?api-version=2023-01-01-preview+15": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "77" ], - "x-ms-client-request-id": [ "e3905e97-eb1a-49ea-a68e-3ebeb17df398" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "2709ac8f-a6f9-4526-8ac3-8b357b0479ac_M8CH3_M8CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], - "x-ms-correlation-request-id": [ "faecbc8d-9326-492e-a403-6993e54019a2" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T075551Z:faecbc8d-9326-492e-a403-6993e54019a2" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: BD8A4DF11E8D4F29B00433360FE45A17 Ref B: SEL221051504011 Ref C: 2023-09-18T07:55:50Z" ], - "Date": [ "Mon, 18 Sep 2023 07:55:51 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1103" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo\",\"name\":\"namespaceV19d35wo\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{\"clientId\":\"440d7336-c408-4327-ad13-10a4e71aad64\",\"principalId\":\"1bdb6af0-4284-47f4-b049-94aa2868d90b\"}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev19d35wo\",\"createdAt\":\"2023-09-18T07:48:36.533Z\",\"updatedAt\":\"2023-09-18T07:55:47.933Z\",\"serviceBusEndpoint\":\"https://namespaceV19d35wo.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzEventHub+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo?api-version=2023-01-01-preview+16": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "78" ], - "x-ms-client-request-id": [ "e3905e97-eb1a-49ea-a68e-3ebeb17df398" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "f4ba1316-d78c-4da6-bdd3-5c49ed1cda45_M8CH3_M8CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-correlation-request-id": [ "2a088e7c-c955-4606-a241-d3d03f373851" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T075553Z:2a088e7c-c955-4606-a241-d3d03f373851" ], + "x-ms-correlation-request-id": [ "bdd66e30-a424-4ca0-99b3-976c93438200" ], + "x-ms-client-request-id": [ "3a366b20-6061-4c62-807f-8f1c3b543166_RP" ], + "x-ms-messaging-activity-id": [ "a35c48f8-589b-42c7-b1cf-020e84e68bba" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G2|2024-04-29T12:50:07" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "bdd66e30-a424-4ca0-99b3-976c93438200" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T125007Z:bdd66e30-a424-4ca0-99b3-976c93438200" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: FF9F25CF21984FABAB80ED7796625555 Ref B: SEL221051504011 Ref C: 2023-09-18T07:55:51Z" ], - "Date": [ "Mon, 18 Sep 2023 07:55:53 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 619DEB7C39DD40459B585095F94698A8 Ref B: SEL221051504047 Ref C: 2024-04-29T12:50:06Z" ], + "Date": [ "Mon, 29 Apr 2024 12:50:07 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1103" ], + "Content-Length": [ "1161" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo\",\"name\":\"namespaceV19d35wo\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{\"clientId\":\"440d7336-c408-4327-ad13-10a4e71aad64\",\"principalId\":\"1bdb6af0-4284-47f4-b049-94aa2868d90b\"}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev19d35wo\",\"createdAt\":\"2023-09-18T07:48:36.533Z\",\"updatedAt\":\"2023-09-18T07:55:47.933Z\",\"serviceBusEndpoint\":\"https://namespaceV19d35wo.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV14e6stf\",\"name\":\"namespaceV14e6stf\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev14e6stf\",\"serviceBusEndpoint\":\"https://namespaceV14e6stf.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:49:02.5300323Z\",\"updatedAt\":\"2024-04-29T12:49:53.4003505Z\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi2\":{\"clientId\":\"5c5159b2-689b-4fb3-9412-010709a20a7f\",\"principalId\":\"14f2ac9f-e580-4c60-b26b-f46704cedfd4\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "New-AzEventHub+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo/eventhubs/eventHublnw123?api-version=2023-01-01-preview+17": { + "New-AzEventHub+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV14e6stf/eventhubs/eventHubex7bys?api-version=2023-01-01-preview+5": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo/eventhubs/eventHublnw123?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV14e6stf/eventhubs/eventHubex7bys?api-version=2023-01-01-preview", "Content": "{\n \"properties\": {\n \"retentionDescription\": {\n \"cleanupPolicy\": \"Compact\"\n },\n \"partitionCount\": 2\n }\n}", "isContentBase64": false, "Headers": { @@ -700,29 +196,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-request-id": [ "3e412684-27eb-4ab2-95c5-4917ce26b9e0" ], - "x-ms-correlation-request-id": [ "3e412684-27eb-4ab2-95c5-4917ce26b9e0" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T075601Z:3e412684-27eb-4ab2-95c5-4917ce26b9e0" ], + "x-ms-correlation-request-id": [ "187c8f27-1bdd-4747-80e6-5b27d7fff7ec" ], + "x-ms-client-request-id": [ "044df4b9-2c3f-4c30-9681-732653d1c9b5_RP" ], + "x-ms-messaging-activity-id": [ "52bf9d00-5adc-424b-aed1-22b66620a64a" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G14|2024-04-29T12:50:12" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-request-id": [ "187c8f27-1bdd-4747-80e6-5b27d7fff7ec" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T125012Z:187c8f27-1bdd-4747-80e6-5b27d7fff7ec" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 6DDF286881544046AB4A21F684A156A8 Ref B: SEL221051504011 Ref C: 2023-09-18T07:55:53Z" ], - "Date": [ "Mon, 18 Sep 2023 07:56:01 GMT" ] + "X-MSEdge-Ref": [ "Ref A: DB6D7087865146AFBF0ECB2B552CB028 Ref B: SEL221051504047 Ref C: 2024-04-29T12:50:07Z" ], + "Date": [ "Mon, 29 Apr 2024 12:50:12 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "529" ], + "Content-Length": [ "528" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo/eventhubs/eventHublnw123\",\"name\":\"eventHublnw123\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs\",\"location\":\"eastus\",\"properties\":{\"retentionDescription\":{\"cleanupPolicy\":\"Compact\"},\"messageRetentionInDays\":9223372036854775807,\"partitionCount\":2,\"status\":\"Active\",\"createdAt\":\"2023-09-18T07:55:56.63Z\",\"updatedAt\":\"2023-09-18T07:56:00.447Z\",\"partitionIds\":[\"0\",\"1\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV14e6stf/eventhubs/eventHubex7bys\",\"name\":\"eventHubex7bys\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs\",\"location\":\"eastus\",\"properties\":{\"retentionDescription\":{\"cleanupPolicy\":\"Compact\"},\"messageRetentionInDays\":9223372036854775807,\"partitionCount\":2,\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:50:10.62Z\",\"updatedAt\":\"2024-04-29T12:50:12.07Z\",\"partitionIds\":[\"0\",\"1\"]}}", "isContentBase64": false } }, - "New-AzEventHub+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo/eventhubs/eventHub9vim3cf?api-version=2023-01-01-preview+18": { + "New-AzEventHub+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV14e6stf/eventhubs/eventHub9ubhv4s?api-version=2023-01-01-preview+6": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo/eventhubs/eventHub9vim3cf?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV14e6stf/eventhubs/eventHub9ubhv4s?api-version=2023-01-01-preview", "Content": "{\n \"properties\": {\n \"retentionDescription\": {\n \"cleanupPolicy\": \"Delete\"\n },\n \"partitionCount\": 2\n }\n}", "isContentBase64": false, "Headers": { @@ -737,29 +237,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], - "x-ms-request-id": [ "043ee1d8-a135-4453-beff-b831ad68d7be" ], - "x-ms-correlation-request-id": [ "043ee1d8-a135-4453-beff-b831ad68d7be" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T075603Z:043ee1d8-a135-4453-beff-b831ad68d7be" ], + "x-ms-correlation-request-id": [ "314cd397-0c93-4185-b4e9-bb2fc9049f6d" ], + "x-ms-client-request-id": [ "08912af6-3d52-446f-9549-34b31702cc9c_RP" ], + "x-ms-messaging-activity-id": [ "0bea6fec-0e8c-4689-be77-798909eb26c5" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G4|2024-04-29T12:50:15" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "314cd397-0c93-4185-b4e9-bb2fc9049f6d" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T125015Z:314cd397-0c93-4185-b4e9-bb2fc9049f6d" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 49B2CF609692437B8CD2FC60531753D1 Ref B: SEL221051504011 Ref C: 2023-09-18T07:56:01Z" ], - "Date": [ "Mon, 18 Sep 2023 07:56:03 GMT" ] + "X-MSEdge-Ref": [ "Ref A: C89E44F2D592435E93E55B595F9F81BD Ref B: SEL221051504047 Ref C: 2024-04-29T12:50:12Z" ], + "Date": [ "Mon, 29 Apr 2024 12:50:15 GMT" ] }, "ContentHeaders": { "Content-Length": [ "538" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo/eventhubs/eventHub9vim3cf\",\"name\":\"eventHub9vim3cf\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs\",\"location\":\"eastus\",\"properties\":{\"retentionDescription\":{\"cleanupPolicy\":\"Delete\",\"retentionTimeInHours\":24},\"messageRetentionInDays\":1,\"partitionCount\":2,\"status\":\"Active\",\"createdAt\":\"2023-09-18T07:56:02.76Z\",\"updatedAt\":\"2023-09-18T07:56:02.967Z\",\"partitionIds\":[\"0\",\"1\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV14e6stf/eventhubs/eventHub9ubhv4s\",\"name\":\"eventHub9ubhv4s\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs\",\"location\":\"eastus\",\"properties\":{\"retentionDescription\":{\"cleanupPolicy\":\"Delete\",\"retentionTimeInHours\":24},\"messageRetentionInDays\":1,\"partitionCount\":2,\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:50:14.77Z\",\"updatedAt\":\"2024-04-29T12:50:15.023Z\",\"partitionIds\":[\"0\",\"1\"]}}", "isContentBase64": false } }, - "New-AzEventHub+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHublnw123?api-version=2023-01-01-preview+19": { + "New-AzEventHub+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHubex7bys?api-version=2023-01-01-preview+7": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHublnw123?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHubex7bys?api-version=2023-01-01-preview", "Content": "{\n \"properties\": {\n \"partitionCount\": 5\n }\n}", "isContentBase64": false, "Headers": { @@ -774,36 +278,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-request-id": [ "44a14bd4-909a-418f-9f1d-d48bb8ca0e57" ], - "x-ms-correlation-request-id": [ "44a14bd4-909a-418f-9f1d-d48bb8ca0e57" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T075607Z:44a14bd4-909a-418f-9f1d-d48bb8ca0e57" ], + "x-ms-correlation-request-id": [ "908a8ce8-3b2e-4073-9619-3911c1da8ff1" ], + "x-ms-client-request-id": [ "53020a2d-c099-4db2-ad6d-f5c1be8b966f_RP" ], + "x-ms-messaging-activity-id": [ "3d0436b3-4e95-410e-b98c-47a872dd3ae8" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G9|2024-04-29T12:50:19" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "908a8ce8-3b2e-4073-9619-3911c1da8ff1" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T125019Z:908a8ce8-3b2e-4073-9619-3911c1da8ff1" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 3A07AF87CD66420882EB7E5F51C9D731 Ref B: SEL221051504011 Ref C: 2023-09-18T07:56:03Z" ], - "Date": [ "Mon, 18 Sep 2023 07:56:07 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 86580FB4EEFD419A9134FC2AF19AF309 Ref B: SEL221051504047 Ref C: 2024-04-29T12:50:15Z" ], + "Date": [ "Mon, 29 Apr 2024 12:50:19 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "550" ], + "Content-Length": [ "552" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHublnw123\",\"name\":\"eventHublnw123\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs\",\"location\":\"eastus\",\"properties\":{\"retentionDescription\":{\"cleanupPolicy\":\"Delete\",\"retentionTimeInHours\":168},\"messageRetentionInDays\":7,\"partitionCount\":5,\"status\":\"Active\",\"createdAt\":\"2023-09-18T07:56:05.57Z\",\"updatedAt\":\"2023-09-18T07:56:07.33Z\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\",\"4\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHubex7bys\",\"name\":\"eventHubex7bys\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs\",\"location\":\"eastus\",\"properties\":{\"retentionDescription\":{\"cleanupPolicy\":\"Delete\",\"retentionTimeInHours\":168},\"messageRetentionInDays\":7,\"partitionCount\":5,\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:50:17.903Z\",\"updatedAt\":\"2024-04-29T12:50:19.147Z\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\",\"4\"]}}", "isContentBase64": false } }, - "New-AzEventHub+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHubhwo7mf?api-version=2023-01-01-preview+20": { + "New-AzEventHub+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHubgaq2iy?api-version=2023-01-01-preview+8": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHubhwo7mf?api-version=2023-01-01-preview", - "Content": "{\n \"properties\": {\n \"captureDescription\": {\n \"destination\": {\n \"properties\": {\n \"storageAccountResourceId\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.Storage/storageAccounts/testpsstoragaccount\",\n \"blobContainer\": \"container\",\n \"archiveNameFormat\": \"{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}\"\n },\n \"name\": \"EventHubArchive.AzureBlockBlob\"\n },\n \"enabled\": true,\n \"encoding\": \"Avro\",\n \"intervalInSeconds\": 600,\n \"sizeLimitInBytes\": 11000000,\n \"skipEmptyArchives\": true\n }\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHubgaq2iy?api-version=2023-01-01-preview", + "Content": "{\n \"properties\": {\n \"captureDescription\": {\n \"destination\": {\n \"properties\": {\n \"storageAccountResourceId\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Storage/storageAccounts/ehpsvgt87wsa1\",\n \"blobContainer\": \"container\",\n \"archiveNameFormat\": \"{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}\"\n },\n \"name\": \"EventHubArchive.AzureBlockBlob\"\n },\n \"enabled\": true,\n \"encoding\": \"Avro\",\n \"intervalInSeconds\": 600,\n \"sizeLimitInBytes\": 11000000,\n \"skipEmptyArchives\": true\n }\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "679" ] + "Content-Length": [ "674" ] } }, "Response": { @@ -811,36 +319,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-request-id": [ "d289b46f-2329-4067-b9c5-e2cebe442890" ], - "x-ms-correlation-request-id": [ "d289b46f-2329-4067-b9c5-e2cebe442890" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T075611Z:d289b46f-2329-4067-b9c5-e2cebe442890" ], + "x-ms-correlation-request-id": [ "cd9cd088-dc8b-426f-92a1-617e07ac4c2f" ], + "x-ms-client-request-id": [ "6a7dd5a1-4241-4716-bcd8-e40240609316_RP" ], + "x-ms-messaging-activity-id": [ "87b4f9d6-d398-4293-b44c-8b41380e62f3" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G1|2024-04-29T12:50:23" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "cd9cd088-dc8b-426f-92a1-617e07ac4c2f" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T125023Z:cd9cd088-dc8b-426f-92a1-617e07ac4c2f" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: F7746B9C29B540AC8CD407BD7D691D97 Ref B: SEL221051504011 Ref C: 2023-09-18T07:56:08Z" ], - "Date": [ "Mon, 18 Sep 2023 07:56:11 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 51729D6FD9F44C668ABE991C1B759F38 Ref B: SEL221051504047 Ref C: 2024-04-29T12:50:19Z" ], + "Date": [ "Mon, 29 Apr 2024 12:50:22 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1072" ], + "Content-Length": [ "1067" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHubhwo7mf\",\"name\":\"eventHubhwo7mf\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs\",\"location\":\"eastus\",\"properties\":{\"retentionDescription\":{\"cleanupPolicy\":\"Delete\",\"retentionTimeInHours\":168},\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"2023-09-18T07:56:10.323Z\",\"updatedAt\":\"2023-09-18T07:56:11.327Z\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\"],\"captureDescription\":{\"enabled\":true,\"encoding\":\"Avro\",\"destination\":{\"name\":\"EventHubArchive.AzureBlockBlob\",\"properties\":{\"storageAccountResourceId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.Storage/storageAccounts/testpsstoragaccount\",\"blobContainer\":\"container\",\"archiveNameFormat\":\"{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}\"}},\"intervalInSeconds\":600,\"sizeLimitInBytes\":11000000,\"skipEmptyArchives\":true}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHubgaq2iy\",\"name\":\"eventHubgaq2iy\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs\",\"location\":\"eastus\",\"properties\":{\"retentionDescription\":{\"cleanupPolicy\":\"Delete\",\"retentionTimeInHours\":168},\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:50:21.917Z\",\"updatedAt\":\"2024-04-29T12:50:22.803Z\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\"],\"captureDescription\":{\"enabled\":true,\"encoding\":\"Avro\",\"destination\":{\"name\":\"EventHubArchive.AzureBlockBlob\",\"properties\":{\"storageAccountResourceId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Storage/storageAccounts/ehpsvgt87wsa1\",\"blobContainer\":\"container\",\"archiveNameFormat\":\"{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}\"}},\"intervalInSeconds\":600,\"sizeLimitInBytes\":11000000,\"skipEmptyArchives\":true}}}", "isContentBase64": false } }, - "New-AzEventHub+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo/eventhubs/eventHub8zop1w?api-version=2023-01-01-preview+21": { + "New-AzEventHub+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV14e6stf/eventhubs/eventHub9djq12?api-version=2023-01-01-preview+9": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo/eventhubs/eventHub8zop1w?api-version=2023-01-01-preview", - "Content": "{\n \"properties\": {\n \"captureDescription\": {\n \"destination\": {\n \"identity\": {\n \"type\": \"UserAssigned\",\n \"userAssignedIdentity\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\"\n },\n \"properties\": {\n \"storageAccountResourceId\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.Storage/storageAccounts/testpsstoragaccount\",\n \"blobContainer\": \"container\",\n \"archiveNameFormat\": \"{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}\"\n },\n \"name\": \"EventHubArchive.AzureBlockBlob\"\n },\n \"enabled\": true,\n \"encoding\": \"Avro\",\n \"intervalInSeconds\": 600,\n \"sizeLimitInBytes\": 11000000,\n \"skipEmptyArchives\": true\n }\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV14e6stf/eventhubs/eventHub9djq12?api-version=2023-01-01-preview", + "Content": "{\n \"properties\": {\n \"captureDescription\": {\n \"destination\": {\n \"identity\": {\n \"type\": \"UserAssigned\",\n \"userAssignedIdentity\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi2\"\n },\n \"properties\": {\n \"storageAccountResourceId\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Storage/storageAccounts/ehpsvgt87wsa1\",\n \"blobContainer\": \"container\",\n \"archiveNameFormat\": \"{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}\"\n },\n \"name\": \"EventHubArchive.AzureBlockBlob\"\n },\n \"enabled\": true,\n \"encoding\": \"Avro\",\n \"intervalInSeconds\": 600,\n \"sizeLimitInBytes\": 11000000,\n \"skipEmptyArchives\": true\n }\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "935" ] + "Content-Length": [ "949" ] } }, "Response": { @@ -848,22 +360,26 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], - "x-ms-request-id": [ "b5de9812-8cbb-4828-8877-7e8f4a1e0ce8" ], - "x-ms-correlation-request-id": [ "b5de9812-8cbb-4828-8877-7e8f4a1e0ce8" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T075616Z:b5de9812-8cbb-4828-8877-7e8f4a1e0ce8" ], + "x-ms-correlation-request-id": [ "a60096f7-9c3f-47f9-a362-eb0bfbc98bc3" ], + "x-ms-client-request-id": [ "efb6e15a-e8ab-4352-972c-d158060207e3_RP" ], + "x-ms-messaging-activity-id": [ "bf66e165-8c59-4e73-9e94-373db51c63a5" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G3|2024-04-29T12:50:28" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "a60096f7-9c3f-47f9-a362-eb0bfbc98bc3" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T125028Z:a60096f7-9c3f-47f9-a362-eb0bfbc98bc3" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 07CF7D45534142C7AAF5359FBB71B533 Ref B: SEL221051504011 Ref C: 2023-09-18T07:56:12Z" ], - "Date": [ "Mon, 18 Sep 2023 07:56:16 GMT" ] + "X-MSEdge-Ref": [ "Ref A: D8D3E8455EAD407698084907DA6D4205 Ref B: SEL221051504047 Ref C: 2024-04-29T12:50:23Z" ], + "Date": [ "Mon, 29 Apr 2024 12:50:27 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1283" ], + "Content-Length": [ "1297" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo/eventhubs/eventHub8zop1w\",\"name\":\"eventHub8zop1w\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs\",\"location\":\"eastus\",\"properties\":{\"retentionDescription\":{\"cleanupPolicy\":\"Delete\",\"retentionTimeInHours\":168},\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"2023-09-18T07:56:15.403Z\",\"updatedAt\":\"2023-09-18T07:56:16.107Z\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\"],\"captureDescription\":{\"enabled\":true,\"encoding\":\"Avro\",\"destination\":{\"name\":\"EventHubArchive.AzureBlockBlob\",\"properties\":{\"storageAccountResourceId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.Storage/storageAccounts/testpsstoragaccount\",\"blobContainer\":\"container\",\"archiveNameFormat\":\"{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\"}},\"intervalInSeconds\":600,\"sizeLimitInBytes\":11000000,\"skipEmptyArchives\":true}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV14e6stf/eventhubs/eventHub9djq12\",\"name\":\"eventHub9djq12\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs\",\"location\":\"eastus\",\"properties\":{\"retentionDescription\":{\"cleanupPolicy\":\"Delete\",\"retentionTimeInHours\":168},\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:50:27.167Z\",\"updatedAt\":\"2024-04-29T12:50:27.577Z\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\"],\"captureDescription\":{\"enabled\":true,\"encoding\":\"Avro\",\"destination\":{\"name\":\"EventHubArchive.AzureBlockBlob\",\"properties\":{\"storageAccountResourceId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Storage/storageAccounts/ehpsvgt87wsa1\",\"blobContainer\":\"container\",\"archiveNameFormat\":\"{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi2\"}},\"intervalInSeconds\":600,\"sizeLimitInBytes\":11000000,\"skipEmptyArchives\":true}}}", "isContentBase64": false } } diff --git a/src/EventHub/EventHub.Autorest/test/New-AzEventHub.Tests.ps1 b/src/EventHub/EventHub.Autorest/test/New-AzEventHub.Tests.ps1 index 59e13d9ee33b..5fb19d132acb 100644 --- a/src/EventHub/EventHub.Autorest/test/New-AzEventHub.Tests.ps1 +++ b/src/EventHub/EventHub.Autorest/test/New-AzEventHub.Tests.ps1 @@ -17,7 +17,7 @@ if(($null -eq $TestName) -or ($TestName -contains 'New-AzEventHub')) Describe 'New-AzEventHub' { It 'CreateExpanded' { #create Premium Namespace - $eventHubNamespace = New-AzEventHubNamespaceV2 -ResourceGroupName $env.resourceGroup -Name $env.namespaceV1 -SkuName Premium -Location eastus -IdentityType UserAssigned -UserAssignedIdentityId $env.msi2 + $eventHubNamespace = New-AzEventHubNamespaceV2 -ResourceGroupName $env.resourceGroup -Name $env.namespaceV1 -SkuName Premium -Location $env.location -IdentityType UserAssigned -UserAssignedIdentityId $env.msi2 #create EventHub with Compact CleanUpPolicy $eventhub = New-AzEventHub -Name $env.eventHub2 -ResourceGroupName $env.resourceGroup -NamespaceName $eventHubNamespace.Name -PartitionCount 2 -CleanupPolicy Compact $eventhub.Name | Should -Be $env.eventHub2 diff --git a/src/EventHub/EventHub.Autorest/test/New-AzEventHubApplicationGroup.Recording.json b/src/EventHub/EventHub.Autorest/test/New-AzEventHubApplicationGroup.Recording.json index f0f49783cf13..ca4bc60a7204 100644 --- a/src/EventHub/EventHub.Autorest/test/New-AzEventHubApplicationGroup.Recording.json +++ b/src/EventHub/EventHub.Autorest/test/New-AzEventHubApplicationGroup.Recording.json @@ -1,8 +1,8 @@ { - "New-AzEventHubApplicationGroup+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/key1?api-version=2023-01-01-preview+1": { + "New-AzEventHubApplicationGroup+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/key1?api-version=2023-01-01-preview+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/key1?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/key1?api-version=2023-01-01-preview", "Content": "{\n \"properties\": {\n \"rights\": [ \"Manage\", \"Send\", \"Listen\" ]\n }\n}", "isContentBase64": false, "Headers": { @@ -17,29 +17,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-request-id": [ "bc8a394c-ea1e-4520-b09a-b022f006f4fd" ], - "x-ms-correlation-request-id": [ "bc8a394c-ea1e-4520-b09a-b022f006f4fd" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T075633Z:bc8a394c-ea1e-4520-b09a-b022f006f4fd" ], + "x-ms-correlation-request-id": [ "313cdcf7-7e39-4d57-838a-92a4f2fb5463" ], + "x-ms-client-request-id": [ "3c94b09e-e300-4922-bcaf-57638d7e4cad_RP" ], + "x-ms-messaging-activity-id": [ "1e851b07-e5d1-4a3d-b082-0b10e5c9a625" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G11|2024-04-29T12:50:48" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "313cdcf7-7e39-4d57-838a-92a4f2fb5463" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T125048Z:313cdcf7-7e39-4d57-838a-92a4f2fb5463" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: E366B9EB9D8C4EDD84AA63B4759988AE Ref B: SEL221051504011 Ref C: 2023-09-18T07:56:26Z" ], - "Date": [ "Mon, 18 Sep 2023 07:56:33 GMT" ] + "X-MSEdge-Ref": [ "Ref A: F9D14CEC94544386A15D5CFB9F544102 Ref B: SEL221051504047 Ref C: 2024-04-29T12:50:41Z" ], + "Date": [ "Mon, 29 Apr 2024 12:50:48 GMT" ] }, "ContentHeaders": { "Content-Length": [ "330" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/key1\",\"name\":\"key1\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/key1\",\"name\":\"key1\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}}", "isContentBase64": false } }, - "New-AzEventHubApplicationGroup+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGrouphloeqm?api-version=2023-01-01-preview+2": { + "New-AzEventHubApplicationGroup+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/applicationGroups/appGroup21njbo?api-version=2023-01-01-preview+2": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGrouphloeqm?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/applicationGroups/appGroup21njbo?api-version=2023-01-01-preview", "Content": "{\n \"properties\": {\n \"clientAppGroupIdentifier\": \"NamespaceSASKeyName=key1\",\n \"policies\": [\n {\n \"name\": \"t1\",\n \"type\": \"ThrottlingPolicy\",\n \"rateLimitThreshold\": 10000,\n \"metricId\": \"IncomingMessages\"\n },\n {\n \"name\": \"t2\",\n \"type\": \"ThrottlingPolicy\",\n \"rateLimitThreshold\": 20000,\n \"metricId\": \"OutgoingBytes\"\n }\n ]\n }\n}", "isContentBase64": false, "Headers": { @@ -54,23 +58,26 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "66f810f6-d5cf-4bc4-bd40-7bb309fa3bee_M6CH3_M6CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-correlation-request-id": [ "3e281dd9-00d2-4475-a9b1-34530e2c78ed" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T075636Z:3e281dd9-00d2-4475-a9b1-34530e2c78ed" ], + "x-ms-correlation-request-id": [ "bab09a09-ce5b-4b2b-954c-2be995bdc7d7" ], + "x-ms-client-request-id": [ "8b45442a-5a49-41ab-949d-89eedd485a1b_RP" ], + "x-ms-messaging-activity-id": [ "98fccabb-c235-4be4-8850-624e24e07bd7" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G11|2024-04-29T12:50:51" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "bab09a09-ce5b-4b2b-954c-2be995bdc7d7" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T125051Z:bab09a09-ce5b-4b2b-954c-2be995bdc7d7" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 911BC5B07C664635BD358DC903A7C704 Ref B: SEL221051504011 Ref C: 2023-09-18T07:56:33Z" ], - "Date": [ "Mon, 18 Sep 2023 07:56:36 GMT" ] + "X-MSEdge-Ref": [ "Ref A: CA87D2718AA74F339377FD77968D67AA Ref B: SEL221051504047 Ref C: 2024-04-29T12:50:48Z" ], + "Date": [ "Mon, 29 Apr 2024 12:50:51 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "541" ], + "Content-Length": [ "611" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGrouphloeqm\",\"name\":\"appGrouphloeqm\",\"type\":\"\",\"location\":\"East US\",\"properties\":{\"clientAppGroupIdentifier\":\"NamespaceSASKeyName=key1\",\"policies\":[{\"type\":\"ThrottlingPolicy\",\"name\":\"t1\",\"metricId\":\"IncomingMessages\",\"rateLimitThreshold\":10000},{\"type\":\"ThrottlingPolicy\",\"name\":\"t2\",\"metricId\":\"OutgoingBytes\",\"rateLimitThreshold\":20000}],\"isEnabled\":true}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/applicationGroups/appGroup21njbo\",\"name\":\"appGroup21njbo\",\"type\":\"Microsoft.EventHub/Namespaces/ApplicationGroups\",\"location\":\"eastus\",\"properties\":{\"name\":\"appGroup21njbo\",\"isEnabled\":true,\"clientAppGroupIdentifier\":\"NamespaceSASKeyName=key1\",\"policies\":[{\"metricId\":\"IncomingMessages\",\"rateLimitThreshold\":10000,\"type\":\"ThrottlingPolicy\",\"name\":\"t1\"},{\"metricId\":\"OutgoingBytes\",\"rateLimitThreshold\":20000,\"type\":\"ThrottlingPolicy\",\"name\":\"t2\"}]}}", "isContentBase64": false } } diff --git a/src/EventHub/EventHub.Autorest/test/New-AzEventHubAuthorizationRule.Recording.json b/src/EventHub/EventHub.Autorest/test/New-AzEventHubAuthorizationRule.Recording.json index 9c1deb7a42d3..32d3f5d50967 100644 --- a/src/EventHub/EventHub.Autorest/test/New-AzEventHubAuthorizationRule.Recording.json +++ b/src/EventHub/EventHub.Autorest/test/New-AzEventHubAuthorizationRule.Recording.json @@ -1,8 +1,8 @@ { - "New-AzEventHubAuthorizationRule+[NoContext]+NewExpandedNamespace+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/auth-rule9ld078?api-version=2023-01-01-preview+1": { + "New-AzEventHubAuthorizationRule+[NoContext]+NewExpandedNamespace+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/auth-rule85shx1?api-version=2023-01-01-preview+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/auth-rule9ld078?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/auth-rule85shx1?api-version=2023-01-01-preview", "Content": "{\n \"properties\": {\n \"rights\": [ \"Manage\", \"Send\", \"Listen\" ]\n }\n}", "isContentBase64": false, "Headers": { @@ -17,38 +17,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1197" ], - "x-ms-request-id": [ "4abdb41f-2e68-4716-9224-ce5055b21069" ], - "x-ms-correlation-request-id": [ "4abdb41f-2e68-4716-9224-ce5055b21069" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T075652Z:4abdb41f-2e68-4716-9224-ce5055b21069" ], + "x-ms-correlation-request-id": [ "37234ca6-f367-443e-b388-fa640ca6f067" ], + "x-ms-client-request-id": [ "675c69ba-32b1-459f-8c8d-ebcc9a14b05c_RP" ], + "x-ms-messaging-activity-id": [ "6357edab-6930-45ef-9bd8-c6cf131287b3" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G12|2024-04-29T12:51:12" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "37234ca6-f367-443e-b388-fa640ca6f067" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T125112Z:37234ca6-f367-443e-b388-fa640ca6f067" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: C0B9AABA364B40F9848E5FD1A30F05FE Ref B: SEL221051504011 Ref C: 2023-09-18T07:56:45Z" ], - "Date": [ "Mon, 18 Sep 2023 07:56:52 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 6177409E8C0045BF8AAFCB65D082B3A0 Ref B: SEL221051504047 Ref C: 2024-04-29T12:51:05Z" ], + "Date": [ "Mon, 29 Apr 2024 12:51:11 GMT" ] }, "ContentHeaders": { "Content-Length": [ "352" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/auth-rule9ld078\",\"name\":\"auth-rule9ld078\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/auth-rule85shx1\",\"name\":\"auth-rule85shx1\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}}", "isContentBase64": false } }, - "New-AzEventHubAuthorizationRule+[NoContext]+NewExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules?api-version=2023-01-01-preview+2": { + "New-AzEventHubAuthorizationRule+[NoContext]+NewExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules?api-version=2023-01-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "87" ], - "x-ms-client-request-id": [ "1af79466-e6a3-4f9c-923c-8d2a22a2d594" ], + "x-ms-unique-id": [ "82" ], + "x-ms-client-request-id": [ "aeacbe84-9909-4907-a9ef-e8baa861fa8a" ], "CommandName": [ "Az.EventHub.private\\Get-AzEventHubNamespaceAuthorizationRule_List" ], "FullCommandName": [ "Get-AzEventHubNamespaceAuthorizationRule_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -59,29 +63,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-request-id": [ "70f150d6-bf97-479b-8ff4-80a0c44e7f8e" ], - "x-ms-correlation-request-id": [ "70f150d6-bf97-479b-8ff4-80a0c44e7f8e" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T075653Z:70f150d6-bf97-479b-8ff4-80a0c44e7f8e" ], + "x-ms-correlation-request-id": [ "fe0d1950-90ed-4c54-be96-6cf63038ded7" ], + "x-ms-client-request-id": [ "aeacbe84-9909-4907-a9ef-e8baa861fa8a_RP" ], + "x-ms-messaging-activity-id": [ "e3f4104a-179e-483f-bb23-cb2d8cae7947" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G7|2024-04-29T12:51:14" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "fe0d1950-90ed-4c54-be96-6cf63038ded7" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T125114Z:fe0d1950-90ed-4c54-be96-6cf63038ded7" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: EBF3C820BB584AA5A79E705DE6078A34 Ref B: SEL221051504011 Ref C: 2023-09-18T07:56:52Z" ], - "Date": [ "Mon, 18 Sep 2023 07:56:53 GMT" ] + "X-MSEdge-Ref": [ "Ref A: CBD04532C9D14B58826D1E67B644F383 Ref B: SEL221051504047 Ref C: 2024-04-29T12:51:12Z" ], + "Date": [ "Mon, 29 Apr 2024 12:51:13 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1421" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationrules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationrules/auth-ruleju0nd3\",\"name\":\"auth-ruleju0nd3\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationrules/key1\",\"name\":\"key1\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationrules/auth-rule9ld078\",\"name\":\"auth-rule9ld078\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationrules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationrules/auth-ruleudhoej\",\"name\":\"auth-ruleudhoej\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationrules/key1\",\"name\":\"key1\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationrules/auth-rule85shx1\",\"name\":\"auth-rule85shx1\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}}]}", "isContentBase64": false } }, - "New-AzEventHubAuthorizationRule+[NoContext]+NewExpandedEntity+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules/auth-ruleirhsyq?api-version=2023-01-01-preview+1": { + "New-AzEventHubAuthorizationRule+[NoContext]+NewExpandedEntity+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules/auth-rulef5iq9n?api-version=2023-01-01-preview+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules/auth-ruleirhsyq?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules/auth-rulef5iq9n?api-version=2023-01-01-preview", "Content": "{\n \"properties\": {\n \"rights\": [ \"Listen\" ]\n }\n}", "isContentBase64": false, "Headers": { @@ -96,38 +104,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-request-id": [ "99add296-e8d5-4716-aa08-a324d599b131" ], - "x-ms-correlation-request-id": [ "99add296-e8d5-4716-aa08-a324d599b131" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T075655Z:99add296-e8d5-4716-aa08-a324d599b131" ], + "x-ms-correlation-request-id": [ "e9ee5e50-7d53-42c7-9c00-f3c6652f6652" ], + "x-ms-client-request-id": [ "9a706509-3abc-4f43-97b1-d78135ccb0bc_RP" ], + "x-ms-messaging-activity-id": [ "fa529958-3f7a-4fdb-8578-fe382f3b3d3d" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G10|2024-04-29T12:51:16" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "e9ee5e50-7d53-42c7-9c00-f3c6652f6652" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240429T125116Z:e9ee5e50-7d53-42c7-9c00-f3c6652f6652" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 1835E9D2A867450085AE1FFE6B42A857 Ref B: SEL221051504011 Ref C: 2023-09-18T07:56:53Z" ], - "Date": [ "Mon, 18 Sep 2023 07:56:55 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 15104A0B46A349C291B2065051A1F0AB Ref B: SEL221051504047 Ref C: 2024-04-29T12:51:14Z" ], + "Date": [ "Mon, 29 Apr 2024 12:51:15 GMT" ] }, "ContentHeaders": { "Content-Length": [ "351" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules/auth-ruleirhsyq\",\"name\":\"auth-ruleirhsyq\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/authorizationrules\",\"properties\":{\"rights\":[\"Listen\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules/auth-rulef5iq9n\",\"name\":\"auth-rulef5iq9n\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/authorizationrules\",\"properties\":{\"rights\":[\"Listen\"]}}", "isContentBase64": false } }, - "New-AzEventHubAuthorizationRule+[NoContext]+NewExpandedEntity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules?api-version=2023-01-01-preview+2": { + "New-AzEventHubAuthorizationRule+[NoContext]+NewExpandedEntity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules?api-version=2023-01-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "89" ], - "x-ms-client-request-id": [ "1f7f39fc-2bcf-49a5-bebe-1ccd49ed7f76" ], + "x-ms-unique-id": [ "84" ], + "x-ms-client-request-id": [ "e0d498ff-1d7b-4c16-956d-2513bc4b411e" ], "CommandName": [ "Az.EventHub.private\\Get-AzEventHubAuthorizationRule_List" ], "FullCommandName": [ "Get-AzEventHubAuthorizationRule_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -138,22 +150,26 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-request-id": [ "de8af370-99f7-4113-a6e7-e1bcabe5e1c3" ], - "x-ms-correlation-request-id": [ "de8af370-99f7-4113-a6e7-e1bcabe5e1c3" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T075656Z:de8af370-99f7-4113-a6e7-e1bcabe5e1c3" ], + "x-ms-correlation-request-id": [ "734daeba-6c44-4c57-aa79-54bd955c0ada" ], + "x-ms-client-request-id": [ "e0d498ff-1d7b-4c16-956d-2513bc4b411e_RP" ], + "x-ms-messaging-activity-id": [ "82888cf2-6e79-4e09-a295-3f56d2afa045" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G14|2024-04-29T12:51:18" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "734daeba-6c44-4c57-aa79-54bd955c0ada" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T125118Z:734daeba-6c44-4c57-aa79-54bd955c0ada" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 1AC679B024F84950A23C5F162BA1CC8D Ref B: SEL221051504011 Ref C: 2023-09-18T07:56:55Z" ], - "Date": [ "Mon, 18 Sep 2023 07:56:56 GMT" ] + "X-MSEdge-Ref": [ "Ref A: F3E3E9BA7B3844A9B475171B78042AF1 Ref B: SEL221051504047 Ref C: 2024-04-29T12:51:16Z" ], + "Date": [ "Mon, 29 Apr 2024 12:51:17 GMT" ] }, "ContentHeaders": { "Content-Length": [ "771" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationrules/auth-rulepjiaoe\",\"name\":\"auth-rulepjiaoe\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationrules/auth-ruleirhsyq\",\"name\":\"auth-ruleirhsyq\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\"]}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationrules/auth-rulevanqub\",\"name\":\"auth-rulevanqub\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationrules/auth-rulef5iq9n\",\"name\":\"auth-rulef5iq9n\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\"]}}]}", "isContentBase64": false } } diff --git a/src/EventHub/EventHub.Autorest/test/New-AzEventHubConsumerGroup.Recording.json b/src/EventHub/EventHub.Autorest/test/New-AzEventHubConsumerGroup.Recording.json index 8471ef4f74fb..4f5763f6af2f 100644 --- a/src/EventHub/EventHub.Autorest/test/New-AzEventHubConsumerGroup.Recording.json +++ b/src/EventHub/EventHub.Autorest/test/New-AzEventHubConsumerGroup.Recording.json @@ -1,8 +1,8 @@ { - "New-AzEventHubConsumerGroup+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/consumergroups/consumerGroupy25nvx?api-version=2023-01-01-preview+1": { + "New-AzEventHubConsumerGroup+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/consumergroups/consumerGroupybm5ad?api-version=2023-01-01-preview+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/consumergroups/consumerGroupy25nvx?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/consumergroups/consumerGroupybm5ad?api-version=2023-01-01-preview", "Content": "{\n \"properties\": {\n \"userMetadata\": \"Test Metadata\"\n }\n}", "isContentBase64": false, "Headers": { @@ -17,29 +17,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], - "x-ms-request-id": [ "8d02244c-0023-485a-b947-b74a86565445" ], - "x-ms-correlation-request-id": [ "8d02244c-0023-485a-b947-b74a86565445" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T075717Z:8d02244c-0023-485a-b947-b74a86565445" ], + "x-ms-correlation-request-id": [ "9eb6cb62-190e-4835-bb82-b2abd6a41462" ], + "x-ms-client-request-id": [ "765d004c-9b2a-4577-8932-57a0308f2e1e_RP" ], + "x-ms-messaging-activity-id": [ "dc6f92c5-6271-4a25-b9d5-6ab9b6fa30d1" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G7|2024-04-29T12:51:47" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "9eb6cb62-190e-4835-bb82-b2abd6a41462" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T125147Z:9eb6cb62-190e-4835-bb82-b2abd6a41462" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: B59BD42562F44A98ACFA19635346D190 Ref B: SEL221051504011 Ref C: 2023-09-18T07:57:15Z" ], - "Date": [ "Mon, 18 Sep 2023 07:57:17 GMT" ] + "X-MSEdge-Ref": [ "Ref A: CE8C40D3E3054A44B5659F477AC26696 Ref B: SEL221051504047 Ref C: 2024-04-29T12:51:45Z" ], + "Date": [ "Mon, 29 Apr 2024 12:51:47 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "468" ], + "Content-Length": [ "466" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/consumergroups/consumerGroupy25nvx\",\"name\":\"consumerGroupy25nvx\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/consumergroups\",\"location\":\"eastus\",\"properties\":{\"createdAt\":\"2023-09-18T07:57:17.1049915Z\",\"updatedAt\":\"2023-09-18T07:57:17.1049915Z\",\"userMetadata\":\"Test Metadata\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/consumergroups/consumerGroupybm5ad\",\"name\":\"consumerGroupybm5ad\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/consumergroups\",\"location\":\"eastus\",\"properties\":{\"createdAt\":\"2024-04-29T12:51:47.560939Z\",\"updatedAt\":\"2024-04-29T12:51:47.560939Z\",\"userMetadata\":\"Test Metadata\"}}", "isContentBase64": false } }, - "New-AzEventHubConsumerGroup+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/consumergroups/consumerGroup8x6rob?api-version=2023-01-01-preview+2": { + "New-AzEventHubConsumerGroup+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/consumergroups/consumerGroupfvwbyr?api-version=2023-01-01-preview+2": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/consumergroups/consumerGroup8x6rob?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/consumergroups/consumerGroupfvwbyr?api-version=2023-01-01-preview", "Content": "{\n \"properties\": {\n \"userMetadata\": \"Test Metadata\"\n }\n}", "isContentBase64": false, "Headers": { @@ -54,22 +58,26 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-request-id": [ "2696e7b9-05ab-4f29-9594-341b3fce9d49" ], - "x-ms-correlation-request-id": [ "2696e7b9-05ab-4f29-9594-341b3fce9d49" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T075719Z:2696e7b9-05ab-4f29-9594-341b3fce9d49" ], + "x-ms-correlation-request-id": [ "3d05677e-3b72-4e21-baa6-f544b16276e3" ], + "x-ms-client-request-id": [ "8f4e60c5-feba-41e3-93b7-18ad76ee2cc5_RP" ], + "x-ms-messaging-activity-id": [ "ca36ca3e-45e9-4b3f-a778-9968883751e9" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G1|2024-04-29T12:51:49" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "3d05677e-3b72-4e21-baa6-f544b16276e3" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T125149Z:3d05677e-3b72-4e21-baa6-f544b16276e3" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 6A37BDD6EFD242BDB06E1C13C3FAB9B5 Ref B: SEL221051504011 Ref C: 2023-09-18T07:57:17Z" ], - "Date": [ "Mon, 18 Sep 2023 07:57:18 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 4E34DBEDDE4D498CB71FFBC7D04E2AC0 Ref B: SEL221051504047 Ref C: 2024-04-29T12:51:47Z" ], + "Date": [ "Mon, 29 Apr 2024 12:51:49 GMT" ] }, "ContentHeaders": { "Content-Length": [ "468" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/consumergroups/consumerGroup8x6rob\",\"name\":\"consumerGroup8x6rob\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/consumergroups\",\"location\":\"eastus\",\"properties\":{\"createdAt\":\"2023-09-18T07:57:18.9204912Z\",\"updatedAt\":\"2023-09-18T07:57:18.9204912Z\",\"userMetadata\":\"Test Metadata\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/consumergroups/consumerGroupfvwbyr\",\"name\":\"consumerGroupfvwbyr\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/consumergroups\",\"location\":\"eastus\",\"properties\":{\"createdAt\":\"2024-04-29T12:51:49.7119116Z\",\"updatedAt\":\"2024-04-29T12:51:49.7119116Z\",\"userMetadata\":\"Test Metadata\"}}", "isContentBase64": false } } diff --git a/src/EventHub/EventHub.Autorest/test/New-AzEventHubGeoDRConfiguration.Recording.json b/src/EventHub/EventHub.Autorest/test/New-AzEventHubGeoDRConfiguration.Recording.json index 775d05cdb8d8..a601ad07644a 100644 --- a/src/EventHub/EventHub.Autorest/test/New-AzEventHubGeoDRConfiguration.Recording.json +++ b/src/EventHub/EventHub.Autorest/test/New-AzEventHubGeoDRConfiguration.Recording.json @@ -1,9 +1,9 @@ { - "New-AzEventHubGeoDRConfiguration+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+1": { + "New-AzEventHubGeoDRConfiguration+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", - "Content": "{\n \"properties\": {\n \"partnerNamespace\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\"\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", + "Content": "{\n \"properties\": {\n \"partnerNamespace\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\"\n }\n}", "isContentBase64": false, "Headers": { }, @@ -17,39 +17,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "868d1e6f-6c6e-49b4-8408-3b9e9ead44f4_M3CH3_M3CH3" ], + "x-ms-request-id": [ "3fad5532-25db-4b8d-bd05-7a766e78fd4b_M1CH3_M1CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-correlation-request-id": [ "40d6cc16-83d7-4796-a567-cf7cadee3e87" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T075748Z:40d6cc16-83d7-4796-a567-cf7cadee3e87" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-correlation-request-id": [ "e2c4bf80-9093-4fc8-a5c8-1dc9cade258c" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T125228Z:e2c4bf80-9093-4fc8-a5c8-1dc9cade258c" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: DB073C4E352E4C42B02F67E07F18D38C Ref B: SEL221051504011 Ref C: 2023-09-18T07:57:38Z" ], - "Date": [ "Mon, 18 Sep 2023 07:57:48 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 8B41B4617E914C7AA43BCFC09D87B7AB Ref B: SEL221051504047 Ref C: 2024-04-29T12:52:17Z" ], + "Date": [ "Mon, 29 Apr 2024 12:52:27 GMT" ] }, "ContentHeaders": { "Content-Length": [ "551" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "New-AzEventHubGeoDRConfiguration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+2": { + "New-AzEventHubGeoDRConfiguration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "93" ], - "x-ms-client-request-id": [ "44d90349-16bc-430b-bf01-d65fa5f57b7f" ], + "x-ms-unique-id": [ "88" ], + "x-ms-client-request-id": [ "0610bc52-ec21-44cb-ab22-4f6361c582e2" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -60,39 +61,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "fae63fcb-67f0-48fa-b278-dc212a9e0e81_M10SN1_M10SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-correlation-request-id": [ "dba2b463-50e2-48b0-86c4-12c4516d945f" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T075750Z:dba2b463-50e2-48b0-86c4-12c4516d945f" ], + "x-ms-request-id": [ "c1137915-3c22-4325-89c1-edf1b14cb45c_M10CH3_M10CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-correlation-request-id": [ "56b07d08-b534-420d-b09a-934598f68eb6" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T125230Z:56b07d08-b534-420d-b09a-934598f68eb6" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 39628ED6F97A4136AE0264A422C79E85 Ref B: SEL221051504011 Ref C: 2023-09-18T07:57:49Z" ], - "Date": [ "Mon, 18 Sep 2023 07:57:50 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 14EE1FB25C32444AA4C2E0EB19CED13D Ref B: SEL221051504047 Ref C: 2024-04-29T12:52:28Z" ], + "Date": [ "Mon, 29 Apr 2024 12:52:29 GMT" ] }, "ContentHeaders": { "Content-Length": [ "551" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "New-AzEventHubGeoDRConfiguration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+3": { + "New-AzEventHubGeoDRConfiguration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "94" ], - "x-ms-client-request-id": [ "8b7c1109-3630-4e8a-a8b8-3f18fdd7f325" ], + "x-ms-unique-id": [ "89" ], + "x-ms-client-request-id": [ "e7f11c45-3db4-4bac-b10e-333ff3e2e475" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -103,39 +105,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "011793a2-c3db-4435-97c3-370e34d84b4d_M6SN1_M6SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], - "x-ms-correlation-request-id": [ "7863c282-9ac6-4bbb-ae40-a21934d737d4" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T075802Z:7863c282-9ac6-4bbb-ae40-a21934d737d4" ], + "x-ms-request-id": [ "4eab481d-c213-4161-8b2a-93c905610698_M1CH3_M1CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-correlation-request-id": [ "2880bbce-8f90-48d7-a704-14fba86dd9e6" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T125241Z:2880bbce-8f90-48d7-a704-14fba86dd9e6" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: C5E09B7D35F043C58B262D200A2EA2DD Ref B: SEL221051504011 Ref C: 2023-09-18T07:58:00Z" ], - "Date": [ "Mon, 18 Sep 2023 07:58:02 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 00773633464946AABF1186ECACFD986A Ref B: SEL221051504047 Ref C: 2024-04-29T12:52:40Z" ], + "Date": [ "Mon, 29 Apr 2024 12:52:41 GMT" ] }, "ContentHeaders": { "Content-Length": [ "551" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "New-AzEventHubGeoDRConfiguration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+4": { + "New-AzEventHubGeoDRConfiguration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+4": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "95" ], - "x-ms-client-request-id": [ "c6ac5c7b-d912-4792-b3dd-7d8387e34ae5" ], + "x-ms-unique-id": [ "90" ], + "x-ms-client-request-id": [ "5339be92-9ca0-48b6-9d50-2d9a1c87084b" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -146,39 +149,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "1dea20ea-f3ff-4192-b394-e8a786d5289e_M1CH3_M1CH3" ], + "x-ms-request-id": [ "686eb900-42a2-4916-83ae-3bc68369564a_M6CH3_M6CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], - "x-ms-correlation-request-id": [ "a2a07e26-eda3-4c48-9b94-4d2766ba388c" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T075814Z:a2a07e26-eda3-4c48-9b94-4d2766ba388c" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "f22d5cf5-000c-4096-97c9-67b7a41f3dab" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T125253Z:f22d5cf5-000c-4096-97c9-67b7a41f3dab" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 1D6B859CCF414D23BF8F89034A82D114 Ref B: SEL221051504011 Ref C: 2023-09-18T07:58:12Z" ], - "Date": [ "Mon, 18 Sep 2023 07:58:14 GMT" ] + "X-MSEdge-Ref": [ "Ref A: C788DF4716894389890FDBF5FB3BC96E Ref B: SEL221051504047 Ref C: 2024-04-29T12:52:51Z" ], + "Date": [ "Mon, 29 Apr 2024 12:52:52 GMT" ] }, "ContentHeaders": { "Content-Length": [ "551" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "New-AzEventHubGeoDRConfiguration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+5": { + "New-AzEventHubGeoDRConfiguration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+5": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "96" ], - "x-ms-client-request-id": [ "a0fcde9f-8468-40c3-9dc0-4587524dfa15" ], + "x-ms-unique-id": [ "91" ], + "x-ms-client-request-id": [ "5064f41a-eb15-4baa-bd57-2793d6410acb" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -189,39 +193,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "68e28a27-db4b-4e96-9a95-a42a43b5a292_M3SN1_M3SN1" ], + "x-ms-request-id": [ "305044dd-481b-40f6-862b-6677309b6005_M7SN1_M7SN1" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-correlation-request-id": [ "fb2891a0-ec9b-4e53-9b2b-9f86ceca4751" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T075827Z:fb2891a0-ec9b-4e53-9b2b-9f86ceca4751" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "767a5403-16ae-44e6-aaf3-5790d3263ec4" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T125304Z:767a5403-16ae-44e6-aaf3-5790d3263ec4" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 553B40F3F55E45239CDCB0C117C022EE Ref B: SEL221051504011 Ref C: 2023-09-18T07:58:25Z" ], - "Date": [ "Mon, 18 Sep 2023 07:58:27 GMT" ] + "X-MSEdge-Ref": [ "Ref A: FBCAD248D2174D158733994A4BC45FD3 Ref B: SEL221051504047 Ref C: 2024-04-29T12:53:03Z" ], + "Date": [ "Mon, 29 Apr 2024 12:53:03 GMT" ] }, "ContentHeaders": { "Content-Length": [ "551" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "New-AzEventHubGeoDRConfiguration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+6": { + "New-AzEventHubGeoDRConfiguration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+6": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "97" ], - "x-ms-client-request-id": [ "f5514ac8-7f30-43b8-81e5-91c3cde4b37c" ], + "x-ms-unique-id": [ "92" ], + "x-ms-client-request-id": [ "0a993e62-c6ec-4930-b3d8-1754ae646315" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -232,39 +237,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "e69aac38-0fa2-438e-a32d-25f0a51abf67_M6SN1_M6SN1" ], + "x-ms-request-id": [ "0f1f6652-9d2d-4537-a5fa-92d91c82fdaf_M10SN1_M10SN1" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], - "x-ms-correlation-request-id": [ "3e5e2acc-17bc-4265-bcc1-2558cfc37ffa" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T075838Z:3e5e2acc-17bc-4265-bcc1-2558cfc37ffa" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "9d5078a1-66a2-43e2-918c-2ee792ec7e1e" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T125316Z:9d5078a1-66a2-43e2-918c-2ee792ec7e1e" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 274C715E69184F40952EE9E1CD0B7117 Ref B: SEL221051504011 Ref C: 2023-09-18T07:58:37Z" ], - "Date": [ "Mon, 18 Sep 2023 07:58:37 GMT" ] + "X-MSEdge-Ref": [ "Ref A: D86DD1C2285B4021B1B2BD3970E5978F Ref B: SEL221051504047 Ref C: 2024-04-29T12:53:14Z" ], + "Date": [ "Mon, 29 Apr 2024 12:53:15 GMT" ] }, "ContentHeaders": { "Content-Length": [ "551" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "New-AzEventHubGeoDRConfiguration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+7": { + "New-AzEventHubGeoDRConfiguration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+7": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "98" ], - "x-ms-client-request-id": [ "26c6ba93-c914-464f-b596-d549d422320f" ], + "x-ms-unique-id": [ "93" ], + "x-ms-client-request-id": [ "c5931b26-afc7-45de-9681-89096028e2cd" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -275,39 +281,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "3887cbe6-1b03-435d-af50-b27d96578b8c_M10SN1_M10SN1" ], + "x-ms-request-id": [ "ff68f364-7186-42a3-8067-cb5e316b900f_M2SN1_M2SN1" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], - "x-ms-correlation-request-id": [ "d52c5a33-29d7-4a5c-9d8d-43464c02458d" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T075850Z:d52c5a33-29d7-4a5c-9d8d-43464c02458d" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "c74f7c82-c1d3-41e5-a0bc-6235a0d9371b" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T125327Z:c74f7c82-c1d3-41e5-a0bc-6235a0d9371b" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 53146637C69C46B4BA0419AAA43E9674 Ref B: SEL221051504011 Ref C: 2023-09-18T07:58:48Z" ], - "Date": [ "Mon, 18 Sep 2023 07:58:50 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 35A002370A144E8A85FF9C4BA8C6B65D Ref B: SEL221051504047 Ref C: 2024-04-29T12:53:26Z" ], + "Date": [ "Mon, 29 Apr 2024 12:53:26 GMT" ] }, "ContentHeaders": { "Content-Length": [ "551" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "New-AzEventHubGeoDRConfiguration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+8": { + "New-AzEventHubGeoDRConfiguration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+8": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "99" ], - "x-ms-client-request-id": [ "b1de2782-d0d0-41ff-9e40-bde8b2d2f3ef" ], + "x-ms-unique-id": [ "94" ], + "x-ms-client-request-id": [ "47f0f513-0ed1-4a1a-9000-3788b8448f7e" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -318,39 +325,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "71ee5cca-d29a-40e4-bcb8-fe65b4600717_M8SN1_M8SN1" ], + "x-ms-request-id": [ "5a905dcb-68ef-4512-94f3-937e02bc73ae_M4SN1_M4SN1" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-correlation-request-id": [ "e6541946-b499-4689-a1af-5185a7901e02" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T075901Z:e6541946-b499-4689-a1af-5185a7901e02" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "2fd98dea-e7c5-4948-a6c3-4ea082e1fead" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240429T125339Z:2fd98dea-e7c5-4948-a6c3-4ea082e1fead" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: F503BABD1C8A47CEB55AD63B7234907C Ref B: SEL221051504011 Ref C: 2023-09-18T07:59:00Z" ], - "Date": [ "Mon, 18 Sep 2023 07:59:01 GMT" ] + "X-MSEdge-Ref": [ "Ref A: F2A7A2075403429E9F75DADB499A7A0F Ref B: SEL221051504047 Ref C: 2024-04-29T12:53:37Z" ], + "Date": [ "Mon, 29 Apr 2024 12:53:38 GMT" ] }, "ContentHeaders": { "Content-Length": [ "551" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "New-AzEventHubGeoDRConfiguration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+9": { + "New-AzEventHubGeoDRConfiguration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+9": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "100" ], - "x-ms-client-request-id": [ "69d0b2e4-a55a-49b9-8c6a-705ea354c518" ], + "x-ms-unique-id": [ "95" ], + "x-ms-client-request-id": [ "bda8bc3c-a850-4dca-9d50-5e9d38f84d7b" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -361,39 +369,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "8ba00a67-a860-4e81-b318-e9e02c69fded_M3SN1_M3SN1" ], + "x-ms-request-id": [ "ef7a503c-73b1-4237-89c7-e802049d8d8a_M6SN1_M6SN1" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], + "x-ms-throttling-version": [ "v1" ], "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], - "x-ms-correlation-request-id": [ "7bda8e8c-df81-44c1-a5ac-69e142461010" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T075913Z:7bda8e8c-df81-44c1-a5ac-69e142461010" ], + "x-ms-correlation-request-id": [ "6139846b-d5ce-4afc-a523-23a95cc6fbcf" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T125351Z:6139846b-d5ce-4afc-a523-23a95cc6fbcf" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: F163B2AC7D5D4C5C901627B455D83033 Ref B: SEL221051504011 Ref C: 2023-09-18T07:59:12Z" ], - "Date": [ "Mon, 18 Sep 2023 07:59:13 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 81CAEB6892504BBEA56284066A49E392 Ref B: SEL221051504047 Ref C: 2024-04-29T12:53:49Z" ], + "Date": [ "Mon, 29 Apr 2024 12:53:50 GMT" ] }, "ContentHeaders": { "Content-Length": [ "551" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "New-AzEventHubGeoDRConfiguration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+10": { + "New-AzEventHubGeoDRConfiguration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+10": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "101" ], - "x-ms-client-request-id": [ "78744cc0-daf0-476c-8d3f-389af90b2352" ], + "x-ms-unique-id": [ "96" ], + "x-ms-client-request-id": [ "f14a20d6-30ad-438e-963e-7004e241e0c1" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -404,39 +413,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "f2e9ca6d-4ff1-4470-918a-51df6bc965ac_M2CH3_M2CH3" ], + "x-ms-request-id": [ "59be0866-a036-4f8e-8e17-36d999765f53_M1CH3_M1CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], - "x-ms-correlation-request-id": [ "acc1c292-4065-4ce1-9fe8-890f849a6add" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T075925Z:acc1c292-4065-4ce1-9fe8-890f849a6add" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-correlation-request-id": [ "fd560bbd-9ff0-463b-8853-a2446e28e4a9" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T125402Z:fd560bbd-9ff0-463b-8853-a2446e28e4a9" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 7DB67B02CB184C58894F7BE92DFF1781 Ref B: SEL221051504011 Ref C: 2023-09-18T07:59:23Z" ], - "Date": [ "Mon, 18 Sep 2023 07:59:25 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 2850A962E32E4AA090BB16FECA1E59C1 Ref B: SEL221051504047 Ref C: 2024-04-29T12:54:01Z" ], + "Date": [ "Mon, 29 Apr 2024 12:54:01 GMT" ] }, "ContentHeaders": { "Content-Length": [ "590" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\",\"pendingReplicationOperationsCount\":0}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\",\"pendingReplicationOperationsCount\":0}}", "isContentBase64": false } }, - "New-AzEventHubGeoDRConfiguration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+11": { + "New-AzEventHubGeoDRConfiguration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+11": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "102" ], - "x-ms-client-request-id": [ "e3bf10e9-e305-41da-9eb4-43351ef63e7e" ], + "x-ms-unique-id": [ "97" ], + "x-ms-client-request-id": [ "5c383579-6362-4bfd-b565-847b63994fe1" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -447,39 +457,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "c267428f-8ab3-412f-8650-6d2ffb090cf0_M10CH3_M10CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-correlation-request-id": [ "a3b6b886-a147-4044-a6d6-445505d2faa8" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T075937Z:a3b6b886-a147-4044-a6d6-445505d2faa8" ], + "x-ms-request-id": [ "a4df1d3a-948b-4bc9-a664-f935c5b03211_M6SN1_M6SN1" ], + "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "099371c3-cce7-4c36-9160-ce38f9aeda33" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T125414Z:099371c3-cce7-4c36-9160-ce38f9aeda33" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 8894ACF3B4A846738721A041E784CA01 Ref B: SEL221051504011 Ref C: 2023-09-18T07:59:36Z" ], - "Date": [ "Mon, 18 Sep 2023 07:59:37 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 89DB717E6BC24A71B4544CFBF3429D29 Ref B: SEL221051504047 Ref C: 2024-04-29T12:54:12Z" ], + "Date": [ "Mon, 29 Apr 2024 12:54:14 GMT" ] }, "ContentHeaders": { "Content-Length": [ "554" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "New-AzEventHubGeoDRConfiguration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/authorizationRules?api-version=2023-01-01-preview+12": { + "New-AzEventHubGeoDRConfiguration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/authorizationRules?api-version=2023-01-01-preview+12": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/authorizationRules?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/authorizationRules?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "103" ], - "x-ms-client-request-id": [ "91733fe6-bf4a-4e80-8955-d5246fe1333e" ], + "x-ms-unique-id": [ "98" ], + "x-ms-client-request-id": [ "4f9957f7-d63d-4afc-8d30-c4cf5cdddd6d" ], "CommandName": [ "Az.EventHub.private\\Get-AzEventHubNamespaceAuthorizationRule_List" ], "FullCommandName": [ "Get-AzEventHubNamespaceAuthorizationRule_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -490,38 +501,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], - "x-ms-request-id": [ "01943aad-f8f0-453c-a70d-90d686b1edb2" ], - "x-ms-correlation-request-id": [ "01943aad-f8f0-453c-a70d-90d686b1edb2" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T075939Z:01943aad-f8f0-453c-a70d-90d686b1edb2" ], + "x-ms-correlation-request-id": [ "a600b9bd-973a-4fe3-8f77-f19f8aa701e2" ], + "x-ms-client-request-id": [ "4f9957f7-d63d-4afc-8d30-c4cf5cdddd6d_RP" ], + "x-ms-messaging-activity-id": [ "e5f73115-49b2-4189-8612-9de9ef8733ae" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G11|2024-04-29T12:54:14" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "a600b9bd-973a-4fe3-8f77-f19f8aa701e2" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T125414Z:a600b9bd-973a-4fe3-8f77-f19f8aa701e2" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: CDFEE5FEEE8F4B48922C6A6C0582251B Ref B: SEL221051504011 Ref C: 2023-09-18T07:59:38Z" ], - "Date": [ "Mon, 18 Sep 2023 07:59:39 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 43B9F4B53629426183086E3557DEE1E0 Ref B: SEL221051504047 Ref C: 2024-04-29T12:54:14Z" ], + "Date": [ "Mon, 29 Apr 2024 12:54:14 GMT" ] }, "ContentHeaders": { "Content-Length": [ "725" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/authorizationrules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/authorizationrules/authRule1\",\"name\":\"authRule1\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/authorizationrules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/authorizationrules/authRUle1\",\"name\":\"authRUle1\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}]}", "isContentBase64": false } }, - "New-AzEventHubGeoDRConfiguration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so/authorizationRules?api-version=2023-01-01-preview+13": { + "New-AzEventHubGeoDRConfiguration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof/authorizationRules?api-version=2023-01-01-preview+13": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so/authorizationRules?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof/authorizationRules?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "104" ], - "x-ms-client-request-id": [ "51885340-48bc-4c90-8e14-dcbb12c8409a" ], + "x-ms-unique-id": [ "99" ], + "x-ms-client-request-id": [ "a82a50eb-5139-4d6f-85a5-3dd483c1471a" ], "CommandName": [ "Az.EventHub.private\\Get-AzEventHubDisasterRecoveryConfigAuthorizationRule_List" ], "FullCommandName": [ "Get-AzEventHubDisasterRecoveryConfigAuthorizationRule_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -532,39 +547,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "68d7c4f3-fb78-43f7-8b0e-a5dd99a30f9c_M8SN1_M8SN1" ], + "x-ms-request-id": [ "3bd00d48-d91c-4cc8-a162-e413fbfb1adf_M11SN1_M11SN1" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], - "x-ms-correlation-request-id": [ "b7e38c60-e10d-415b-97ed-87d9f39308cd" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T075941Z:b7e38c60-e10d-415b-97ed-87d9f39308cd" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "dfc35952-413c-4e16-b8c5-456e5043ab31" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240429T125416Z:dfc35952-413c-4e16-b8c5-456e5043ab31" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 3301A6FF62F74A698F652EE0B10AAC69 Ref B: SEL221051504011 Ref C: 2023-09-18T07:59:40Z" ], - "Date": [ "Mon, 18 Sep 2023 07:59:41 GMT" ] + "X-MSEdge-Ref": [ "Ref A: B0B1D3D0169F49809633362B50092427 Ref B: SEL221051504047 Ref C: 2024-04-29T12:54:15Z" ], + "Date": [ "Mon, 29 Apr 2024 12:54:16 GMT" ] }, "ContentHeaders": { "Content-Length": [ "799" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so/authorizationRules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"East US\",\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so/authorizationRules/authRule1\",\"name\":\"authRule1\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"East US\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof/authorizationRules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"East US\",\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof/authorizationRules/authRUle1\",\"name\":\"authRUle1\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"East US\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}]}", "isContentBase64": false } }, - "New-AzEventHubGeoDRConfiguration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so/authorizationRules/RootManageSharedAccessKey?api-version=2023-01-01-preview+14": { + "New-AzEventHubGeoDRConfiguration+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof/authorizationRules/RootManageSharedAccessKey?api-version=2023-01-01-preview+14": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so/authorizationRules/RootManageSharedAccessKey?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof/authorizationRules/RootManageSharedAccessKey?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "105" ], - "x-ms-client-request-id": [ "58bd90b1-1cc0-4c6f-afea-6c81905d6c12" ], + "x-ms-unique-id": [ "100" ], + "x-ms-client-request-id": [ "c82f86d4-f105-4c4b-b929-6cc44e368e3e" ], "CommandName": [ "Az.EventHub.private\\Get-AzEventHubDisasterRecoveryConfigAuthorizationRule_Get" ], "FullCommandName": [ "Get-AzEventHubDisasterRecoveryConfigAuthorizationRule_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -575,39 +591,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "d092cc1f-37fb-4d4d-9a10-0c48d3c983a1_M11SN1_M11SN1" ], + "x-ms-request-id": [ "04cb2722-33da-40df-a10d-f56a9a95e314_M6SN1_M6SN1" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], - "x-ms-correlation-request-id": [ "92675a96-3235-4954-920e-8399e37e727f" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T075945Z:92675a96-3235-4954-920e-8399e37e727f" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-correlation-request-id": [ "13794a80-9840-44b0-bde1-f8976a51135b" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T125418Z:13794a80-9840-44b0-bde1-f8976a51135b" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: AC9B402983924EBC8DF935E28505A800 Ref B: SEL221051504011 Ref C: 2023-09-18T07:59:41Z" ], - "Date": [ "Mon, 18 Sep 2023 07:59:44 GMT" ] + "X-MSEdge-Ref": [ "Ref A: D8333C5D064E49EBA1D12C13568AAB62 Ref B: SEL221051504047 Ref C: 2024-04-29T12:54:17Z" ], + "Date": [ "Mon, 29 Apr 2024 12:54:18 GMT" ] }, "ContentHeaders": { "Content-Length": [ "409" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so/authorizationRules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"East US\",\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof/authorizationRules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"East US\",\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}}", "isContentBase64": false } }, - "New-AzEventHubGeoDRConfiguration+[NoContext]+CreateExpanded+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so/authorizationRules/RootManageSharedAccessKey/listKeys?api-version=2023-01-01-preview+15": { + "New-AzEventHubGeoDRConfiguration+[NoContext]+CreateExpanded+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof/authorizationRules/RootManageSharedAccessKey/listKeys?api-version=2023-01-01-preview+15": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so/authorizationRules/RootManageSharedAccessKey/listKeys?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof/authorizationRules/RootManageSharedAccessKey/listKeys?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "106" ], - "x-ms-client-request-id": [ "5544b532-5d7b-4bb3-9c74-96a5eec71713" ], + "x-ms-unique-id": [ "101" ], + "x-ms-client-request-id": [ "3eafbf1e-840a-441d-8998-b8b1ec86a7a7" ], "CommandName": [ "Az.EventHub.private\\Get-AzEventHubDisasterRecoveryConfigKey_List" ], "FullCommandName": [ "Get-AzEventHubDisasterRecoveryConfigKey_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -618,39 +635,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "c6f8fe68-11d9-4f63-b1dc-db0f2f22ac17_M6SN1_M6SN1" ], + "x-ms-request-id": [ "d9c23d12-7dd4-4cc9-82c8-51d66335883d_M0SN1_M0SN1" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], + "x-ms-throttling-version": [ "v1" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-correlation-request-id": [ "7dd0506f-3920-4f36-a4ab-a748992e5afd" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T075947Z:7dd0506f-3920-4f36-a4ab-a748992e5afd" ], + "x-ms-correlation-request-id": [ "bef50f19-33c4-49dd-addf-dc3296bea2a4" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T125421Z:bef50f19-33c4-49dd-addf-dc3296bea2a4" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: EC6A228D563D4FFD9790E249AE593FB9 Ref B: SEL221051504011 Ref C: 2023-09-18T07:59:45Z" ], - "Date": [ "Mon, 18 Sep 2023 07:59:47 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 6D11E1D1432B4D359CDB9087C125FD88 Ref B: SEL221051504047 Ref C: 2024-04-29T12:54:18Z" ], + "Date": [ "Mon, 29 Apr 2024 12:54:21 GMT" ] }, "ContentHeaders": { "Content-Length": [ "543" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"aliasPrimaryConnectionString\":\"Endpoint=sb://aliasyfh2so.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=Sanitized\",\"aliasSecondaryConnectionString\":\"Endpoint=sb://aliasyfh2so.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=Sanitized\",\"primaryKey\":\"Sanitized\",\"secondaryKey\":\"Sanitized\",\"keyName\":\"RootManageSharedAccessKey\"}", + "Content": "{\"aliasPrimaryConnectionString\":\"Endpoint=sb://aliasp8gxof.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=hzgm8oSbtMYJOlFRdX6o/GYhXy9w04tJf+AEhLsIlAg=\",\"aliasSecondaryConnectionString\":\"Endpoint=sb://aliasp8gxof.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=yemYTAC5T0776LEg4uIMJtpE8ME7BVo+T+AEhJfFXfo=\",\"primaryKey\":\"hzgm8oSbtMYJOlFRdX6o/GYhXy9w04tJf+AEhLsIlAg=\",\"secondaryKey\":\"yemYTAC5T0776LEg4uIMJtpE8ME7BVo+T+AEhJfFXfo=\",\"keyName\":\"RootManageSharedAccessKey\"}", "isContentBase64": false } }, - "New-AzEventHubGeoDRConfiguration+[NoContext]+CreateExpanded+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/authorizationRules/RootManageSharedAccessKey/listKeys?api-version=2023-01-01-preview+16": { + "New-AzEventHubGeoDRConfiguration+[NoContext]+CreateExpanded+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/authorizationRules/RootManageSharedAccessKey/listKeys?api-version=2023-01-01-preview+16": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/authorizationRules/RootManageSharedAccessKey/listKeys?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/authorizationRules/RootManageSharedAccessKey/listKeys?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "107" ], - "x-ms-client-request-id": [ "0059b01c-af79-4feb-8379-762d03348229" ], + "x-ms-unique-id": [ "102" ], + "x-ms-client-request-id": [ "1bb42a29-f2ac-4052-a89c-ec14154eb6e8" ], "CommandName": [ "Az.EventHub.private\\Get-AzEventHubNamespaceKey_List" ], "FullCommandName": [ "Get-AzEventHubNamespaceKey_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -661,22 +679,26 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-request-id": [ "67cd5a28-797c-45e1-977e-5f2a3c415686" ], - "x-ms-correlation-request-id": [ "67cd5a28-797c-45e1-977e-5f2a3c415686" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T075949Z:67cd5a28-797c-45e1-977e-5f2a3c415686" ], + "x-ms-correlation-request-id": [ "7f364531-969f-4f08-8f38-327761d56527" ], + "x-ms-client-request-id": [ "1bb42a29-f2ac-4052-a89c-ec14154eb6e8_RP" ], + "x-ms-messaging-activity-id": [ "39582f68-5bf8-4075-9a33-a39553ad4fd5" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-29T12:54:21" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "7f364531-969f-4f08-8f38-327761d56527" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240429T125422Z:7f364531-969f-4f08-8f38-327761d56527" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: C8F59ACDD5944356B027A7B676F9E093 Ref B: SEL221051504011 Ref C: 2023-09-18T07:59:47Z" ], - "Date": [ "Mon, 18 Sep 2023 07:59:49 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 67913CCC1FE647EF8FA6022F36A15859 Ref B: SEL221051504047 Ref C: 2024-04-29T12:54:21Z" ], + "Date": [ "Mon, 29 Apr 2024 12:54:21 GMT" ] }, "ContentHeaders": { "Content-Length": [ "931" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenamejwm6p8.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=Sanitized\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenamejwm6p8.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=Sanitized\",\"primaryKey\":\"Sanitized\",\"secondaryKey\":\"Sanitized\",\"keyName\":\"RootManageSharedAccessKey\",\"aliasPrimaryConnectionString\":\"Endpoint=sb://aliasyfh2so.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=Sanitized\",\"aliasSecondaryConnectionString\":\"Endpoint=sb://aliasyfh2so.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=Sanitized\"}", + "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenameil6w7t.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=hzgm8oSbtMYJOlFRdX6o/GYhXy9w04tJf+AEhLsIlAg=\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenameil6w7t.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=yemYTAC5T0776LEg4uIMJtpE8ME7BVo+T+AEhJfFXfo=\",\"primaryKey\":\"hzgm8oSbtMYJOlFRdX6o/GYhXy9w04tJf+AEhLsIlAg=\",\"secondaryKey\":\"yemYTAC5T0776LEg4uIMJtpE8ME7BVo+T+AEhJfFXfo=\",\"keyName\":\"RootManageSharedAccessKey\",\"aliasPrimaryConnectionString\":\"Endpoint=sb://aliasp8gxof.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=hzgm8oSbtMYJOlFRdX6o/GYhXy9w04tJf+AEhLsIlAg=\",\"aliasSecondaryConnectionString\":\"Endpoint=sb://aliasp8gxof.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=yemYTAC5T0776LEg4uIMJtpE8ME7BVo+T+AEhJfFXfo=\"}", "isContentBase64": false } } diff --git a/src/EventHub/EventHub.Autorest/test/New-AzEventHubGeoDRConfiguration.Tests.ps1 b/src/EventHub/EventHub.Autorest/test/New-AzEventHubGeoDRConfiguration.Tests.ps1 index 9501c7490754..1597f675738f 100644 --- a/src/EventHub/EventHub.Autorest/test/New-AzEventHubGeoDRConfiguration.Tests.ps1 +++ b/src/EventHub/EventHub.Autorest/test/New-AzEventHubGeoDRConfiguration.Tests.ps1 @@ -15,7 +15,7 @@ if(($null -eq $TestName) -or ($TestName -contains 'New-AzEventHubGeoDRConfigurat } Describe 'New-AzEventHubGeoDRConfiguration' { - It 'CreateExpanded' { + It 'CreateExpanded' -skip:$($env.secondaryLocation -eq '') { $drConfig = New-AzEventHubGeoDRConfiguration -Name $env.alias -ResourceGroupName $env.resourceGroup -NamespaceName $env.primaryNamespace -PartnerNamespace $env.secondaryNamespaceResourceId $drConfig.ResourceGroupName | Should -Be $env.resourceGroup $drConfig.Name | Should -Be $env.alias @@ -24,7 +24,9 @@ Describe 'New-AzEventHubGeoDRConfiguration' { while($drConfig.ProvisioningState -ne "Succeeded"){ $drConfig = Get-AzEventHubGeoDRConfiguration -Name $env.alias -ResourceGroupName $env.resourceGroup -NamespaceName $env.primaryNamespace - Start-TestSleep 10 + if ($TestMode -ne 'playback') { + Start-Sleep 10 + } } $drConfig = Get-AzEventHubGeoDRConfiguration -Name $env.alias -ResourceGroupName $env.resourceGroup -NamespaceName $env.secondaryNamespace diff --git a/src/EventHub/EventHub.Autorest/test/New-AzEventHubKey.Recording.json b/src/EventHub/EventHub.Autorest/test/New-AzEventHubKey.Recording.json index 2679765c9b10..152814b625c4 100644 --- a/src/EventHub/EventHub.Autorest/test/New-AzEventHubKey.Recording.json +++ b/src/EventHub/EventHub.Autorest/test/New-AzEventHubKey.Recording.json @@ -1,17 +1,17 @@ { - "New-AzEventHubKey+[NoContext]+NewExpandedNamespace+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/auth-ruleju0nd3/listKeys?api-version=2023-01-01-preview+1": { + "New-AzEventHubKey+[NoContext]+NewExpandedNamespace+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/auth-ruleudhoej/listKeys?api-version=2023-01-01-preview+1": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/auth-ruleju0nd3/listKeys?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/auth-ruleudhoej/listKeys?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "108" ], - "x-ms-client-request-id": [ "5532112b-2ab2-4038-95b5-49cbd952f63f" ], + "x-ms-unique-id": [ "103" ], + "x-ms-client-request-id": [ "6c43e085-4fd5-4a47-96a2-daa7c863e779" ], "CommandName": [ "Az.EventHub.private\\Get-AzEventHubNamespaceKey_List" ], "FullCommandName": [ "Get-AzEventHubNamespaceKey_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,29 +22,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], - "x-ms-request-id": [ "478843bf-e88e-4bcc-8662-db611112f239" ], - "x-ms-correlation-request-id": [ "478843bf-e88e-4bcc-8662-db611112f239" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T080010Z:478843bf-e88e-4bcc-8662-db611112f239" ], + "x-ms-correlation-request-id": [ "0a287f00-3e73-4715-b09e-59bb3b1d74ca" ], + "x-ms-client-request-id": [ "6c43e085-4fd5-4a47-96a2-daa7c863e779_RP" ], + "x-ms-messaging-activity-id": [ "5296c509-a85c-45d5-a66e-53a810d9b4f9" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G14|2024-04-29T12:54:51" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "0a287f00-3e73-4715-b09e-59bb3b1d74ca" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240429T125451Z:0a287f00-3e73-4715-b09e-59bb3b1d74ca" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 4541735E45274B1C93D5F0802AB3AEC2 Ref B: SEL221051504011 Ref C: 2023-09-18T08:00:08Z" ], - "Date": [ "Mon, 18 Sep 2023 08:00:10 GMT" ] + "X-MSEdge-Ref": [ "Ref A: EC913620ADEC4D7F8F11C72EF38E6A2A Ref B: SEL221051504047 Ref C: 2024-04-29T12:54:50Z" ], + "Date": [ "Mon, 29 Apr 2024 12:54:51 GMT" ] }, "ContentHeaders": { "Content-Length": [ "519" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenamed5orf8.servicebus.windows.net/;SharedAccessKeyName=auth-ruleju0nd3;SharedAccessKey=Sanitized\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenamed5orf8.servicebus.windows.net/;SharedAccessKeyName=auth-ruleju0nd3;SharedAccessKey=Sanitized\",\"primaryKey\":\"SanitizedPrimary1\",\"secondaryKey\":\"SanitizedSecondary1\",\"keyName\":\"auth-ruleju0nd3\"}", + "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenameeqpx5w.servicebus.windows.net/;SharedAccessKeyName=auth-ruleudhoej;SharedAccessKey=5Fw/dU3UKBtC88lnpoBbKfylCmWVJM3ZI+AEhGWiXbg=\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenameeqpx5w.servicebus.windows.net/;SharedAccessKeyName=auth-ruleudhoej;SharedAccessKey=+9MVU0i390uqIh1w7+lQsa0Qm6cR414iB+AEhObvmas=\",\"primaryKey\":\"5Fw/dU3UKBtC88lnpoBbKfylCmWVJM3ZI+AEhGWiXbg=\",\"secondaryKey\":\"+9MVU0i390uqIh1w7+lQsa0Qm6cR414iB+AEhObvmas=\",\"keyName\":\"auth-ruleudhoej\"}", "isContentBase64": false } }, - "New-AzEventHubKey+[NoContext]+NewExpandedNamespace+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/auth-ruleju0nd3/regenerateKeys?api-version=2023-01-01-preview+2": { + "New-AzEventHubKey+[NoContext]+NewExpandedNamespace+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/auth-ruleudhoej/regenerateKeys?api-version=2023-01-01-preview+2": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/auth-ruleju0nd3/regenerateKeys?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/auth-ruleudhoej/regenerateKeys?api-version=2023-01-01-preview", "Content": "{\n \"keyType\": \"PrimaryKey\"\n}", "isContentBase64": false, "Headers": { @@ -59,29 +63,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-request-id": [ "1ac9187b-cc17-42d6-bd35-89d02d65a402" ], - "x-ms-correlation-request-id": [ "1ac9187b-cc17-42d6-bd35-89d02d65a402" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T080017Z:1ac9187b-cc17-42d6-bd35-89d02d65a402" ], + "x-ms-correlation-request-id": [ "a44dab2a-e48a-4f71-bfcb-c57b0f0d00b6" ], + "x-ms-client-request-id": [ "49f1fe95-2cf0-4992-8471-35070b5724cf_RP" ], + "x-ms-messaging-activity-id": [ "fa2abf50-7690-4f91-8079-dccc1dc28f84" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G10|2024-04-29T12:54:58" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "a44dab2a-e48a-4f71-bfcb-c57b0f0d00b6" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T125458Z:a44dab2a-e48a-4f71-bfcb-c57b0f0d00b6" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 3616C2A6BEF74FA38E2C0971345E4C2A Ref B: SEL221051504011 Ref C: 2023-09-18T08:00:10Z" ], - "Date": [ "Mon, 18 Sep 2023 08:00:16 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 4B858CAC64A74B99A288924A4FFAC5C8 Ref B: SEL221051504047 Ref C: 2024-04-29T12:54:51Z" ], + "Date": [ "Mon, 29 Apr 2024 12:54:58 GMT" ] }, "ContentHeaders": { "Content-Length": [ "519" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenamed5orf8.servicebus.windows.net/;SharedAccessKeyName=auth-ruleju0nd3;SharedAccessKey=Sanitized\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenamed5orf8.servicebus.windows.net/;SharedAccessKeyName=auth-ruleju0nd3;SharedAccessKey=Sanitized\",\"primaryKey\":\"SanitizedPrimary2\",\"secondaryKey\":\"SanitizedSecondary1\",\"keyName\":\"auth-ruleju0nd3\"}", + "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenameeqpx5w.servicebus.windows.net/;SharedAccessKeyName=auth-ruleudhoej;SharedAccessKey=fKctd7sw75LXnv4qXG9rcgQFVXXUZVWRX+AEhDlJGnI=\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenameeqpx5w.servicebus.windows.net/;SharedAccessKeyName=auth-ruleudhoej;SharedAccessKey=+9MVU0i390uqIh1w7+lQsa0Qm6cR414iB+AEhObvmas=\",\"primaryKey\":\"fKctd7sw75LXnv4qXG9rcgQFVXXUZVWRX+AEhDlJGnI=\",\"secondaryKey\":\"+9MVU0i390uqIh1w7+lQsa0Qm6cR414iB+AEhObvmas=\",\"keyName\":\"auth-ruleudhoej\"}", "isContentBase64": false } }, - "New-AzEventHubKey+[NoContext]+NewExpandedNamespace+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/auth-ruleju0nd3/regenerateKeys?api-version=2023-01-01-preview+3": { + "New-AzEventHubKey+[NoContext]+NewExpandedNamespace+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/auth-ruleudhoej/regenerateKeys?api-version=2023-01-01-preview+3": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/auth-ruleju0nd3/regenerateKeys?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/auth-ruleudhoej/regenerateKeys?api-version=2023-01-01-preview", "Content": "{\n \"keyType\": \"SecondaryKey\"\n}", "isContentBase64": false, "Headers": { @@ -96,30 +104,34 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-request-id": [ "49bdc830-f268-495e-a757-4404487866c9" ], - "x-ms-correlation-request-id": [ "49bdc830-f268-495e-a757-4404487866c9" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T080023Z:49bdc830-f268-495e-a757-4404487866c9" ], + "x-ms-correlation-request-id": [ "5c0a5972-124b-4bd4-aedd-916f56b6d37f" ], + "x-ms-client-request-id": [ "45e9d9c6-3bea-4ca9-b4f3-b02561ae485a_RP" ], + "x-ms-messaging-activity-id": [ "cd3e533c-3273-4b58-ac24-08045b789593" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G11|2024-04-29T12:55:05" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "5c0a5972-124b-4bd4-aedd-916f56b6d37f" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T125505Z:5c0a5972-124b-4bd4-aedd-916f56b6d37f" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: F99BC96FB9E0493898CFD0DAE86B49DA Ref B: SEL221051504011 Ref C: 2023-09-18T08:00:17Z" ], - "Date": [ "Mon, 18 Sep 2023 08:00:23 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 229DAD87D11346C4AEC555484AB2A3D2 Ref B: SEL221051504047 Ref C: 2024-04-29T12:54:58Z" ], + "Date": [ "Mon, 29 Apr 2024 12:55:05 GMT" ] }, "ContentHeaders": { "Content-Length": [ "519" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenamed5orf8.servicebus.windows.net/;SharedAccessKeyName=auth-ruleju0nd3;SharedAccessKey=Sanitized\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenamed5orf8.servicebus.windows.net/;SharedAccessKeyName=auth-ruleju0nd3;SharedAccessKey=Sanitized\",\"primaryKey\":\"SanitizedPrimary2\",\"secondaryKey\":\"SanitizedSecondary2\",\"keyName\":\"auth-ruleju0nd3\"}", + "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenameeqpx5w.servicebus.windows.net/;SharedAccessKeyName=auth-ruleudhoej;SharedAccessKey=fKctd7sw75LXnv4qXG9rcgQFVXXUZVWRX+AEhDlJGnI=\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenameeqpx5w.servicebus.windows.net/;SharedAccessKeyName=auth-ruleudhoej;SharedAccessKey=H/OTD94SndLmu0z+uMFjU1xPdgY+nMaae+AEhDPbEEs=\",\"primaryKey\":\"fKctd7sw75LXnv4qXG9rcgQFVXXUZVWRX+AEhDlJGnI=\",\"secondaryKey\":\"H/OTD94SndLmu0z+uMFjU1xPdgY+nMaae+AEhDPbEEs=\",\"keyName\":\"auth-ruleudhoej\"}", "isContentBase64": false } }, - "New-AzEventHubKey+[NoContext]+NewExpandedNamespace+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/auth-ruleju0nd3/regenerateKeys?api-version=2023-01-01-preview+4": { + "New-AzEventHubKey+[NoContext]+NewExpandedNamespace+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/auth-ruleudhoej/regenerateKeys?api-version=2023-01-01-preview+4": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/auth-ruleju0nd3/regenerateKeys?api-version=2023-01-01-preview", - "Content": "{\n \"keyType\": \"PrimaryKey\",\n \"key\": \"Sanitized\"\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/auth-ruleudhoej/regenerateKeys?api-version=2023-01-01-preview", + "Content": "{\n \"keyType\": \"PrimaryKey\",\n \"key\": \"5uD6fJh/Rpvx00S+ndDgAHbB9fN/5SZ/ujDEoCNqOGg=\"\n}", "isContentBase64": false, "Headers": { }, @@ -133,30 +145,34 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-request-id": [ "a037d03d-99b9-413f-bac1-0ec8d1f9eaac" ], - "x-ms-correlation-request-id": [ "a037d03d-99b9-413f-bac1-0ec8d1f9eaac" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T080030Z:a037d03d-99b9-413f-bac1-0ec8d1f9eaac" ], + "x-ms-correlation-request-id": [ "2fc1d4c2-1e0d-405b-a95a-928c987d1874" ], + "x-ms-client-request-id": [ "7dd4f276-fa26-457f-b3ac-f7ed8d0884d3_RP" ], + "x-ms-messaging-activity-id": [ "ea5b1496-bfbe-4635-8579-0e42c943c488" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-29T12:55:11" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "2fc1d4c2-1e0d-405b-a95a-928c987d1874" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T125511Z:2fc1d4c2-1e0d-405b-a95a-928c987d1874" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: A7E03C5EF0FA4F2B86D24C5A1ED22BF9 Ref B: SEL221051504011 Ref C: 2023-09-18T08:00:24Z" ], - "Date": [ "Mon, 18 Sep 2023 08:00:30 GMT" ] + "X-MSEdge-Ref": [ "Ref A: F31879E652CA477B861D5A0F56A80760 Ref B: SEL221051504047 Ref C: 2024-04-29T12:55:05Z" ], + "Date": [ "Mon, 29 Apr 2024 12:55:11 GMT" ] }, "ContentHeaders": { "Content-Length": [ "519" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenamed5orf8.servicebus.windows.net/;SharedAccessKeyName=auth-ruleju0nd3;SharedAccessKey=Sanitized\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenamed5orf8.servicebus.windows.net/;SharedAccessKeyName=auth-ruleju0nd3;SharedAccessKey=Sanitized\",\"primaryKey\":\"SanitizedPrimary3\",\"secondaryKey\":\"SanitizedSecondary2\",\"keyName\":\"auth-ruleju0nd3\"}", + "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenameeqpx5w.servicebus.windows.net/;SharedAccessKeyName=auth-ruleudhoej;SharedAccessKey=5uD6fJh/Rpvx00S+ndDgAHbB9fN/5SZ/ujDEoCNqOGg=\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenameeqpx5w.servicebus.windows.net/;SharedAccessKeyName=auth-ruleudhoej;SharedAccessKey=H/OTD94SndLmu0z+uMFjU1xPdgY+nMaae+AEhDPbEEs=\",\"primaryKey\":\"5uD6fJh/Rpvx00S+ndDgAHbB9fN/5SZ/ujDEoCNqOGg=\",\"secondaryKey\":\"H/OTD94SndLmu0z+uMFjU1xPdgY+nMaae+AEhDPbEEs=\",\"keyName\":\"auth-ruleudhoej\"}", "isContentBase64": false } }, - "New-AzEventHubKey+[NoContext]+NewExpandedNamespace+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/auth-ruleju0nd3/regenerateKeys?api-version=2023-01-01-preview+5": { + "New-AzEventHubKey+[NoContext]+NewExpandedNamespace+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/auth-ruleudhoej/regenerateKeys?api-version=2023-01-01-preview+5": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/auth-ruleju0nd3/regenerateKeys?api-version=2023-01-01-preview", - "Content": "{\n \"keyType\": \"SecondaryKey\",\n \"key\": \"Sanitized\"\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/auth-ruleudhoej/regenerateKeys?api-version=2023-01-01-preview", + "Content": "{\n \"keyType\": \"SecondaryKey\",\n \"key\": \"5uD6fJh/Rpvx00S+ndDgAHbB9fN/5SZ/ujDEoCNqOGg=\"\n}", "isContentBase64": false, "Headers": { }, @@ -170,38 +186,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-request-id": [ "d442d394-16e0-4d90-bf29-8fed89fc03c5" ], - "x-ms-correlation-request-id": [ "d442d394-16e0-4d90-bf29-8fed89fc03c5" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T080038Z:d442d394-16e0-4d90-bf29-8fed89fc03c5" ], + "x-ms-correlation-request-id": [ "280a9cee-0821-44ec-91ab-93c4c53f1f77" ], + "x-ms-client-request-id": [ "f728a02c-c4df-4cfb-ad78-bed57c401d8e_RP" ], + "x-ms-messaging-activity-id": [ "5ca06107-6d44-4365-a935-829555bc1c29" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G11|2024-04-29T12:55:18" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "280a9cee-0821-44ec-91ab-93c4c53f1f77" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T125518Z:280a9cee-0821-44ec-91ab-93c4c53f1f77" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: A85E7D915B5549B594A5B45227B8F44A Ref B: SEL221051504011 Ref C: 2023-09-18T08:00:31Z" ], - "Date": [ "Mon, 18 Sep 2023 08:00:37 GMT" ] + "X-MSEdge-Ref": [ "Ref A: F97B322378624A5EAE73D3D61B98342B Ref B: SEL221051504047 Ref C: 2024-04-29T12:55:11Z" ], + "Date": [ "Mon, 29 Apr 2024 12:55:18 GMT" ] }, "ContentHeaders": { "Content-Length": [ "519" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenamed5orf8.servicebus.windows.net/;SharedAccessKeyName=auth-ruleju0nd3;SharedAccessKey=Sanitized\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenamed5orf8.servicebus.windows.net/;SharedAccessKeyName=auth-ruleju0nd3;SharedAccessKey=Sanitized\",\"primaryKey\":\"SanitizedPrimary3\",\"secondaryKey\":\"SanitizedSecondary3\",\"keyName\":\"auth-ruleju0nd3\"}", + "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenameeqpx5w.servicebus.windows.net/;SharedAccessKeyName=auth-ruleudhoej;SharedAccessKey=5uD6fJh/Rpvx00S+ndDgAHbB9fN/5SZ/ujDEoCNqOGg=\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenameeqpx5w.servicebus.windows.net/;SharedAccessKeyName=auth-ruleudhoej;SharedAccessKey=5uD6fJh/Rpvx00S+ndDgAHbB9fN/5SZ/ujDEoCNqOGg=\",\"primaryKey\":\"5uD6fJh/Rpvx00S+ndDgAHbB9fN/5SZ/ujDEoCNqOGg=\",\"secondaryKey\":\"5uD6fJh/Rpvx00S+ndDgAHbB9fN/5SZ/ujDEoCNqOGg=\",\"keyName\":\"auth-ruleudhoej\"}", "isContentBase64": false } }, - "New-AzEventHubKey+[NoContext]+NewExpandedEntity+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules/auth-rulepjiaoe/listKeys?api-version=2023-01-01-preview+1": { + "New-AzEventHubKey+[NoContext]+NewExpandedEntity+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules/auth-rulevanqub/listKeys?api-version=2023-01-01-preview+1": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules/auth-rulepjiaoe/listKeys?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules/auth-rulevanqub/listKeys?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "113" ], - "x-ms-client-request-id": [ "9422c7a3-34eb-42c4-914c-4a6f84980bf9" ], + "x-ms-unique-id": [ "108" ], + "x-ms-client-request-id": [ "e1da7c30-3f3b-4040-b9b3-7f2c8e482dd5" ], "CommandName": [ "Az.EventHub.private\\Get-AzEventHubKey_List" ], "FullCommandName": [ "Get-AzEventHubKey_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -212,29 +232,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-request-id": [ "1205edbf-f3a6-41ed-8486-cd742ebc7688" ], - "x-ms-correlation-request-id": [ "1205edbf-f3a6-41ed-8486-cd742ebc7688" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T080039Z:1205edbf-f3a6-41ed-8486-cd742ebc7688" ], + "x-ms-correlation-request-id": [ "b29aa710-98ee-45d9-bcd8-38de9f250a09" ], + "x-ms-client-request-id": [ "e1da7c30-3f3b-4040-b9b3-7f2c8e482dd5_RP" ], + "x-ms-messaging-activity-id": [ "ee567819-050f-4e48-aa9f-5dbfee64e11c" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G14|2024-04-29T12:55:20" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-request-id": [ "b29aa710-98ee-45d9-bcd8-38de9f250a09" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T125520Z:b29aa710-98ee-45d9-bcd8-38de9f250a09" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 5809D11F3BFB406BBD22FE9FAD27EFF1 Ref B: SEL221051504011 Ref C: 2023-09-18T08:00:38Z" ], - "Date": [ "Mon, 18 Sep 2023 08:00:39 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 5BE1D0E1E05A46A1AF29ECC2EB418C64 Ref B: SEL221051504047 Ref C: 2024-04-29T12:55:18Z" ], + "Date": [ "Mon, 29 Apr 2024 12:55:20 GMT" ] }, "ContentHeaders": { "Content-Length": [ "571" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenamed5orf8.servicebus.windows.net/;SharedAccessKeyName=auth-rulepjiaoe;SharedAccessKey=Sanitized;EntityPath=eventHub504uah\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenamed5orf8.servicebus.windows.net/;SharedAccessKeyName=auth-rulepjiaoe;SharedAccessKey=Sanitized;EntityPath=eventHub504uah\",\"primaryKey\":\"SanitizedPrimary1\",\"secondaryKey\":\"SanitizedSecondary1\",\"keyName\":\"auth-rulepjiaoe\"}", + "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenameeqpx5w.servicebus.windows.net/;SharedAccessKeyName=auth-rulevanqub;SharedAccessKey=VsW0oPfgg5VsKOREk0YDRenZfwTBtT7WV+AEhOqC3vc=;EntityPath=eventHub789hmt\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenameeqpx5w.servicebus.windows.net/;SharedAccessKeyName=auth-rulevanqub;SharedAccessKey=1u3LCEtWZqOou9wG1YzpsWrk7lhK6Ug/C+AEhK/TBCM=;EntityPath=eventHub789hmt\",\"primaryKey\":\"VsW0oPfgg5VsKOREk0YDRenZfwTBtT7WV+AEhOqC3vc=\",\"secondaryKey\":\"1u3LCEtWZqOou9wG1YzpsWrk7lhK6Ug/C+AEhK/TBCM=\",\"keyName\":\"auth-rulevanqub\"}", "isContentBase64": false } }, - "New-AzEventHubKey+[NoContext]+NewExpandedEntity+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules/auth-rulepjiaoe/regenerateKeys?api-version=2023-01-01-preview+2": { + "New-AzEventHubKey+[NoContext]+NewExpandedEntity+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules/auth-rulevanqub/regenerateKeys?api-version=2023-01-01-preview+2": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules/auth-rulepjiaoe/regenerateKeys?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules/auth-rulevanqub/regenerateKeys?api-version=2023-01-01-preview", "Content": "{\n \"keyType\": \"PrimaryKey\"\n}", "isContentBase64": false, "Headers": { @@ -249,29 +273,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-request-id": [ "604de6e5-e7ca-4e21-90ee-530f6d97e0a6" ], - "x-ms-correlation-request-id": [ "604de6e5-e7ca-4e21-90ee-530f6d97e0a6" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T080041Z:604de6e5-e7ca-4e21-90ee-530f6d97e0a6" ], + "x-ms-correlation-request-id": [ "4c0d27aa-9b74-4f6b-bf42-a86e60c8aa3d" ], + "x-ms-client-request-id": [ "b287a874-f3bc-4ab9-91fc-ba6ec94b5e6c_RP" ], + "x-ms-messaging-activity-id": [ "3b39d853-22c8-42a4-8c8c-8ac41a1c9170" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G1|2024-04-29T12:55:22" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "4c0d27aa-9b74-4f6b-bf42-a86e60c8aa3d" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T125522Z:4c0d27aa-9b74-4f6b-bf42-a86e60c8aa3d" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 24B3BD964E35441F801982D9AD80EB41 Ref B: SEL221051504011 Ref C: 2023-09-18T08:00:39Z" ], - "Date": [ "Mon, 18 Sep 2023 08:00:40 GMT" ] + "X-MSEdge-Ref": [ "Ref A: E118EA32654146928B655B6CA4B2C00E Ref B: SEL221051504047 Ref C: 2024-04-29T12:55:20Z" ], + "Date": [ "Mon, 29 Apr 2024 12:55:22 GMT" ] }, "ContentHeaders": { "Content-Length": [ "571" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenamed5orf8.servicebus.windows.net/;SharedAccessKeyName=auth-rulepjiaoe;SharedAccessKey=Sanitized;EntityPath=eventHub504uah\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenamed5orf8.servicebus.windows.net/;SharedAccessKeyName=auth-rulepjiaoe;SharedAccessKey=Sanitized;EntityPath=eventHub504uah\",\"primaryKey\":\"SanitizedPrimary2\",\"secondaryKey\":\"SanitizedSecondary1\",\"keyName\":\"auth-rulepjiaoe\"}", + "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenameeqpx5w.servicebus.windows.net/;SharedAccessKeyName=auth-rulevanqub;SharedAccessKey=8sTxBIv6PDvngiHtapwG8hEa/lFnWTLz2+AEhAvSQxY=;EntityPath=eventHub789hmt\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenameeqpx5w.servicebus.windows.net/;SharedAccessKeyName=auth-rulevanqub;SharedAccessKey=1u3LCEtWZqOou9wG1YzpsWrk7lhK6Ug/C+AEhK/TBCM=;EntityPath=eventHub789hmt\",\"primaryKey\":\"8sTxBIv6PDvngiHtapwG8hEa/lFnWTLz2+AEhAvSQxY=\",\"secondaryKey\":\"1u3LCEtWZqOou9wG1YzpsWrk7lhK6Ug/C+AEhK/TBCM=\",\"keyName\":\"auth-rulevanqub\"}", "isContentBase64": false } }, - "New-AzEventHubKey+[NoContext]+NewExpandedEntity+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules/auth-rulepjiaoe/regenerateKeys?api-version=2023-01-01-preview+3": { + "New-AzEventHubKey+[NoContext]+NewExpandedEntity+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules/auth-rulevanqub/regenerateKeys?api-version=2023-01-01-preview+3": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules/auth-rulepjiaoe/regenerateKeys?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules/auth-rulevanqub/regenerateKeys?api-version=2023-01-01-preview", "Content": "{\n \"keyType\": \"SecondaryKey\"\n}", "isContentBase64": false, "Headers": { @@ -286,30 +314,34 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-request-id": [ "0f50e19d-5960-424a-a3e6-a0ef880fa2f4" ], - "x-ms-correlation-request-id": [ "0f50e19d-5960-424a-a3e6-a0ef880fa2f4" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T080043Z:0f50e19d-5960-424a-a3e6-a0ef880fa2f4" ], + "x-ms-correlation-request-id": [ "09cd1311-ba63-4425-9f30-acb8f9d9321a" ], + "x-ms-client-request-id": [ "7c06820f-3240-4a3e-95d9-6d4586a1bfae_RP" ], + "x-ms-messaging-activity-id": [ "92c72d80-4343-4d05-b7f3-ad485935aacb" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G11|2024-04-29T12:55:23" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-request-id": [ "09cd1311-ba63-4425-9f30-acb8f9d9321a" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T125523Z:09cd1311-ba63-4425-9f30-acb8f9d9321a" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 6E96E82D3E6641119FE8BF0D0E5D1C6F Ref B: SEL221051504011 Ref C: 2023-09-18T08:00:41Z" ], - "Date": [ "Mon, 18 Sep 2023 08:00:42 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 5FC5698B16DF42E3B0354709B4A3B6BE Ref B: SEL221051504047 Ref C: 2024-04-29T12:55:22Z" ], + "Date": [ "Mon, 29 Apr 2024 12:55:23 GMT" ] }, "ContentHeaders": { "Content-Length": [ "571" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenamed5orf8.servicebus.windows.net/;SharedAccessKeyName=auth-rulepjiaoe;SharedAccessKey=Sanitized;EntityPath=eventHub504uah\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenamed5orf8.servicebus.windows.net/;SharedAccessKeyName=auth-rulepjiaoe;SharedAccessKey=Sanitized;EntityPath=eventHub504uah\",\"primaryKey\":\"SanitizedPrimary2\",\"secondaryKey\":\"SanitizedSecondary2\",\"keyName\":\"auth-rulepjiaoe\"}", + "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenameeqpx5w.servicebus.windows.net/;SharedAccessKeyName=auth-rulevanqub;SharedAccessKey=8sTxBIv6PDvngiHtapwG8hEa/lFnWTLz2+AEhAvSQxY=;EntityPath=eventHub789hmt\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenameeqpx5w.servicebus.windows.net/;SharedAccessKeyName=auth-rulevanqub;SharedAccessKey=RibAEqkvYDr3N1KXgjLxvdJnlfXaTD/JP+AEhM27KaE=;EntityPath=eventHub789hmt\",\"primaryKey\":\"8sTxBIv6PDvngiHtapwG8hEa/lFnWTLz2+AEhAvSQxY=\",\"secondaryKey\":\"RibAEqkvYDr3N1KXgjLxvdJnlfXaTD/JP+AEhM27KaE=\",\"keyName\":\"auth-rulevanqub\"}", "isContentBase64": false } }, - "New-AzEventHubKey+[NoContext]+NewExpandedEntity+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules/auth-rulepjiaoe/regenerateKeys?api-version=2023-01-01-preview+4": { + "New-AzEventHubKey+[NoContext]+NewExpandedEntity+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules/auth-rulevanqub/regenerateKeys?api-version=2023-01-01-preview+4": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules/auth-rulepjiaoe/regenerateKeys?api-version=2023-01-01-preview", - "Content": "{\n \"keyType\": \"PrimaryKey\",\n \"key\": \"Sanitized\"\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules/auth-rulevanqub/regenerateKeys?api-version=2023-01-01-preview", + "Content": "{\n \"keyType\": \"PrimaryKey\",\n \"key\": \"5uD6fJh/Rpvx00S+ndDgAHbB9fN/5SZ/ujDEoCNqOGg=\"\n}", "isContentBase64": false, "Headers": { }, @@ -323,30 +355,34 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], - "x-ms-request-id": [ "8b612584-958e-4b9b-bc2c-f07a254d27e5" ], - "x-ms-correlation-request-id": [ "8b612584-958e-4b9b-bc2c-f07a254d27e5" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T080044Z:8b612584-958e-4b9b-bc2c-f07a254d27e5" ], + "x-ms-correlation-request-id": [ "c651b685-1bdf-413c-8b26-a3ef6859843d" ], + "x-ms-client-request-id": [ "ed831747-8594-47cd-9605-1d79466607c5_RP" ], + "x-ms-messaging-activity-id": [ "f4c72390-76e6-48f3-b2a1-d2cbb6ebb708" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G7|2024-04-29T12:55:25" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "c651b685-1bdf-413c-8b26-a3ef6859843d" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T125525Z:c651b685-1bdf-413c-8b26-a3ef6859843d" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: B5D482347652448F8D1B4BA66BAFD3C8 Ref B: SEL221051504011 Ref C: 2023-09-18T08:00:43Z" ], - "Date": [ "Mon, 18 Sep 2023 08:00:43 GMT" ] + "X-MSEdge-Ref": [ "Ref A: ED5DD533F91A4B8B8A61E09B9CD18C69 Ref B: SEL221051504047 Ref C: 2024-04-29T12:55:23Z" ], + "Date": [ "Mon, 29 Apr 2024 12:55:25 GMT" ] }, "ContentHeaders": { "Content-Length": [ "571" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenamed5orf8.servicebus.windows.net/;SharedAccessKeyName=auth-rulepjiaoe;SharedAccessKey=Sanitized;EntityPath=eventHub504uah\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenamed5orf8.servicebus.windows.net/;SharedAccessKeyName=auth-rulepjiaoe;SharedAccessKey=Sanitized;EntityPath=eventHub504uah\",\"primaryKey\":\"SanitizedPrimary3\",\"secondaryKey\":\"SanitizedSecondary2\",\"keyName\":\"auth-rulepjiaoe\"}", + "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenameeqpx5w.servicebus.windows.net/;SharedAccessKeyName=auth-rulevanqub;SharedAccessKey=5uD6fJh/Rpvx00S+ndDgAHbB9fN/5SZ/ujDEoCNqOGg=;EntityPath=eventHub789hmt\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenameeqpx5w.servicebus.windows.net/;SharedAccessKeyName=auth-rulevanqub;SharedAccessKey=RibAEqkvYDr3N1KXgjLxvdJnlfXaTD/JP+AEhM27KaE=;EntityPath=eventHub789hmt\",\"primaryKey\":\"5uD6fJh/Rpvx00S+ndDgAHbB9fN/5SZ/ujDEoCNqOGg=\",\"secondaryKey\":\"RibAEqkvYDr3N1KXgjLxvdJnlfXaTD/JP+AEhM27KaE=\",\"keyName\":\"auth-rulevanqub\"}", "isContentBase64": false } }, - "New-AzEventHubKey+[NoContext]+NewExpandedEntity+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules/auth-rulepjiaoe/regenerateKeys?api-version=2023-01-01-preview+5": { + "New-AzEventHubKey+[NoContext]+NewExpandedEntity+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules/auth-rulevanqub/regenerateKeys?api-version=2023-01-01-preview+5": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules/auth-rulepjiaoe/regenerateKeys?api-version=2023-01-01-preview", - "Content": "{\n \"keyType\": \"SecondaryKey\",\n \"key\": \"Sanitized\"\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules/auth-rulevanqub/regenerateKeys?api-version=2023-01-01-preview", + "Content": "{\n \"keyType\": \"SecondaryKey\",\n \"key\": \"5uD6fJh/Rpvx00S+ndDgAHbB9fN/5SZ/ujDEoCNqOGg=\"\n}", "isContentBase64": false, "Headers": { }, @@ -360,22 +396,26 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-request-id": [ "889c92d5-b757-48e1-90ad-7875b4c92ee4" ], - "x-ms-correlation-request-id": [ "889c92d5-b757-48e1-90ad-7875b4c92ee4" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T080045Z:889c92d5-b757-48e1-90ad-7875b4c92ee4" ], + "x-ms-correlation-request-id": [ "d298d707-fbe8-4fd6-b38c-ed2ed4120188" ], + "x-ms-client-request-id": [ "35b05e03-264d-42c8-9663-6fd9e5effcc1_RP" ], + "x-ms-messaging-activity-id": [ "037da512-8be7-4885-afa5-c0330d91d0c6" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G4|2024-04-29T12:55:26" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "d298d707-fbe8-4fd6-b38c-ed2ed4120188" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T125526Z:d298d707-fbe8-4fd6-b38c-ed2ed4120188" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 372FFFC8C3C440AD8EFFD96A1F245FB7 Ref B: SEL221051504011 Ref C: 2023-09-18T08:00:44Z" ], - "Date": [ "Mon, 18 Sep 2023 08:00:44 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 1966AACF3D594999B48CF29D8C076B3A Ref B: SEL221051504047 Ref C: 2024-04-29T12:55:25Z" ], + "Date": [ "Mon, 29 Apr 2024 12:55:26 GMT" ] }, "ContentHeaders": { "Content-Length": [ "571" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenamed5orf8.servicebus.windows.net/;SharedAccessKeyName=auth-rulepjiaoe;SharedAccessKey=Sanitized;EntityPath=eventHub504uah\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenamed5orf8.servicebus.windows.net/;SharedAccessKeyName=auth-rulepjiaoe;SharedAccessKey=Sanitized;EntityPath=eventHub504uah\",\"primaryKey\":\"SanitizedPrimary3\",\"secondaryKey\":\"SanitizedSecondary3\",\"keyName\":\"auth-rulepjiaoe\"}", + "Content": "{\"primaryConnectionString\":\"Endpoint=sb://namespacenameeqpx5w.servicebus.windows.net/;SharedAccessKeyName=auth-rulevanqub;SharedAccessKey=5uD6fJh/Rpvx00S+ndDgAHbB9fN/5SZ/ujDEoCNqOGg=;EntityPath=eventHub789hmt\",\"secondaryConnectionString\":\"Endpoint=sb://namespacenameeqpx5w.servicebus.windows.net/;SharedAccessKeyName=auth-rulevanqub;SharedAccessKey=5uD6fJh/Rpvx00S+ndDgAHbB9fN/5SZ/ujDEoCNqOGg=;EntityPath=eventHub789hmt\",\"primaryKey\":\"5uD6fJh/Rpvx00S+ndDgAHbB9fN/5SZ/ujDEoCNqOGg=\",\"secondaryKey\":\"5uD6fJh/Rpvx00S+ndDgAHbB9fN/5SZ/ujDEoCNqOGg=\",\"keyName\":\"auth-rulevanqub\"}", "isContentBase64": false } } diff --git a/src/EventHub/EventHub.Autorest/test/New-AzEventHubNamespaceV2.Recording.json b/src/EventHub/EventHub.Autorest/test/New-AzEventHubNamespaceV2.Recording.json index 44cad9f23ed5..73ca165faba6 100644 --- a/src/EventHub/EventHub.Autorest/test/New-AzEventHubNamespaceV2.Recording.json +++ b/src/EventHub/EventHub.Autorest/test/New-AzEventHubNamespaceV2.Recording.json @@ -1,8 +1,8 @@ { - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV2b4cdh6?api-version=2023-01-01-preview+1": { + "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV2dmnw8c?api-version=2023-01-01-preview+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV2b4cdh6?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV2dmnw8c?api-version=2023-01-01-preview", "Content": "{\n \"location\": \"eastus\",\n \"sku\": {\n \"name\": \"Standard\",\n \"tier\": \"Standard\"\n }\n}", "isContentBase64": false, "Headers": { @@ -13,1577 +13,47 @@ } }, "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "b77bdc83-0bdd-4547-85ba-4439e47833b4_M0SN1_M0SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ "49" ], - "x-ms-correlation-request-id": [ "75759464-2e78-47fc-8819-f1e5a811a7ea" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T080125Z:75759464-2e78-47fc-8819-f1e5a811a7ea" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 31D7ADBC93B9418E80554F0F0BC52C9E Ref B: SEL221051504011 Ref C: 2023-09-18T08:01:13Z" ], - "Date": [ "Mon, 18 Sep 2023 08:01:25 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "784" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV2b4cdh6\",\"name\":\"namespaceV2b4cdh6\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Created\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev2b4cdh6\",\"createdAt\":\"2023-09-18T08:01:24.34Z\",\"updatedAt\":\"2023-09-18T08:01:24.34Z\",\"serviceBusEndpoint\":\"https://namespaceV2b4cdh6.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV2b4cdh6?api-version=2023-01-01-preview+2": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV2b4cdh6?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "119" ], - "x-ms-client-request-id": [ "d125b39e-b24d-4fd7-93f2-fe442c0e2dd8" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "c6db3846-bd67-4969-b3be-4280e331d83b_M3CH3_M3CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], - "x-ms-correlation-request-id": [ "4840b27a-79a8-42fe-a7a9-d8e5423298cb" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T080156Z:4840b27a-79a8-42fe-a7a9-d8e5423298cb" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: ED2C92DF788C47C1A8A15077F37B1A55 Ref B: SEL221051504011 Ref C: 2023-09-18T08:01:55Z" ], - "Date": [ "Mon, 18 Sep 2023 08:01:55 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "784" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV2b4cdh6\",\"name\":\"namespaceV2b4cdh6\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Created\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev2b4cdh6\",\"createdAt\":\"2023-09-18T08:01:24.34Z\",\"updatedAt\":\"2023-09-18T08:01:24.34Z\",\"serviceBusEndpoint\":\"https://namespaceV2b4cdh6.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV2b4cdh6?api-version=2023-01-01-preview+3": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV2b4cdh6?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "120" ], - "x-ms-client-request-id": [ "d125b39e-b24d-4fd7-93f2-fe442c0e2dd8" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "983608e8-2a33-479a-bf32-b7d897944346_M2CH3_M2CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], - "x-ms-correlation-request-id": [ "9243b533-13fc-4f2c-85d2-31cef21649d3" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T080227Z:9243b533-13fc-4f2c-85d2-31cef21649d3" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 1F2B0D45182643859E6D340C3B77D787 Ref B: SEL221051504011 Ref C: 2023-09-18T08:02:26Z" ], - "Date": [ "Mon, 18 Sep 2023 08:02:27 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "783" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV2b4cdh6\",\"name\":\"namespaceV2b4cdh6\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev2b4cdh6\",\"createdAt\":\"2023-09-18T08:01:24.34Z\",\"updatedAt\":\"2023-09-18T08:02:16.493Z\",\"serviceBusEndpoint\":\"https://namespaceV2b4cdh6.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV2b4cdh6?api-version=2023-01-01-preview+4": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV2b4cdh6?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "121" ], - "x-ms-client-request-id": [ "d125b39e-b24d-4fd7-93f2-fe442c0e2dd8" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "f65fa156-3572-4f97-8c04-08ba0dda8445_M10CH3_M10CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], - "x-ms-correlation-request-id": [ "4a4a1a06-a678-4728-aef4-23dcd6a7246d" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T080229Z:4a4a1a06-a678-4728-aef4-23dcd6a7246d" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 92AC204D544C44589C392AEBDA3A172E Ref B: SEL221051504011 Ref C: 2023-09-18T08:02:27Z" ], - "Date": [ "Mon, 18 Sep 2023 08:02:29 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "783" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV2b4cdh6\",\"name\":\"namespaceV2b4cdh6\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev2b4cdh6\",\"createdAt\":\"2023-09-18T08:01:24.34Z\",\"updatedAt\":\"2023-09-18T08:02:16.493Z\",\"serviceBusEndpoint\":\"https://namespaceV2b4cdh6.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview+5": { - "Request": { - "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview", - "Content": "{\n \"location\": \"southcentralus\",\n \"tags\": {\n \"k1\": \"v1\",\n \"k2\": \"v2\"\n },\n \"sku\": {\n \"name\": \"Standard\",\n \"tier\": \"Standard\",\n \"capacity\": 10\n },\n \"properties\": {\n \"minimumTlsVersion\": \"1.1\",\n \"isAutoInflateEnabled\": true,\n \"publicNetworkAccess\": \"Disabled\",\n \"maximumThroughputUnits\": 18,\n \"zoneRedundant\": true,\n \"disableLocalAuth\": true\n }\n}", - "isContentBase64": false, - "Headers": { - }, - "ContentHeaders": { - "Content-Type": [ "application/json" ], - "Content-Length": [ "383" ] - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "1a8c153f-a00a-4b06-a441-0d492bced5fc_M5CH3_M5CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ "49" ], - "x-ms-correlation-request-id": [ "e2652b9c-1edf-405e-af43-8a7dfa2ebac9" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T080237Z:e2652b9c-1edf-405e-af43-8a7dfa2ebac9" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: F7CCE7AC10FD4D81AEA7C1A698C35C90 Ref B: SEL221051504011 Ref C: 2023-09-18T08:02:30Z" ], - "Date": [ "Mon, 18 Sep 2023 08:02:36 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "812" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":10},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9\",\"name\":\"namespaceV3dp4io9\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":true,\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":18,\"kafkaEnabled\":true,\"provisioningState\":\"Created\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3dp4io9\",\"createdAt\":\"2023-09-18T08:02:35.31Z\",\"updatedAt\":\"2023-09-18T08:02:35.31Z\",\"serviceBusEndpoint\":\"https://namespaceV3dp4io9.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview+6": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "123" ], - "x-ms-client-request-id": [ "71d40fed-8553-404c-963d-23df2b35c52a" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "78a3694f-eaeb-4304-88ec-e44a1942e6d7_M10SN1_M10SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], - "x-ms-correlation-request-id": [ "891d7199-bcb6-4698-8f26-467b262656f9" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T080308Z:891d7199-bcb6-4698-8f26-467b262656f9" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 4D1C7938735C4AD5874F40001FCC1F2E Ref B: SEL221051504011 Ref C: 2023-09-18T08:03:07Z" ], - "Date": [ "Mon, 18 Sep 2023 08:03:07 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "812" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":10},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9\",\"name\":\"namespaceV3dp4io9\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":true,\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":18,\"kafkaEnabled\":true,\"provisioningState\":\"Created\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3dp4io9\",\"createdAt\":\"2023-09-18T08:02:35.31Z\",\"updatedAt\":\"2023-09-18T08:02:35.31Z\",\"serviceBusEndpoint\":\"https://namespaceV3dp4io9.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview+7": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "124" ], - "x-ms-client-request-id": [ "71d40fed-8553-404c-963d-23df2b35c52a" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "60e62a98-cd82-4167-a7ff-83771da16e1a_M1DM2_M1DM2" ], - "Server-SB": [ "Service-Bus-Resource-Provider/DM2" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], - "x-ms-correlation-request-id": [ "9ed678f2-bba4-4ab8-ae23-54fc89fd5b23" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T080338Z:9ed678f2-bba4-4ab8-ae23-54fc89fd5b23" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 0C5744CA6557403C98D0B685431749D1 Ref B: SEL221051504011 Ref C: 2023-09-18T08:03:38Z" ], - "Date": [ "Mon, 18 Sep 2023 08:03:38 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "810" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":10},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9\",\"name\":\"namespaceV3dp4io9\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":true,\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":18,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3dp4io9\",\"createdAt\":\"2023-09-18T08:02:35.31Z\",\"updatedAt\":\"2023-09-18T08:03:22.78Z\",\"serviceBusEndpoint\":\"https://namespaceV3dp4io9.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview+8": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "125" ], - "x-ms-client-request-id": [ "71d40fed-8553-404c-963d-23df2b35c52a" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "2b1de6ca-e357-448c-8e81-0ea5b2d10561_M1SN1_M1SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], - "x-ms-correlation-request-id": [ "64b0adf2-c8f8-4c98-ac14-3f67aded4c1c" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T080339Z:64b0adf2-c8f8-4c98-ac14-3f67aded4c1c" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 207D77EA7A95457FB41656020A0262B1 Ref B: SEL221051504011 Ref C: 2023-09-18T08:03:38Z" ], - "Date": [ "Mon, 18 Sep 2023 08:03:38 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "810" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":10},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9\",\"name\":\"namespaceV3dp4io9\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":true,\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":18,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3dp4io9\",\"createdAt\":\"2023-09-18T08:02:35.31Z\",\"updatedAt\":\"2023-09-18T08:03:22.78Z\",\"serviceBusEndpoint\":\"https://namespaceV3dp4io9.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV4wfj1rk?api-version=2023-01-01-preview+9": { - "Request": { - "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV4wfj1rk?api-version=2023-01-01-preview", - "Content": "{\n \"location\": \"eastus\",\n \"sku\": {\n \"name\": \"Premium\",\n \"tier\": \"Premium\"\n },\n \"identity\": {\n \"type\": \"SystemAssigned\"\n }\n}", - "isContentBase64": false, - "Headers": { - }, - "ContentHeaders": { - "Content-Type": [ "application/json" ], - "Content-Length": [ "137" ] - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "0952a6d8-257c-4eb0-b74a-088c68b09615_M1CH3_M1CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ "49" ], - "x-ms-correlation-request-id": [ "58c2fbc6-260f-44ef-ac6e-1de546dd4491" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T080348Z:58c2fbc6-260f-44ef-ac6e-1de546dd4491" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 0E1E2C3D23B6401195CEBC18FB021A04 Ref B: SEL221051504011 Ref C: 2023-09-18T08:03:39Z" ], - "Date": [ "Mon, 18 Sep 2023 08:03:47 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "932" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV4wfj1rk\",\"name\":\"namespaceV4wfj1rk\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"00fc2141-67ee-4a13-b2fa-a1fa8fe152a2\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4wfj1rk\",\"createdAt\":\"2023-09-18T08:03:46.82Z\",\"updatedAt\":\"2023-09-18T08:03:46.82Z\",\"serviceBusEndpoint\":\"https://namespaceV4wfj1rk.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV4wfj1rk?api-version=2023-01-01-preview+10": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV4wfj1rk?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "127" ], - "x-ms-client-request-id": [ "aa6f3a38-878e-427e-ab5f-65098a456643" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "f58db011-0df0-474c-8725-62bfca507984_M6CH3_M6CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-correlation-request-id": [ "69825345-be5b-4c3b-86e3-72b60c9ff578" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T080418Z:69825345-be5b-4c3b-86e3-72b60c9ff578" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: FCBD2178F7554F80A6E0F6A0D8E71BD1 Ref B: SEL221051504011 Ref C: 2023-09-18T08:04:18Z" ], - "Date": [ "Mon, 18 Sep 2023 08:04:17 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "932" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV4wfj1rk\",\"name\":\"namespaceV4wfj1rk\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"00fc2141-67ee-4a13-b2fa-a1fa8fe152a2\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4wfj1rk\",\"createdAt\":\"2023-09-18T08:03:46.82Z\",\"updatedAt\":\"2023-09-18T08:03:46.82Z\",\"serviceBusEndpoint\":\"https://namespaceV4wfj1rk.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV4wfj1rk?api-version=2023-01-01-preview+11": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV4wfj1rk?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "128" ], - "x-ms-client-request-id": [ "aa6f3a38-878e-427e-ab5f-65098a456643" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "53b6d428-237d-4352-8be0-fcaa81767fe4_M2CH3_M2CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], - "x-ms-correlation-request-id": [ "4b05522e-f6a8-4dfd-879e-4a949ab4b88c" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T080449Z:4b05522e-f6a8-4dfd-879e-4a949ab4b88c" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 2A78372861894B8E939B73029EE8D1DF Ref B: SEL221051504011 Ref C: 2023-09-18T08:04:48Z" ], - "Date": [ "Mon, 18 Sep 2023 08:04:48 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "932" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV4wfj1rk\",\"name\":\"namespaceV4wfj1rk\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"00fc2141-67ee-4a13-b2fa-a1fa8fe152a2\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4wfj1rk\",\"createdAt\":\"2023-09-18T08:03:46.82Z\",\"updatedAt\":\"2023-09-18T08:03:46.82Z\",\"serviceBusEndpoint\":\"https://namespaceV4wfj1rk.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV4wfj1rk?api-version=2023-01-01-preview+12": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV4wfj1rk?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "129" ], - "x-ms-client-request-id": [ "aa6f3a38-878e-427e-ab5f-65098a456643" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "2f88e2dc-4cde-4431-8ea6-22fe48136146_M2CH3_M2CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], - "x-ms-correlation-request-id": [ "1769385d-45ea-4fe4-b8ba-2dabedbaf97f" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T080520Z:1769385d-45ea-4fe4-b8ba-2dabedbaf97f" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 0F57F526849644D6955EF1C4F585E6C9 Ref B: SEL221051504011 Ref C: 2023-09-18T08:05:19Z" ], - "Date": [ "Mon, 18 Sep 2023 08:05:20 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "932" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV4wfj1rk\",\"name\":\"namespaceV4wfj1rk\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"00fc2141-67ee-4a13-b2fa-a1fa8fe152a2\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4wfj1rk\",\"createdAt\":\"2023-09-18T08:03:46.82Z\",\"updatedAt\":\"2023-09-18T08:03:46.82Z\",\"serviceBusEndpoint\":\"https://namespaceV4wfj1rk.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV4wfj1rk?api-version=2023-01-01-preview+13": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV4wfj1rk?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "130" ], - "x-ms-client-request-id": [ "aa6f3a38-878e-427e-ab5f-65098a456643" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "cbb9e972-4417-4111-81ce-86726445db8c_M1CH3_M1CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], - "x-ms-correlation-request-id": [ "f9557b4d-1ea3-406c-acfa-e12a03213e47" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T080551Z:f9557b4d-1ea3-406c-acfa-e12a03213e47" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: A5191B388B2A4B2DBCF6F08644758FDB Ref B: SEL221051504011 Ref C: 2023-09-18T08:05:50Z" ], - "Date": [ "Mon, 18 Sep 2023 08:05:50 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "929" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV4wfj1rk\",\"name\":\"namespaceV4wfj1rk\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"00fc2141-67ee-4a13-b2fa-a1fa8fe152a2\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4wfj1rk\",\"createdAt\":\"2023-09-18T08:03:46.82Z\",\"updatedAt\":\"2023-09-18T08:05:28.663Z\",\"serviceBusEndpoint\":\"https://namespaceV4wfj1rk.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV4wfj1rk?api-version=2023-01-01-preview+14": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV4wfj1rk?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "131" ], - "x-ms-client-request-id": [ "aa6f3a38-878e-427e-ab5f-65098a456643" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "de2c5a8f-35f9-46b0-b44d-2da2c2b6f629_M2CH3_M2CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], - "x-ms-correlation-request-id": [ "bff8c62c-18ed-46ea-ac6c-fe6a8ce4f793" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T080622Z:bff8c62c-18ed-46ea-ac6c-fe6a8ce4f793" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 124848A50CD44DB18ACC2675A87AB5CA Ref B: SEL221051504011 Ref C: 2023-09-18T08:06:21Z" ], - "Date": [ "Mon, 18 Sep 2023 08:06:21 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "929" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV4wfj1rk\",\"name\":\"namespaceV4wfj1rk\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"00fc2141-67ee-4a13-b2fa-a1fa8fe152a2\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4wfj1rk\",\"createdAt\":\"2023-09-18T08:03:46.82Z\",\"updatedAt\":\"2023-09-18T08:05:28.663Z\",\"serviceBusEndpoint\":\"https://namespaceV4wfj1rk.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV4wfj1rk?api-version=2023-01-01-preview+15": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV4wfj1rk?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "132" ], - "x-ms-client-request-id": [ "aa6f3a38-878e-427e-ab5f-65098a456643" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "0fb0b566-ef3e-4cc5-822a-b45bb7c89220_M4CH3_M4CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], - "x-ms-correlation-request-id": [ "e2716be2-516b-424d-8c8d-b26204090da0" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T080653Z:e2716be2-516b-424d-8c8d-b26204090da0" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 39584D7DC5FF46E18B58AB99C4377872 Ref B: SEL221051504011 Ref C: 2023-09-18T08:06:52Z" ], - "Date": [ "Mon, 18 Sep 2023 08:06:52 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "929" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV4wfj1rk\",\"name\":\"namespaceV4wfj1rk\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"00fc2141-67ee-4a13-b2fa-a1fa8fe152a2\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4wfj1rk\",\"createdAt\":\"2023-09-18T08:03:46.82Z\",\"updatedAt\":\"2023-09-18T08:05:28.663Z\",\"serviceBusEndpoint\":\"https://namespaceV4wfj1rk.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV4wfj1rk?api-version=2023-01-01-preview+16": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV4wfj1rk?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "133" ], - "x-ms-client-request-id": [ "aa6f3a38-878e-427e-ab5f-65098a456643" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "c98d8d60-f6cf-4387-b82b-5183ed80b1a8_M3CH3_M3CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11991" ], - "x-ms-correlation-request-id": [ "344cc13d-ec48-404d-87a3-da4abc192eaa" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T080723Z:344cc13d-ec48-404d-87a3-da4abc192eaa" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: BFEBF304E93A4125A84ACCBE7E0856C7 Ref B: SEL221051504011 Ref C: 2023-09-18T08:07:23Z" ], - "Date": [ "Mon, 18 Sep 2023 08:07:22 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "929" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV4wfj1rk\",\"name\":\"namespaceV4wfj1rk\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"00fc2141-67ee-4a13-b2fa-a1fa8fe152a2\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4wfj1rk\",\"createdAt\":\"2023-09-18T08:03:46.82Z\",\"updatedAt\":\"2023-09-18T08:05:28.663Z\",\"serviceBusEndpoint\":\"https://namespaceV4wfj1rk.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV4wfj1rk?api-version=2023-01-01-preview+17": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV4wfj1rk?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "134" ], - "x-ms-client-request-id": [ "aa6f3a38-878e-427e-ab5f-65098a456643" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "cfb38366-2b9a-4bff-b90e-784779eee625_M5CH3_M5CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], - "x-ms-correlation-request-id": [ "b81697f7-ef7e-4829-a963-6e494df6ac46" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T080754Z:b81697f7-ef7e-4829-a963-6e494df6ac46" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 74D0A1BD7C614821A61AACC7FCC6105D Ref B: SEL221051504011 Ref C: 2023-09-18T08:07:53Z" ], - "Date": [ "Mon, 18 Sep 2023 08:07:53 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "929" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV4wfj1rk\",\"name\":\"namespaceV4wfj1rk\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"00fc2141-67ee-4a13-b2fa-a1fa8fe152a2\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4wfj1rk\",\"createdAt\":\"2023-09-18T08:03:46.82Z\",\"updatedAt\":\"2023-09-18T08:05:28.663Z\",\"serviceBusEndpoint\":\"https://namespaceV4wfj1rk.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV4wfj1rk?api-version=2023-01-01-preview+18": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV4wfj1rk?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "135" ], - "x-ms-client-request-id": [ "aa6f3a38-878e-427e-ab5f-65098a456643" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "6f4e4d14-be8a-4885-94fa-d6eefa881c47_M8CH3_M8CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], - "x-ms-correlation-request-id": [ "80a0f8cc-1d42-41a3-b7df-db2da1113c27" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T080824Z:80a0f8cc-1d42-41a3-b7df-db2da1113c27" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 4F8EF35F09A047AD8BE629C8880CC3D3 Ref B: SEL221051504011 Ref C: 2023-09-18T08:08:24Z" ], - "Date": [ "Mon, 18 Sep 2023 08:08:24 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "929" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV4wfj1rk\",\"name\":\"namespaceV4wfj1rk\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"00fc2141-67ee-4a13-b2fa-a1fa8fe152a2\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4wfj1rk\",\"createdAt\":\"2023-09-18T08:03:46.82Z\",\"updatedAt\":\"2023-09-18T08:05:28.663Z\",\"serviceBusEndpoint\":\"https://namespaceV4wfj1rk.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV4wfj1rk?api-version=2023-01-01-preview+19": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV4wfj1rk?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "136" ], - "x-ms-client-request-id": [ "aa6f3a38-878e-427e-ab5f-65098a456643" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "fc53bca6-b898-4122-b606-47007f76f310_M5SN1_M5SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], - "x-ms-correlation-request-id": [ "2dd75bcc-e28c-4c05-a4e7-733df291e49f" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T080855Z:2dd75bcc-e28c-4c05-a4e7-733df291e49f" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: E592207982234CB8BCA4E04BFE04C7F0 Ref B: SEL221051504011 Ref C: 2023-09-18T08:08:55Z" ], - "Date": [ "Mon, 18 Sep 2023 08:08:55 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "929" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV4wfj1rk\",\"name\":\"namespaceV4wfj1rk\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"00fc2141-67ee-4a13-b2fa-a1fa8fe152a2\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4wfj1rk\",\"createdAt\":\"2023-09-18T08:03:46.82Z\",\"updatedAt\":\"2023-09-18T08:05:28.663Z\",\"serviceBusEndpoint\":\"https://namespaceV4wfj1rk.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV4wfj1rk?api-version=2023-01-01-preview+20": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV4wfj1rk?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "137" ], - "x-ms-client-request-id": [ "aa6f3a38-878e-427e-ab5f-65098a456643" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "425158b2-3092-4384-a2c6-028cc9315ff0_M4SN1_M4SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], - "x-ms-correlation-request-id": [ "3e64c702-ccdd-447b-8a5d-13e77c4976f0" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T080927Z:3e64c702-ccdd-447b-8a5d-13e77c4976f0" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 71AB04C8C47845998D6C6FA606A29FB7 Ref B: SEL221051504011 Ref C: 2023-09-18T08:09:25Z" ], - "Date": [ "Mon, 18 Sep 2023 08:09:26 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "929" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV4wfj1rk\",\"name\":\"namespaceV4wfj1rk\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"00fc2141-67ee-4a13-b2fa-a1fa8fe152a2\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4wfj1rk\",\"createdAt\":\"2023-09-18T08:03:46.82Z\",\"updatedAt\":\"2023-09-18T08:05:28.663Z\",\"serviceBusEndpoint\":\"https://namespaceV4wfj1rk.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV4wfj1rk?api-version=2023-01-01-preview+21": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV4wfj1rk?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "138" ], - "x-ms-client-request-id": [ "aa6f3a38-878e-427e-ab5f-65098a456643" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "17a15f3e-6ee7-4737-97df-ca57f671cd82_M4CH3_M4CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-correlation-request-id": [ "43b1d5ea-ddf0-4c81-993d-3a5e3b868024" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T080957Z:43b1d5ea-ddf0-4c81-993d-3a5e3b868024" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 0E8E0F24CD5B4B3392BDED7F3651898C Ref B: SEL221051504011 Ref C: 2023-09-18T08:09:57Z" ], - "Date": [ "Mon, 18 Sep 2023 08:09:57 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "929" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV4wfj1rk\",\"name\":\"namespaceV4wfj1rk\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"00fc2141-67ee-4a13-b2fa-a1fa8fe152a2\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4wfj1rk\",\"createdAt\":\"2023-09-18T08:03:46.82Z\",\"updatedAt\":\"2023-09-18T08:05:28.663Z\",\"serviceBusEndpoint\":\"https://namespaceV4wfj1rk.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV4wfj1rk?api-version=2023-01-01-preview+22": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV4wfj1rk?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "139" ], - "x-ms-client-request-id": [ "aa6f3a38-878e-427e-ab5f-65098a456643" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "ca8c0e74-7aa4-4be1-8425-87053cccfc5f_M5SN1_M5SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], - "x-ms-correlation-request-id": [ "f566aa45-f160-4e17-ac7e-49d973f85f9e" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T081028Z:f566aa45-f160-4e17-ac7e-49d973f85f9e" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: BFDF0E11110E4BA888A0D18CA5DF9BBD Ref B: SEL221051504011 Ref C: 2023-09-18T08:10:27Z" ], - "Date": [ "Mon, 18 Sep 2023 08:10:27 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "929" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV4wfj1rk\",\"name\":\"namespaceV4wfj1rk\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"00fc2141-67ee-4a13-b2fa-a1fa8fe152a2\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4wfj1rk\",\"createdAt\":\"2023-09-18T08:03:46.82Z\",\"updatedAt\":\"2023-09-18T08:05:28.663Z\",\"serviceBusEndpoint\":\"https://namespaceV4wfj1rk.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV4wfj1rk?api-version=2023-01-01-preview+23": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV4wfj1rk?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "140" ], - "x-ms-client-request-id": [ "aa6f3a38-878e-427e-ab5f-65098a456643" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "fb629a4b-3d9f-4762-a024-ea63cc2db541_M10CH3_M10CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-correlation-request-id": [ "fb62ffde-4a81-42d9-adc3-da2872665fae" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T081058Z:fb62ffde-4a81-42d9-adc3-da2872665fae" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 7C8943D6B98240EB98339323C2D6E011 Ref B: SEL221051504011 Ref C: 2023-09-18T08:10:58Z" ], - "Date": [ "Mon, 18 Sep 2023 08:10:58 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "929" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV4wfj1rk\",\"name\":\"namespaceV4wfj1rk\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"00fc2141-67ee-4a13-b2fa-a1fa8fe152a2\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4wfj1rk\",\"createdAt\":\"2023-09-18T08:03:46.82Z\",\"updatedAt\":\"2023-09-18T08:05:28.663Z\",\"serviceBusEndpoint\":\"https://namespaceV4wfj1rk.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV4wfj1rk?api-version=2023-01-01-preview+24": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV4wfj1rk?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "141" ], - "x-ms-client-request-id": [ "aa6f3a38-878e-427e-ab5f-65098a456643" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "e20bcba5-2ef0-4e92-9648-5389efa5a12c_M11CH3_M11CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], - "x-ms-correlation-request-id": [ "cae5dacd-ee28-4f8c-b748-f849a6e97c93" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T081130Z:cae5dacd-ee28-4f8c-b748-f849a6e97c93" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 07C310B941E44F758B4238952A560DEC Ref B: SEL221051504011 Ref C: 2023-09-18T08:11:28Z" ], - "Date": [ "Mon, 18 Sep 2023 08:11:29 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "919" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV4wfj1rk\",\"name\":\"namespaceV4wfj1rk\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"00fc2141-67ee-4a13-b2fa-a1fa8fe152a2\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4wfj1rk\",\"createdAt\":\"2023-09-18T08:03:46.82Z\",\"updatedAt\":\"2023-09-18T08:11:00.91Z\",\"serviceBusEndpoint\":\"https://namespaceV4wfj1rk.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV4wfj1rk?api-version=2023-01-01-preview+25": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV4wfj1rk?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "142" ], - "x-ms-client-request-id": [ "aa6f3a38-878e-427e-ab5f-65098a456643" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "f3d4adf8-f7bd-4895-b86c-b56bd6982832_M0SN1_M0SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-correlation-request-id": [ "1d63d43f-053a-46d0-9aaf-7ef9641e5df5" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T081131Z:1d63d43f-053a-46d0-9aaf-7ef9641e5df5" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: FB2F3BD0723B41428B9CB2C306214910 Ref B: SEL221051504011 Ref C: 2023-09-18T08:11:30Z" ], - "Date": [ "Mon, 18 Sep 2023 08:11:31 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "919" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV4wfj1rk\",\"name\":\"namespaceV4wfj1rk\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"00fc2141-67ee-4a13-b2fa-a1fa8fe152a2\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4wfj1rk\",\"createdAt\":\"2023-09-18T08:03:46.82Z\",\"updatedAt\":\"2023-09-18T08:11:00.91Z\",\"serviceBusEndpoint\":\"https://namespaceV4wfj1rk.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt?api-version=2023-01-01-preview+26": { - "Request": { - "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt?api-version=2023-01-01-preview", - "Content": "{\n \"location\": \"northeurope\",\n \"sku\": {\n \"name\": \"Premium\",\n \"tier\": \"Premium\"\n },\n \"identity\": {\n \"type\": \"UserAssigned\",\n \"userAssignedIdentities\": {\n \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\": {\n },\n \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\": {\n }\n }\n },\n \"properties\": {\n \"encryption\": {\n \"keyVaultProperties\": [\n {\n \"identity\": {\n \"userAssignedIdentity\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"\n },\n \"keyName\": \"key1\",\n \"keyVaultUri\": \"https://keyVaultNameoqye7t.vault.azure.net/\"\n },\n {\n \"identity\": {\n \"userAssignedIdentity\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"\n },\n \"keyName\": \"key2\",\n \"keyVaultUri\": \"https://keyVaultNameoqye7t.vault.azure.net/\"\n }\n ],\n \"keySource\": \"Microsoft.KeyVault\"\n }\n }\n}", - "isContentBase64": false, - "Headers": { - }, - "ContentHeaders": { - "Content-Type": [ "application/json" ], - "Content-Length": [ "1349" ] - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "81b34bd9-8003-4907-a02e-203ae2bccd35_M9SN1_M9SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ "48" ], - "x-ms-correlation-request-id": [ "51195d2c-439d-412d-8332-02ae4533d885" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T081142Z:51195d2c-439d-412d-8332-02ae4533d885" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: FD2F829DB72D4C50AC666063DE688EB3 Ref B: SEL221051504011 Ref C: 2023-09-18T08:11:32Z" ], - "Date": [ "Mon, 18 Sep 2023 08:11:41 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1856" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt\",\"name\":\"namespaceV5nrf8kt\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":false},\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5nrf8kt\",\"createdAt\":\"2023-09-18T08:11:40.49Z\",\"updatedAt\":\"2023-09-18T08:11:40.49Z\",\"serviceBusEndpoint\":\"https://namespaceV5nrf8kt.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt?api-version=2023-01-01-preview+27": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "144" ], - "x-ms-client-request-id": [ "97e4bcab-0cc0-447c-9446-1e827e5e262e" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "d62d08b1-6356-4265-8931-8d44ab9f7545_M4SN1_M4SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], - "x-ms-correlation-request-id": [ "d79941cb-f32f-49ea-944e-8a453e92ac34" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T081212Z:d79941cb-f32f-49ea-944e-8a453e92ac34" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: D1EB986B3A8D4448AEA5919A8AA83EC3 Ref B: SEL221051504011 Ref C: 2023-09-18T08:12:12Z" ], - "Date": [ "Mon, 18 Sep 2023 08:12:12 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1856" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt\",\"name\":\"namespaceV5nrf8kt\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":false},\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5nrf8kt\",\"createdAt\":\"2023-09-18T08:11:40.49Z\",\"updatedAt\":\"2023-09-18T08:11:40.49Z\",\"serviceBusEndpoint\":\"https://namespaceV5nrf8kt.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt?api-version=2023-01-01-preview+28": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "145" ], - "x-ms-client-request-id": [ "97e4bcab-0cc0-447c-9446-1e827e5e262e" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "189951a0-4405-468f-90ce-8b7ff8677f50_M11CH3_M11CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], - "x-ms-correlation-request-id": [ "ff0e369c-e8a8-4b3e-831b-5665b2da0274" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T081244Z:ff0e369c-e8a8-4b3e-831b-5665b2da0274" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 542ECE4AC4FA4952BF0F3C998412EA2D Ref B: SEL221051504011 Ref C: 2023-09-18T08:12:42Z" ], - "Date": [ "Mon, 18 Sep 2023 08:12:44 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1856" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt\",\"name\":\"namespaceV5nrf8kt\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":false},\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5nrf8kt\",\"createdAt\":\"2023-09-18T08:11:40.49Z\",\"updatedAt\":\"2023-09-18T08:11:40.49Z\",\"serviceBusEndpoint\":\"https://namespaceV5nrf8kt.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt?api-version=2023-01-01-preview+29": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "146" ], - "x-ms-client-request-id": [ "97e4bcab-0cc0-447c-9446-1e827e5e262e" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "420782d4-a190-47ba-8b71-02900d0198af_M2CH3_M2CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], - "x-ms-correlation-request-id": [ "a2843697-3071-49e5-b532-55986c64b142" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T081315Z:a2843697-3071-49e5-b532-55986c64b142" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: EBC7A6334E0346AC8ECCDE46F2B2D129 Ref B: SEL221051504011 Ref C: 2023-09-18T08:13:14Z" ], - "Date": [ "Mon, 18 Sep 2023 08:13:15 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1856" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt\",\"name\":\"namespaceV5nrf8kt\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":false},\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5nrf8kt\",\"createdAt\":\"2023-09-18T08:11:40.49Z\",\"updatedAt\":\"2023-09-18T08:11:40.49Z\",\"serviceBusEndpoint\":\"https://namespaceV5nrf8kt.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt?api-version=2023-01-01-preview+30": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "147" ], - "x-ms-client-request-id": [ "97e4bcab-0cc0-447c-9446-1e827e5e262e" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "7a22d874-a594-4c9c-95ec-a44487c83676_M0SN1_M0SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-correlation-request-id": [ "67ba2bd4-fe0b-4850-8fcc-0daa4a34bebe" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T081347Z:67ba2bd4-fe0b-4850-8fcc-0daa4a34bebe" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: A9D772250E76452A9D98064A4C997A4F Ref B: SEL221051504011 Ref C: 2023-09-18T08:13:45Z" ], - "Date": [ "Mon, 18 Sep 2023 08:13:46 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1856" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt\",\"name\":\"namespaceV5nrf8kt\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":false},\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5nrf8kt\",\"createdAt\":\"2023-09-18T08:11:40.49Z\",\"updatedAt\":\"2023-09-18T08:11:40.49Z\",\"serviceBusEndpoint\":\"https://namespaceV5nrf8kt.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt?api-version=2023-01-01-preview+31": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "148" ], - "x-ms-client-request-id": [ "97e4bcab-0cc0-447c-9446-1e827e5e262e" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "5edd9673-5e07-40fa-bc1c-82803b35e5ed_M2CH3_M2CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], - "x-ms-correlation-request-id": [ "63491ed6-9c08-4208-8e15-4bf8d9615d09" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T081418Z:63491ed6-9c08-4208-8e15-4bf8d9615d09" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: E7ABC8A7571841B4862A8E5EFF12BFA4 Ref B: SEL221051504011 Ref C: 2023-09-18T08:14:17Z" ], - "Date": [ "Mon, 18 Sep 2023 08:14:18 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1856" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt\",\"name\":\"namespaceV5nrf8kt\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":false},\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5nrf8kt\",\"createdAt\":\"2023-09-18T08:11:40.49Z\",\"updatedAt\":\"2023-09-18T08:11:40.49Z\",\"serviceBusEndpoint\":\"https://namespaceV5nrf8kt.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt?api-version=2023-01-01-preview+32": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "149" ], - "x-ms-client-request-id": [ "97e4bcab-0cc0-447c-9446-1e827e5e262e" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "71dea366-3750-468b-b8df-1602264d1fbe_M11SN1_M11SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-correlation-request-id": [ "9c564cd9-2b14-4d76-9aba-7a170537a1b1" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T081450Z:9c564cd9-2b14-4d76-9aba-7a170537a1b1" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 151114DA50DD47539857DDD527AAAA54 Ref B: SEL221051504011 Ref C: 2023-09-18T08:14:48Z" ], - "Date": [ "Mon, 18 Sep 2023 08:14:49 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1856" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt\",\"name\":\"namespaceV5nrf8kt\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":false},\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5nrf8kt\",\"createdAt\":\"2023-09-18T08:11:40.49Z\",\"updatedAt\":\"2023-09-18T08:11:40.49Z\",\"serviceBusEndpoint\":\"https://namespaceV5nrf8kt.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt?api-version=2023-01-01-preview+33": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "150" ], - "x-ms-client-request-id": [ "97e4bcab-0cc0-447c-9446-1e827e5e262e" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "c7044c07-c21b-48ac-9e26-048859ce2927_M2SN1_M2SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], - "x-ms-correlation-request-id": [ "becf26df-9ba9-4064-963b-214a37ef29c3" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T081520Z:becf26df-9ba9-4064-963b-214a37ef29c3" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 3142E59A0CFF47FB921BCF18433B3522 Ref B: SEL221051504011 Ref C: 2023-09-18T08:15:20Z" ], - "Date": [ "Mon, 18 Sep 2023 08:15:20 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1856" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt\",\"name\":\"namespaceV5nrf8kt\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":false},\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5nrf8kt\",\"createdAt\":\"2023-09-18T08:11:40.49Z\",\"updatedAt\":\"2023-09-18T08:11:40.49Z\",\"serviceBusEndpoint\":\"https://namespaceV5nrf8kt.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt?api-version=2023-01-01-preview+34": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "151" ], - "x-ms-client-request-id": [ "97e4bcab-0cc0-447c-9446-1e827e5e262e" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "8d932dec-1258-4867-9f60-8bb167c501df_M8SN1_M8SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], - "x-ms-correlation-request-id": [ "2ca6dfb0-b072-4c9e-aaa6-cfd48685d021" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T081551Z:2ca6dfb0-b072-4c9e-aaa6-cfd48685d021" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: B8F8468842DF444D8D0D7966E38120E5 Ref B: SEL221051504011 Ref C: 2023-09-18T08:15:51Z" ], - "Date": [ "Mon, 18 Sep 2023 08:15:51 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1853" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt\",\"name\":\"namespaceV5nrf8kt\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":false},\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5nrf8kt\",\"createdAt\":\"2023-09-18T08:11:40.49Z\",\"updatedAt\":\"2023-09-18T08:15:44.317Z\",\"serviceBusEndpoint\":\"https://namespaceV5nrf8kt.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt?api-version=2023-01-01-preview+35": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "152" ], - "x-ms-client-request-id": [ "97e4bcab-0cc0-447c-9446-1e827e5e262e" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "17554c01-cc37-4938-8098-fb9ff4b6bd48_M11CH3_M11CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-correlation-request-id": [ "d6864a0e-8f03-45e5-a1bc-533b89319a9f" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T081623Z:d6864a0e-8f03-45e5-a1bc-533b89319a9f" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 5465135339B34E7E9672D2E6C23CDCF4 Ref B: SEL221051504011 Ref C: 2023-09-18T08:16:21Z" ], - "Date": [ "Mon, 18 Sep 2023 08:16:23 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1853" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt\",\"name\":\"namespaceV5nrf8kt\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":false},\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5nrf8kt\",\"createdAt\":\"2023-09-18T08:11:40.49Z\",\"updatedAt\":\"2023-09-18T08:15:44.317Z\",\"serviceBusEndpoint\":\"https://namespaceV5nrf8kt.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt?api-version=2023-01-01-preview+36": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "153" ], - "x-ms-client-request-id": [ "97e4bcab-0cc0-447c-9446-1e827e5e262e" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "7d06fc12-c878-4b49-8253-9b80bef96664_M11CH3_M11CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], - "x-ms-correlation-request-id": [ "a4a00e0a-8892-49c1-a863-c626064f1b6b" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T081655Z:a4a00e0a-8892-49c1-a863-c626064f1b6b" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: E395CE498412404D86CFF8C3584A65DC Ref B: SEL221051504011 Ref C: 2023-09-18T08:16:53Z" ], - "Date": [ "Mon, 18 Sep 2023 08:16:54 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1853" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt\",\"name\":\"namespaceV5nrf8kt\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":false},\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5nrf8kt\",\"createdAt\":\"2023-09-18T08:11:40.49Z\",\"updatedAt\":\"2023-09-18T08:15:44.317Z\",\"serviceBusEndpoint\":\"https://namespaceV5nrf8kt.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt?api-version=2023-01-01-preview+37": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "154" ], - "x-ms-client-request-id": [ "97e4bcab-0cc0-447c-9446-1e827e5e262e" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, + "StatusCode": 201, "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "6b5e0314-dad2-41f8-8349-037027759915_M9CH3_M9CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11991" ], - "x-ms-correlation-request-id": [ "ada1450b-c20c-44c7-a45e-94d9c137d7bc" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T081726Z:ada1450b-c20c-44c7-a45e-94d9c137d7bc" ], + "x-ms-correlation-request-id": [ "d9784204-01cf-4049-8776-58789392fe56" ], + "x-ms-client-request-id": [ "0e8b68cf-eb1a-46fb-b016-91921ac245c0_RP" ], + "x-ms-messaging-activity-id": [ "d6517e01-ad48-4731-a203-b05d35c0054f" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G7|2024-04-29T12:56:09" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "49" ], + "x-ms-request-id": [ "d9784204-01cf-4049-8776-58789392fe56" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T125609Z:d9784204-01cf-4049-8776-58789392fe56" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 201B3FAACE654C1DA973E440A48AE6AE Ref B: SEL221051504011 Ref C: 2023-09-18T08:17:25Z" ], - "Date": [ "Mon, 18 Sep 2023 08:17:25 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 6831C20801C24FC68C45F9C038FC0204 Ref B: SEL221051504047 Ref C: 2024-04-29T12:56:05Z" ], + "Date": [ "Mon, 29 Apr 2024 12:56:09 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1853" ], + "Content-Length": [ "792" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt\",\"name\":\"namespaceV5nrf8kt\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":false},\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5nrf8kt\",\"createdAt\":\"2023-09-18T08:11:40.49Z\",\"updatedAt\":\"2023-09-18T08:15:44.317Z\",\"serviceBusEndpoint\":\"https://namespaceV5nrf8kt.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV2dmnw8c\",\"name\":\"namespaceV2dmnw8c\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev2dmnw8c\",\"serviceBusEndpoint\":\"https://namespaceV2dmnw8c.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Creating\",\"status\":\"Creating\",\"createdAt\":\"2024-04-29T12:56:09.3854671Z\",\"updatedAt\":\"2024-04-29T12:56:09.3854671Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}}", "isContentBase64": false } }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt?api-version=2023-01-01-preview+38": { + "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV2dmnw8c?api-version=2023-01-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV2dmnw8c?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "155" ], - "x-ms-client-request-id": [ "97e4bcab-0cc0-447c-9446-1e827e5e262e" ], + "x-ms-unique-id": [ "114" ], + "x-ms-client-request-id": [ "0e8b68cf-eb1a-46fb-b016-91921ac245c0" ], "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ] }, "ContentHeaders": { } @@ -1593,40 +63,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "8fd12a68-35a8-4526-90e4-7bec04afeb5c_M0CH3_M0CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-correlation-request-id": [ "1b4cc708-f431-41df-8274-aadeb51eb1cf" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T081758Z:1b4cc708-f431-41df-8274-aadeb51eb1cf" ], + "x-ms-correlation-request-id": [ "6681adc3-4482-407e-8e77-0ece25d231eb" ], + "x-ms-client-request-id": [ "0e8b68cf-eb1a-46fb-b016-91921ac245c0_RP" ], + "x-ms-messaging-activity-id": [ "1e8bc4e8-f289-4269-9411-d86aa340f2eb" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G12|2024-04-29T12:56:41" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "6681adc3-4482-407e-8e77-0ece25d231eb" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T125641Z:6681adc3-4482-407e-8e77-0ece25d231eb" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 5ACBF20491ED412584325F79DE6AAE7A Ref B: SEL221051504011 Ref C: 2023-09-18T08:17:56Z" ], - "Date": [ "Mon, 18 Sep 2023 08:17:57 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 206D3B651CEA4470A7D0A1BDEB54F998 Ref B: SEL221051504047 Ref C: 2024-04-29T12:56:39Z" ], + "Date": [ "Mon, 29 Apr 2024 12:56:41 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1853" ], + "Content-Length": [ "823" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt\",\"name\":\"namespaceV5nrf8kt\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":false},\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5nrf8kt\",\"createdAt\":\"2023-09-18T08:11:40.49Z\",\"updatedAt\":\"2023-09-18T08:15:44.317Z\",\"serviceBusEndpoint\":\"https://namespaceV5nrf8kt.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV2dmnw8c\",\"name\":\"namespaceV2dmnw8c\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"privateEndpointConnections\":[],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev2dmnw8c\",\"serviceBusEndpoint\":\"https://namespaceV2dmnw8c.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:56:09.3854671Z\",\"updatedAt\":\"2024-04-29T12:56:36.7520883Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}}", "isContentBase64": false } }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt?api-version=2023-01-01-preview+39": { + "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV2dmnw8c?api-version=2023-01-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV2dmnw8c?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "156" ], - "x-ms-client-request-id": [ "97e4bcab-0cc0-447c-9446-1e827e5e262e" ], + "x-ms-unique-id": [ "115" ], + "x-ms-client-request-id": [ "0e8b68cf-eb1a-46fb-b016-91921ac245c0" ], "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ] }, "ContentHeaders": { } @@ -1636,83 +109,84 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "db932960-f075-4a50-b12f-fcdab35da2b5_M5CH3_M5CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], - "x-ms-correlation-request-id": [ "d15c68e5-b7ba-4df4-bfd2-a52037de8e4e" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T081829Z:d15c68e5-b7ba-4df4-bfd2-a52037de8e4e" ], + "x-ms-correlation-request-id": [ "e5474ef5-2b26-46d6-a52c-ce1860781827" ], + "x-ms-client-request-id": [ "0e8b68cf-eb1a-46fb-b016-91921ac245c0_RP" ], + "x-ms-messaging-activity-id": [ "5deb2ed6-abe1-41c1-a983-863a880114c2" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G10|2024-04-29T12:56:42" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "e5474ef5-2b26-46d6-a52c-ce1860781827" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240429T125642Z:e5474ef5-2b26-46d6-a52c-ce1860781827" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: EC60A4DD81BD428D806122DDFD8018EC Ref B: SEL221051504011 Ref C: 2023-09-18T08:18:28Z" ], - "Date": [ "Mon, 18 Sep 2023 08:18:28 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 40ECA50A2A7245BDA7080D939AE77110 Ref B: SEL221051504047 Ref C: 2024-04-29T12:56:41Z" ], + "Date": [ "Mon, 29 Apr 2024 12:56:42 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1853" ], + "Content-Length": [ "823" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt\",\"name\":\"namespaceV5nrf8kt\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":false},\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5nrf8kt\",\"createdAt\":\"2023-09-18T08:11:40.49Z\",\"updatedAt\":\"2023-09-18T08:15:44.317Z\",\"serviceBusEndpoint\":\"https://namespaceV5nrf8kt.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV2dmnw8c\",\"name\":\"namespaceV2dmnw8c\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"privateEndpointConnections\":[],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev2dmnw8c\",\"serviceBusEndpoint\":\"https://namespaceV2dmnw8c.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:56:09.3854671Z\",\"updatedAt\":\"2024-04-29T12:56:36.7520883Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}}", "isContentBase64": false } }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt?api-version=2023-01-01-preview+40": { + "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview+4": { "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt?api-version=2023-01-01-preview", - "Content": null, + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview", + "Content": "{\n \"location\": \"eastus\",\n \"tags\": {\n \"k2\": \"v2\",\n \"k1\": \"v1\"\n },\n \"sku\": {\n \"name\": \"Standard\",\n \"tier\": \"Standard\",\n \"capacity\": 10\n },\n \"properties\": {\n \"minimumTlsVersion\": \"1.1\",\n \"isAutoInflateEnabled\": true,\n \"publicNetworkAccess\": \"Disabled\",\n \"maximumThroughputUnits\": 18,\n \"zoneRedundant\": true,\n \"disableLocalAuth\": true\n }\n}", "isContentBase64": false, "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "157" ], - "x-ms-client-request-id": [ "97e4bcab-0cc0-447c-9446-1e827e5e262e" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] }, "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "375" ] } }, "Response": { - "StatusCode": 200, + "StatusCode": 201, "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "cb40ad69-81b1-4d7f-936a-e1e61ab9bf2c_M1SN1_M1SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-correlation-request-id": [ "5c720405-d614-4cca-83bf-b6bed7768c77" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T081900Z:5c720405-d614-4cca-83bf-b6bed7768c77" ], + "x-ms-correlation-request-id": [ "b84cf3cf-be1f-41f8-a380-47a507e7d812" ], + "x-ms-client-request-id": [ "019ce462-8f6e-4b27-b85d-b7c58d298695_RP" ], + "x-ms-messaging-activity-id": [ "db655663-7f75-4a28-8363-4fb82658d789" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G6|2024-04-29T12:56:46" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "49" ], + "x-ms-request-id": [ "b84cf3cf-be1f-41f8-a380-47a507e7d812" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T125647Z:b84cf3cf-be1f-41f8-a380-47a507e7d812" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 201EADB58720464A820A4ED67B826DA2 Ref B: SEL221051504011 Ref C: 2023-09-18T08:18:59Z" ], - "Date": [ "Mon, 18 Sep 2023 08:18:59 GMT" ] + "X-MSEdge-Ref": [ "Ref A: BF5B098777AB446E92F9044B12B72218 Ref B: SEL221051504047 Ref C: 2024-04-29T12:56:42Z" ], + "Date": [ "Mon, 29 Apr 2024 12:56:47 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1955" ], + "Content-Length": [ "811" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt\",\"name\":\"namespaceV5nrf8kt\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{\"clientId\":\"440d7336-c408-4327-ad13-10a4e71aad64\",\"principalId\":\"1bdb6af0-4284-47f4-b049-94aa2868d90b\"}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":false},\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5nrf8kt\",\"createdAt\":\"2023-09-18T08:11:40.49Z\",\"updatedAt\":\"2023-09-18T08:18:49.213Z\",\"serviceBusEndpoint\":\"https://namespaceV5nrf8kt.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz\",\"name\":\"namespaceV35flrpz\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev35flrpz\",\"serviceBusEndpoint\":\"https://namespaceV35flrpz.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":18,\"kafkaEnabled\":true,\"provisioningState\":\"Creating\",\"status\":\"Creating\",\"createdAt\":\"2024-04-29T12:56:46.3971474Z\",\"updatedAt\":\"2024-04-29T12:56:46.3971474Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":10}}", "isContentBase64": false } }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt?api-version=2023-01-01-preview+41": { + "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview+5": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "158" ], - "x-ms-client-request-id": [ "97e4bcab-0cc0-447c-9446-1e827e5e262e" ], + "x-ms-unique-id": [ "117" ], + "x-ms-client-request-id": [ "019ce462-8f6e-4b27-b85d-b7c58d298695" ], "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ] }, "ContentHeaders": { } @@ -1722,40 +196,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "76103180-5216-485f-806b-c94f263cfc3d_M10CH3_M10CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], - "x-ms-correlation-request-id": [ "1a8f957b-cb49-40a5-9ee7-4822a9487862" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T081932Z:1a8f957b-cb49-40a5-9ee7-4822a9487862" ], + "x-ms-correlation-request-id": [ "f6e82686-c452-4b2f-ad6c-cda47f9e6ce6" ], + "x-ms-client-request-id": [ "019ce462-8f6e-4b27-b85d-b7c58d298695_RP" ], + "x-ms-messaging-activity-id": [ "3b0facb9-ac6f-40c9-a04c-e9897ecb674d" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G11|2024-04-29T12:57:19" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "f6e82686-c452-4b2f-ad6c-cda47f9e6ce6" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T125719Z:f6e82686-c452-4b2f-ad6c-cda47f9e6ce6" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: B1188274004746BB9BF8A66D6E84F8B4 Ref B: SEL221051504011 Ref C: 2023-09-18T08:19:30Z" ], - "Date": [ "Mon, 18 Sep 2023 08:19:31 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 643E8D9C1F4F4C52981D34A50A146751 Ref B: SEL221051504047 Ref C: 2024-04-29T12:57:17Z" ], + "Date": [ "Mon, 29 Apr 2024 12:57:18 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "2047" ], + "Content-Length": [ "842" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt\",\"name\":\"namespaceV5nrf8kt\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{\"clientId\":\"38a989a1-3fab-4015-b546-cbcf7a67aa89\",\"principalId\":\"624205aa-192c-4303-9606-990d06cbd997\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{\"clientId\":\"440d7336-c408-4327-ad13-10a4e71aad64\",\"principalId\":\"1bdb6af0-4284-47f4-b049-94aa2868d90b\"}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":false},\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5nrf8kt\",\"createdAt\":\"2023-09-18T08:11:40.49Z\",\"updatedAt\":\"2023-09-18T08:19:01.53Z\",\"serviceBusEndpoint\":\"https://namespaceV5nrf8kt.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz\",\"name\":\"namespaceV35flrpz\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev35flrpz\",\"serviceBusEndpoint\":\"https://namespaceV35flrpz.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":18,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:56:46.3971474Z\",\"updatedAt\":\"2024-04-29T12:57:10.8990145Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":10}}", "isContentBase64": false } }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt?api-version=2023-01-01-preview+42": { + "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview+6": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "159" ], - "x-ms-client-request-id": [ "97e4bcab-0cc0-447c-9446-1e827e5e262e" ], + "x-ms-unique-id": [ "118" ], + "x-ms-client-request-id": [ "019ce462-8f6e-4b27-b85d-b7c58d298695" ], "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ] }, "ContentHeaders": { } @@ -1765,164 +242,84 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "0c2ea3cd-59b3-41ad-bc13-b9a699ae7919_M10CH3_M10CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], - "x-ms-correlation-request-id": [ "d3cd3ef4-d89c-4570-a550-678ba95159f8" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T081932Z:d3cd3ef4-d89c-4570-a550-678ba95159f8" ], + "x-ms-correlation-request-id": [ "83165cd7-1b09-46d5-b973-3e2cb07c5d7b" ], + "x-ms-client-request-id": [ "019ce462-8f6e-4b27-b85d-b7c58d298695_RP" ], + "x-ms-messaging-activity-id": [ "16b21504-3b60-4b29-9f48-c0c5e1a81663" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G14|2024-04-29T12:57:20" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "83165cd7-1b09-46d5-b973-3e2cb07c5d7b" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240429T125721Z:83165cd7-1b09-46d5-b973-3e2cb07c5d7b" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: ABC1F03366354B8FAE220C4FEE20668E Ref B: SEL221051504011 Ref C: 2023-09-18T08:19:32Z" ], - "Date": [ "Mon, 18 Sep 2023 08:19:31 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 26AD39475C5441499D2816C0B8919E47 Ref B: SEL221051504047 Ref C: 2024-04-29T12:57:19Z" ], + "Date": [ "Mon, 29 Apr 2024 12:57:20 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "2047" ], + "Content-Length": [ "842" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt\",\"name\":\"namespaceV5nrf8kt\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{\"clientId\":\"38a989a1-3fab-4015-b546-cbcf7a67aa89\",\"principalId\":\"624205aa-192c-4303-9606-990d06cbd997\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{\"clientId\":\"440d7336-c408-4327-ad13-10a4e71aad64\",\"principalId\":\"1bdb6af0-4284-47f4-b049-94aa2868d90b\"}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":false},\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5nrf8kt\",\"createdAt\":\"2023-09-18T08:11:40.49Z\",\"updatedAt\":\"2023-09-18T08:19:01.53Z\",\"serviceBusEndpoint\":\"https://namespaceV5nrf8kt.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz\",\"name\":\"namespaceV35flrpz\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev35flrpz\",\"serviceBusEndpoint\":\"https://namespaceV35flrpz.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":18,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:56:46.3971474Z\",\"updatedAt\":\"2024-04-29T12:57:10.8990145Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":10}}", "isContentBase64": false } }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV7efod9x?api-version=2023-01-01-preview+43": { + "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV4i450gk?api-version=2023-01-01-preview+7": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV7efod9x?api-version=2023-01-01-preview", - "Content": "{\n \"location\": \"northeurope\",\n \"sku\": {\n \"name\": \"Premium\",\n \"tier\": \"Premium\"\n },\n \"identity\": {\n \"type\": \"UserAssigned\",\n \"userAssignedIdentities\": {\n \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\": {\n },\n \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\": {\n }\n }\n },\n \"properties\": {\n \"encryption\": {\n \"keyVaultProperties\": [\n {\n \"identity\": {\n \"userAssignedIdentity\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"\n },\n \"keyName\": \"key1\",\n \"keyVaultUri\": \"https://keyVaultNameoqye7t.vault.azure.net/\"\n },\n {\n \"identity\": {\n \"userAssignedIdentity\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"\n },\n \"keyName\": \"key2\",\n \"keyVaultUri\": \"https://keyVaultNameoqye7t.vault.azure.net/\"\n }\n ],\n \"keySource\": \"Microsoft.KeyVault\",\n \"requireInfrastructureEncryption\": true\n }\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV4i450gk?api-version=2023-01-01-preview", + "Content": "{\n \"location\": \"eastus\",\n \"sku\": {\n \"name\": \"Premium\",\n \"tier\": \"Premium\"\n },\n \"identity\": {\n \"type\": \"SystemAssigned\"\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "1396" ] - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "5c40be4e-3978-42f6-b805-8214579e490f_M5SN1_M5SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ "49" ], - "x-ms-correlation-request-id": [ "80ce2019-f397-4201-b88b-3abfebf3c497" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T081945Z:80ce2019-f397-4201-b88b-3abfebf3c497" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 5668B9B3D8DC4D5DBB4B87EF6145DF31 Ref B: SEL221051504011 Ref C: 2023-09-18T08:19:34Z" ], - "Date": [ "Mon, 18 Sep 2023 08:19:45 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1855" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV7efod9x\",\"name\":\"namespaceV7efod9x\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":true},\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev7efod9x\",\"createdAt\":\"2023-09-18T08:19:43.23Z\",\"updatedAt\":\"2023-09-18T08:19:43.23Z\",\"serviceBusEndpoint\":\"https://namespaceV7efod9x.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV7efod9x?api-version=2023-01-01-preview+44": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV7efod9x?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "161" ], - "x-ms-client-request-id": [ "ff5507c0-ca6b-4f60-b57f-c88c751d4e7b" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "5d340c4b-4e60-4e39-b343-80792c055805_M10SN1_M10SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], - "x-ms-correlation-request-id": [ "17e47a49-3acd-48f0-8ff7-7c4aa6ae830e" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T082017Z:17e47a49-3acd-48f0-8ff7-7c4aa6ae830e" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 5087C8B4DB1E4E049F8F8560EEC82255 Ref B: SEL221051504011 Ref C: 2023-09-18T08:20:16Z" ], - "Date": [ "Mon, 18 Sep 2023 08:20:17 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1855" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV7efod9x\",\"name\":\"namespaceV7efod9x\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":true},\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev7efod9x\",\"createdAt\":\"2023-09-18T08:19:43.23Z\",\"updatedAt\":\"2023-09-18T08:19:43.23Z\",\"serviceBusEndpoint\":\"https://namespaceV7efod9x.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV7efod9x?api-version=2023-01-01-preview+45": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV7efod9x?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "162" ], - "x-ms-client-request-id": [ "ff5507c0-ca6b-4f60-b57f-c88c751d4e7b" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { + "Content-Length": [ "137" ] } }, "Response": { - "StatusCode": 200, + "StatusCode": 201, "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "592d9638-e50a-435d-87b3-58f0323c2980_M2CH3_M2CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], - "x-ms-correlation-request-id": [ "84bb21c0-50f9-4ae6-8d59-13026052757e" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T082048Z:84bb21c0-50f9-4ae6-8d59-13026052757e" ], + "x-ms-correlation-request-id": [ "c7b0b496-ff3b-4f6c-bfec-2486aea72c8a" ], + "x-ms-client-request-id": [ "efa2df22-44c6-45c6-8c88-4f51c64836c5_RP" ], + "x-ms-messaging-activity-id": [ "767ce026-2e16-4d91-b0aa-66aec6b76e81" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G9|2024-04-29T12:57:25" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "49" ], + "x-ms-request-id": [ "c7b0b496-ff3b-4f6c-bfec-2486aea72c8a" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T125726Z:c7b0b496-ff3b-4f6c-bfec-2486aea72c8a" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 9D201973A63343C898DADC468F9D1A86 Ref B: SEL221051504011 Ref C: 2023-09-18T08:20:47Z" ], - "Date": [ "Mon, 18 Sep 2023 08:20:48 GMT" ] + "X-MSEdge-Ref": [ "Ref A: F83FD0320AC14988B323A4D4AEF695FB Ref B: SEL221051504047 Ref C: 2024-04-29T12:57:21Z" ], + "Date": [ "Mon, 29 Apr 2024 12:57:25 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1855" ], + "Content-Length": [ "929" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV7efod9x\",\"name\":\"namespaceV7efod9x\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":true},\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev7efod9x\",\"createdAt\":\"2023-09-18T08:19:43.23Z\",\"updatedAt\":\"2023-09-18T08:19:43.23Z\",\"serviceBusEndpoint\":\"https://namespaceV7efod9x.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV4i450gk\",\"name\":\"namespaceV4i450gk\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4i450gk\",\"serviceBusEndpoint\":\"https://namespaceV4i450gk.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Creating\",\"status\":\"Creating\",\"createdAt\":\"2024-04-29T12:57:25.8647035Z\",\"updatedAt\":\"2024-04-29T12:57:25.8647035Z\"},\"identity\":{\"principalId\":\"5cbf484f-6486-4dd8-909c-ea55b8b32811\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV7efod9x?api-version=2023-01-01-preview+46": { + "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV4i450gk?api-version=2023-01-01-preview+8": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV7efod9x?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV4i450gk?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "163" ], - "x-ms-client-request-id": [ "ff5507c0-ca6b-4f60-b57f-c88c751d4e7b" ], + "x-ms-unique-id": [ "120" ], + "x-ms-client-request-id": [ "efa2df22-44c6-45c6-8c88-4f51c64836c5" ], "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ] }, "ContentHeaders": { } @@ -1932,40 +329,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "08b10ac3-ec6b-4175-8fc4-ca9ca20a829f_M10CH3_M10CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], - "x-ms-correlation-request-id": [ "d1b58b54-09f6-4a57-b80b-4816ff4f1e60" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T082119Z:d1b58b54-09f6-4a57-b80b-4816ff4f1e60" ], + "x-ms-correlation-request-id": [ "ff50d915-e8ed-4a92-95aa-fd9d6ca48909" ], + "x-ms-client-request-id": [ "efa2df22-44c6-45c6-8c88-4f51c64836c5_RP" ], + "x-ms-messaging-activity-id": [ "e3563e72-4407-419f-8dc3-73c3d13c5a21" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G11|2024-04-29T12:57:57" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "ff50d915-e8ed-4a92-95aa-fd9d6ca48909" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T125757Z:ff50d915-e8ed-4a92-95aa-fd9d6ca48909" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 8D5C14D6227F4C72B96F6B4E91998E6D Ref B: SEL221051504011 Ref C: 2023-09-18T08:21:18Z" ], - "Date": [ "Mon, 18 Sep 2023 08:21:19 GMT" ] + "X-MSEdge-Ref": [ "Ref A: A301583B7F2449249BB913B361448ADF Ref B: SEL221051504047 Ref C: 2024-04-29T12:57:56Z" ], + "Date": [ "Mon, 29 Apr 2024 12:57:57 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1855" ], + "Content-Length": [ "961" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV7efod9x\",\"name\":\"namespaceV7efod9x\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":true},\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev7efod9x\",\"createdAt\":\"2023-09-18T08:19:43.23Z\",\"updatedAt\":\"2023-09-18T08:19:43.23Z\",\"serviceBusEndpoint\":\"https://namespaceV7efod9x.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV4i450gk\",\"name\":\"namespaceV4i450gk\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4i450gk\",\"serviceBusEndpoint\":\"https://namespaceV4i450gk.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Creating\",\"status\":\"Creating\",\"createdAt\":\"2024-04-29T12:57:25.8647035Z\",\"updatedAt\":\"2024-04-29T12:57:25.8647035Z\"},\"identity\":{\"principalId\":\"5cbf484f-6486-4dd8-909c-ea55b8b32811\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV7efod9x?api-version=2023-01-01-preview+47": { + "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV4i450gk?api-version=2023-01-01-preview+9": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV7efod9x?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV4i450gk?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "164" ], - "x-ms-client-request-id": [ "ff5507c0-ca6b-4f60-b57f-c88c751d4e7b" ], + "x-ms-unique-id": [ "121" ], + "x-ms-client-request-id": [ "efa2df22-44c6-45c6-8c88-4f51c64836c5" ], "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ] }, "ContentHeaders": { } @@ -1975,83 +375,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "0d2eae06-f726-4605-82ae-663cdd994d16_M8CH3_M8CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11990" ], - "x-ms-correlation-request-id": [ "6ed6e64a-4539-47a7-9d39-a826bf2177f8" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T082150Z:6ed6e64a-4539-47a7-9d39-a826bf2177f8" ], + "x-ms-correlation-request-id": [ "2132e2ea-b821-4e87-980a-5f43deb14d39" ], + "x-ms-client-request-id": [ "efa2df22-44c6-45c6-8c88-4f51c64836c5_RP" ], + "x-ms-messaging-activity-id": [ "4a116f24-858b-407f-b0fb-1fa23b0cbcbd" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G11|2024-04-29T12:58:29" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 9208A9929B2F4A5EB3E140B33A7C7649 Ref B: SEL221051504011 Ref C: 2023-09-18T08:21:49Z" ], - "Date": [ "Mon, 18 Sep 2023 08:21:49 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1855" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV7efod9x\",\"name\":\"namespaceV7efod9x\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":true},\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev7efod9x\",\"createdAt\":\"2023-09-18T08:19:43.23Z\",\"updatedAt\":\"2023-09-18T08:19:43.23Z\",\"serviceBusEndpoint\":\"https://namespaceV7efod9x.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV7efod9x?api-version=2023-01-01-preview+48": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV7efod9x?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "165" ], - "x-ms-client-request-id": [ "ff5507c0-ca6b-4f60-b57f-c88c751d4e7b" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "2d206534-7b54-4c76-9eb4-936249bc793c_M7CH3_M7CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], - "x-ms-correlation-request-id": [ "effd38c7-c0dd-4af4-b366-f7460924229f" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T082220Z:effd38c7-c0dd-4af4-b366-f7460924229f" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-request-id": [ "2132e2ea-b821-4e87-980a-5f43deb14d39" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T125829Z:2132e2ea-b821-4e87-980a-5f43deb14d39" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 90E86801047842C8993CB3BD1A14A2CF Ref B: SEL221051504011 Ref C: 2023-09-18T08:22:20Z" ], - "Date": [ "Mon, 18 Sep 2023 08:22:20 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 5C9817EE8AD2497BB2995DEB3D98F88C Ref B: SEL221051504047 Ref C: 2024-04-29T12:58:27Z" ], + "Date": [ "Mon, 29 Apr 2024 12:58:29 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1855" ], + "Content-Length": [ "960" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV7efod9x\",\"name\":\"namespaceV7efod9x\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":true},\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev7efod9x\",\"createdAt\":\"2023-09-18T08:19:43.23Z\",\"updatedAt\":\"2023-09-18T08:19:43.23Z\",\"serviceBusEndpoint\":\"https://namespaceV7efod9x.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV4i450gk\",\"name\":\"namespaceV4i450gk\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4i450gk\",\"serviceBusEndpoint\":\"https://namespaceV4i450gk.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:57:25.8647035Z\",\"updatedAt\":\"2024-04-29T12:58:19.4123871Z\"},\"identity\":{\"principalId\":\"5cbf484f-6486-4dd8-909c-ea55b8b32811\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV7efod9x?api-version=2023-01-01-preview+49": { + "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV4i450gk?api-version=2023-01-01-preview+10": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV7efod9x?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV4i450gk?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "166" ], - "x-ms-client-request-id": [ "ff5507c0-ca6b-4f60-b57f-c88c751d4e7b" ], + "x-ms-unique-id": [ "122" ], + "x-ms-client-request-id": [ "efa2df22-44c6-45c6-8c88-4f51c64836c5" ], "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ] }, "ContentHeaders": { } @@ -2061,83 +421,84 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "b9f5d517-5a8c-4638-b07f-7a4ab97deb70_M10CH3_M10CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-correlation-request-id": [ "d483b792-1460-4e69-a9a0-cac54616783b" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T082251Z:d483b792-1460-4e69-a9a0-cac54616783b" ], + "x-ms-correlation-request-id": [ "abbc54db-a4c6-416b-91ca-e6ad02f02831" ], + "x-ms-client-request-id": [ "efa2df22-44c6-45c6-8c88-4f51c64836c5_RP" ], + "x-ms-messaging-activity-id": [ "b33e4b89-b8c9-4ec5-9772-961cbb6fd958" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G4|2024-04-29T12:58:30" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "abbc54db-a4c6-416b-91ca-e6ad02f02831" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T125830Z:abbc54db-a4c6-416b-91ca-e6ad02f02831" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 8424D68374044AFABB96AED0D237A04E Ref B: SEL221051504011 Ref C: 2023-09-18T08:22:50Z" ], - "Date": [ "Mon, 18 Sep 2023 08:22:51 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 9B96453095C34F7C83F0C5E331F869B0 Ref B: SEL221051504047 Ref C: 2024-04-29T12:58:29Z" ], + "Date": [ "Mon, 29 Apr 2024 12:58:30 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1855" ], + "Content-Length": [ "960" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV7efod9x\",\"name\":\"namespaceV7efod9x\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":true},\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev7efod9x\",\"createdAt\":\"2023-09-18T08:19:43.23Z\",\"updatedAt\":\"2023-09-18T08:19:43.23Z\",\"serviceBusEndpoint\":\"https://namespaceV7efod9x.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV4i450gk\",\"name\":\"namespaceV4i450gk\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4i450gk\",\"serviceBusEndpoint\":\"https://namespaceV4i450gk.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:57:25.8647035Z\",\"updatedAt\":\"2024-04-29T12:58:19.4123871Z\"},\"identity\":{\"principalId\":\"5cbf484f-6486-4dd8-909c-ea55b8b32811\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV7efod9x?api-version=2023-01-01-preview+50": { + "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV5dmbu7w?api-version=2023-01-01-preview+11": { "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV7efod9x?api-version=2023-01-01-preview", - "Content": null, + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV5dmbu7w?api-version=2023-01-01-preview", + "Content": "{\n \"location\": \"eastus\",\n \"sku\": {\n \"name\": \"Premium\",\n \"tier\": \"Premium\"\n },\n \"identity\": {\n \"type\": \"UserAssigned\",\n \"userAssignedIdentities\": {\n \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi2\": {\n },\n \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi1\": {\n }\n }\n },\n \"properties\": {\n \"encryption\": {\n \"keyVaultProperties\": [\n {\n \"identity\": {\n \"userAssignedIdentity\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi1\"\n },\n \"keyName\": \"key1\",\n \"keyVaultUri\": \"https://eh-ps-vgt87w-kv1.vault.azure.net/\"\n },\n {\n \"identity\": {\n \"userAssignedIdentity\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi1\"\n },\n \"keyName\": \"key2\",\n \"keyVaultUri\": \"https://eh-ps-vgt87w-kv1.vault.azure.net/\"\n }\n ],\n \"keySource\": \"Microsoft.KeyVault\"\n }\n }\n}", "isContentBase64": false, "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "167" ], - "x-ms-client-request-id": [ "ff5507c0-ca6b-4f60-b57f-c88c751d4e7b" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] }, "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "1416" ] } }, "Response": { - "StatusCode": 200, + "StatusCode": 201, "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "c2818302-06a9-488b-b628-2135d62e9421_M10SN1_M10SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-correlation-request-id": [ "0f4974d4-2e92-4f89-b4bb-8b545bc77a3b" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T082322Z:0f4974d4-2e92-4f89-b4bb-8b545bc77a3b" ], + "x-ms-correlation-request-id": [ "bae8d081-79d3-4a0e-af10-ee49f38e3ede" ], + "x-ms-client-request-id": [ "e96ec232-1591-49a6-bcbb-0ac24e1dd185_RP" ], + "x-ms-messaging-activity-id": [ "9cd6cd8d-ddc2-4fd7-8140-4f7a75b54fa0" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-29T12:58:35" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "49" ], + "x-ms-request-id": [ "bae8d081-79d3-4a0e-af10-ee49f38e3ede" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T125836Z:bae8d081-79d3-4a0e-af10-ee49f38e3ede" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 3BA942CF6EF14A9D8D4C32E9DA35B69B Ref B: SEL221051504011 Ref C: 2023-09-18T08:23:21Z" ], - "Date": [ "Mon, 18 Sep 2023 08:23:22 GMT" ] + "X-MSEdge-Ref": [ "Ref A: C63104D04E494774AE49C1ADA6C43F2C Ref B: SEL221051504047 Ref C: 2024-04-29T12:58:30Z" ], + "Date": [ "Mon, 29 Apr 2024 12:58:35 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1855" ], + "Content-Length": [ "2094" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV7efod9x\",\"name\":\"namespaceV7efod9x\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":true},\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev7efod9x\",\"createdAt\":\"2023-09-18T08:19:43.23Z\",\"updatedAt\":\"2023-09-18T08:19:43.23Z\",\"serviceBusEndpoint\":\"https://namespaceV7efod9x.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV5dmbu7w\",\"name\":\"namespaceV5dmbu7w\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://eh-ps-vgt87w-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://eh-ps-vgt87w-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi1\"}}],\"requireInfrastructureEncryption\":false},\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5dmbu7w\",\"serviceBusEndpoint\":\"https://namespaceV5dmbu7w.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Creating\",\"status\":\"Creating\",\"createdAt\":\"2024-04-29T12:58:35.8874476Z\",\"updatedAt\":\"2024-04-29T12:58:35.8874476Z\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi2\":{\"clientId\":\"5c5159b2-689b-4fb3-9412-010709a20a7f\",\"principalId\":\"14f2ac9f-e580-4c60-b26b-f46704cedfd4\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi1\":{\"clientId\":\"bd1fd688-d955-4f14-b35a-ead560b90d61\",\"principalId\":\"2c3ba703-66cf-47ec-99b4-465018cd9540\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV7efod9x?api-version=2023-01-01-preview+51": { + "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV5dmbu7w?api-version=2023-01-01-preview+12": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV7efod9x?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV5dmbu7w?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "168" ], - "x-ms-client-request-id": [ "ff5507c0-ca6b-4f60-b57f-c88c751d4e7b" ], + "x-ms-unique-id": [ "124" ], + "x-ms-client-request-id": [ "e96ec232-1591-49a6-bcbb-0ac24e1dd185" ], "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ] }, "ContentHeaders": { } @@ -2147,40 +508,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "77275f50-eb11-4a13-b741-d2cb62b69d28_M1SN1_M1SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], - "x-ms-correlation-request-id": [ "7704f69e-47f5-4978-a0e0-da403b3033c7" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T082354Z:7704f69e-47f5-4978-a0e0-da403b3033c7" ], + "x-ms-correlation-request-id": [ "c3444d2b-f1c8-4c6e-9bd5-b81657532730" ], + "x-ms-client-request-id": [ "e96ec232-1591-49a6-bcbb-0ac24e1dd185_RP" ], + "x-ms-messaging-activity-id": [ "eeb0906d-2da6-41b8-abfd-e7379d20686e" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G9|2024-04-29T12:59:07" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "c3444d2b-f1c8-4c6e-9bd5-b81657532730" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T125908Z:c3444d2b-f1c8-4c6e-9bd5-b81657532730" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 78ED4F7821AC44A0B753D9B1570A4BC1 Ref B: SEL221051504011 Ref C: 2023-09-18T08:23:52Z" ], - "Date": [ "Mon, 18 Sep 2023 08:23:53 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 542D7ED8FBA446BAAB5FF8E39CBBBF2E Ref B: SEL221051504047 Ref C: 2024-04-29T12:59:06Z" ], + "Date": [ "Mon, 29 Apr 2024 12:59:07 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1852" ], + "Content-Length": [ "2126" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV7efod9x\",\"name\":\"namespaceV7efod9x\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":true},\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev7efod9x\",\"createdAt\":\"2023-09-18T08:19:43.23Z\",\"updatedAt\":\"2023-09-18T08:23:34.657Z\",\"serviceBusEndpoint\":\"https://namespaceV7efod9x.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV5dmbu7w\",\"name\":\"namespaceV5dmbu7w\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://eh-ps-vgt87w-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://eh-ps-vgt87w-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi1\"}}],\"requireInfrastructureEncryption\":false},\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5dmbu7w\",\"serviceBusEndpoint\":\"https://namespaceV5dmbu7w.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Creating\",\"status\":\"Creating\",\"createdAt\":\"2024-04-29T12:58:35.8874476Z\",\"updatedAt\":\"2024-04-29T12:58:35.8874476Z\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi2\":{\"clientId\":\"5c5159b2-689b-4fb3-9412-010709a20a7f\",\"principalId\":\"14f2ac9f-e580-4c60-b26b-f46704cedfd4\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi1\":{\"clientId\":\"bd1fd688-d955-4f14-b35a-ead560b90d61\",\"principalId\":\"2c3ba703-66cf-47ec-99b4-465018cd9540\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV7efod9x?api-version=2023-01-01-preview+52": { + "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV5dmbu7w?api-version=2023-01-01-preview+13": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV7efod9x?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV5dmbu7w?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "169" ], - "x-ms-client-request-id": [ "ff5507c0-ca6b-4f60-b57f-c88c751d4e7b" ], + "x-ms-unique-id": [ "125" ], + "x-ms-client-request-id": [ "e96ec232-1591-49a6-bcbb-0ac24e1dd185" ], "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ] }, "ContentHeaders": { } @@ -2190,126 +554,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "2879401b-ba7a-4698-a7f4-76733a037d85_M1CH3_M1CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], - "x-ms-correlation-request-id": [ "fcfc2036-3576-4793-b9dc-8ee6f1be67a5" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T082424Z:fcfc2036-3576-4793-b9dc-8ee6f1be67a5" ], + "x-ms-correlation-request-id": [ "7b4cf3c0-e43f-4a1a-a9f1-8f6fa9b39041" ], + "x-ms-client-request-id": [ "e96ec232-1591-49a6-bcbb-0ac24e1dd185_RP" ], + "x-ms-messaging-activity-id": [ "c7a6fb14-db83-477d-9c4e-427a930dac73" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G7|2024-04-29T12:59:39" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: A1F159B98CFE4D1EADD88DB1A00913F1 Ref B: SEL221051504011 Ref C: 2023-09-18T08:24:24Z" ], - "Date": [ "Mon, 18 Sep 2023 08:24:24 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1852" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV7efod9x\",\"name\":\"namespaceV7efod9x\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":true},\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev7efod9x\",\"createdAt\":\"2023-09-18T08:19:43.23Z\",\"updatedAt\":\"2023-09-18T08:23:34.657Z\",\"serviceBusEndpoint\":\"https://namespaceV7efod9x.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV7efod9x?api-version=2023-01-01-preview+53": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV7efod9x?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "170" ], - "x-ms-client-request-id": [ "ff5507c0-ca6b-4f60-b57f-c88c751d4e7b" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "fbc18d1f-d845-4abd-9301-f681c412189c_M9SN1_M9SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], + "x-ms-throttling-version": [ "v1" ], "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-correlation-request-id": [ "bfaaa832-8da5-46fe-a62f-80417c565f40" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T082455Z:bfaaa832-8da5-46fe-a62f-80417c565f40" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 8D1FC781104149B881A74982D06B57F9 Ref B: SEL221051504011 Ref C: 2023-09-18T08:24:54Z" ], - "Date": [ "Mon, 18 Sep 2023 08:24:55 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1852" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV7efod9x\",\"name\":\"namespaceV7efod9x\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":true},\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev7efod9x\",\"createdAt\":\"2023-09-18T08:19:43.23Z\",\"updatedAt\":\"2023-09-18T08:23:34.657Z\",\"serviceBusEndpoint\":\"https://namespaceV7efod9x.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV7efod9x?api-version=2023-01-01-preview+54": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV7efod9x?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "171" ], - "x-ms-client-request-id": [ "ff5507c0-ca6b-4f60-b57f-c88c751d4e7b" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "0128fc63-2bc8-4f48-8d2f-15a2985964bb_M8SN1_M8SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], - "x-ms-correlation-request-id": [ "7ff6174c-1ff4-49d0-af0f-552bb88ec679" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T082526Z:7ff6174c-1ff4-49d0-af0f-552bb88ec679" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-request-id": [ "7b4cf3c0-e43f-4a1a-a9f1-8f6fa9b39041" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T125939Z:7b4cf3c0-e43f-4a1a-a9f1-8f6fa9b39041" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: D217BF6C09DE45E7823B9DC2B802130C Ref B: SEL221051504011 Ref C: 2023-09-18T08:25:25Z" ], - "Date": [ "Mon, 18 Sep 2023 08:25:25 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 555F8764B138439A9AB94F71D0BD0504 Ref B: SEL221051504047 Ref C: 2024-04-29T12:59:38Z" ], + "Date": [ "Mon, 29 Apr 2024 12:59:39 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1852" ], + "Content-Length": [ "2125" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV7efod9x\",\"name\":\"namespaceV7efod9x\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":true},\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev7efod9x\",\"createdAt\":\"2023-09-18T08:19:43.23Z\",\"updatedAt\":\"2023-09-18T08:23:34.657Z\",\"serviceBusEndpoint\":\"https://namespaceV7efod9x.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV5dmbu7w\",\"name\":\"namespaceV5dmbu7w\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://eh-ps-vgt87w-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://eh-ps-vgt87w-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi1\"}}],\"requireInfrastructureEncryption\":false},\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5dmbu7w\",\"serviceBusEndpoint\":\"https://namespaceV5dmbu7w.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:58:35.8874476Z\",\"updatedAt\":\"2024-04-29T12:59:35.6226002Z\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi2\":{\"clientId\":\"5c5159b2-689b-4fb3-9412-010709a20a7f\",\"principalId\":\"14f2ac9f-e580-4c60-b26b-f46704cedfd4\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi1\":{\"clientId\":\"bd1fd688-d955-4f14-b35a-ead560b90d61\",\"principalId\":\"2c3ba703-66cf-47ec-99b4-465018cd9540\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV7efod9x?api-version=2023-01-01-preview+55": { + "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV5dmbu7w?api-version=2023-01-01-preview+14": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV7efod9x?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV5dmbu7w?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "172" ], - "x-ms-client-request-id": [ "ff5507c0-ca6b-4f60-b57f-c88c751d4e7b" ], + "x-ms-unique-id": [ "126" ], + "x-ms-client-request-id": [ "e96ec232-1591-49a6-bcbb-0ac24e1dd185" ], "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ] }, "ContentHeaders": { } @@ -2319,83 +600,84 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "3fe58919-c44e-4e88-a549-69041f6e9382_M2CH3_M2CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11991" ], - "x-ms-correlation-request-id": [ "7c5dc1e0-a282-4edc-bf22-848f131d926e" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T082557Z:7c5dc1e0-a282-4edc-bf22-848f131d926e" ], + "x-ms-correlation-request-id": [ "cd56d49a-f501-4b53-98e6-916d643e197c" ], + "x-ms-client-request-id": [ "e96ec232-1591-49a6-bcbb-0ac24e1dd185_RP" ], + "x-ms-messaging-activity-id": [ "9b47011e-ed4b-4ef3-bfb1-c4604b21977b" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G6|2024-04-29T12:59:41" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "cd56d49a-f501-4b53-98e6-916d643e197c" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T125941Z:cd56d49a-f501-4b53-98e6-916d643e197c" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 345824C4BE154292A731A594F69054CC Ref B: SEL221051504011 Ref C: 2023-09-18T08:25:56Z" ], - "Date": [ "Mon, 18 Sep 2023 08:25:56 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 5B0936AF59CB45F4A9F341516F5671C0 Ref B: SEL221051504047 Ref C: 2024-04-29T12:59:39Z" ], + "Date": [ "Mon, 29 Apr 2024 12:59:40 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1852" ], + "Content-Length": [ "2125" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV7efod9x\",\"name\":\"namespaceV7efod9x\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":true},\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev7efod9x\",\"createdAt\":\"2023-09-18T08:19:43.23Z\",\"updatedAt\":\"2023-09-18T08:23:34.657Z\",\"serviceBusEndpoint\":\"https://namespaceV7efod9x.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV5dmbu7w\",\"name\":\"namespaceV5dmbu7w\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://eh-ps-vgt87w-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://eh-ps-vgt87w-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi1\"}}],\"requireInfrastructureEncryption\":false},\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5dmbu7w\",\"serviceBusEndpoint\":\"https://namespaceV5dmbu7w.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:58:35.8874476Z\",\"updatedAt\":\"2024-04-29T12:59:35.6226002Z\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi2\":{\"clientId\":\"5c5159b2-689b-4fb3-9412-010709a20a7f\",\"principalId\":\"14f2ac9f-e580-4c60-b26b-f46704cedfd4\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi1\":{\"clientId\":\"bd1fd688-d955-4f14-b35a-ead560b90d61\",\"principalId\":\"2c3ba703-66cf-47ec-99b4-465018cd9540\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV7efod9x?api-version=2023-01-01-preview+56": { + "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV75reoyd?api-version=2023-01-01-preview+15": { "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV7efod9x?api-version=2023-01-01-preview", - "Content": null, + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV75reoyd?api-version=2023-01-01-preview", + "Content": "{\n \"location\": \"eastus\",\n \"sku\": {\n \"name\": \"Premium\",\n \"tier\": \"Premium\"\n },\n \"identity\": {\n \"type\": \"UserAssigned\",\n \"userAssignedIdentities\": {\n \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi2\": {\n },\n \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi1\": {\n }\n }\n },\n \"properties\": {\n \"encryption\": {\n \"keyVaultProperties\": [\n {\n \"identity\": {\n \"userAssignedIdentity\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi1\"\n },\n \"keyName\": \"key1\",\n \"keyVaultUri\": \"https://eh-ps-vgt87w-kv1.vault.azure.net/\"\n },\n {\n \"identity\": {\n \"userAssignedIdentity\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi1\"\n },\n \"keyName\": \"key2\",\n \"keyVaultUri\": \"https://eh-ps-vgt87w-kv1.vault.azure.net/\"\n }\n ],\n \"keySource\": \"Microsoft.KeyVault\",\n \"requireInfrastructureEncryption\": true\n }\n }\n}", "isContentBase64": false, "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "173" ], - "x-ms-client-request-id": [ "ff5507c0-ca6b-4f60-b57f-c88c751d4e7b" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] }, "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "1463" ] } }, "Response": { - "StatusCode": 200, + "StatusCode": 201, "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "8edec3a7-7c2a-43f9-99f0-c429110a1826_M5CH3_M5CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], - "x-ms-correlation-request-id": [ "77d874ce-4f38-403d-bece-334e8658c4db" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T082627Z:77d874ce-4f38-403d-bece-334e8658c4db" ], + "x-ms-correlation-request-id": [ "8e2b2e83-8a45-402f-9d6a-60c79e2b4bc9" ], + "x-ms-client-request-id": [ "09aa4ca3-6cea-4dad-b6f2-bc4d5f22f32a_RP" ], + "x-ms-messaging-activity-id": [ "f4821c9d-6303-4888-b2f6-a3dc51ebf170" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G6|2024-04-29T12:59:46" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "49" ], + "x-ms-request-id": [ "8e2b2e83-8a45-402f-9d6a-60c79e2b4bc9" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T125946Z:8e2b2e83-8a45-402f-9d6a-60c79e2b4bc9" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 56FE304A60784209A5E96435DA676EA4 Ref B: SEL221051504011 Ref C: 2023-09-18T08:26:27Z" ], - "Date": [ "Mon, 18 Sep 2023 08:26:27 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 0BEABAB4FFBD40BEA05888DCBD65CC70 Ref B: SEL221051504047 Ref C: 2024-04-29T12:59:41Z" ], + "Date": [ "Mon, 29 Apr 2024 12:59:46 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1852" ], + "Content-Length": [ "2093" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV7efod9x\",\"name\":\"namespaceV7efod9x\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":true},\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev7efod9x\",\"createdAt\":\"2023-09-18T08:19:43.23Z\",\"updatedAt\":\"2023-09-18T08:23:34.657Z\",\"serviceBusEndpoint\":\"https://namespaceV7efod9x.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV75reoyd\",\"name\":\"namespaceV75reoyd\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://eh-ps-vgt87w-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://eh-ps-vgt87w-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi1\"}}],\"requireInfrastructureEncryption\":true},\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev75reoyd\",\"serviceBusEndpoint\":\"https://namespaceV75reoyd.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Creating\",\"status\":\"Creating\",\"createdAt\":\"2024-04-29T12:59:46.3500708Z\",\"updatedAt\":\"2024-04-29T12:59:46.3500708Z\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi2\":{\"clientId\":\"5c5159b2-689b-4fb3-9412-010709a20a7f\",\"principalId\":\"14f2ac9f-e580-4c60-b26b-f46704cedfd4\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi1\":{\"clientId\":\"bd1fd688-d955-4f14-b35a-ead560b90d61\",\"principalId\":\"2c3ba703-66cf-47ec-99b4-465018cd9540\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV7efod9x?api-version=2023-01-01-preview+57": { + "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV75reoyd?api-version=2023-01-01-preview+16": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV7efod9x?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV75reoyd?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "174" ], - "x-ms-client-request-id": [ "ff5507c0-ca6b-4f60-b57f-c88c751d4e7b" ], + "x-ms-unique-id": [ "128" ], + "x-ms-client-request-id": [ "09aa4ca3-6cea-4dad-b6f2-bc4d5f22f32a" ], "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ] }, "ContentHeaders": { } @@ -2405,40 +687,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "8bbbfecb-5a34-4853-ad45-9c71082b1559_M11CH3_M11CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], - "x-ms-correlation-request-id": [ "d8ef8a5b-9594-4fd9-b4f3-9a9979b40da4" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T082659Z:d8ef8a5b-9594-4fd9-b4f3-9a9979b40da4" ], + "x-ms-correlation-request-id": [ "a375f7ab-9759-4f04-b7ba-347593799676" ], + "x-ms-client-request-id": [ "09aa4ca3-6cea-4dad-b6f2-bc4d5f22f32a_RP" ], + "x-ms-messaging-activity-id": [ "96e2dcf8-0019-4dd7-baa8-6c8237f09a05" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G9|2024-04-29T13:00:18" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "a375f7ab-9759-4f04-b7ba-347593799676" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T130018Z:a375f7ab-9759-4f04-b7ba-347593799676" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 6C381C4F56CD4FA88C36CB9A30BF5E10 Ref B: SEL221051504011 Ref C: 2023-09-18T08:26:58Z" ], - "Date": [ "Mon, 18 Sep 2023 08:26:58 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 4D2D6F58052548AAB7C24899787C2C35 Ref B: SEL221051504047 Ref C: 2024-04-29T13:00:16Z" ], + "Date": [ "Mon, 29 Apr 2024 13:00:17 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1954" ], + "Content-Length": [ "2125" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV7efod9x\",\"name\":\"namespaceV7efod9x\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{\"clientId\":\"440d7336-c408-4327-ad13-10a4e71aad64\",\"principalId\":\"1bdb6af0-4284-47f4-b049-94aa2868d90b\"}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":true},\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev7efod9x\",\"createdAt\":\"2023-09-18T08:19:43.23Z\",\"updatedAt\":\"2023-09-18T08:26:59.077Z\",\"serviceBusEndpoint\":\"https://namespaceV7efod9x.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV75reoyd\",\"name\":\"namespaceV75reoyd\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://eh-ps-vgt87w-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://eh-ps-vgt87w-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi1\"}}],\"requireInfrastructureEncryption\":true},\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev75reoyd\",\"serviceBusEndpoint\":\"https://namespaceV75reoyd.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Creating\",\"status\":\"Creating\",\"createdAt\":\"2024-04-29T12:59:46.3500708Z\",\"updatedAt\":\"2024-04-29T12:59:46.3500708Z\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi2\":{\"clientId\":\"5c5159b2-689b-4fb3-9412-010709a20a7f\",\"principalId\":\"14f2ac9f-e580-4c60-b26b-f46704cedfd4\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi1\":{\"clientId\":\"bd1fd688-d955-4f14-b35a-ead560b90d61\",\"principalId\":\"2c3ba703-66cf-47ec-99b4-465018cd9540\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV7efod9x?api-version=2023-01-01-preview+58": { + "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV75reoyd?api-version=2023-01-01-preview+17": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV7efod9x?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV75reoyd?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "175" ], - "x-ms-client-request-id": [ "ff5507c0-ca6b-4f60-b57f-c88c751d4e7b" ], + "x-ms-unique-id": [ "129" ], + "x-ms-client-request-id": [ "09aa4ca3-6cea-4dad-b6f2-bc4d5f22f32a" ], "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ] }, "ContentHeaders": { } @@ -2448,40 +733,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "7e464db6-fd40-412e-8253-e8ba677e0a34_M6CH3_M6CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], - "x-ms-correlation-request-id": [ "cf69a70c-c1d9-408e-bfb2-ed6565c91cc9" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T082730Z:cf69a70c-c1d9-408e-bfb2-ed6565c91cc9" ], + "x-ms-correlation-request-id": [ "ceedd139-0009-4ddf-a6e3-4c61ef7292a2" ], + "x-ms-client-request-id": [ "09aa4ca3-6cea-4dad-b6f2-bc4d5f22f32a_RP" ], + "x-ms-messaging-activity-id": [ "ea1362be-23d1-42b3-be6b-c8811cbecf16" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G9|2024-04-29T13:00:49" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-request-id": [ "ceedd139-0009-4ddf-a6e3-4c61ef7292a2" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T130049Z:ceedd139-0009-4ddf-a6e3-4c61ef7292a2" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 0D70C50EA68E416B8D9BE8888089F27E Ref B: SEL221051504011 Ref C: 2023-09-18T08:27:29Z" ], - "Date": [ "Mon, 18 Sep 2023 08:27:29 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 802B622F82494A57AF5A9B0238CC0AF8 Ref B: SEL221051504047 Ref C: 2024-04-29T13:00:48Z" ], + "Date": [ "Mon, 29 Apr 2024 13:00:49 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "2046" ], + "Content-Length": [ "2124" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV7efod9x\",\"name\":\"namespaceV7efod9x\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{\"clientId\":\"38a989a1-3fab-4015-b546-cbcf7a67aa89\",\"principalId\":\"624205aa-192c-4303-9606-990d06cbd997\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{\"clientId\":\"440d7336-c408-4327-ad13-10a4e71aad64\",\"principalId\":\"1bdb6af0-4284-47f4-b049-94aa2868d90b\"}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":true},\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev7efod9x\",\"createdAt\":\"2023-09-18T08:19:43.23Z\",\"updatedAt\":\"2023-09-18T08:26:59.42Z\",\"serviceBusEndpoint\":\"https://namespaceV7efod9x.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV75reoyd\",\"name\":\"namespaceV75reoyd\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://eh-ps-vgt87w-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://eh-ps-vgt87w-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi1\"}}],\"requireInfrastructureEncryption\":true},\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev75reoyd\",\"serviceBusEndpoint\":\"https://namespaceV75reoyd.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:59:46.3500708Z\",\"updatedAt\":\"2024-04-29T13:00:49.3646053Z\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi2\":{\"clientId\":\"5c5159b2-689b-4fb3-9412-010709a20a7f\",\"principalId\":\"14f2ac9f-e580-4c60-b26b-f46704cedfd4\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi1\":{\"clientId\":\"bd1fd688-d955-4f14-b35a-ead560b90d61\",\"principalId\":\"2c3ba703-66cf-47ec-99b4-465018cd9540\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV7efod9x?api-version=2023-01-01-preview+59": { + "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV75reoyd?api-version=2023-01-01-preview+18": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV7efod9x?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV75reoyd?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "176" ], - "x-ms-client-request-id": [ "ff5507c0-ca6b-4f60-b57f-c88c751d4e7b" ], + "x-ms-unique-id": [ "130" ], + "x-ms-client-request-id": [ "09aa4ca3-6cea-4dad-b6f2-bc4d5f22f32a" ], "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ] }, "ContentHeaders": { } @@ -2491,121 +779,84 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "a06db111-9fb4-40dc-b806-90f13b039865_M0SN1_M0SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], - "x-ms-correlation-request-id": [ "a3cb5440-3922-4049-9019-97a61b2e72b7" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T082731Z:a3cb5440-3922-4049-9019-97a61b2e72b7" ], + "x-ms-correlation-request-id": [ "e0428da1-dab0-479b-b66a-2dc15667ed0d" ], + "x-ms-client-request-id": [ "09aa4ca3-6cea-4dad-b6f2-bc4d5f22f32a_RP" ], + "x-ms-messaging-activity-id": [ "ff73a7f3-90da-4a0e-a0de-5fd6ca706a07" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G10|2024-04-29T13:00:51" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-request-id": [ "e0428da1-dab0-479b-b66a-2dc15667ed0d" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T130051Z:e0428da1-dab0-479b-b66a-2dc15667ed0d" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: C4E5098A26C84C489AC7D50EECF50FC1 Ref B: SEL221051504011 Ref C: 2023-09-18T08:27:30Z" ], - "Date": [ "Mon, 18 Sep 2023 08:27:30 GMT" ] + "X-MSEdge-Ref": [ "Ref A: C812752BF7824C6687FAFD395F9BCCCF Ref B: SEL221051504047 Ref C: 2024-04-29T13:00:49Z" ], + "Date": [ "Mon, 29 Apr 2024 13:00:50 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "2046" ], + "Content-Length": [ "2124" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV7efod9x\",\"name\":\"namespaceV7efod9x\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{\"clientId\":\"38a989a1-3fab-4015-b546-cbcf7a67aa89\",\"principalId\":\"624205aa-192c-4303-9606-990d06cbd997\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{\"clientId\":\"440d7336-c408-4327-ad13-10a4e71aad64\",\"principalId\":\"1bdb6af0-4284-47f4-b049-94aa2868d90b\"}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":true},\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev7efod9x\",\"createdAt\":\"2023-09-18T08:19:43.23Z\",\"updatedAt\":\"2023-09-18T08:26:59.42Z\",\"serviceBusEndpoint\":\"https://namespaceV7efod9x.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV75reoyd\",\"name\":\"namespaceV75reoyd\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://eh-ps-vgt87w-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://eh-ps-vgt87w-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi1\"}}],\"requireInfrastructureEncryption\":true},\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev75reoyd\",\"serviceBusEndpoint\":\"https://namespaceV75reoyd.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:59:46.3500708Z\",\"updatedAt\":\"2024-04-29T13:00:49.3646053Z\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi2\":{\"clientId\":\"5c5159b2-689b-4fb3-9412-010709a20a7f\",\"principalId\":\"14f2ac9f-e580-4c60-b26b-f46704cedfd4\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi1\":{\"clientId\":\"bd1fd688-d955-4f14-b35a-ead560b90d61\",\"principalId\":\"2c3ba703-66cf-47ec-99b4-465018cd9540\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV92x0wzd?api-version=2023-01-01-preview+60": { + "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV9t8q4ed?api-version=2023-01-01-preview+19": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV92x0wzd?api-version=2023-01-01-preview", - "Content": "{\n \"location\": \"australiaeast\",\n \"sku\": {\n \"name\": \"Standard\",\n \"tier\": \"Standard\"\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV9t8q4ed?api-version=2023-01-01-preview", + "Content": "{\n \"location\": \"eastus\",\n \"sku\": {\n \"name\": \"Standard\",\n \"tier\": \"Standard\"\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "96" ] - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "ead7a8b2-75c6-48c7-8edf-f3b436271997_M5CH3_M5CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ "49" ], - "x-ms-correlation-request-id": [ "7679797e-c0ca-422a-a72a-5c6385519752" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T082740Z:7679797e-c0ca-422a-a72a-5c6385519752" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 5D7649F65A2F4871A275CF4E0D7D336E Ref B: SEL221051504011 Ref C: 2023-09-18T08:27:31Z" ], - "Date": [ "Mon, 18 Sep 2023 08:27:39 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "793" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV92x0wzd\",\"name\":\"namespaceV92x0wzd\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"Australia East\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Created\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev92x0wzd\",\"createdAt\":\"2023-09-18T08:27:37.147Z\",\"updatedAt\":\"2023-09-18T08:27:37.147Z\",\"serviceBusEndpoint\":\"https://namespaceV92x0wzd.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV92x0wzd?api-version=2023-01-01-preview+61": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV92x0wzd?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "178" ], - "x-ms-client-request-id": [ "c2b4f5a4-db2b-4195-a3de-5ea3ca31d969" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { + "Content-Length": [ "89" ] } }, "Response": { - "StatusCode": 200, + "StatusCode": 201, "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "7478baae-8e56-45b3-9629-abb364c40152_M7CH3_M7CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11991" ], - "x-ms-correlation-request-id": [ "5ebdecc7-51da-4d1d-8b68-ff0984456121" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T082812Z:5ebdecc7-51da-4d1d-8b68-ff0984456121" ], + "x-ms-correlation-request-id": [ "b15f404a-557a-44c7-b83c-b583a2936e5c" ], + "x-ms-client-request-id": [ "42cd17b5-930d-4803-9a92-fe92eea288aa_RP" ], + "x-ms-messaging-activity-id": [ "28a895f3-c26e-4359-8637-7e52ea1ed9c5" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G9|2024-04-29T13:00:56" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "49" ], + "x-ms-request-id": [ "b15f404a-557a-44c7-b83c-b583a2936e5c" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T130056Z:b15f404a-557a-44c7-b83c-b583a2936e5c" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: CEF88056739844F1B9BAD1C1FF6EA57D Ref B: SEL221051504011 Ref C: 2023-09-18T08:28:10Z" ], - "Date": [ "Mon, 18 Sep 2023 08:28:11 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 1C36933459AE4260948E2838CBEDBF82 Ref B: SEL221051504047 Ref C: 2024-04-29T13:00:51Z" ], + "Date": [ "Mon, 29 Apr 2024 13:00:55 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "793" ], + "Content-Length": [ "792" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV92x0wzd\",\"name\":\"namespaceV92x0wzd\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"Australia East\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Created\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev92x0wzd\",\"createdAt\":\"2023-09-18T08:27:37.147Z\",\"updatedAt\":\"2023-09-18T08:27:37.147Z\",\"serviceBusEndpoint\":\"https://namespaceV92x0wzd.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV9t8q4ed\",\"name\":\"namespaceV9t8q4ed\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev9t8q4ed\",\"serviceBusEndpoint\":\"https://namespaceV9t8q4ed.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Creating\",\"status\":\"Creating\",\"createdAt\":\"2024-04-29T13:00:56.0365492Z\",\"updatedAt\":\"2024-04-29T13:00:56.0365492Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}}", "isContentBase64": false } }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV92x0wzd?api-version=2023-01-01-preview+62": { + "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV9t8q4ed?api-version=2023-01-01-preview+20": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV92x0wzd?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV9t8q4ed?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "179" ], - "x-ms-client-request-id": [ "c2b4f5a4-db2b-4195-a3de-5ea3ca31d969" ], + "x-ms-unique-id": [ "132" ], + "x-ms-client-request-id": [ "42cd17b5-930d-4803-9a92-fe92eea288aa" ], "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ] }, "ContentHeaders": { } @@ -2615,40 +866,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "4b7908d3-a98c-4988-9544-5934f9450c9f_M8CH3_M8CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-correlation-request-id": [ "d9c6b17d-8a57-4a07-a038-45ee8aa40627" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T082842Z:d9c6b17d-8a57-4a07-a038-45ee8aa40627" ], + "x-ms-correlation-request-id": [ "d346022b-ab97-4ba2-9ffa-52311facce84" ], + "x-ms-client-request-id": [ "42cd17b5-930d-4803-9a92-fe92eea288aa_RP" ], + "x-ms-messaging-activity-id": [ "d81d25e3-0326-4bdb-a509-fe3e700f286b" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-29T13:01:28" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "d346022b-ab97-4ba2-9ffa-52311facce84" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T130128Z:d346022b-ab97-4ba2-9ffa-52311facce84" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 6BDA8DBC971842469D5EC8E9A0D43B9E Ref B: SEL221051504011 Ref C: 2023-09-18T08:28:42Z" ], - "Date": [ "Mon, 18 Sep 2023 08:28:41 GMT" ] + "X-MSEdge-Ref": [ "Ref A: AD36D4A9025F467BA9D979C4400C7123 Ref B: SEL221051504047 Ref C: 2024-04-29T13:01:26Z" ], + "Date": [ "Mon, 29 Apr 2024 13:01:27 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "790" ], + "Content-Length": [ "823" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV92x0wzd\",\"name\":\"namespaceV92x0wzd\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"Australia East\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev92x0wzd\",\"createdAt\":\"2023-09-18T08:27:37.147Z\",\"updatedAt\":\"2023-09-18T08:28:31.04Z\",\"serviceBusEndpoint\":\"https://namespaceV92x0wzd.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV9t8q4ed\",\"name\":\"namespaceV9t8q4ed\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"privateEndpointConnections\":[],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev9t8q4ed\",\"serviceBusEndpoint\":\"https://namespaceV9t8q4ed.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T13:00:56.0365492Z\",\"updatedAt\":\"2024-04-29T13:01:24.8803571Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}}", "isContentBase64": false } }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV92x0wzd?api-version=2023-01-01-preview+63": { + "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV9t8q4ed?api-version=2023-01-01-preview+21": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV92x0wzd?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV9t8q4ed?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "180" ], - "x-ms-client-request-id": [ "c2b4f5a4-db2b-4195-a3de-5ea3ca31d969" ], + "x-ms-unique-id": [ "133" ], + "x-ms-client-request-id": [ "42cd17b5-930d-4803-9a92-fe92eea288aa" ], "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ] }, "ContentHeaders": { } @@ -2658,39 +912,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "7a58d4aa-a5e9-4c27-85fb-c896496e81da_M0SN1_M0SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], - "x-ms-correlation-request-id": [ "6e8ab8e4-af12-4aa3-9bf1-62a4d371b4a8" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T082843Z:6e8ab8e4-af12-4aa3-9bf1-62a4d371b4a8" ], + "x-ms-correlation-request-id": [ "371eae63-abc8-4572-bc93-52adef87e264" ], + "x-ms-client-request-id": [ "42cd17b5-930d-4803-9a92-fe92eea288aa_RP" ], + "x-ms-messaging-activity-id": [ "aa05ea4f-7eb8-4735-a099-c0a731e7bb72" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G12|2024-04-29T13:01:29" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "371eae63-abc8-4572-bc93-52adef87e264" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240429T130129Z:371eae63-abc8-4572-bc93-52adef87e264" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 7168A4F8D20F449EB1877273FFFC8D8F Ref B: SEL221051504011 Ref C: 2023-09-18T08:28:42Z" ], - "Date": [ "Mon, 18 Sep 2023 08:28:42 GMT" ] + "X-MSEdge-Ref": [ "Ref A: A27EEE5BDC854B449A5D412A25AF6179 Ref B: SEL221051504047 Ref C: 2024-04-29T13:01:28Z" ], + "Date": [ "Mon, 29 Apr 2024 13:01:29 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "790" ], + "Content-Length": [ "823" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV92x0wzd\",\"name\":\"namespaceV92x0wzd\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"Australia East\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev92x0wzd\",\"createdAt\":\"2023-09-18T08:27:37.147Z\",\"updatedAt\":\"2023-09-18T08:28:31.04Z\",\"serviceBusEndpoint\":\"https://namespaceV92x0wzd.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV9t8q4ed\",\"name\":\"namespaceV9t8q4ed\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"privateEndpointConnections\":[],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev9t8q4ed\",\"serviceBusEndpoint\":\"https://namespaceV9t8q4ed.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T13:00:56.0365492Z\",\"updatedAt\":\"2024-04-29T13:01:24.8803571Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}}", "isContentBase64": false } }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt?api-version=2023-01-01-preview+64": { + "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV5dmbu7w?api-version=2023-01-01-preview+22": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV5dmbu7w?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "181" ], - "x-ms-client-request-id": [ "6d943975-ec7f-407a-af0f-d56ff2441047" ], + "x-ms-unique-id": [ "134" ], + "x-ms-client-request-id": [ "34031211-bcaa-419f-94d3-38cf7458376a" ], "CommandName": [ "Get-AzEventHubNamespaceV2" ], "FullCommandName": [ "Get-AzEventHubNamespace_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -2701,39 +958,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "7dc28f86-ec10-4a31-823d-797bfcb4e4fa_M2SN1_M2SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11990" ], - "x-ms-correlation-request-id": [ "0da51861-6cae-41d4-80a4-1083dd82dc4d" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T082846Z:0da51861-6cae-41d4-80a4-1083dd82dc4d" ], + "x-ms-correlation-request-id": [ "2ac41885-2b13-4ec8-9ab4-8c5fd465742a" ], + "x-ms-client-request-id": [ "34031211-bcaa-419f-94d3-38cf7458376a_RP" ], + "x-ms-messaging-activity-id": [ "74e5f4ee-15d7-4e53-bcc9-b7157350695f" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G8|2024-04-29T13:01:31" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "2ac41885-2b13-4ec8-9ab4-8c5fd465742a" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T130131Z:2ac41885-2b13-4ec8-9ab4-8c5fd465742a" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 244C690036E74E5C95826A2F50866D0C Ref B: SEL221051504011 Ref C: 2023-09-18T08:28:43Z" ], - "Date": [ "Mon, 18 Sep 2023 08:28:45 GMT" ] + "X-MSEdge-Ref": [ "Ref A: B873B030A604485C8104BD5D1295FC04 Ref B: SEL221051504047 Ref C: 2024-04-29T13:01:29Z" ], + "Date": [ "Mon, 29 Apr 2024 13:01:30 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "2047" ], + "Content-Length": [ "2125" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt\",\"name\":\"namespaceV5nrf8kt\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{\"clientId\":\"38a989a1-3fab-4015-b546-cbcf7a67aa89\",\"principalId\":\"624205aa-192c-4303-9606-990d06cbd997\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{\"clientId\":\"440d7336-c408-4327-ad13-10a4e71aad64\",\"principalId\":\"1bdb6af0-4284-47f4-b049-94aa2868d90b\"}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":false},\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5nrf8kt\",\"createdAt\":\"2023-09-18T08:11:40.49Z\",\"updatedAt\":\"2023-09-18T08:19:01.53Z\",\"serviceBusEndpoint\":\"https://namespaceV5nrf8kt.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV5dmbu7w\",\"name\":\"namespaceV5dmbu7w\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://eh-ps-vgt87w-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://eh-ps-vgt87w-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi1\"}}],\"requireInfrastructureEncryption\":false},\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5dmbu7w\",\"serviceBusEndpoint\":\"https://namespaceV5dmbu7w.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:58:35.8874476Z\",\"updatedAt\":\"2024-04-29T12:59:35.6226002Z\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi2\":{\"clientId\":\"5c5159b2-689b-4fb3-9412-010709a20a7f\",\"principalId\":\"14f2ac9f-e580-4c60-b26b-f46704cedfd4\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi1\":{\"clientId\":\"bd1fd688-d955-4f14-b35a-ead560b90d61\",\"principalId\":\"2c3ba703-66cf-47ec-99b4-465018cd9540\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}}", "isContentBase64": false } }, - "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces?api-version=2023-01-01-preview+65": { + "New-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces?api-version=2023-01-01-preview+23": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "182" ], - "x-ms-client-request-id": [ "0b92706d-7472-4dc0-8195-6a0f325c7c0f" ], + "x-ms-unique-id": [ "135" ], + "x-ms-client-request-id": [ "a4b1178d-15ff-4321-be9f-28054d5227d7" ], "CommandName": [ "Get-AzEventHubNamespaceV2" ], "FullCommandName": [ "Get-AzEventHubNamespace_List1" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -2744,23 +1004,24 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "c54fcc4e-de90-4946-b46d-ff34c0b167e4_M6SN1_M6SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-correlation-request-id": [ "d09f6a3d-edce-4a86-bec7-1a36aec3705c" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T082846Z:d09f6a3d-edce-4a86-bec7-1a36aec3705c" ], + "x-ms-original-request-ids": [ "", "" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "9a2a7ecf-cc7a-4970-a212-8d231437c0e5" ], + "x-ms-correlation-request-id": [ "9a2a7ecf-cc7a-4970-a212-8d231437c0e5" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240429T130133Z:9a2a7ecf-cc7a-4970-a212-8d231437c0e5" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 76E5493551D4441099A4044BF68A8FE7 Ref B: SEL221051504011 Ref C: 2023-09-18T08:28:46Z" ], - "Date": [ "Mon, 18 Sep 2023 08:28:45 GMT" ] + "X-MSEdge-Ref": [ "Ref A: C2AE0CF9524140EFA02437F340FCC896 Ref B: SEL221051504047 Ref C: 2024-04-29T13:01:31Z" ], + "Date": [ "Mon, 29 Apr 2024 13:01:32 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "13214" ], + "Content-Length": [ "11992" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8\",\"name\":\"namespaceNamed5orf8\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"privateEndpointConnections\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/privateEndpointConnections/039cd4e6-b8c0-4b3f-a6c2-41d367f808b5\",\"name\":\"039cd4e6-b8c0-4b3f-a6c2-41d367f808b5\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"East US\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.Network/privateEndpoints/privateEndpoint-qyfutj\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956\",\"name\":\"cfdfc4e7-f5a8-465f-82a7-c4a77d84a956\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"East US\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.Network/privateEndpoints/privateEndpoint-352l4o\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}],\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamed5orf8\",\"createdAt\":\"2023-09-18T07:32:30.42Z\",\"updatedAt\":\"2023-09-18T07:33:53.993Z\",\"serviceBusEndpoint\":\"https://namespaceNamed5orf8.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s\",\"name\":\"namespaceNamewze84s\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"07331995-dc52-4f9b-898b-98ac4f0f5c53\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamewze84s\",\"createdAt\":\"2023-09-18T07:32:31.713Z\",\"updatedAt\":\"2023-09-18T07:39:50.78Z\",\"serviceBusEndpoint\":\"https://namespaceNamewze84s.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8\",\"name\":\"namespaceNamejwm6p8\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamejwm6p8\",\"createdAt\":\"2023-09-18T07:40:21.923Z\",\"updatedAt\":\"2023-09-18T07:59:15.757Z\",\"serviceBusEndpoint\":\"https://namespaceNamejwm6p8.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"name\":\"namespaceNameyr61dz\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"Australia East\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenameyr61dz\",\"createdAt\":\"2023-09-18T07:40:22.723Z\",\"updatedAt\":\"2023-09-18T07:59:18.36Z\",\"serviceBusEndpoint\":\"https://namespaceNameyr61dz.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo\",\"name\":\"namespaceV19d35wo\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{\"clientId\":\"440d7336-c408-4327-ad13-10a4e71aad64\",\"principalId\":\"1bdb6af0-4284-47f4-b049-94aa2868d90b\"}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev19d35wo\",\"createdAt\":\"2023-09-18T07:48:36.533Z\",\"updatedAt\":\"2023-09-18T07:55:47.933Z\",\"serviceBusEndpoint\":\"https://namespaceV19d35wo.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV2b4cdh6\",\"name\":\"namespaceV2b4cdh6\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev2b4cdh6\",\"createdAt\":\"2023-09-18T08:01:24.34Z\",\"updatedAt\":\"2023-09-18T08:02:16.493Z\",\"serviceBusEndpoint\":\"https://namespaceV2b4cdh6.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":10},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9\",\"name\":\"namespaceV3dp4io9\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":true,\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":18,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3dp4io9\",\"createdAt\":\"2023-09-18T08:02:35.31Z\",\"updatedAt\":\"2023-09-18T08:03:22.78Z\",\"serviceBusEndpoint\":\"https://namespaceV3dp4io9.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV4wfj1rk\",\"name\":\"namespaceV4wfj1rk\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"00fc2141-67ee-4a13-b2fa-a1fa8fe152a2\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4wfj1rk\",\"createdAt\":\"2023-09-18T08:03:46.82Z\",\"updatedAt\":\"2023-09-18T08:11:00.91Z\",\"serviceBusEndpoint\":\"https://namespaceV4wfj1rk.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt\",\"name\":\"namespaceV5nrf8kt\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{\"clientId\":\"38a989a1-3fab-4015-b546-cbcf7a67aa89\",\"principalId\":\"624205aa-192c-4303-9606-990d06cbd997\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{\"clientId\":\"440d7336-c408-4327-ad13-10a4e71aad64\",\"principalId\":\"1bdb6af0-4284-47f4-b049-94aa2868d90b\"}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":false},\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5nrf8kt\",\"createdAt\":\"2023-09-18T08:11:40.49Z\",\"updatedAt\":\"2023-09-18T08:19:01.53Z\",\"serviceBusEndpoint\":\"https://namespaceV5nrf8kt.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV7efod9x\",\"name\":\"namespaceV7efod9x\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{\"clientId\":\"38a989a1-3fab-4015-b546-cbcf7a67aa89\",\"principalId\":\"624205aa-192c-4303-9606-990d06cbd997\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{\"clientId\":\"440d7336-c408-4327-ad13-10a4e71aad64\",\"principalId\":\"1bdb6af0-4284-47f4-b049-94aa2868d90b\"}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":true},\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev7efod9x\",\"createdAt\":\"2023-09-18T08:19:43.23Z\",\"updatedAt\":\"2023-09-18T08:26:59.42Z\",\"serviceBusEndpoint\":\"https://namespaceV7efod9x.servicebus.windows.net:443/\",\"status\":\"Active\"}},{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV92x0wzd\",\"name\":\"namespaceV92x0wzd\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"Australia East\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev92x0wzd\",\"createdAt\":\"2023-09-18T08:27:37.147Z\",\"updatedAt\":\"2023-09-18T08:28:31.04Z\",\"serviceBusEndpoint\":\"https://namespaceV92x0wzd.servicebus.windows.net:443/\",\"status\":\"Active\"}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV4i450gk\",\"name\":\"namespaceV4i450gk\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev4i450gk\",\"serviceBusEndpoint\":\"https://namespaceV4i450gk.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:57:25.8647035Z\",\"updatedAt\":\"2024-04-29T12:58:19.4123871Z\"},\"identity\":{\"principalId\":\"5cbf484f-6486-4dd8-909c-ea55b8b32811\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV2dmnw8c\",\"name\":\"namespaceV2dmnw8c\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev2dmnw8c\",\"serviceBusEndpoint\":\"https://namespaceV2dmnw8c.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:56:09.3854671Z\",\"updatedAt\":\"2024-04-29T12:56:36.7520883Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV75reoyd\",\"name\":\"namespaceV75reoyd\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://eh-ps-vgt87w-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://eh-ps-vgt87w-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi1\"}}],\"requireInfrastructureEncryption\":true},\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev75reoyd\",\"serviceBusEndpoint\":\"https://namespaceV75reoyd.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:59:46.3500708Z\",\"updatedAt\":\"2024-04-29T13:00:49.3646053Z\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi1\":{\"clientId\":\"bd1fd688-d955-4f14-b35a-ead560b90d61\",\"principalId\":\"2c3ba703-66cf-47ec-99b4-465018cd9540\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi2\":{\"clientId\":\"5c5159b2-689b-4fb3-9412-010709a20a7f\",\"principalId\":\"14f2ac9f-e580-4c60-b26b-f46704cedfd4\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz\",\"name\":\"namespaceV35flrpz\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev35flrpz\",\"serviceBusEndpoint\":\"https://namespaceV35flrpz.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":18,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:56:46.3971474Z\",\"updatedAt\":\"2024-04-29T12:57:10.8990145Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":10}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV5dmbu7w\",\"name\":\"namespaceV5dmbu7w\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://eh-ps-vgt87w-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://eh-ps-vgt87w-kv1.vault.azure.net/\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi1\"}}],\"requireInfrastructureEncryption\":false},\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5dmbu7w\",\"serviceBusEndpoint\":\"https://namespaceV5dmbu7w.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:58:35.8874476Z\",\"updatedAt\":\"2024-04-29T12:59:35.6226002Z\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi1\":{\"clientId\":\"bd1fd688-d955-4f14-b35a-ead560b90d61\",\"principalId\":\"2c3ba703-66cf-47ec-99b4-465018cd9540\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi2\":{\"clientId\":\"5c5159b2-689b-4fb3-9412-010709a20a7f\",\"principalId\":\"14f2ac9f-e580-4c60-b26b-f46704cedfd4\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName8avljz\",\"name\":\"namespaceName8avljz\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacename8avljz\",\"serviceBusEndpoint\":\"https://namespaceName8avljz.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:36:42.1697023Z\",\"updatedAt\":\"2024-04-29T12:40:07.9626719Z\"},\"identity\":{\"principalId\":\"95bc1d16-654f-4c7a-b29d-01094b522d1a\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t\",\"name\":\"namespaceNameil6w7t\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenameil6w7t\",\"serviceBusEndpoint\":\"https://namespaceNameil6w7t.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:36:41.1305159Z\",\"updatedAt\":\"2024-04-29T12:53:59.9125587Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV14e6stf\",\"name\":\"namespaceV14e6stf\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev14e6stf\",\"serviceBusEndpoint\":\"https://namespaceV14e6stf.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:49:02.5300323Z\",\"updatedAt\":\"2024-04-29T12:49:53.4003505Z\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi2\":{\"clientId\":\"5c5159b2-689b-4fb3-9412-010709a20a7f\",\"principalId\":\"14f2ac9f-e580-4c60-b26b-f46704cedfd4\"}}},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w\",\"name\":\"namespaceNameeqpx5w\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenameeqpx5w\",\"serviceBusEndpoint\":\"https://namespaceNameeqpx5w.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:36:41.1774488Z\",\"updatedAt\":\"2024-04-29T12:37:29.3508153Z\"},\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV9t8q4ed\",\"name\":\"namespaceV9t8q4ed\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev9t8q4ed\",\"serviceBusEndpoint\":\"https://namespaceV9t8q4ed.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T13:00:56.0365492Z\",\"updatedAt\":\"2024-04-29T13:01:24.8803571Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"name\":\"namespaceName7pzlta\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"southcentralus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacename7pzlta\",\"serviceBusEndpoint\":\"https://namespaceName7pzlta.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:36:41.2194019Z\",\"updatedAt\":\"2024-04-29T12:53:56.3476531Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}}]}", "isContentBase64": false } } diff --git a/src/EventHub/EventHub.Autorest/test/New-AzEventHubNamespaceV2.Tests.ps1 b/src/EventHub/EventHub.Autorest/test/New-AzEventHubNamespaceV2.Tests.ps1 index 3fdcf0370412..0089a9b97396 100644 --- a/src/EventHub/EventHub.Autorest/test/New-AzEventHubNamespaceV2.Tests.ps1 +++ b/src/EventHub/EventHub.Autorest/test/New-AzEventHubNamespaceV2.Tests.ps1 @@ -16,7 +16,7 @@ if(($null -eq $TestName) -or ($TestName -contains 'New-AzEventHubNamespaceV2')) Describe 'New-AzEventHubNamespaceV2' { It 'SetExpanded' { - $eventHubNamespace = New-AzEventHubNamespaceV2 -ResourceGroupName $env.resourceGroup -Name $env.namespaceV2 -SkuName Standard -Location eastus + $eventHubNamespace = New-AzEventHubNamespaceV2 -ResourceGroupName $env.resourceGroup -Name $env.namespaceV2 -SkuName Standard -Location $env.location $eventHubNamespace.Name | Should -Be $env.namespaceV2 $eventHubNamespace.SkuName | Should -Be Standard $eventHubNamespace.SkuCapacity | Should -Be 1 @@ -28,20 +28,20 @@ Describe 'New-AzEventHubNamespaceV2' { $eventHubNamespace.DisableLocalAuth | Should -Be $false $eventHubNamespace.KafkaEnabled | Should be $true - $eventHubNamespace = New-AzEventHubNamespaceV2 -ResourceGroupName $env.resourceGroup -Name $env.namespaceV3 -SkuCapacity 10 -MaximumThroughputUnit 18 -SkuName Standard -Location southcentralus -Tag @{k1='v1'; k2='v2'} -EnableAutoInflate -DisableLocalAuth -MinimumTlsVersion 1.1 -PublicNetworkAccess Disabled -ZoneRedundant + $eventHubNamespace = New-AzEventHubNamespaceV2 -ResourceGroupName $env.resourceGroup -Name $env.namespaceV3 -SkuCapacity 10 -MaximumThroughputUnit 18 -SkuName Standard -Location $env.location -Tag @{k1='v1'; k2='v2'} -EnableAutoInflate -DisableLocalAuth -MinimumTlsVersion 1.1 -PublicNetworkAccess Disabled -ZoneRedundant:$env.useZoneRedundancy $eventHubNamespace.Name | Should be $env.namespaceV3 $eventHubNamespace.SkuCapacity | Should be 10 $eventHubNamespace.SkuName | Should be Standard $eventHubNamespace.MaximumThroughputUnit | Should be 18 $eventHubNamespace.MinimumTlsVersion | Should be '1.1' - $eventHubNamespace.Location | Should be "South Central Us" + $eventhubNamespace.Location.Replace(' ', '').ToLower() | Should -Be $env.location $eventHubNamespace.EnableAutoInflate | Should be $true $eventHubNamespace.DisableLocalAuth | Should be $true $eventHubNamespace.KafkaEnabled | Should be $true $eventHubNamespace.PublicNetworkAccess | Should -Be "Disabled" - $eventHubNamespace.ZoneRedundant | Should -Be $true + $eventHubNamespace.ZoneRedundant | Should -Be $env.useZoneRedundancy - $eventhubNamespace = New-AzEventHubNamespaceV2 -ResourceGroupName $env.resourceGroup -Name $env.namespaceV4 -SkuName Premium -Location eastus -IdentityType SystemAssigned + $eventhubNamespace = New-AzEventHubNamespaceV2 -ResourceGroupName $env.resourceGroup -Name $env.namespaceV4 -SkuName Premium -Location $env.location -IdentityType SystemAssigned $eventhubNamespace.MaximumThroughputUnit | Should -Be 0 $eventhubNamespace.Name | Should -Be $env.namespaceV4 $eventhubNamespace.IdentityType | Should -Be SystemAssigned @@ -49,40 +49,39 @@ Describe 'New-AzEventHubNamespaceV2' { $eventhubNamespace.SkuName | Should -Be Premium $eventhubNamespace.SkuTier | Should be Premium $eventhubNamespace.DisableLocalAuth | Should -Be $false - $eventhubNamespace.Location | Should -Be "East Us" + $eventhubNamespace.Location.Replace(' ', '').ToLower() | Should -Be $env.location $eventhubNamespace.MinimumTlsVersion | Should -Be "1.2" $eventhubNamespace.KafkaEnabled | Should -Be $true - # Create namespace with UserAssigned Encryption Enabled $ec1 = New-AzEventHubKeyVaultPropertiesObject -KeyName key1 -KeyVaulturi $env.keyVaultUri -UserAssignedIdentity $env.msi1 $ec2 = New-AzEventHubKeyVaultPropertiesObject -KeyName key2 -KeyVaulturi $env.keyVaultUri -UserAssignedIdentity $env.msi1 - $eventhubNamespace = New-AzEventHubNamespaceV2 -ResourceGroupName $env.resourceGroup -Name $env.namespaceV5 -SkuName Premium -Location northeurope -IdentityType UserAssigned -UserAssignedIdentityId $env.msi1,$env.msi2 -KeyVaultProperty $ec1,$ec2 + $eventhubNamespace = New-AzEventHubNamespaceV2 -ResourceGroupName $env.resourceGroup -Name $env.namespaceV5 -SkuName Premium -Location $env.location -IdentityType UserAssigned -UserAssignedIdentityId $env.msi1,$env.msi2 -KeyVaultProperty $ec1,$ec2 $eventhubNamespace.IdentityType | Should -Be UserAssigned $eventhubNamespace.SkuName | Should -Be Premium $eventhubNamespace.SkuTier | Should -Be Premium - $eventhubNamespace.Location | Should -Be "North Europe" + $eventhubNamespace.Location.Replace(' ', '').ToLower() | Should -Be $env.location $eventhubNamespace.KeyVaultProperty.Count | Should -Be 2 $eventhubNamespace.UserAssignedIdentity.Count | Should -Be 2 $eventhubNamespace.RequireInfrastructureEncryption | Should -Be $false - # Create namespace with UserAssigned Encryption Enabled and RequireInfrastructureEncryption true $ec1 = New-AzEventHubKeyVaultPropertiesObject -KeyName key1 -KeyVaulturi $env.keyVaultUri -UserAssignedIdentity $env.msi1 $ec2 = New-AzEventHubKeyVaultPropertiesObject -KeyName key2 -KeyVaulturi $env.keyVaultUri -UserAssignedIdentity $env.msi1 - $eventhubNamespace = New-AzEventHubNamespaceV2 -ResourceGroupName $env.resourceGroup -Name $env.namespaceV7 -SkuName Premium -Location northeurope -IdentityType UserAssigned -UserAssignedIdentityId $env.msi1,$env.msi2 -KeyVaultProperty $ec1,$ec2 -RequireInfrastructureEncryption + $eventhubNamespace = New-AzEventHubNamespaceV2 -ResourceGroupName $env.resourceGroup -Name $env.namespaceV7 -SkuName Premium -Location $env.location -IdentityType UserAssigned -UserAssignedIdentityId $env.msi1,$env.msi2 -KeyVaultProperty $ec1,$ec2 -RequireInfrastructureEncryption $eventhubNamespace.IdentityType | Should -Be UserAssigned $eventhubNamespace.SkuName | Should -Be Premium $eventhubNamespace.SkuTier | Should -Be Premium - $eventhubNamespace.Location | Should -Be "North Europe" + $eventhubNamespace.Location.Replace(' ', '').ToLower() | Should -Be $env.location $eventhubNamespace.KeyVaultProperty.Count | Should -Be 2 $eventhubNamespace.UserAssignedIdentity.Count | Should -Be 2 $eventhubNamespace.RequireInfrastructureEncryption | Should -Be $true # Create an EventHub namespace within a dedicated cluster - $clusterNamespace = New-AzEventHubNamespaceV2 -ResourceGroupName $env.resourceGroup -Name $env.namespaceV9 -SkuName Standard -Location australiaeast + $clusterNamespace = New-AzEventHubNamespaceV2 -ResourceGroupName $env.resourceGroup -Name $env.namespaceV9 -SkuName Standard -Location $env.location $clusterNamespace.Name | Should -Be $env.namespaceV9 $clusterNamespace.ClusterArmId | Should -Be $env.ClusterArmId $clusterNamespace.SkuName | Should -Be "Standard" + # TODO REVERT COMMENTS BEFORE MERGING TO MAIN $eventhubNamespace = Get-AzEventHubNamespaceV2 -ResourceGroupName $env.resourceGroup -Name $env.namespaceV5 $eventhubNamespace.Name | Should -Be $env.namespaceV5 $eventhubNamespace.IdentityType | Should -Be "UserAssigned" diff --git a/src/EventHub/EventHub.Autorest/test/New-AzEventHubSchemaGroup.Recording.json b/src/EventHub/EventHub.Autorest/test/New-AzEventHubSchemaGroup.Recording.json index 24c2a1507a61..cf6b1131e3a8 100644 --- a/src/EventHub/EventHub.Autorest/test/New-AzEventHubSchemaGroup.Recording.json +++ b/src/EventHub/EventHub.Autorest/test/New-AzEventHubSchemaGroup.Recording.json @@ -1,8 +1,8 @@ { - "New-AzEventHubSchemaGroup+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/schemagroups/schemaGroupl6t5kq?api-version=2023-01-01-preview+1": { + "New-AzEventHubSchemaGroup+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/schemagroups/schemaGroup0owimy?api-version=2023-01-01-preview+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/schemagroups/schemaGroupl6t5kq?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/schemagroups/schemaGroup0owimy?api-version=2023-01-01-preview", "Content": "{\n \"properties\": {\n \"groupProperties\": {\n \"c\": \"d\",\n \"a\": \"b\"\n },\n \"schemaCompatibility\": \"Forward\",\n \"schemaType\": \"Avro\"\n }\n}", "isContentBase64": false, "Headers": { @@ -17,30 +17,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "a7dc57f3-5dfe-4876-bffb-f861970216fb_M2CH3_M2CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], - "x-ms-correlation-request-id": [ "d1ff9d7e-f842-4491-8578-1929dda1397d" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T082859Z:d1ff9d7e-f842-4491-8578-1929dda1397d" ], + "x-ms-correlation-request-id": [ "c3e1110a-5ef9-4276-a499-a0a9af17cb01" ], + "x-ms-client-request-id": [ "556391d6-b6e4-452a-9d6b-7a1ea911af6e_RP" ], + "x-ms-messaging-activity-id": [ "62d1c946-b318-4b84-9441-46f3183b879e" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G6|2024-04-29T13:01:50" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "c3e1110a-5ef9-4276-a499-a0a9af17cb01" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T130150Z:c3e1110a-5ef9-4276-a499-a0a9af17cb01" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 8A5F22145C634313A21296663FC37D80 Ref B: SEL221051504011 Ref C: 2023-09-18T08:28:57Z" ], - "Date": [ "Mon, 18 Sep 2023 08:28:58 GMT" ] + "X-MSEdge-Ref": [ "Ref A: EA5F9D76853B43658E5DE50F590A0B12 Ref B: SEL221051504047 Ref C: 2024-04-29T13:01:47Z" ], + "Date": [ "Mon, 29 Apr 2024 13:01:49 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "535" ], + "Content-Length": [ "534" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/schemagroups/schemaGroupl6t5kq\",\"name\":\"schemaGroupl6t5kq\",\"type\":\"Microsoft.EventHub/Namespaces/SchemaGroups\",\"location\":\"East US\",\"properties\":{\"updatedAtUtc\":\"2023-09-18T08:28:59.4383258Z\",\"createdAtUtc\":\"2023-09-18T08:28:59.4383258Z\",\"eTag\":\"2f7dd6f8-3bae-457c-8739-8ec5c18fccbf\",\"groupProperties\":{\"c\":\"d\",\"a\":\"b\"},\"schemaCompatibility\":\"Forward\",\"schemaType\":\"Avro\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/schemaGroups/schemaGroup0owimy\",\"name\":\"schemaGroup0owimy\",\"type\":\"Microsoft.EventHub/namespaces/schemagroups\",\"location\":\"eastus\",\"properties\":{\"updatedAtUtc\":\"2024-04-29T13:01:50.2986633Z\",\"createdAtUtc\":\"2024-04-29T13:01:50.2986633Z\",\"eTag\":\"5cb588c8-c334-40d4-b12a-be93bb36041f\",\"groupProperties\":{\"c\":\"d\",\"a\":\"b\"},\"schemaCompatibility\":\"Forward\",\"schemaType\":\"Avro\"}}", "isContentBase64": false } }, - "New-AzEventHubSchemaGroup+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/schemagroups/schemaGroupzws62u?api-version=2023-01-01-preview+2": { + "New-AzEventHubSchemaGroup+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/schemagroups/schemaGroupgbf8s5?api-version=2023-01-01-preview+2": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/schemagroups/schemaGroupzws62u?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/schemagroups/schemaGroupgbf8s5?api-version=2023-01-01-preview", "Content": "{\n \"properties\": {\n \"schemaCompatibility\": \"Backward\",\n \"schemaType\": \"Avro\"\n }\n}", "isContentBase64": false, "Headers": { @@ -55,23 +58,26 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "14eb1821-5416-4fc9-a500-1252aecc69f9_M2CH3_M2CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1197" ], - "x-ms-correlation-request-id": [ "19657ef9-5854-49b1-92d9-0cf18b065887" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T082901Z:19657ef9-5854-49b1-92d9-0cf18b065887" ], + "x-ms-correlation-request-id": [ "1e4bcaea-6513-4dce-91f2-8a4c796fe284" ], + "x-ms-client-request-id": [ "bb167c6b-f6fa-4b35-a1da-7341c28eaf2a_RP" ], + "x-ms-messaging-activity-id": [ "b79cdabb-39e0-4def-9772-cf46b22573c9" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G11|2024-04-29T13:01:53" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "1e4bcaea-6513-4dce-91f2-8a4c796fe284" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T130153Z:1e4bcaea-6513-4dce-91f2-8a4c796fe284" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: AF3A2AFBDF724D3D9608CD623A794A5C Ref B: SEL221051504011 Ref C: 2023-09-18T08:28:59Z" ], - "Date": [ "Mon, 18 Sep 2023 08:29:00 GMT" ] + "X-MSEdge-Ref": [ "Ref A: B494EB58D3424E7B9579F4DDACE7CBF1 Ref B: SEL221051504047 Ref C: 2024-04-29T13:01:50Z" ], + "Date": [ "Mon, 29 Apr 2024 13:01:52 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "521" ], + "Content-Length": [ "520" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/schemagroups/schemaGroupzws62u\",\"name\":\"schemaGroupzws62u\",\"type\":\"Microsoft.EventHub/Namespaces/SchemaGroups\",\"location\":\"East US\",\"properties\":{\"updatedAtUtc\":\"2023-09-18T08:29:00.9852689Z\",\"createdAtUtc\":\"2023-09-18T08:29:00.9852689Z\",\"eTag\":\"8b5bf17c-4acf-4124-bf59-a469da2db0dd\",\"groupProperties\":{},\"schemaCompatibility\":\"Backward\",\"schemaType\":\"Avro\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/schemaGroups/schemaGroupgbf8s5\",\"name\":\"schemaGroupgbf8s5\",\"type\":\"Microsoft.EventHub/namespaces/schemagroups\",\"location\":\"eastus\",\"properties\":{\"updatedAtUtc\":\"2024-04-29T13:01:53.3455216Z\",\"createdAtUtc\":\"2024-04-29T13:01:53.3455216Z\",\"eTag\":\"89ba5a5a-18be-430f-be93-69a3a722cb44\",\"groupProperties\":{},\"schemaCompatibility\":\"Backward\",\"schemaType\":\"Avro\"}}", "isContentBase64": false } } diff --git a/src/EventHub/EventHub.Autorest/test/Remove-AzEventHub.Recording.json b/src/EventHub/EventHub.Autorest/test/Remove-AzEventHub.Recording.json index 9b4a02463177..35af292458bb 100644 --- a/src/EventHub/EventHub.Autorest/test/Remove-AzEventHub.Recording.json +++ b/src/EventHub/EventHub.Autorest/test/Remove-AzEventHub.Recording.json @@ -1,8 +1,8 @@ { - "Remove-AzEventHub+[NoContext]+Delete+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eh1?api-version=2023-01-01-preview+1": { + "Remove-AzEventHub+[NoContext]+Delete+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eh1?api-version=2023-01-01-preview+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eh1?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eh1?api-version=2023-01-01-preview", "Content": "{\n}", "isContentBase64": false, "Headers": { @@ -17,38 +17,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-request-id": [ "de05c708-b8b3-4a23-be5c-750a2ab07797" ], - "x-ms-correlation-request-id": [ "de05c708-b8b3-4a23-be5c-750a2ab07797" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T082946Z:de05c708-b8b3-4a23-be5c-750a2ab07797" ], + "x-ms-correlation-request-id": [ "2a0da7a4-16d8-44fb-ba57-a842c7ffbaa5" ], + "x-ms-client-request-id": [ "94b96801-70c2-4dcb-97e6-49b993c6f21a_RP" ], + "x-ms-messaging-activity-id": [ "8cbdb74e-e66c-4104-b919-07aa79a967b7" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G9|2024-04-29T13:02:52" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-request-id": [ "2a0da7a4-16d8-44fb-ba57-a842c7ffbaa5" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T130253Z:2a0da7a4-16d8-44fb-ba57-a842c7ffbaa5" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 1C622755487544A2A71C9C2FCA6FCCE0 Ref B: SEL221051504011 Ref C: 2023-09-18T08:29:43Z" ], - "Date": [ "Mon, 18 Sep 2023 08:29:45 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 873876F3CB53406C9CA350416D8E1345 Ref B: SEL221051504047 Ref C: 2024-04-29T13:02:49Z" ], + "Date": [ "Mon, 29 Apr 2024 13:02:52 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "526" ], + "Content-Length": [ "525" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eh1\",\"name\":\"eh1\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs\",\"location\":\"eastus\",\"properties\":{\"retentionDescription\":{\"cleanupPolicy\":\"Delete\",\"retentionTimeInHours\":168},\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"2023-09-18T08:29:45.937Z\",\"updatedAt\":\"2023-09-18T08:29:46.177Z\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eh1\",\"name\":\"eh1\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs\",\"location\":\"eastus\",\"properties\":{\"retentionDescription\":{\"cleanupPolicy\":\"Delete\",\"retentionTimeInHours\":168},\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"2024-04-29T13:02:52.087Z\",\"updatedAt\":\"2024-04-29T13:02:52.44Z\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\"]}}", "isContentBase64": false } }, - "Remove-AzEventHub+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eh1?api-version=2023-01-01-preview+2": { + "Remove-AzEventHub+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eh1?api-version=2023-01-01-preview+2": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eh1?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eh1?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "186" ], - "x-ms-client-request-id": [ "191f253f-1109-4fe6-8f80-580db4dd17fd" ], + "x-ms-unique-id": [ "139" ], + "x-ms-client-request-id": [ "5bd9c1cc-5b59-48c1-8943-862f952f8ff7" ], "CommandName": [ "Remove-AzEventHub" ], "FullCommandName": [ "Remove-AzEventHub_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -59,15 +63,19 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], - "x-ms-request-id": [ "77b30775-1d78-4dd2-9d3b-736dc728c114" ], - "x-ms-correlation-request-id": [ "77b30775-1d78-4dd2-9d3b-736dc728c114" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T082955Z:77b30775-1d78-4dd2-9d3b-736dc728c114" ], + "x-ms-correlation-request-id": [ "00000001-0000-0000-0002-000000001728" ], + "x-ms-client-request-id": [ "00000001-0000-0000-0002-000000001728" ], + "x-ms-messaging-activity-id": [ "00000001-0000-0000-0002-000000001728" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G11|2024-04-29T13:02:57" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], + "x-ms-request-id": [ "2fcd55d8-b4ae-4240-8e7f-c6ed92f826a4" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T130300Z:2fcd55d8-b4ae-4240-8e7f-c6ed92f826a4" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 51825C7ECD0D45678E176EDD4CF2035F Ref B: SEL221051504011 Ref C: 2023-09-18T08:29:46Z" ], - "Date": [ "Mon, 18 Sep 2023 08:29:54 GMT" ] + "X-MSEdge-Ref": [ "Ref A: EBBD1AFA9A724DE88023699A36ED3138 Ref B: SEL221051504047 Ref C: 2024-04-29T13:02:53Z" ], + "Date": [ "Mon, 29 Apr 2024 13:02:59 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -77,19 +85,19 @@ "isContentBase64": false } }, - "Remove-AzEventHub+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eh1?api-version=2023-01-01-preview+3": { + "Remove-AzEventHub+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eh1?api-version=2023-01-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eh1?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eh1?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "187" ], - "x-ms-client-request-id": [ "40cece5f-8690-4dd5-b8b6-1eb84f21ddc7" ], + "x-ms-unique-id": [ "140" ], + "x-ms-client-request-id": [ "88dfac67-ca2e-4821-8dd4-24761d480e08" ], "CommandName": [ "Get-AzEventHub" ], "FullCommandName": [ "Get-AzEventHub_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -100,15 +108,19 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], - "x-ms-request-id": [ "c7049aaf-e0dd-4dd7-be50-146d872d5b4f" ], - "x-ms-correlation-request-id": [ "c7049aaf-e0dd-4dd7-be50-146d872d5b4f" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T082957Z:c7049aaf-e0dd-4dd7-be50-146d872d5b4f" ], + "x-ms-correlation-request-id": [ "6193f5bb-52a4-49b0-b83e-6714c93627f7" ], + "x-ms-client-request-id": [ "88dfac67-ca2e-4821-8dd4-24761d480e08_RP" ], + "x-ms-messaging-activity-id": [ "d402d35a-646f-4401-a804-7a7b45cb2b92" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G7|2024-04-29T13:03:02" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "6193f5bb-52a4-49b0-b83e-6714c93627f7" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T130303Z:6193f5bb-52a4-49b0-b83e-6714c93627f7" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 6E7D27AFDFAE4042B0773DFFC7A0B9D3 Ref B: SEL221051504011 Ref C: 2023-09-18T08:29:55Z" ], - "Date": [ "Mon, 18 Sep 2023 08:29:56 GMT" ] + "X-MSEdge-Ref": [ "Ref A: AD362895EE6340239748B57360925F3A Ref B: SEL221051504047 Ref C: 2024-04-29T13:03:00Z" ], + "Date": [ "Mon, 29 Apr 2024 13:03:02 GMT" ] }, "ContentHeaders": { "Content-Length": [ "78" ], @@ -119,10 +131,10 @@ "isContentBase64": false } }, - "Remove-AzEventHub+[NoContext]+DeleteViaIdentity+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eh1?api-version=2023-01-01-preview+1": { + "Remove-AzEventHub+[NoContext]+DeleteViaIdentity+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eh1?api-version=2023-01-01-preview+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eh1?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eh1?api-version=2023-01-01-preview", "Content": "{\n}", "isContentBase64": false, "Headers": { @@ -137,38 +149,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], - "x-ms-request-id": [ "7f6da28b-9393-4015-9bbb-e677aaf605e8" ], - "x-ms-correlation-request-id": [ "7f6da28b-9393-4015-9bbb-e677aaf605e8" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083002Z:7f6da28b-9393-4015-9bbb-e677aaf605e8" ], + "x-ms-correlation-request-id": [ "523a966d-20bb-4ae1-80af-8776049dc037" ], + "x-ms-client-request-id": [ "15e7473a-dc9c-492e-bfcb-734a2a018a32_RP" ], + "x-ms-messaging-activity-id": [ "6f619aa7-2ce7-4b77-b8d3-39367f1c9cdb" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G9|2024-04-29T13:03:07" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "523a966d-20bb-4ae1-80af-8776049dc037" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T130307Z:523a966d-20bb-4ae1-80af-8776049dc037" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 18CAD366631F4395971F31BF916F2BEE Ref B: SEL221051504011 Ref C: 2023-09-18T08:29:57Z" ], - "Date": [ "Mon, 18 Sep 2023 08:30:01 GMT" ] + "X-MSEdge-Ref": [ "Ref A: A3BAB32211354148B06239468C28B8A1 Ref B: SEL221051504047 Ref C: 2024-04-29T13:03:03Z" ], + "Date": [ "Mon, 29 Apr 2024 13:03:06 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "525" ], + "Content-Length": [ "524" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eh1\",\"name\":\"eh1\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs\",\"location\":\"eastus\",\"properties\":{\"retentionDescription\":{\"cleanupPolicy\":\"Delete\",\"retentionTimeInHours\":168},\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"2023-09-18T08:29:58.983Z\",\"updatedAt\":\"2023-09-18T08:30:02.18Z\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eh1\",\"name\":\"eh1\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs\",\"location\":\"eastus\",\"properties\":{\"retentionDescription\":{\"cleanupPolicy\":\"Delete\",\"retentionTimeInHours\":168},\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"2024-04-29T13:03:06.7Z\",\"updatedAt\":\"2024-04-29T13:03:06.773Z\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\"]}}", "isContentBase64": false } }, - "Remove-AzEventHub+[NoContext]+DeleteViaIdentity+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eh1?api-version=2023-01-01-preview+2": { + "Remove-AzEventHub+[NoContext]+DeleteViaIdentity+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eh1?api-version=2023-01-01-preview+2": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eh1?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eh1?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "189" ], - "x-ms-client-request-id": [ "58124648-16b6-4ea5-85da-408f8aa85b98" ], + "x-ms-unique-id": [ "142" ], + "x-ms-client-request-id": [ "2bec77cb-eda0-408b-9553-4987f381600a" ], "CommandName": [ "Remove-AzEventHub" ], "FullCommandName": [ "Remove-AzEventHub_DeleteViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -179,15 +195,19 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], - "x-ms-request-id": [ "29d5f3bf-ccf8-44c5-aeb6-cd6738feb689" ], - "x-ms-correlation-request-id": [ "29d5f3bf-ccf8-44c5-aeb6-cd6738feb689" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083007Z:29d5f3bf-ccf8-44c5-aeb6-cd6738feb689" ], + "x-ms-correlation-request-id": [ "00000001-0000-0000-0002-000000002544" ], + "x-ms-client-request-id": [ "00000001-0000-0000-0002-000000002544" ], + "x-ms-messaging-activity-id": [ "00000001-0000-0000-0002-000000002544" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G12|2024-04-29T13:03:10" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], + "x-ms-request-id": [ "b4bd575a-b8d7-4742-be52-e2c88c475108" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T130315Z:b4bd575a-b8d7-4742-be52-e2c88c475108" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: EEC1D40FC2674D77873A3151AD664AEC Ref B: SEL221051504011 Ref C: 2023-09-18T08:30:02Z" ], - "Date": [ "Mon, 18 Sep 2023 08:30:06 GMT" ] + "X-MSEdge-Ref": [ "Ref A: EED7AE20D3FB4A67AFCDD4828192609E Ref B: SEL221051504047 Ref C: 2024-04-29T13:03:07Z" ], + "Date": [ "Mon, 29 Apr 2024 13:03:14 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -197,19 +217,19 @@ "isContentBase64": false } }, - "Remove-AzEventHub+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eh1?api-version=2023-01-01-preview+3": { + "Remove-AzEventHub+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eh1?api-version=2023-01-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eh1?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eh1?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "190" ], - "x-ms-client-request-id": [ "75a1fff0-b8cd-438c-87cd-c4267166e6c1" ], + "x-ms-unique-id": [ "143" ], + "x-ms-client-request-id": [ "ada24bb7-0a9c-4d2d-880b-6d271af1a4cf" ], "CommandName": [ "Get-AzEventHub" ], "FullCommandName": [ "Get-AzEventHub_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -220,15 +240,19 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], - "x-ms-request-id": [ "f7aadf5e-736f-48e0-b779-6fc9fe509308" ], - "x-ms-correlation-request-id": [ "f7aadf5e-736f-48e0-b779-6fc9fe509308" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083008Z:f7aadf5e-736f-48e0-b779-6fc9fe509308" ], + "x-ms-correlation-request-id": [ "50faaa52-6bf2-47c3-9a28-e6737d598536" ], + "x-ms-client-request-id": [ "ada24bb7-0a9c-4d2d-880b-6d271af1a4cf_RP" ], + "x-ms-messaging-activity-id": [ "9d93d4b3-2997-4347-884e-1f0ded861a6e" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G7|2024-04-29T13:03:16" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-request-id": [ "50faaa52-6bf2-47c3-9a28-e6737d598536" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T130316Z:50faaa52-6bf2-47c3-9a28-e6737d598536" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: A38212D29EE84DBC954FBD636D2B9190 Ref B: SEL221051504011 Ref C: 2023-09-18T08:30:07Z" ], - "Date": [ "Mon, 18 Sep 2023 08:30:07 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 90E017FD91894593B90807A74B1235BE Ref B: SEL221051504047 Ref C: 2024-04-29T13:03:15Z" ], + "Date": [ "Mon, 29 Apr 2024 13:03:15 GMT" ] }, "ContentHeaders": { "Content-Length": [ "78" ], diff --git a/src/EventHub/EventHub.Autorest/test/Remove-AzEventHub.Tests.ps1 b/src/EventHub/EventHub.Autorest/test/Remove-AzEventHub.Tests.ps1 index 719c11f0a332..93add1f9a481 100644 --- a/src/EventHub/EventHub.Autorest/test/Remove-AzEventHub.Tests.ps1 +++ b/src/EventHub/EventHub.Autorest/test/Remove-AzEventHub.Tests.ps1 @@ -18,12 +18,12 @@ Describe 'Remove-AzEventHub' { It 'Delete' { New-AzEventHub -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -Name eh1 Remove-AzEventHub -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -Name eh1 - { Get-AzEventHub -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -Name eh1 } | Should -Throw + { Get-AzEventHub -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -Name eh1 -ErrorAction Stop } | Should -Throw } It 'DeleteViaIdentity' { $eventhub = New-AzEventHub -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -Name eh1 Remove-AzEventHub -InputObject $eventhub - { Get-AzEventHub -InputObject $eventhub } | Should -Throw + { Get-AzEventHub -InputObject $eventhub -ErrorAction Stop } | Should -Throw } } diff --git a/src/EventHub/EventHub.Autorest/test/Remove-AzEventHubApplicationGroup.Recording.json b/src/EventHub/EventHub.Autorest/test/Remove-AzEventHubApplicationGroup.Recording.json index 85dd77cc1fdd..539409c6e5c4 100644 --- a/src/EventHub/EventHub.Autorest/test/Remove-AzEventHubApplicationGroup.Recording.json +++ b/src/EventHub/EventHub.Autorest/test/Remove-AzEventHubApplicationGroup.Recording.json @@ -1,8 +1,8 @@ { - "Remove-AzEventHubApplicationGroup+[NoContext]+Delete+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/b?api-version=2023-01-01-preview+1": { + "Remove-AzEventHubApplicationGroup+[NoContext]+Delete+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/b?api-version=2023-01-01-preview+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/b?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/b?api-version=2023-01-01-preview", "Content": "{\n \"properties\": {\n \"rights\": [ \"Manage\", \"Send\", \"Listen\" ]\n }\n}", "isContentBase64": false, "Headers": { @@ -17,29 +17,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-request-id": [ "2c4a055c-44d2-4eda-bdc4-4582b3926442" ], - "x-ms-correlation-request-id": [ "2c4a055c-44d2-4eda-bdc4-4582b3926442" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083026Z:2c4a055c-44d2-4eda-bdc4-4582b3926442" ], + "x-ms-correlation-request-id": [ "28dce387-7317-42b3-96fd-497d1efccc60" ], + "x-ms-client-request-id": [ "5541ca32-3472-4560-b62e-44128b206934_RP" ], + "x-ms-messaging-activity-id": [ "ae6a58cb-ac6b-435a-8dc4-81ddc1164209" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G8|2024-04-29T13:03:38" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "28dce387-7317-42b3-96fd-497d1efccc60" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T130338Z:28dce387-7317-42b3-96fd-497d1efccc60" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: F3AFD986A4B0442AA4C8FC38DCA285D1 Ref B: SEL221051504011 Ref C: 2023-09-18T08:30:18Z" ], - "Date": [ "Mon, 18 Sep 2023 08:30:25 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 60D5E2DA1B9545599819CCC8464DAC55 Ref B: SEL221051504047 Ref C: 2024-04-29T13:03:30Z" ], + "Date": [ "Mon, 29 Apr 2024 13:03:37 GMT" ] }, "ContentHeaders": { "Content-Length": [ "324" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/b\",\"name\":\"b\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/b\",\"name\":\"b\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}}", "isContentBase64": false } }, - "Remove-AzEventHubApplicationGroup+[NoContext]+Delete+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGroup?api-version=2023-01-01-preview+2": { + "Remove-AzEventHubApplicationGroup+[NoContext]+Delete+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/applicationGroups/appGroup?api-version=2023-01-01-preview+2": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGroup?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/applicationGroups/appGroup?api-version=2023-01-01-preview", "Content": "{\n \"properties\": {\n \"clientAppGroupIdentifier\": \"NamespaceSASKeyName=b\",\n \"policies\": [\n {\n \"name\": \"t2\",\n \"type\": \"ThrottlingPolicy\",\n \"rateLimitThreshold\": 20000,\n \"metricId\": \"OutgoingBytes\"\n }\n ]\n }\n}", "isContentBase64": false, "Headers": { @@ -54,39 +58,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "1d942cfe-101a-4998-b619-d22a1927cbb8_M10SN1_M10SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-correlation-request-id": [ "d6a2181b-4737-492e-a5df-c41924c954a5" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083028Z:d6a2181b-4737-492e-a5df-c41924c954a5" ], + "x-ms-correlation-request-id": [ "aca9d104-95ca-4bf1-a59a-bfedef61774d" ], + "x-ms-client-request-id": [ "b0d62684-c27c-4975-8555-7b102d2dd4d0_RP" ], + "x-ms-messaging-activity-id": [ "950e3440-7774-4774-80f3-e0d45db682ad" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G8|2024-04-29T13:03:41" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "aca9d104-95ca-4bf1-a59a-bfedef61774d" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T130341Z:aca9d104-95ca-4bf1-a59a-bfedef61774d" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: F21B904A10EC44DE8A21B8A0CA77262F Ref B: SEL221051504011 Ref C: 2023-09-18T08:30:26Z" ], - "Date": [ "Mon, 18 Sep 2023 08:30:28 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 5FD8471DF1E74AB68C4BABEB5BB877A2 Ref B: SEL221051504047 Ref C: 2024-04-29T13:03:38Z" ], + "Date": [ "Mon, 29 Apr 2024 13:03:40 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "429" ], + "Content-Length": [ "493" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGroup\",\"name\":\"appGroup\",\"type\":\"\",\"location\":\"East US\",\"properties\":{\"clientAppGroupIdentifier\":\"NamespaceSASKeyName=b\",\"policies\":[{\"type\":\"ThrottlingPolicy\",\"name\":\"t2\",\"metricId\":\"OutgoingBytes\",\"rateLimitThreshold\":20000}],\"isEnabled\":true}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/applicationGroups/appGroup\",\"name\":\"appGroup\",\"type\":\"Microsoft.EventHub/Namespaces/ApplicationGroups\",\"location\":\"eastus\",\"properties\":{\"name\":\"appGroup\",\"isEnabled\":true,\"clientAppGroupIdentifier\":\"NamespaceSASKeyName=b\",\"policies\":[{\"metricId\":\"OutgoingBytes\",\"rateLimitThreshold\":20000,\"type\":\"ThrottlingPolicy\",\"name\":\"t2\"}]}}", "isContentBase64": false } }, - "Remove-AzEventHubApplicationGroup+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGroup?api-version=2023-01-01-preview+3": { + "Remove-AzEventHubApplicationGroup+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/applicationGroups/appGroup?api-version=2023-01-01-preview+3": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGroup?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/applicationGroups/appGroup?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "193" ], - "x-ms-client-request-id": [ "ab43bfd0-f21b-4b72-a188-b12330a8a060" ], + "x-ms-unique-id": [ "146" ], + "x-ms-client-request-id": [ "2f328d0e-403e-4e21-b239-e63d7ac90c3f" ], "CommandName": [ "Remove-AzEventHubApplicationGroup" ], "FullCommandName": [ "Remove-AzEventHubApplicationGroup_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -97,16 +104,19 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "a8b6f2ef-37e4-4b5c-91f2-f151c89fe286_M3SN1_M3SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], - "x-ms-correlation-request-id": [ "1fde6e70-2095-47e8-8aa8-d0307b3c981f" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083031Z:1fde6e70-2095-47e8-8aa8-d0307b3c981f" ], + "x-ms-correlation-request-id": [ "00000001-0000-0000-0002-000000002544" ], + "x-ms-client-request-id": [ "00000001-0000-0000-0002-000000002544" ], + "x-ms-messaging-activity-id": [ "00000001-0000-0000-0002-000000002544" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G12|2024-04-29T13:03:43" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], + "x-ms-request-id": [ "7b315e41-8bb9-4e0b-b435-c2a9ac12c260" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T130343Z:7b315e41-8bb9-4e0b-b435-c2a9ac12c260" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 90322F0875F54129ADA333F94262B575 Ref B: SEL221051504011 Ref C: 2023-09-18T08:30:29Z" ], - "Date": [ "Mon, 18 Sep 2023 08:30:30 GMT" ] + "X-MSEdge-Ref": [ "Ref A: C9CC79845BED468E898AD6547B47FC91 Ref B: SEL221051504047 Ref C: 2024-04-29T13:03:41Z" ], + "Date": [ "Mon, 29 Apr 2024 13:03:42 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -116,19 +126,19 @@ "isContentBase64": false } }, - "Remove-AzEventHubApplicationGroup+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGroup?api-version=2023-01-01-preview+4": { + "Remove-AzEventHubApplicationGroup+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/applicationGroups/appGroup?api-version=2023-01-01-preview+4": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGroup?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/applicationGroups/appGroup?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "194" ], - "x-ms-client-request-id": [ "673dfc21-cdda-430d-890d-f62c16f12fac" ], + "x-ms-unique-id": [ "147" ], + "x-ms-client-request-id": [ "0f99cb05-1a98-4a43-9356-6313f9a2335a" ], "CommandName": [ "Get-AzEventHubApplicationGroup" ], "FullCommandName": [ "Get-AzEventHubApplicationGroup_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -139,30 +149,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "4a227e86-c84f-40f4-abc3-3ec572d21b83_M5SN1_M5SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11991" ], - "x-ms-correlation-request-id": [ "c8e3c48a-3054-4910-b86d-aa4f442e5d67" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083036Z:c8e3c48a-3054-4910-b86d-aa4f442e5d67" ], + "x-ms-correlation-request-id": [ "6b1e453f-8e59-456d-b4ba-90ba188ba1ae" ], + "x-ms-client-request-id": [ "0f99cb05-1a98-4a43-9356-6313f9a2335a_RP" ], + "x-ms-messaging-activity-id": [ "49f45361-1fe4-4c85-89d0-61236270f887" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G13|2024-04-29T13:03:45" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "6b1e453f-8e59-456d-b4ba-90ba188ba1ae" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T130345Z:6b1e453f-8e59-456d-b4ba-90ba188ba1ae" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 8C7903DE4AA54E8587B342344D9FF4A4 Ref B: SEL221051504011 Ref C: 2023-09-18T08:30:31Z" ], - "Date": [ "Mon, 18 Sep 2023 08:30:35 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 3FC2D3177DD4476E8376218BFC0186C3 Ref B: SEL221051504047 Ref C: 2024-04-29T13:03:43Z" ], + "Date": [ "Mon, 29 Apr 2024 13:03:44 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "141" ], - "Content-Type": [ "application/json; charset=utf-8" ], + "Content-Length": [ "85" ], + "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"error\":{\"message\":\"The requested resource appGroup does not exist. CorrelationId: c8e3c48a-3054-4910-b86d-aa4f442e5d67\",\"code\":\"NotFound\"}}", + "Content": "{\"error\":{\"code\":\"ApplicationGroupNotFound\",\"message\":\"Application group not found\"}}", "isContentBase64": false } }, - "Remove-AzEventHubApplicationGroup+[NoContext]+DeleteViaIdentity+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/c?api-version=2023-01-01-preview+1": { + "Remove-AzEventHubApplicationGroup+[NoContext]+DeleteViaIdentity+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/c?api-version=2023-01-01-preview+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/c?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/c?api-version=2023-01-01-preview", "Content": "{\n \"properties\": {\n \"rights\": [ \"Manage\", \"Send\", \"Listen\" ]\n }\n}", "isContentBase64": false, "Headers": { @@ -177,29 +190,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-request-id": [ "f7ecbdf4-1670-4171-95d3-4ab40f27c512" ], - "x-ms-correlation-request-id": [ "f7ecbdf4-1670-4171-95d3-4ab40f27c512" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083042Z:f7ecbdf4-1670-4171-95d3-4ab40f27c512" ], + "x-ms-correlation-request-id": [ "bfaee4ea-293f-4a37-a7f7-a2d2892249cf" ], + "x-ms-client-request-id": [ "fa6f924f-3df3-4e28-89b3-a65048c4f2b0_RP" ], + "x-ms-messaging-activity-id": [ "96649c2f-c549-4a94-bf0c-d269390c6b47" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G8|2024-04-29T13:03:53" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-request-id": [ "bfaee4ea-293f-4a37-a7f7-a2d2892249cf" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T130353Z:bfaee4ea-293f-4a37-a7f7-a2d2892249cf" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: EB52B9DFB7A54A46814238AA27135965 Ref B: SEL221051504011 Ref C: 2023-09-18T08:30:36Z" ], - "Date": [ "Mon, 18 Sep 2023 08:30:42 GMT" ] + "X-MSEdge-Ref": [ "Ref A: DE5B521A5F6D498692F082318BE8DC0C Ref B: SEL221051504047 Ref C: 2024-04-29T13:03:45Z" ], + "Date": [ "Mon, 29 Apr 2024 13:03:52 GMT" ] }, "ContentHeaders": { "Content-Length": [ "324" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/c\",\"name\":\"c\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/c\",\"name\":\"c\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}}", "isContentBase64": false } }, - "Remove-AzEventHubApplicationGroup+[NoContext]+DeleteViaIdentity+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGroup?api-version=2023-01-01-preview+2": { + "Remove-AzEventHubApplicationGroup+[NoContext]+DeleteViaIdentity+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/applicationGroups/appGroup?api-version=2023-01-01-preview+2": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGroup?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/applicationGroups/appGroup?api-version=2023-01-01-preview", "Content": "{\n \"properties\": {\n \"clientAppGroupIdentifier\": \"NamespaceSASKeyName=c\",\n \"policies\": [\n {\n \"name\": \"t2\",\n \"type\": \"ThrottlingPolicy\",\n \"rateLimitThreshold\": 20000,\n \"metricId\": \"OutgoingBytes\"\n }\n ]\n }\n}", "isContentBase64": false, "Headers": { @@ -214,39 +231,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "92bfb63a-5fa0-4558-9ff6-f0214dfb6a72_M10SN1_M10SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], - "x-ms-correlation-request-id": [ "6e80b7c4-ed38-4f4c-a482-cb06814d184e" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083044Z:6e80b7c4-ed38-4f4c-a482-cb06814d184e" ], + "x-ms-correlation-request-id": [ "d9f386cc-18d5-4dad-9236-183a55858931" ], + "x-ms-client-request-id": [ "e7cd07ed-a387-4c57-a84c-d15affc9a435_RP" ], + "x-ms-messaging-activity-id": [ "de903e4f-6d9a-438f-8554-611418057388" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-29T13:03:56" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "d9f386cc-18d5-4dad-9236-183a55858931" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T130356Z:d9f386cc-18d5-4dad-9236-183a55858931" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: B604010BFEF346DF875402F0CAA4F17B Ref B: SEL221051504011 Ref C: 2023-09-18T08:30:43Z" ], - "Date": [ "Mon, 18 Sep 2023 08:30:44 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 084829AFF4E149FD80C567955A813AF1 Ref B: SEL221051504047 Ref C: 2024-04-29T13:03:53Z" ], + "Date": [ "Mon, 29 Apr 2024 13:03:55 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "429" ], + "Content-Length": [ "493" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGroup\",\"name\":\"appGroup\",\"type\":\"\",\"location\":\"East US\",\"properties\":{\"clientAppGroupIdentifier\":\"NamespaceSASKeyName=c\",\"policies\":[{\"type\":\"ThrottlingPolicy\",\"name\":\"t2\",\"metricId\":\"OutgoingBytes\",\"rateLimitThreshold\":20000}],\"isEnabled\":true}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/applicationGroups/appGroup\",\"name\":\"appGroup\",\"type\":\"Microsoft.EventHub/Namespaces/ApplicationGroups\",\"location\":\"eastus\",\"properties\":{\"name\":\"appGroup\",\"isEnabled\":true,\"clientAppGroupIdentifier\":\"NamespaceSASKeyName=c\",\"policies\":[{\"metricId\":\"OutgoingBytes\",\"rateLimitThreshold\":20000,\"type\":\"ThrottlingPolicy\",\"name\":\"t2\"}]}}", "isContentBase64": false } }, - "Remove-AzEventHubApplicationGroup+[NoContext]+DeleteViaIdentity+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGroup?api-version=2023-01-01-preview+3": { + "Remove-AzEventHubApplicationGroup+[NoContext]+DeleteViaIdentity+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/applicationGroups/appGroup?api-version=2023-01-01-preview+3": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGroup?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/applicationGroups/appGroup?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "197" ], - "x-ms-client-request-id": [ "c98a6190-b37f-45a7-b04e-ba73ffac0690" ], + "x-ms-unique-id": [ "150" ], + "x-ms-client-request-id": [ "7fc9a032-6d9e-4918-9d6f-b20366e607e8" ], "CommandName": [ "Remove-AzEventHubApplicationGroup" ], "FullCommandName": [ "Remove-AzEventHubApplicationGroup_DeleteViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -257,16 +277,19 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "9d0c25cb-01f6-4866-8c74-2a9b4ffe7467_M2CH3_M2CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], - "x-ms-correlation-request-id": [ "7fb80b4c-d839-44e8-a8b5-e51e5a40d4f1" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083047Z:7fb80b4c-d839-44e8-a8b5-e51e5a40d4f1" ], + "x-ms-correlation-request-id": [ "00000001-0000-0000-0002-000000005260" ], + "x-ms-client-request-id": [ "00000001-0000-0000-0002-000000005260" ], + "x-ms-messaging-activity-id": [ "00000001-0000-0000-0002-000000005260" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G3|2024-04-29T13:03:58" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], + "x-ms-request-id": [ "6a2239b3-cf9b-4cbe-a104-cf17e1ccc8a1" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T130358Z:6a2239b3-cf9b-4cbe-a104-cf17e1ccc8a1" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 4A1FE06641344C9D9859441FF8D45693 Ref B: SEL221051504011 Ref C: 2023-09-18T08:30:44Z" ], - "Date": [ "Mon, 18 Sep 2023 08:30:47 GMT" ] + "X-MSEdge-Ref": [ "Ref A: CBFD6F5DF9744A758F9FFE91B4324B1E Ref B: SEL221051504047 Ref C: 2024-04-29T13:03:56Z" ], + "Date": [ "Mon, 29 Apr 2024 13:03:57 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -276,19 +299,19 @@ "isContentBase64": false } }, - "Remove-AzEventHubApplicationGroup+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGroup?api-version=2023-01-01-preview+4": { + "Remove-AzEventHubApplicationGroup+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/applicationGroups/appGroup?api-version=2023-01-01-preview+4": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGroup?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/applicationGroups/appGroup?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "198" ], - "x-ms-client-request-id": [ "dd0590cf-dc3b-474a-8795-0bb0ffeb49b7" ], + "x-ms-unique-id": [ "151" ], + "x-ms-client-request-id": [ "6309ec26-1530-477f-a5b8-2f3411bdca04" ], "CommandName": [ "Get-AzEventHubApplicationGroup" ], "FullCommandName": [ "Get-AzEventHubApplicationGroup_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -299,23 +322,26 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "0d20696e-81d6-4531-b7a8-706216329581_M1SN1_M1SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11989" ], - "x-ms-correlation-request-id": [ "70b124f9-0ad5-4380-9b7c-a42b9ebf3497" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083049Z:70b124f9-0ad5-4380-9b7c-a42b9ebf3497" ], + "x-ms-correlation-request-id": [ "88d8a807-6758-47e3-96c4-05457c6e5ee6" ], + "x-ms-client-request-id": [ "6309ec26-1530-477f-a5b8-2f3411bdca04_RP" ], + "x-ms-messaging-activity-id": [ "2143b790-004b-4007-8c00-b079e8a20e7e" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G13|2024-04-29T13:04:00" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "88d8a807-6758-47e3-96c4-05457c6e5ee6" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T130400Z:88d8a807-6758-47e3-96c4-05457c6e5ee6" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 40A0EBFB837F46C981FDE965FCB60BD3 Ref B: SEL221051504011 Ref C: 2023-09-18T08:30:47Z" ], - "Date": [ "Mon, 18 Sep 2023 08:30:49 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 2431A28A41154D899B5D0735A21BBEDA Ref B: SEL221051504047 Ref C: 2024-04-29T13:03:58Z" ], + "Date": [ "Mon, 29 Apr 2024 13:03:59 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "141" ], - "Content-Type": [ "application/json; charset=utf-8" ], + "Content-Length": [ "85" ], + "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"error\":{\"message\":\"The requested resource appGroup does not exist. CorrelationId: 70b124f9-0ad5-4380-9b7c-a42b9ebf3497\",\"code\":\"NotFound\"}}", + "Content": "{\"error\":{\"code\":\"ApplicationGroupNotFound\",\"message\":\"Application group not found\"}}", "isContentBase64": false } } diff --git a/src/EventHub/EventHub.Autorest/test/Remove-AzEventHubApplicationGroup.Tests.ps1 b/src/EventHub/EventHub.Autorest/test/Remove-AzEventHubApplicationGroup.Tests.ps1 index 2bbc988c0946..81687b9db844 100644 --- a/src/EventHub/EventHub.Autorest/test/Remove-AzEventHubApplicationGroup.Tests.ps1 +++ b/src/EventHub/EventHub.Autorest/test/Remove-AzEventHubApplicationGroup.Tests.ps1 @@ -22,7 +22,7 @@ Describe 'Remove-AzEventHubApplicationGroup' { $SASKey = "NamespaceSASKeyName="+$b.Name New-AzEventHubApplicationGroup -NamespaceName $env.namespace -ResourceGroupName $env.resourceGroup -Name appGroup -ClientAppGroupIdentifier $SASKey -Policy $t2 Remove-AzEventHubApplicationGroup -NamespaceName $env.namespace -ResourceGroupName $env.resourceGroup -Name appGroup - { Get-AzEventHubApplicationGroup -NamespaceName $env.namespace -ResourceGroupName $env.resourceGroup -Name appGroup } | Should -Throw + { Get-AzEventHubApplicationGroup -NamespaceName $env.namespace -ResourceGroupName $env.resourceGroup -Name appGroup -ErrorAction Stop } | Should -Throw } It 'DeleteViaIdentity' { @@ -30,6 +30,6 @@ Describe 'Remove-AzEventHubApplicationGroup' { $SASKey = "NamespaceSASKeyName="+$c.Name $appGroup = New-AzEventHubApplicationGroup -NamespaceName $env.namespace -ResourceGroupName $env.resourceGroup -Name appGroup -ClientAppGroupIdentifier $SASKey -Policy $t2 Remove-AzEventHubApplicationGroup -InputObject $appGroup - { Get-AzEventHubApplicationGroup -NamespaceName $env.namespace -ResourceGroupName $env.resourceGroup -Name appGroup } | Should -Throw + { Get-AzEventHubApplicationGroup -NamespaceName $env.namespace -ResourceGroupName $env.resourceGroup -Name appGroup -ErrorAction Stop } | Should -Throw } } diff --git a/src/EventHub/EventHub.Autorest/test/Remove-AzEventHubAuthorizationRule.Recording.json b/src/EventHub/EventHub.Autorest/test/Remove-AzEventHubAuthorizationRule.Recording.json index 933463f04b24..3a1a6b377856 100644 --- a/src/EventHub/EventHub.Autorest/test/Remove-AzEventHubAuthorizationRule.Recording.json +++ b/src/EventHub/EventHub.Autorest/test/Remove-AzEventHubAuthorizationRule.Recording.json @@ -1,8 +1,8 @@ { - "Remove-AzEventHubAuthorizationRule+[NoContext]+[NoScenario]+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/namespaceAuthRule1?api-version=2023-01-01-preview+1": { + "Remove-AzEventHubAuthorizationRule+[NoContext]+[NoScenario]+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/namespaceAuthRule1?api-version=2023-01-01-preview+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/namespaceAuthRule1?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/namespaceAuthRule1?api-version=2023-01-01-preview", "Content": "{\n \"properties\": {\n \"rights\": [ \"Manage\", \"Send\", \"Listen\" ]\n }\n}", "isContentBase64": false, "Headers": { @@ -17,29 +17,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-request-id": [ "68cff123-1d48-4c89-988b-460bb8a582cc" ], - "x-ms-correlation-request-id": [ "68cff123-1d48-4c89-988b-460bb8a582cc" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083106Z:68cff123-1d48-4c89-988b-460bb8a582cc" ], + "x-ms-correlation-request-id": [ "7b6022e4-0061-497c-82e7-af915f5a6bc7" ], + "x-ms-client-request-id": [ "f8440141-71e5-468e-b62a-ccf6625a60bd_RP" ], + "x-ms-messaging-activity-id": [ "cb59bb55-c16d-4387-a614-2bdbb3372f97" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G7|2024-04-29T13:04:22" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "7b6022e4-0061-497c-82e7-af915f5a6bc7" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T130422Z:7b6022e4-0061-497c-82e7-af915f5a6bc7" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: AA6EBF1A853844E99BEF8014F6AA7D69 Ref B: SEL221051504011 Ref C: 2023-09-18T08:30:58Z" ], - "Date": [ "Mon, 18 Sep 2023 08:31:06 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 2079570E195E4178AF48C210E5F4294B Ref B: SEL221051504047 Ref C: 2024-04-29T13:04:13Z" ], + "Date": [ "Mon, 29 Apr 2024 13:04:21 GMT" ] }, "ContentHeaders": { "Content-Length": [ "358" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/namespaceAuthRule1\",\"name\":\"namespaceAuthRule1\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/namespaceAuthRule1\",\"name\":\"namespaceAuthRule1\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}}", "isContentBase64": false } }, - "Remove-AzEventHubAuthorizationRule+[NoContext]+[NoScenario]+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/namespaceAuthRule2?api-version=2023-01-01-preview+2": { + "Remove-AzEventHubAuthorizationRule+[NoContext]+[NoScenario]+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/namespaceAuthRule2?api-version=2023-01-01-preview+2": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/namespaceAuthRule2?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/namespaceAuthRule2?api-version=2023-01-01-preview", "Content": "{\n \"properties\": {\n \"rights\": [ \"Manage\", \"Send\", \"Listen\" ]\n }\n}", "isContentBase64": false, "Headers": { @@ -54,38 +58,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1196" ], - "x-ms-request-id": [ "acc2d466-2c56-4d6c-927b-0440a6afa206" ], - "x-ms-correlation-request-id": [ "acc2d466-2c56-4d6c-927b-0440a6afa206" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083113Z:acc2d466-2c56-4d6c-927b-0440a6afa206" ], + "x-ms-correlation-request-id": [ "f1f0ca3e-dba1-4a29-90b6-12f837177bd8" ], + "x-ms-client-request-id": [ "faab485b-9d20-41c1-889f-336601e3f320_RP" ], + "x-ms-messaging-activity-id": [ "7c6a415c-8ef7-4b5c-b269-641851fd34cd" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G4|2024-04-29T13:04:30" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "f1f0ca3e-dba1-4a29-90b6-12f837177bd8" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T130430Z:f1f0ca3e-dba1-4a29-90b6-12f837177bd8" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: BA588FA0739944958E24614A48C09FD1 Ref B: SEL221051504011 Ref C: 2023-09-18T08:31:06Z" ], - "Date": [ "Mon, 18 Sep 2023 08:31:13 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 6D9C08BF63054E28BBAA01E2FBB86D1C Ref B: SEL221051504047 Ref C: 2024-04-29T13:04:22Z" ], + "Date": [ "Mon, 29 Apr 2024 13:04:30 GMT" ] }, "ContentHeaders": { "Content-Length": [ "358" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/namespaceAuthRule2\",\"name\":\"namespaceAuthRule2\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/namespaceAuthRule2\",\"name\":\"namespaceAuthRule2\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}}", "isContentBase64": false } }, - "Remove-AzEventHubAuthorizationRule+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules?api-version=2023-01-01-preview+3": { + "Remove-AzEventHubAuthorizationRule+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules?api-version=2023-01-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "201" ], - "x-ms-client-request-id": [ "77e023a8-5d62-49b1-8bea-c512b4a5b3ad" ], + "x-ms-unique-id": [ "154" ], + "x-ms-client-request-id": [ "f25555ef-a839-48f1-995c-df7f9d9570b6" ], "CommandName": [ "Az.EventHub.private\\Get-AzEventHubNamespaceAuthorizationRule_List" ], "FullCommandName": [ "Get-AzEventHubNamespaceAuthorizationRule_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -96,38 +104,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], - "x-ms-request-id": [ "0a8b77a8-4479-4fca-a574-f0167bbd7775" ], - "x-ms-correlation-request-id": [ "0a8b77a8-4479-4fca-a574-f0167bbd7775" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083114Z:0a8b77a8-4479-4fca-a574-f0167bbd7775" ], + "x-ms-correlation-request-id": [ "413f50b1-c4ff-4c37-a7c7-72caaf817f24" ], + "x-ms-client-request-id": [ "f25555ef-a839-48f1-995c-df7f9d9570b6_RP" ], + "x-ms-messaging-activity-id": [ "13e5ff21-58fc-4d6e-8960-d45b121d5e90" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G14|2024-04-29T13:04:31" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "413f50b1-c4ff-4c37-a7c7-72caaf817f24" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T130431Z:413f50b1-c4ff-4c37-a7c7-72caaf817f24" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 806815D55CBD43C087E218807932E274 Ref B: SEL221051504011 Ref C: 2023-09-18T08:31:13Z" ], - "Date": [ "Mon, 18 Sep 2023 08:31:14 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 1C7ABB1E5A344F82BC62F6BA2C69F60C Ref B: SEL221051504047 Ref C: 2024-04-29T13:04:30Z" ], + "Date": [ "Mon, 29 Apr 2024 13:04:31 GMT" ] }, "ContentHeaders": { "Content-Length": [ "2789" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationrules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationrules/auth-ruleju0nd3\",\"name\":\"auth-ruleju0nd3\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationrules/key1\",\"name\":\"key1\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationrules/auth-rule9ld078\",\"name\":\"auth-rule9ld078\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationrules/b\",\"name\":\"b\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationrules/c\",\"name\":\"c\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationrules/namespaceAuthRule1\",\"name\":\"namespaceAuthRule1\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationrules/namespaceAuthRule2\",\"name\":\"namespaceAuthRule2\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationrules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationrules/auth-ruleudhoej\",\"name\":\"auth-ruleudhoej\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationrules/key1\",\"name\":\"key1\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationrules/auth-rule85shx1\",\"name\":\"auth-rule85shx1\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationrules/b\",\"name\":\"b\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationrules/c\",\"name\":\"c\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationrules/namespaceAuthRule1\",\"name\":\"namespaceAuthRule1\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationrules/namespaceAuthRule2\",\"name\":\"namespaceAuthRule2\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}}]}", "isContentBase64": false } }, - "Remove-AzEventHubAuthorizationRule+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules?api-version=2023-01-01-preview+4": { + "Remove-AzEventHubAuthorizationRule+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules?api-version=2023-01-01-preview+4": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "202" ], - "x-ms-client-request-id": [ "6b593aeb-43e8-4a78-85ac-fce56ab64516" ], + "x-ms-unique-id": [ "155" ], + "x-ms-client-request-id": [ "a7ea9929-a158-4f05-88cd-577bb8c21642" ], "CommandName": [ "Az.EventHub.private\\Get-AzEventHubAuthorizationRule_List" ], "FullCommandName": [ "Get-AzEventHubAuthorizationRule_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -138,29 +150,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], - "x-ms-request-id": [ "3bba4bdc-858b-4535-9ca4-4f3aa9d646f0" ], - "x-ms-correlation-request-id": [ "3bba4bdc-858b-4535-9ca4-4f3aa9d646f0" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083115Z:3bba4bdc-858b-4535-9ca4-4f3aa9d646f0" ], + "x-ms-correlation-request-id": [ "e9bef2f4-8b38-484c-a815-df7425f7488e" ], + "x-ms-client-request-id": [ "a7ea9929-a158-4f05-88cd-577bb8c21642_RP" ], + "x-ms-messaging-activity-id": [ "4f109220-50ae-470b-8f71-afdda10a0413" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-29T13:04:32" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "e9bef2f4-8b38-484c-a815-df7425f7488e" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240429T130432Z:e9bef2f4-8b38-484c-a815-df7425f7488e" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 90F0706F88034F8BB51E8E3435C3C734 Ref B: SEL221051504011 Ref C: 2023-09-18T08:31:14Z" ], - "Date": [ "Mon, 18 Sep 2023 08:31:15 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 09C8FE8561E5452DABA4BD711D92B983 Ref B: SEL221051504047 Ref C: 2024-04-29T13:04:31Z" ], + "Date": [ "Mon, 29 Apr 2024 13:04:32 GMT" ] }, "ContentHeaders": { "Content-Length": [ "771" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationrules/auth-ruleirhsyq\",\"name\":\"auth-ruleirhsyq\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationrules/auth-rulepjiaoe\",\"name\":\"auth-rulepjiaoe\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationrules/auth-rulef5iq9n\",\"name\":\"auth-rulef5iq9n\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationrules/auth-rulevanqub\",\"name\":\"auth-rulevanqub\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}]}", "isContentBase64": false } }, - "Remove-AzEventHubAuthorizationRule+[NoContext]+[NoScenario]+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules/entityAuthRule1?api-version=2023-01-01-preview+5": { + "Remove-AzEventHubAuthorizationRule+[NoContext]+[NoScenario]+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules/entityAuthRule1?api-version=2023-01-01-preview+5": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules/entityAuthRule1?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules/entityAuthRule1?api-version=2023-01-01-preview", "Content": "{\n \"properties\": {\n \"rights\": [ \"Manage\", \"Send\", \"Listen\" ]\n }\n}", "isContentBase64": false, "Headers": { @@ -175,29 +191,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-request-id": [ "4b1d9b80-927b-455e-b91b-588026a0c870" ], - "x-ms-correlation-request-id": [ "4b1d9b80-927b-455e-b91b-588026a0c870" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083116Z:4b1d9b80-927b-455e-b91b-588026a0c870" ], + "x-ms-correlation-request-id": [ "e0183bea-4044-4c6a-b484-87c96b8fb0f8" ], + "x-ms-client-request-id": [ "08a0207e-e508-4b7a-a372-823a369d92a8_RP" ], + "x-ms-messaging-activity-id": [ "4c154f06-e07e-40f3-a9e7-96461d949359" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-29T13:04:33" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-request-id": [ "e0183bea-4044-4c6a-b484-87c96b8fb0f8" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T130433Z:e0183bea-4044-4c6a-b484-87c96b8fb0f8" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: F527220DEFE543759A413349DBB51972 Ref B: SEL221051504011 Ref C: 2023-09-18T08:31:15Z" ], - "Date": [ "Mon, 18 Sep 2023 08:31:16 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 7B1E1D49A04646EFA5C6BA0B56A817A6 Ref B: SEL221051504047 Ref C: 2024-04-29T13:04:32Z" ], + "Date": [ "Mon, 29 Apr 2024 13:04:33 GMT" ] }, "ContentHeaders": { "Content-Length": [ "367" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules/entityAuthRule1\",\"name\":\"entityAuthRule1\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/authorizationrules\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules/entityAuthRule1\",\"name\":\"entityAuthRule1\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/authorizationrules\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}}", "isContentBase64": false } }, - "Remove-AzEventHubAuthorizationRule+[NoContext]+[NoScenario]+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules/entityAuthRule2?api-version=2023-01-01-preview+6": { + "Remove-AzEventHubAuthorizationRule+[NoContext]+[NoScenario]+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules/entityAuthRule2?api-version=2023-01-01-preview+6": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules/entityAuthRule2?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules/entityAuthRule2?api-version=2023-01-01-preview", "Content": "{\n \"properties\": {\n \"rights\": [ \"Manage\", \"Send\", \"Listen\" ]\n }\n}", "isContentBase64": false, "Headers": { @@ -212,38 +232,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], - "x-ms-request-id": [ "a32747c6-ab6f-46d7-adde-ceb9735d5b72" ], - "x-ms-correlation-request-id": [ "a32747c6-ab6f-46d7-adde-ceb9735d5b72" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083118Z:a32747c6-ab6f-46d7-adde-ceb9735d5b72" ], + "x-ms-correlation-request-id": [ "d69ad21e-0f01-426c-ac28-b1f337ccaf01" ], + "x-ms-client-request-id": [ "8543311f-6e85-43c2-8871-61d3a6581769_RP" ], + "x-ms-messaging-activity-id": [ "829d7d40-1d6e-460b-81a0-0b1d8a9f4e18" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G1|2024-04-29T13:04:34" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "d69ad21e-0f01-426c-ac28-b1f337ccaf01" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T130434Z:d69ad21e-0f01-426c-ac28-b1f337ccaf01" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 9D6C25F3C3F24964A3B16867053DA32E Ref B: SEL221051504011 Ref C: 2023-09-18T08:31:16Z" ], - "Date": [ "Mon, 18 Sep 2023 08:31:18 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 87933BBB35CD42FCAF17A35C31CEA0EE Ref B: SEL221051504047 Ref C: 2024-04-29T13:04:33Z" ], + "Date": [ "Mon, 29 Apr 2024 13:04:34 GMT" ] }, "ContentHeaders": { "Content-Length": [ "367" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules/entityAuthRule2\",\"name\":\"entityAuthRule2\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/authorizationrules\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules/entityAuthRule2\",\"name\":\"entityAuthRule2\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/authorizationrules\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}}", "isContentBase64": false } }, - "Remove-AzEventHubAuthorizationRule+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules?api-version=2023-01-01-preview+7": { + "Remove-AzEventHubAuthorizationRule+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules?api-version=2023-01-01-preview+7": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "205" ], - "x-ms-client-request-id": [ "5f2d4b5d-ac89-4ed1-8b62-c787dd011e24" ], + "x-ms-unique-id": [ "158" ], + "x-ms-client-request-id": [ "35827cae-74ec-44ea-bbea-f39319e94853" ], "CommandName": [ "Az.EventHub.private\\Get-AzEventHubNamespaceAuthorizationRule_List" ], "FullCommandName": [ "Get-AzEventHubNamespaceAuthorizationRule_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -254,38 +278,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], - "x-ms-request-id": [ "53c12186-75d5-409e-bbfa-e9b1c2c7d587" ], - "x-ms-correlation-request-id": [ "53c12186-75d5-409e-bbfa-e9b1c2c7d587" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083119Z:53c12186-75d5-409e-bbfa-e9b1c2c7d587" ], + "x-ms-correlation-request-id": [ "cc80a77e-df1a-4369-9c77-bbdfdeb277ce" ], + "x-ms-client-request-id": [ "35827cae-74ec-44ea-bbea-f39319e94853_RP" ], + "x-ms-messaging-activity-id": [ "45871d51-7585-412e-ad21-4da404659a0c" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G12|2024-04-29T13:04:36" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "cc80a77e-df1a-4369-9c77-bbdfdeb277ce" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T130436Z:cc80a77e-df1a-4369-9c77-bbdfdeb277ce" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 9130295CEF324830AA995D525607AF59 Ref B: SEL221051504011 Ref C: 2023-09-18T08:31:18Z" ], - "Date": [ "Mon, 18 Sep 2023 08:31:19 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 6C7325CC820F4000A1586783AC6E8E04 Ref B: SEL221051504047 Ref C: 2024-04-29T13:04:34Z" ], + "Date": [ "Mon, 29 Apr 2024 13:04:36 GMT" ] }, "ContentHeaders": { "Content-Length": [ "2789" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationrules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationrules/auth-ruleju0nd3\",\"name\":\"auth-ruleju0nd3\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationrules/key1\",\"name\":\"key1\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationrules/auth-rule9ld078\",\"name\":\"auth-rule9ld078\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationrules/b\",\"name\":\"b\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationrules/c\",\"name\":\"c\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationrules/namespaceAuthRule1\",\"name\":\"namespaceAuthRule1\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationrules/namespaceAuthRule2\",\"name\":\"namespaceAuthRule2\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationrules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationrules/auth-ruleudhoej\",\"name\":\"auth-ruleudhoej\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationrules/key1\",\"name\":\"key1\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationrules/auth-rule85shx1\",\"name\":\"auth-rule85shx1\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationrules/b\",\"name\":\"b\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationrules/c\",\"name\":\"c\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationrules/namespaceAuthRule1\",\"name\":\"namespaceAuthRule1\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationrules/namespaceAuthRule2\",\"name\":\"namespaceAuthRule2\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}}]}", "isContentBase64": false } }, - "Remove-AzEventHubAuthorizationRule+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules?api-version=2023-01-01-preview+8": { + "Remove-AzEventHubAuthorizationRule+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules?api-version=2023-01-01-preview+8": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "206" ], - "x-ms-client-request-id": [ "10a37f51-de53-42eb-b173-6037c9d8ea88" ], + "x-ms-unique-id": [ "159" ], + "x-ms-client-request-id": [ "6a1c2730-a9a4-40cf-a862-f48a5c977088" ], "CommandName": [ "Az.EventHub.private\\Get-AzEventHubAuthorizationRule_List" ], "FullCommandName": [ "Get-AzEventHubAuthorizationRule_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -296,38 +324,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], - "x-ms-request-id": [ "1d35ca6e-08a5-44fb-9d1a-e1663b7ea18b" ], - "x-ms-correlation-request-id": [ "1d35ca6e-08a5-44fb-9d1a-e1663b7ea18b" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083120Z:1d35ca6e-08a5-44fb-9d1a-e1663b7ea18b" ], + "x-ms-correlation-request-id": [ "6faf51c7-455c-4960-9231-595d931c9371" ], + "x-ms-client-request-id": [ "6a1c2730-a9a4-40cf-a862-f48a5c977088_RP" ], + "x-ms-messaging-activity-id": [ "adbb1e40-f954-43ec-8937-79d237b78639" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G9|2024-04-29T13:04:37" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "6faf51c7-455c-4960-9231-595d931c9371" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T130437Z:6faf51c7-455c-4960-9231-595d931c9371" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: B91C4AD204B74F0CA3FFE85CFEF6A2D5 Ref B: SEL221051504011 Ref C: 2023-09-18T08:31:19Z" ], - "Date": [ "Mon, 18 Sep 2023 08:31:20 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 3EA740DB4CE449B39FD0B429E11CD9D7 Ref B: SEL221051504047 Ref C: 2024-04-29T13:04:36Z" ], + "Date": [ "Mon, 29 Apr 2024 13:04:37 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1547" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationrules/auth-ruleirhsyq\",\"name\":\"auth-ruleirhsyq\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationrules/auth-rulepjiaoe\",\"name\":\"auth-rulepjiaoe\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationrules/entityAuthRule1\",\"name\":\"entityAuthRule1\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationrules/entityAuthRule2\",\"name\":\"entityAuthRule2\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationrules/auth-rulef5iq9n\",\"name\":\"auth-rulef5iq9n\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationrules/auth-rulevanqub\",\"name\":\"auth-rulevanqub\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationrules/entityAuthRule1\",\"name\":\"entityAuthRule1\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationrules/entityAuthRule2\",\"name\":\"entityAuthRule2\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}}]}", "isContentBase64": false } }, - "Remove-AzEventHubAuthorizationRule+[NoContext]+RemoveExpandedNamespace+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/namespaceAuthRule1?api-version=2023-01-01-preview+1": { + "Remove-AzEventHubAuthorizationRule+[NoContext]+RemoveExpandedNamespace+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/namespaceAuthRule1?api-version=2023-01-01-preview+1": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/namespaceAuthRule1?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/namespaceAuthRule1?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "207" ], - "x-ms-client-request-id": [ "f327c564-4488-4803-a518-ed5749e569dc" ], + "x-ms-unique-id": [ "160" ], + "x-ms-client-request-id": [ "aeb5ab9b-45b2-4d9a-b648-a65a0de84a4a" ], "CommandName": [ "Az.EventHub.private\\Remove-AzEventHubNamespaceAuthorizationRule_Delete" ], "FullCommandName": [ "Remove-AzEventHubNamespaceAuthorizationRule_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -338,15 +370,19 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], - "x-ms-request-id": [ "dee597f4-f35e-47f1-9203-b56bef265ca1" ], - "x-ms-correlation-request-id": [ "dee597f4-f35e-47f1-9203-b56bef265ca1" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083129Z:dee597f4-f35e-47f1-9203-b56bef265ca1" ], + "x-ms-correlation-request-id": [ "00000001-0000-0000-0002-000000005484" ], + "x-ms-client-request-id": [ "00000001-0000-0000-0002-000000005484" ], + "x-ms-messaging-activity-id": [ "00000001-0000-0000-0002-000000005484" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-29T13:04:44" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], + "x-ms-request-id": [ "6b863332-30c0-4b0f-b667-5232735f61e6" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T130448Z:6b863332-30c0-4b0f-b667-5232735f61e6" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 828BCFBD0A7449E191C4C36EEC4550A6 Ref B: SEL221051504011 Ref C: 2023-09-18T08:31:20Z" ], - "Date": [ "Mon, 18 Sep 2023 08:31:28 GMT" ] + "X-MSEdge-Ref": [ "Ref A: FB02100ACC7E47FCAEFD756A152C703E Ref B: SEL221051504047 Ref C: 2024-04-29T13:04:37Z" ], + "Date": [ "Mon, 29 Apr 2024 13:04:48 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -356,19 +392,19 @@ "isContentBase64": false } }, - "Remove-AzEventHubAuthorizationRule+[NoContext]+RemoveExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/namespaceAuthRule1?api-version=2023-01-01-preview+2": { + "Remove-AzEventHubAuthorizationRule+[NoContext]+RemoveExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/namespaceAuthRule1?api-version=2023-01-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/namespaceAuthRule1?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/namespaceAuthRule1?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "208" ], - "x-ms-client-request-id": [ "5a1bec09-9eac-42be-a601-2adb438cace2" ], + "x-ms-unique-id": [ "161" ], + "x-ms-client-request-id": [ "1377afc7-e238-4a60-be11-7c9ce42fdae0" ], "CommandName": [ "Az.EventHub.private\\Get-AzEventHubNamespaceAuthorizationRule_Get" ], "FullCommandName": [ "Get-AzEventHubNamespaceAuthorizationRule_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -379,15 +415,19 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], - "x-ms-request-id": [ "37d4bd8c-d611-457a-b379-d75c88b94986" ], - "x-ms-correlation-request-id": [ "37d4bd8c-d611-457a-b379-d75c88b94986" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083131Z:37d4bd8c-d611-457a-b379-d75c88b94986" ], + "x-ms-correlation-request-id": [ "1c587d8f-fe95-4f51-92e4-13056b72c605" ], + "x-ms-client-request-id": [ "1377afc7-e238-4a60-be11-7c9ce42fdae0_RP" ], + "x-ms-messaging-activity-id": [ "251bfb2d-d028-44cb-a477-95a8ddc1e03a" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-29T13:04:48" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "1c587d8f-fe95-4f51-92e4-13056b72c605" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T130448Z:1c587d8f-fe95-4f51-92e4-13056b72c605" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 1587EB22704B4221B034E06D177052D8 Ref B: SEL221051504011 Ref C: 2023-09-18T08:31:29Z" ], - "Date": [ "Mon, 18 Sep 2023 08:31:30 GMT" ] + "X-MSEdge-Ref": [ "Ref A: E69080C5EB3C42799AEB6100B5951004 Ref B: SEL221051504047 Ref C: 2024-04-29T13:04:48Z" ], + "Date": [ "Mon, 29 Apr 2024 13:04:48 GMT" ] }, "ContentHeaders": { "Content-Length": [ "87" ], @@ -398,19 +438,19 @@ "isContentBase64": false } }, - "Remove-AzEventHubAuthorizationRule+[NoContext]+RemoveExpandedEntity+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules/entityAuthRule1?api-version=2023-01-01-preview+1": { + "Remove-AzEventHubAuthorizationRule+[NoContext]+RemoveExpandedEntity+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules/entityAuthRule1?api-version=2023-01-01-preview+1": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules/entityAuthRule1?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules/entityAuthRule1?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "209" ], - "x-ms-client-request-id": [ "6d3a2f65-32d6-410f-9e6a-36e9cdc621dc" ], + "x-ms-unique-id": [ "162" ], + "x-ms-client-request-id": [ "feab1fd9-87d9-449d-93fe-d78ff7389aa3" ], "CommandName": [ "Az.EventHub.private\\Remove-AzEventHubAuthorizationRule_Delete" ], "FullCommandName": [ "Remove-AzEventHubAuthorizationRule_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -421,15 +461,19 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14998" ], - "x-ms-request-id": [ "4af0fd9b-3395-42c7-8c3d-4099eae3c803" ], - "x-ms-correlation-request-id": [ "4af0fd9b-3395-42c7-8c3d-4099eae3c803" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083131Z:4af0fd9b-3395-42c7-8c3d-4099eae3c803" ], + "x-ms-correlation-request-id": [ "00000001-0000-0000-0002-000000005484" ], + "x-ms-client-request-id": [ "00000001-0000-0000-0002-000000005484" ], + "x-ms-messaging-activity-id": [ "00000001-0000-0000-0002-000000005484" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-29T13:04:49" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], + "x-ms-request-id": [ "173b1ce0-ee0c-4516-bd01-99f2428ab0a9" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T130449Z:173b1ce0-ee0c-4516-bd01-99f2428ab0a9" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 9196324A58DF4B179C329722C7672B5B Ref B: SEL221051504011 Ref C: 2023-09-18T08:31:31Z" ], - "Date": [ "Mon, 18 Sep 2023 08:31:31 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 6DFD4EFC9D0140B1A8B5F42DBEFA82C8 Ref B: SEL221051504047 Ref C: 2024-04-29T13:04:48Z" ], + "Date": [ "Mon, 29 Apr 2024 13:04:49 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -439,19 +483,19 @@ "isContentBase64": false } }, - "Remove-AzEventHubAuthorizationRule+[NoContext]+RemoveExpandedEntity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules/entityAuthRule1?api-version=2023-01-01-preview+2": { + "Remove-AzEventHubAuthorizationRule+[NoContext]+RemoveExpandedEntity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules/entityAuthRule1?api-version=2023-01-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules/entityAuthRule1?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules/entityAuthRule1?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "210" ], - "x-ms-client-request-id": [ "c0032f88-f1e4-4e90-9a07-96a42f444728" ], + "x-ms-unique-id": [ "163" ], + "x-ms-client-request-id": [ "d5781251-9e5d-4e23-bdd7-6973f0de65e5" ], "CommandName": [ "Az.EventHub.private\\Get-AzEventHubAuthorizationRule_Get" ], "FullCommandName": [ "Get-AzEventHubAuthorizationRule_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -462,15 +506,19 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], - "x-ms-request-id": [ "b36180b7-3207-4474-be2b-96f7c4848691" ], - "x-ms-correlation-request-id": [ "b36180b7-3207-4474-be2b-96f7c4848691" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083132Z:b36180b7-3207-4474-be2b-96f7c4848691" ], + "x-ms-correlation-request-id": [ "b94057c3-0ed4-4c82-9464-6279c8c58262" ], + "x-ms-client-request-id": [ "d5781251-9e5d-4e23-bdd7-6973f0de65e5_RP" ], + "x-ms-messaging-activity-id": [ "78b73a9e-8d21-4794-8ddc-70df852ab8ea" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G9|2024-04-29T13:04:51" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "b94057c3-0ed4-4c82-9464-6279c8c58262" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T130451Z:b94057c3-0ed4-4c82-9464-6279c8c58262" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: B1931FC32D9448B099916866D6F485F9 Ref B: SEL221051504011 Ref C: 2023-09-18T08:31:31Z" ], - "Date": [ "Mon, 18 Sep 2023 08:31:32 GMT" ] + "X-MSEdge-Ref": [ "Ref A: E79410B1A6E44D408E6C2FF79226FF6F Ref B: SEL221051504047 Ref C: 2024-04-29T13:04:49Z" ], + "Date": [ "Mon, 29 Apr 2024 13:04:51 GMT" ] }, "ContentHeaders": { "Content-Length": [ "87" ], @@ -481,19 +529,19 @@ "isContentBase64": false } }, - "Remove-AzEventHubAuthorizationRule+[NoContext]+RemoveViaIdentityExpanded+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/namespaceAuthRule2?api-version=2023-01-01-preview+1": { + "Remove-AzEventHubAuthorizationRule+[NoContext]+RemoveViaIdentityExpanded+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/namespaceAuthRule2?api-version=2023-01-01-preview+1": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/namespaceAuthRule2?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/namespaceAuthRule2?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "211" ], - "x-ms-client-request-id": [ "75af09f6-5ff4-474f-af2a-d22082576833" ], + "x-ms-unique-id": [ "164" ], + "x-ms-client-request-id": [ "a3491842-7a36-4fe0-b618-af65fcf19e36" ], "CommandName": [ "Az.EventHub.private\\Remove-AzEventHubNamespaceAuthorizationRule_DeleteViaIdentity" ], "FullCommandName": [ "Remove-AzEventHubNamespaceAuthorizationRule_DeleteViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -504,15 +552,19 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14998" ], - "x-ms-request-id": [ "4a098be8-48cf-4aea-9d47-aa2603737aec" ], - "x-ms-correlation-request-id": [ "4a098be8-48cf-4aea-9d47-aa2603737aec" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083140Z:4a098be8-48cf-4aea-9d47-aa2603737aec" ], + "x-ms-correlation-request-id": [ "00000001-0000-0000-0002-000000005980" ], + "x-ms-client-request-id": [ "00000001-0000-0000-0002-000000005980" ], + "x-ms-messaging-activity-id": [ "00000001-0000-0000-0002-000000005980" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G8|2024-04-29T13:04:58" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], + "x-ms-request-id": [ "776c6575-a022-4e4c-a811-ae804a1fc70a" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T130502Z:776c6575-a022-4e4c-a811-ae804a1fc70a" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 89B469C234B743D69C5A619E2046C739 Ref B: SEL221051504011 Ref C: 2023-09-18T08:31:32Z" ], - "Date": [ "Mon, 18 Sep 2023 08:31:40 GMT" ] + "X-MSEdge-Ref": [ "Ref A: A0A4F5C2448C49669975BBE7B254FD45 Ref B: SEL221051504047 Ref C: 2024-04-29T13:04:51Z" ], + "Date": [ "Mon, 29 Apr 2024 13:05:02 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -522,19 +574,19 @@ "isContentBase64": false } }, - "Remove-AzEventHubAuthorizationRule+[NoContext]+RemoveViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/namespaceAuthRule2?api-version=2023-01-01-preview+2": { + "Remove-AzEventHubAuthorizationRule+[NoContext]+RemoveViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/namespaceAuthRule2?api-version=2023-01-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/namespaceAuthRule2?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/namespaceAuthRule2?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "212" ], - "x-ms-client-request-id": [ "46f0ac02-243c-4162-8c8f-e17a252a4aa3" ], + "x-ms-unique-id": [ "165" ], + "x-ms-client-request-id": [ "8d3cc35d-b38a-488a-9dd4-623bc4d259d1" ], "CommandName": [ "Az.EventHub.private\\Get-AzEventHubNamespaceAuthorizationRule_GetViaIdentity" ], "FullCommandName": [ "Get-AzEventHubNamespaceAuthorizationRule_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -545,15 +597,19 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], - "x-ms-request-id": [ "c6f6cd8b-07e7-4d6e-bf7d-60baf1fd458f" ], - "x-ms-correlation-request-id": [ "c6f6cd8b-07e7-4d6e-bf7d-60baf1fd458f" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083141Z:c6f6cd8b-07e7-4d6e-bf7d-60baf1fd458f" ], + "x-ms-correlation-request-id": [ "b764661d-faf3-4e89-9f88-514a086c2383" ], + "x-ms-client-request-id": [ "8d3cc35d-b38a-488a-9dd4-623bc4d259d1_RP" ], + "x-ms-messaging-activity-id": [ "1d90437f-7191-42b3-9819-a6dc56dd9dee" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G2|2024-04-29T13:05:03" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "b764661d-faf3-4e89-9f88-514a086c2383" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240429T130503Z:b764661d-faf3-4e89-9f88-514a086c2383" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: B02ED11D9BD2451A8DEAC6E7813CC60B Ref B: SEL221051504011 Ref C: 2023-09-18T08:31:41Z" ], - "Date": [ "Mon, 18 Sep 2023 08:31:41 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 27EC4594B372401A9BE76D46E6E8847F Ref B: SEL221051504047 Ref C: 2024-04-29T13:05:02Z" ], + "Date": [ "Mon, 29 Apr 2024 13:05:03 GMT" ] }, "ContentHeaders": { "Content-Length": [ "87" ], @@ -564,19 +620,19 @@ "isContentBase64": false } }, - "Remove-AzEventHubAuthorizationRule+[NoContext]+RemoveViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules?api-version=2023-01-01-preview+3": { + "Remove-AzEventHubAuthorizationRule+[NoContext]+RemoveViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules?api-version=2023-01-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "213" ], - "x-ms-client-request-id": [ "1b0eff9e-9094-40ef-926f-f2504fbe101f" ], + "x-ms-unique-id": [ "166" ], + "x-ms-client-request-id": [ "d763c62c-b4af-406c-85e9-eb8a0ab2ab6d" ], "CommandName": [ "Az.EventHub.private\\Get-AzEventHubNamespaceAuthorizationRule_List" ], "FullCommandName": [ "Get-AzEventHubNamespaceAuthorizationRule_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -587,38 +643,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11990" ], - "x-ms-request-id": [ "ec21cf3e-4419-4de2-aa22-18ffaa9d67ef" ], - "x-ms-correlation-request-id": [ "ec21cf3e-4419-4de2-aa22-18ffaa9d67ef" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083142Z:ec21cf3e-4419-4de2-aa22-18ffaa9d67ef" ], + "x-ms-correlation-request-id": [ "0e4e7559-db1f-4bf0-8f9c-f2b509c6fd8b" ], + "x-ms-client-request-id": [ "d763c62c-b4af-406c-85e9-eb8a0ab2ab6d_RP" ], + "x-ms-messaging-activity-id": [ "870974f2-78d6-41cd-a69b-cd486da6f232" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G8|2024-04-29T13:05:05" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "0e4e7559-db1f-4bf0-8f9c-f2b509c6fd8b" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T130505Z:0e4e7559-db1f-4bf0-8f9c-f2b509c6fd8b" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 3F25E5F4528444BFAF44CE089D0301C1 Ref B: SEL221051504011 Ref C: 2023-09-18T08:31:41Z" ], - "Date": [ "Mon, 18 Sep 2023 08:31:42 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 40B8DBEC9D54407F991C033A33C3F8AA Ref B: SEL221051504047 Ref C: 2024-04-29T13:05:03Z" ], + "Date": [ "Mon, 29 Apr 2024 13:05:05 GMT" ] }, "ContentHeaders": { "Content-Length": [ "2071" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationrules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationrules/auth-ruleju0nd3\",\"name\":\"auth-ruleju0nd3\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationrules/key1\",\"name\":\"key1\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationrules/auth-rule9ld078\",\"name\":\"auth-rule9ld078\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationrules/b\",\"name\":\"b\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationrules/c\",\"name\":\"c\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationrules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationrules/auth-ruleudhoej\",\"name\":\"auth-ruleudhoej\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationrules/key1\",\"name\":\"key1\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationrules/auth-rule85shx1\",\"name\":\"auth-rule85shx1\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationrules/b\",\"name\":\"b\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationrules/c\",\"name\":\"c\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}}]}", "isContentBase64": false } }, - "Remove-AzEventHubAuthorizationRule+[NoContext]+RemoveViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules?api-version=2023-01-01-preview+4": { + "Remove-AzEventHubAuthorizationRule+[NoContext]+RemoveViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules?api-version=2023-01-01-preview+4": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "214" ], - "x-ms-client-request-id": [ "a2a628d4-50ea-4956-b80a-92465f25ca29" ], + "x-ms-unique-id": [ "167" ], + "x-ms-client-request-id": [ "4815029b-00b4-4d76-b5c7-5cb0cd4273d7" ], "CommandName": [ "Az.EventHub.private\\Get-AzEventHubAuthorizationRule_List" ], "FullCommandName": [ "Get-AzEventHubAuthorizationRule_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -629,38 +689,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-request-id": [ "1a2dcc59-28aa-4978-84d5-7e4ae70a8049" ], - "x-ms-correlation-request-id": [ "1a2dcc59-28aa-4978-84d5-7e4ae70a8049" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083143Z:1a2dcc59-28aa-4978-84d5-7e4ae70a8049" ], + "x-ms-correlation-request-id": [ "97253a9d-6b02-497f-ab1c-83b466c71279" ], + "x-ms-client-request-id": [ "4815029b-00b4-4d76-b5c7-5cb0cd4273d7_RP" ], + "x-ms-messaging-activity-id": [ "2cea354b-3100-47bc-b2e9-3675ce31a1f2" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G14|2024-04-29T13:05:07" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "97253a9d-6b02-497f-ab1c-83b466c71279" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T130507Z:97253a9d-6b02-497f-ab1c-83b466c71279" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 32E14B644B084FC98847CEE57A367D04 Ref B: SEL221051504011 Ref C: 2023-09-18T08:31:42Z" ], - "Date": [ "Mon, 18 Sep 2023 08:31:43 GMT" ] + "X-MSEdge-Ref": [ "Ref A: D9AB14E3C97D48AE86847EAEAED3AF85 Ref B: SEL221051504047 Ref C: 2024-04-29T13:05:05Z" ], + "Date": [ "Mon, 29 Apr 2024 13:05:07 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1159" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationrules/auth-ruleirhsyq\",\"name\":\"auth-ruleirhsyq\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationrules/auth-rulepjiaoe\",\"name\":\"auth-rulepjiaoe\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationrules/entityAuthRule2\",\"name\":\"entityAuthRule2\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationrules/auth-rulef5iq9n\",\"name\":\"auth-rulef5iq9n\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationrules/auth-rulevanqub\",\"name\":\"auth-rulevanqub\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationrules/entityAuthRule2\",\"name\":\"entityAuthRule2\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}}]}", "isContentBase64": false } }, - "Remove-AzEventHubAuthorizationRule+[NoContext]+RemoveViaIdentityExpanded+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules/entityAuthRule2?api-version=2023-01-01-preview+5": { + "Remove-AzEventHubAuthorizationRule+[NoContext]+RemoveViaIdentityExpanded+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules/entityAuthRule2?api-version=2023-01-01-preview+5": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules/entityAuthRule2?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules/entityAuthRule2?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "215" ], - "x-ms-client-request-id": [ "1c4695a8-4692-4990-8f63-6c3dea4ab6c5" ], + "x-ms-unique-id": [ "168" ], + "x-ms-client-request-id": [ "b32bb159-c261-4ada-bcd7-9103dca3b92f" ], "CommandName": [ "Az.EventHub.private\\Remove-AzEventHubAuthorizationRule_DeleteViaIdentity" ], "FullCommandName": [ "Remove-AzEventHubAuthorizationRule_DeleteViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -671,15 +735,19 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], - "x-ms-request-id": [ "800e89d9-fd9e-4ed0-a66f-6dde34cd0e89" ], - "x-ms-correlation-request-id": [ "800e89d9-fd9e-4ed0-a66f-6dde34cd0e89" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083144Z:800e89d9-fd9e-4ed0-a66f-6dde34cd0e89" ], + "x-ms-correlation-request-id": [ "00000001-0000-0000-0002-000000005484" ], + "x-ms-client-request-id": [ "00000001-0000-0000-0002-000000005484" ], + "x-ms-messaging-activity-id": [ "00000001-0000-0000-0002-000000005484" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-29T13:05:08" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], + "x-ms-request-id": [ "b0687cbc-4c6b-4600-9fce-3dc91bbcfdc5" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240429T130508Z:b0687cbc-4c6b-4600-9fce-3dc91bbcfdc5" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: A1031BF11E7D46DB877D53B0BD8C4933 Ref B: SEL221051504011 Ref C: 2023-09-18T08:31:43Z" ], - "Date": [ "Mon, 18 Sep 2023 08:31:44 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 33546E4DABC442B3A800E050FF8EACFF Ref B: SEL221051504047 Ref C: 2024-04-29T13:05:07Z" ], + "Date": [ "Mon, 29 Apr 2024 13:05:08 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -689,19 +757,19 @@ "isContentBase64": false } }, - "Remove-AzEventHubAuthorizationRule+[NoContext]+RemoveViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules/entityAuthRule2?api-version=2023-01-01-preview+6": { + "Remove-AzEventHubAuthorizationRule+[NoContext]+RemoveViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules/entityAuthRule2?api-version=2023-01-01-preview+6": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules/entityAuthRule2?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules/entityAuthRule2?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "216" ], - "x-ms-client-request-id": [ "c3d210bc-898a-4c04-b7c9-35cdd1b1323e" ], + "x-ms-unique-id": [ "169" ], + "x-ms-client-request-id": [ "12e66e65-841f-4d69-b24e-36a655148114" ], "CommandName": [ "Az.EventHub.private\\Get-AzEventHubAuthorizationRule_GetViaIdentity" ], "FullCommandName": [ "Get-AzEventHubAuthorizationRule_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -712,15 +780,19 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], - "x-ms-request-id": [ "ac3ffe63-af16-41d8-9468-2212661872c0" ], - "x-ms-correlation-request-id": [ "ac3ffe63-af16-41d8-9468-2212661872c0" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083145Z:ac3ffe63-af16-41d8-9468-2212661872c0" ], + "x-ms-correlation-request-id": [ "2cd5df6e-76cb-4ce1-94f6-840b20b7914b" ], + "x-ms-client-request-id": [ "12e66e65-841f-4d69-b24e-36a655148114_RP" ], + "x-ms-messaging-activity-id": [ "fd15913f-22dd-4221-b7fc-bdd4c644f7f6" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G7|2024-04-29T13:05:09" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "2cd5df6e-76cb-4ce1-94f6-840b20b7914b" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T130509Z:2cd5df6e-76cb-4ce1-94f6-840b20b7914b" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: C442691AA17A49B0A0D16B029FAE1C84 Ref B: SEL221051504011 Ref C: 2023-09-18T08:31:44Z" ], - "Date": [ "Mon, 18 Sep 2023 08:31:45 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 68173B316AF9464F9ACB254A568E12D4 Ref B: SEL221051504047 Ref C: 2024-04-29T13:05:09Z" ], + "Date": [ "Mon, 29 Apr 2024 13:05:09 GMT" ] }, "ContentHeaders": { "Content-Length": [ "87" ], @@ -731,19 +803,19 @@ "isContentBase64": false } }, - "Remove-AzEventHubAuthorizationRule+[NoContext]+RemoveViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules?api-version=2023-01-01-preview+7": { + "Remove-AzEventHubAuthorizationRule+[NoContext]+RemoveViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules?api-version=2023-01-01-preview+7": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "217" ], - "x-ms-client-request-id": [ "36dad63c-0524-4aa0-9fb9-a8594cc65bfd" ], + "x-ms-unique-id": [ "170" ], + "x-ms-client-request-id": [ "8ebe7c2d-e336-4362-9067-0e76b85ba5ff" ], "CommandName": [ "Az.EventHub.private\\Get-AzEventHubNamespaceAuthorizationRule_List" ], "FullCommandName": [ "Get-AzEventHubNamespaceAuthorizationRule_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -754,38 +826,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-request-id": [ "5a9c8e52-9e09-4736-9187-43c42f6210a3" ], - "x-ms-correlation-request-id": [ "5a9c8e52-9e09-4736-9187-43c42f6210a3" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083147Z:5a9c8e52-9e09-4736-9187-43c42f6210a3" ], + "x-ms-correlation-request-id": [ "09e32e60-ab98-4555-9023-74c07e750e4a" ], + "x-ms-client-request-id": [ "8ebe7c2d-e336-4362-9067-0e76b85ba5ff_RP" ], + "x-ms-messaging-activity-id": [ "b359af60-515e-4d68-ab04-81f637a21c88" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G7|2024-04-29T13:05:10" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "09e32e60-ab98-4555-9023-74c07e750e4a" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T130510Z:09e32e60-ab98-4555-9023-74c07e750e4a" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: BF92A7214EAF490EB97338532DE4CB69 Ref B: SEL221051504011 Ref C: 2023-09-18T08:31:45Z" ], - "Date": [ "Mon, 18 Sep 2023 08:31:47 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 283834F280F84B27AE51397E4B5A41EE Ref B: SEL221051504047 Ref C: 2024-04-29T13:05:09Z" ], + "Date": [ "Mon, 29 Apr 2024 13:05:10 GMT" ] }, "ContentHeaders": { "Content-Length": [ "2071" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationrules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationrules/auth-ruleju0nd3\",\"name\":\"auth-ruleju0nd3\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationrules/key1\",\"name\":\"key1\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationrules/auth-rule9ld078\",\"name\":\"auth-rule9ld078\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationrules/b\",\"name\":\"b\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationrules/c\",\"name\":\"c\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationrules/RootManageSharedAccessKey\",\"name\":\"RootManageSharedAccessKey\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationrules/auth-ruleudhoej\",\"name\":\"auth-ruleudhoej\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationrules/key1\",\"name\":\"key1\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationrules/auth-rule85shx1\",\"name\":\"auth-rule85shx1\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationrules/b\",\"name\":\"b\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationrules/c\",\"name\":\"c\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}}]}", "isContentBase64": false } }, - "Remove-AzEventHubAuthorizationRule+[NoContext]+RemoveViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules?api-version=2023-01-01-preview+8": { + "Remove-AzEventHubAuthorizationRule+[NoContext]+RemoveViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules?api-version=2023-01-01-preview+8": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "218" ], - "x-ms-client-request-id": [ "27e763ec-1614-4044-addc-98f0e32d85f7" ], + "x-ms-unique-id": [ "171" ], + "x-ms-client-request-id": [ "c8285a7a-4daa-4f4d-9421-9e8f36e710ae" ], "CommandName": [ "Az.EventHub.private\\Get-AzEventHubAuthorizationRule_List" ], "FullCommandName": [ "Get-AzEventHubAuthorizationRule_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -796,22 +872,26 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], - "x-ms-request-id": [ "7b6dc3ef-20dd-4036-8d4d-7366c7ee1f5b" ], - "x-ms-correlation-request-id": [ "7b6dc3ef-20dd-4036-8d4d-7366c7ee1f5b" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083149Z:7b6dc3ef-20dd-4036-8d4d-7366c7ee1f5b" ], + "x-ms-correlation-request-id": [ "d2051ac5-1a84-42b5-914a-a5b331f6c4e8" ], + "x-ms-client-request-id": [ "c8285a7a-4daa-4f4d-9421-9e8f36e710ae_RP" ], + "x-ms-messaging-activity-id": [ "18047b46-e33c-4530-a5bf-1d2c63ce1394" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G13|2024-04-29T13:05:11" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "d2051ac5-1a84-42b5-914a-a5b331f6c4e8" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T130511Z:d2051ac5-1a84-42b5-914a-a5b331f6c4e8" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 760C3142965C4C89813441DC542EFE65 Ref B: SEL221051504011 Ref C: 2023-09-18T08:31:47Z" ], - "Date": [ "Mon, 18 Sep 2023 08:31:48 GMT" ] + "X-MSEdge-Ref": [ "Ref A: B1BBAB01FC954A678894FFA281FD5F4E Ref B: SEL221051504047 Ref C: 2024-04-29T13:05:10Z" ], + "Date": [ "Mon, 29 Apr 2024 13:05:11 GMT" ] }, "ContentHeaders": { "Content-Length": [ "771" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationrules/auth-ruleirhsyq\",\"name\":\"auth-ruleirhsyq\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationrules/auth-rulepjiaoe\",\"name\":\"auth-rulepjiaoe\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationrules/auth-rulef5iq9n\",\"name\":\"auth-rulef5iq9n\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationrules/auth-rulevanqub\",\"name\":\"auth-rulevanqub\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Listen\",\"Send\"]}}]}", "isContentBase64": false } } diff --git a/src/EventHub/EventHub.Autorest/test/Remove-AzEventHubAuthorizationRule.Tests.ps1 b/src/EventHub/EventHub.Autorest/test/Remove-AzEventHubAuthorizationRule.Tests.ps1 index fed655b6e562..e1fcfc9eaa17 100644 --- a/src/EventHub/EventHub.Autorest/test/Remove-AzEventHubAuthorizationRule.Tests.ps1 +++ b/src/EventHub/EventHub.Autorest/test/Remove-AzEventHubAuthorizationRule.Tests.ps1 @@ -35,17 +35,17 @@ Describe 'Remove-AzEventHubAuthorizationRule' { It 'RemoveExpandedNamespace' { Remove-AzEventHubAuthorizationRule -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -Name namespaceAuthRule1 - { Get-AzEventHubAuthorizationRule -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -Name namespaceAuthRule1 } | Should -Throw + { Get-AzEventHubAuthorizationRule -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -Name namespaceAuthRule1 -ErrorAction Stop } | Should -Throw } It 'RemoveExpandedEntity' { Remove-AzEventHubAuthorizationRule -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -EventHubName $env.eventHub -Name entityAuthRule1 - { Get-AzEventHubAuthorizationRule -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -EventHubName $env.eventHub -Name entityAuthRule1 } | Should -Throw + { Get-AzEventHubAuthorizationRule -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -EventHubName $env.eventHub -Name entityAuthRule1 -ErrorAction Stop } | Should -Throw } It 'RemoveViaIdentityExpanded' { Remove-AzEventHubAuthorizationRule -InputObject $namespaceAuthRule - { Get-AzEventHubAuthorizationRule -InputObject $namespaceAuthRule } | Should -Throw + { Get-AzEventHubAuthorizationRule -InputObject $namespaceAuthRule -ErrorAction Stop } | Should -Throw $listOfNamespaceAuthRules = Get-AzEventHubAuthorizationRule -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace $listOfNamespaceAuthRules.Count | Should -Be 6 @@ -54,7 +54,7 @@ Describe 'Remove-AzEventHubAuthorizationRule' { $listOfEventHubAuthRules.Count | Should -Be 3 Remove-AzEventHubAuthorizationRule -InputObject $eventhubAuthRule - { Get-AzEventHubAuthorizationRule -InputObject $eventhubAuthRule } | Should -Throw + { Get-AzEventHubAuthorizationRule -InputObject $eventhubAuthRule -ErrorAction Stop } | Should -Throw $listOfNamespaceAuthRules = Get-AzEventHubAuthorizationRule -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace $listOfNamespaceAuthRules.Count | Should -Be 6 diff --git a/src/EventHub/EventHub.Autorest/test/Remove-AzEventHubCluster.Tests.ps1 b/src/EventHub/EventHub.Autorest/test/Remove-AzEventHubCluster.Tests.ps1 index 384f32f66eaa..caa4544bcdab 100644 --- a/src/EventHub/EventHub.Autorest/test/Remove-AzEventHubCluster.Tests.ps1 +++ b/src/EventHub/EventHub.Autorest/test/Remove-AzEventHubCluster.Tests.ps1 @@ -18,11 +18,11 @@ Describe 'Remove-AzEventHubCluster' { It 'Delete' -skip { Remove-AzEventHubCluster -ResourceGroupName $env.clusterResourceGroup -Name $env.cluster2 - { Get-AzEventHubCluster -ResourceGroupName $env.clusterResourceGroup -Name $env.cluster2 } | Should -Throw + { Get-AzEventHubCluster -ResourceGroupName $env.clusterResourceGroup -Name $env.cluster2 -ErrorAction Stop } | Should -Throw } It 'DeleteViaIdentity' -skip { $cluster = Get-AzEventHubCluster -ResourceGroupName $env.clusterResourceGroup -Name $env.cluster2 - { Remove-AzEventHubCluster -InputObject $cluster } | Should -Throw + { Remove-AzEventHubCluster -InputObject $cluster -ErrorAction Stop } | Should -Throw } } diff --git a/src/EventHub/EventHub.Autorest/test/Remove-AzEventHubConsumerGroup.Recording.json b/src/EventHub/EventHub.Autorest/test/Remove-AzEventHubConsumerGroup.Recording.json index 799928b8a681..2776ebeec066 100644 --- a/src/EventHub/EventHub.Autorest/test/Remove-AzEventHubConsumerGroup.Recording.json +++ b/src/EventHub/EventHub.Autorest/test/Remove-AzEventHubConsumerGroup.Recording.json @@ -1,8 +1,8 @@ { - "Remove-AzEventHubConsumerGroup+[NoContext]+Delete+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/consumergroups/consumerGroup?api-version=2023-01-01-preview+1": { + "Remove-AzEventHubConsumerGroup+[NoContext]+Delete+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/consumergroups/consumerGroup?api-version=2023-01-01-preview+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/consumergroups/consumerGroup?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/consumergroups/consumerGroup?api-version=2023-01-01-preview", "Content": "{\n}", "isContentBase64": false, "Headers": { @@ -17,38 +17,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-request-id": [ "5ed2db69-7fd3-499f-9124-ada8c51cf267" ], - "x-ms-correlation-request-id": [ "5ed2db69-7fd3-499f-9124-ada8c51cf267" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083211Z:5ed2db69-7fd3-499f-9124-ada8c51cf267" ], + "x-ms-correlation-request-id": [ "11c9abd3-d410-421c-92bb-5aa9c8774ac3" ], + "x-ms-client-request-id": [ "8ecf0a80-ba5f-4ba0-bd4c-c363b5c5d1f8_RP" ], + "x-ms-messaging-activity-id": [ "a8e19cff-5502-414a-84bb-de2c48b3a703" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G9|2024-04-29T13:05:41" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "11c9abd3-d410-421c-92bb-5aa9c8774ac3" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T130541Z:11c9abd3-d410-421c-92bb-5aa9c8774ac3" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 7BF5115164A64765BA6A6D85E7ED1BCA Ref B: SEL221051504011 Ref C: 2023-09-18T08:32:10Z" ], - "Date": [ "Mon, 18 Sep 2023 08:32:11 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 34EC61CC33214B77BA4BF4C5F3535858 Ref B: SEL221051504047 Ref C: 2024-04-29T13:05:39Z" ], + "Date": [ "Mon, 29 Apr 2024 13:05:41 GMT" ] }, "ContentHeaders": { "Content-Length": [ "425" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/consumergroups/consumerGroup\",\"name\":\"consumerGroup\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/consumergroups\",\"location\":\"eastus\",\"properties\":{\"createdAt\":\"2023-09-18T08:32:11.8109912Z\",\"updatedAt\":\"2023-09-18T08:32:11.8109912Z\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/consumergroups/consumerGroup\",\"name\":\"consumerGroup\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/consumergroups\",\"location\":\"eastus\",\"properties\":{\"createdAt\":\"2024-04-29T13:05:41.3309785Z\",\"updatedAt\":\"2024-04-29T13:05:41.3309785Z\"}}", "isContentBase64": false } }, - "Remove-AzEventHubConsumerGroup+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/consumergroups/consumerGroup?api-version=2023-01-01-preview+2": { + "Remove-AzEventHubConsumerGroup+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/consumergroups/consumerGroup?api-version=2023-01-01-preview+2": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/consumergroups/consumerGroup?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/consumergroups/consumerGroup?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "220" ], - "x-ms-client-request-id": [ "020832c6-40f2-4b32-868f-0cc799f9e6ad" ], + "x-ms-unique-id": [ "173" ], + "x-ms-client-request-id": [ "6e859c1e-2d2d-4dae-8f96-aaa0ecffcddb" ], "CommandName": [ "Remove-AzEventHubConsumerGroup" ], "FullCommandName": [ "Remove-AzEventHubConsumerGroup_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -59,15 +63,19 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], - "x-ms-request-id": [ "f90391e1-f93e-47a2-8d9e-15abf628a5a5" ], - "x-ms-correlation-request-id": [ "f90391e1-f93e-47a2-8d9e-15abf628a5a5" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083212Z:f90391e1-f93e-47a2-8d9e-15abf628a5a5" ], + "x-ms-correlation-request-id": [ "00000001-0000-0000-0002-000000001748" ], + "x-ms-client-request-id": [ "00000001-0000-0000-0002-000000001748" ], + "x-ms-messaging-activity-id": [ "00000001-0000-0000-0002-000000001748" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G7|2024-04-29T13:05:43" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], + "x-ms-request-id": [ "c6126c7b-8117-43c6-bf18-c7183763fc4d" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T130543Z:c6126c7b-8117-43c6-bf18-c7183763fc4d" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: D228FCB003804194884B4039050E5193 Ref B: SEL221051504011 Ref C: 2023-09-18T08:32:12Z" ], - "Date": [ "Mon, 18 Sep 2023 08:32:12 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 50C2D39B356C4A17BFE435B457EA4246 Ref B: SEL221051504047 Ref C: 2024-04-29T13:05:41Z" ], + "Date": [ "Mon, 29 Apr 2024 13:05:43 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -77,19 +85,19 @@ "isContentBase64": false } }, - "Remove-AzEventHubConsumerGroup+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/consumergroups/consumerGroup?api-version=2023-01-01-preview+3": { + "Remove-AzEventHubConsumerGroup+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/consumergroups/consumerGroup?api-version=2023-01-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/consumergroups/consumerGroup?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/consumergroups/consumerGroup?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "221" ], - "x-ms-client-request-id": [ "15b0a4bf-6bc8-44de-b397-e199104b9c94" ], + "x-ms-unique-id": [ "174" ], + "x-ms-client-request-id": [ "3f1b673d-bc56-4e29-b0be-a8a33f35ceb4" ], "CommandName": [ "Get-AzEventHubConsumerGroup" ], "FullCommandName": [ "Get-AzEventHubConsumerGroup_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -100,15 +108,19 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-request-id": [ "49aaea47-663c-451e-b403-70db2445d821" ], - "x-ms-correlation-request-id": [ "49aaea47-663c-451e-b403-70db2445d821" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083215Z:49aaea47-663c-451e-b403-70db2445d821" ], + "x-ms-correlation-request-id": [ "eff8afee-a4e2-4977-985f-9776a7d5a056" ], + "x-ms-client-request-id": [ "3f1b673d-bc56-4e29-b0be-a8a33f35ceb4_RP" ], + "x-ms-messaging-activity-id": [ "1b27a25b-f6f8-4e71-9c1e-c24f1de777b8" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G11|2024-04-29T13:05:44" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "eff8afee-a4e2-4977-985f-9776a7d5a056" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T130544Z:eff8afee-a4e2-4977-985f-9776a7d5a056" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: DF67DD7277A9475C8C6AC3875E0DC60B Ref B: SEL221051504011 Ref C: 2023-09-18T08:32:13Z" ], - "Date": [ "Mon, 18 Sep 2023 08:32:15 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 5E73F07042EC41A889EE4908563B04E0 Ref B: SEL221051504047 Ref C: 2024-04-29T13:05:43Z" ], + "Date": [ "Mon, 29 Apr 2024 13:05:44 GMT" ] }, "ContentHeaders": { "Content-Length": [ "84" ], @@ -119,10 +131,10 @@ "isContentBase64": false } }, - "Remove-AzEventHubConsumerGroup+[NoContext]+DeleteViaIdentity+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/consumergroups/consumerGroup?api-version=2023-01-01-preview+1": { + "Remove-AzEventHubConsumerGroup+[NoContext]+DeleteViaIdentity+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/consumergroups/consumerGroup?api-version=2023-01-01-preview+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/consumergroups/consumerGroup?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/consumergroups/consumerGroup?api-version=2023-01-01-preview", "Content": "{\n}", "isContentBase64": false, "Headers": { @@ -137,38 +149,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-request-id": [ "aaabcc1a-7b90-4b8a-b545-74a11aeae9ab" ], - "x-ms-correlation-request-id": [ "aaabcc1a-7b90-4b8a-b545-74a11aeae9ab" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083217Z:aaabcc1a-7b90-4b8a-b545-74a11aeae9ab" ], + "x-ms-correlation-request-id": [ "d9f582bc-dbdc-465b-9ecb-013cad256aa0" ], + "x-ms-client-request-id": [ "970db358-7fa8-485a-a49d-3e70753168d5_RP" ], + "x-ms-messaging-activity-id": [ "3c8f6d16-02e0-4d38-8376-86516b2e252d" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G11|2024-04-29T13:05:46" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "d9f582bc-dbdc-465b-9ecb-013cad256aa0" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T130546Z:d9f582bc-dbdc-465b-9ecb-013cad256aa0" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: C0C1E17FB84B45DDBDF737F4436E650A Ref B: SEL221051504011 Ref C: 2023-09-18T08:32:15Z" ], - "Date": [ "Mon, 18 Sep 2023 08:32:17 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 1552A173B822467C94C2A5EF87377CB1 Ref B: SEL221051504047 Ref C: 2024-04-29T13:05:44Z" ], + "Date": [ "Mon, 29 Apr 2024 13:05:46 GMT" ] }, "ContentHeaders": { "Content-Length": [ "425" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/consumergroups/consumerGroup\",\"name\":\"consumerGroup\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/consumergroups\",\"location\":\"eastus\",\"properties\":{\"createdAt\":\"2023-09-18T08:32:17.2410104Z\",\"updatedAt\":\"2023-09-18T08:32:17.2410104Z\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/consumergroups/consumerGroup\",\"name\":\"consumerGroup\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/consumergroups\",\"location\":\"eastus\",\"properties\":{\"createdAt\":\"2024-04-29T13:05:46.6832664Z\",\"updatedAt\":\"2024-04-29T13:05:46.6832664Z\"}}", "isContentBase64": false } }, - "Remove-AzEventHubConsumerGroup+[NoContext]+DeleteViaIdentity+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/consumergroups/consumerGroup?api-version=2023-01-01-preview+2": { + "Remove-AzEventHubConsumerGroup+[NoContext]+DeleteViaIdentity+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/consumergroups/consumerGroup?api-version=2023-01-01-preview+2": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/consumergroups/consumerGroup?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/consumergroups/consumerGroup?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "223" ], - "x-ms-client-request-id": [ "c1c0512b-fb44-458c-a118-ea04dd83aa49" ], + "x-ms-unique-id": [ "176" ], + "x-ms-client-request-id": [ "ed39bfff-6166-4423-bdcc-61c6a6645b4d" ], "CommandName": [ "Remove-AzEventHubConsumerGroup" ], "FullCommandName": [ "Remove-AzEventHubConsumerGroup_DeleteViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -179,15 +195,19 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], - "x-ms-request-id": [ "a8ed911d-3e14-48e1-94d4-7896aeb5de8b" ], - "x-ms-correlation-request-id": [ "a8ed911d-3e14-48e1-94d4-7896aeb5de8b" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083218Z:a8ed911d-3e14-48e1-94d4-7896aeb5de8b" ], + "x-ms-correlation-request-id": [ "00000001-0000-0000-0002-000000005436" ], + "x-ms-client-request-id": [ "00000001-0000-0000-0002-000000005436" ], + "x-ms-messaging-activity-id": [ "00000001-0000-0000-0002-000000005436" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G2|2024-04-29T13:05:47" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], + "x-ms-request-id": [ "6d917338-fda1-4367-8ea0-eea16beb48a4" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T130547Z:6d917338-fda1-4367-8ea0-eea16beb48a4" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 0F904C6FC36B41C69B83921EAA8BC6B0 Ref B: SEL221051504011 Ref C: 2023-09-18T08:32:17Z" ], - "Date": [ "Mon, 18 Sep 2023 08:32:18 GMT" ] + "X-MSEdge-Ref": [ "Ref A: E021E23BDE194534B4B9874D298847EE Ref B: SEL221051504047 Ref C: 2024-04-29T13:05:46Z" ], + "Date": [ "Mon, 29 Apr 2024 13:05:47 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -197,19 +217,19 @@ "isContentBase64": false } }, - "Remove-AzEventHubConsumerGroup+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/consumergroups/consumerGroup?api-version=2023-01-01-preview+3": { + "Remove-AzEventHubConsumerGroup+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/consumergroups/consumerGroup?api-version=2023-01-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/consumergroups/consumerGroup?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/consumergroups/consumerGroup?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "224" ], - "x-ms-client-request-id": [ "e58d01d1-5f8a-440d-ab0a-f47c3714220a" ], + "x-ms-unique-id": [ "177" ], + "x-ms-client-request-id": [ "cbec6e6a-5735-4ec5-9236-d603a5991ab0" ], "CommandName": [ "Get-AzEventHubConsumerGroup" ], "FullCommandName": [ "Get-AzEventHubConsumerGroup_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -220,15 +240,19 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11991" ], - "x-ms-request-id": [ "40ff4dd9-0160-4c99-a7b4-2d03e4e6930b" ], - "x-ms-correlation-request-id": [ "40ff4dd9-0160-4c99-a7b4-2d03e4e6930b" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083220Z:40ff4dd9-0160-4c99-a7b4-2d03e4e6930b" ], + "x-ms-correlation-request-id": [ "dfe0cd29-f430-4f10-8205-5e9df8d9abb4" ], + "x-ms-client-request-id": [ "cbec6e6a-5735-4ec5-9236-d603a5991ab0_RP" ], + "x-ms-messaging-activity-id": [ "6e39af2e-5e5c-45e5-bad1-a7204a05e5e2" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G12|2024-04-29T13:05:50" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "dfe0cd29-f430-4f10-8205-5e9df8d9abb4" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T130550Z:dfe0cd29-f430-4f10-8205-5e9df8d9abb4" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 2DB12388C97F4962B0EEFB0403A3EF4C Ref B: SEL221051504011 Ref C: 2023-09-18T08:32:18Z" ], - "Date": [ "Mon, 18 Sep 2023 08:32:19 GMT" ] + "X-MSEdge-Ref": [ "Ref A: FAA82B70CD544DC4A5B6E42AC270F6DF Ref B: SEL221051504047 Ref C: 2024-04-29T13:05:47Z" ], + "Date": [ "Mon, 29 Apr 2024 13:05:50 GMT" ] }, "ContentHeaders": { "Content-Length": [ "84" ], diff --git a/src/EventHub/EventHub.Autorest/test/Remove-AzEventHubConsumerGroup.Tests.ps1 b/src/EventHub/EventHub.Autorest/test/Remove-AzEventHubConsumerGroup.Tests.ps1 index 4f245145eb44..3e044ea0e7c9 100644 --- a/src/EventHub/EventHub.Autorest/test/Remove-AzEventHubConsumerGroup.Tests.ps1 +++ b/src/EventHub/EventHub.Autorest/test/Remove-AzEventHubConsumerGroup.Tests.ps1 @@ -18,12 +18,12 @@ Describe 'Remove-AzEventHubConsumerGroup' { It 'Delete' { New-AzEventHubConsumerGroup -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -EventHubName $env.eventHub -Name consumerGroup Remove-AzEventHubConsumerGroup -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -EventHubName $env.eventHub -Name consumerGroup - { Get-AzEventHubConsumerGroup -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -EventHubName $env.eventHub -Name consumerGroup } | Should -Throw + { Get-AzEventHubConsumerGroup -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -EventHubName $env.eventHub -Name consumerGroup -ErrorAction Stop } | Should -Throw } It 'DeleteViaIdentity' { $consumerGroup = New-AzEventHubConsumerGroup -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -EventHubName $env.eventHub -Name consumerGroup Remove-AzEventHubConsumerGroup -InputObject $consumerGroup - { Get-AzEventHubConsumerGroup -InputObject $consumerGroup } | Should -Throw + { Get-AzEventHubConsumerGroup -InputObject $consumerGroup -ErrorAction Stop } | Should -Throw } } diff --git a/src/EventHub/EventHub.Autorest/test/Remove-AzEventHubNamespaceV2.Recording.json b/src/EventHub/EventHub.Autorest/test/Remove-AzEventHubNamespaceV2.Recording.json index b63840495df6..748bfeaa8fb0 100644 --- a/src/EventHub/EventHub.Autorest/test/Remove-AzEventHubNamespaceV2.Recording.json +++ b/src/EventHub/EventHub.Autorest/test/Remove-AzEventHubNamespaceV2.Recording.json @@ -1,8 +1,8 @@ { - "Remove-AzEventHubNamespaceV2+[NoContext]+Delete+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV2b4cdh6?api-version=2023-01-01-preview+1": { + "Remove-AzEventHubNamespaceV2+[NoContext]+Delete+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV2dmnw8c?api-version=2023-01-01-preview+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV2b4cdh6?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV2dmnw8c?api-version=2023-01-01-preview", "Content": "{\n \"location\": \"eastus\",\n \"sku\": {\n \"name\": \"Standard\",\n \"tier\": \"Standard\"\n }\n}", "isContentBase64": false, "Headers": { @@ -17,40 +17,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "dcdbcc89-75b3-4b6d-b790-8a04bed34f2d_M7SN1_M7SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ "49" ], - "x-ms-correlation-request-id": [ "b35e0279-482c-40a6-aba0-293cb9d41f9e" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083300Z:b35e0279-482c-40a6-aba0-293cb9d41f9e" ], + "x-ms-correlation-request-id": [ "7edf3f8e-e8dc-49cc-9a4e-2a5f2480b9b5" ], + "x-ms-client-request-id": [ "b8e3de77-802f-416d-9f7c-c78105d03f6b_RP" ], + "x-ms-messaging-activity-id": [ "6163e9fb-72f0-4bfe-ac19-f001aa98242d" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G2|2024-04-29T13:06:33" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "49" ], + "x-ms-request-id": [ "7edf3f8e-e8dc-49cc-9a4e-2a5f2480b9b5" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T130634Z:7edf3f8e-e8dc-49cc-9a4e-2a5f2480b9b5" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 5EC699A7193448B280AACD352C9B65F5 Ref B: SEL221051504011 Ref C: 2023-09-18T08:32:48Z" ], - "Date": [ "Mon, 18 Sep 2023 08:32:59 GMT" ] + "X-MSEdge-Ref": [ "Ref A: ABCA4E98AA2A4E31865D4D2B1B33CB78 Ref B: SEL221051504047 Ref C: 2024-04-29T13:06:31Z" ], + "Date": [ "Mon, 29 Apr 2024 13:06:33 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "786" ], + "Content-Length": [ "791" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV2b4cdh6\",\"name\":\"namespaceV2b4cdh6\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Updating\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev2b4cdh6\",\"createdAt\":\"2023-09-18T08:01:24.34Z\",\"updatedAt\":\"2023-09-18T08:32:56.337Z\",\"serviceBusEndpoint\":\"https://namespaceV2b4cdh6.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV2dmnw8c\",\"name\":\"namespaceV2dmnw8c\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev2dmnw8c\",\"serviceBusEndpoint\":\"https://namespaceV2dmnw8c.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:56:09.3854671Z\",\"updatedAt\":\"2024-04-29T12:56:36.7520883Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}}", "isContentBase64": false } }, - "Remove-AzEventHubNamespaceV2+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV2b4cdh6?api-version=2023-01-01-preview+2": { + "Remove-AzEventHubNamespaceV2+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV2dmnw8c?api-version=2023-01-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV2b4cdh6?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV2dmnw8c?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "226" ], - "x-ms-client-request-id": [ "a6d7a2ce-caa1-4d84-b56a-89fc5538cb00" ], + "x-ms-unique-id": [ "179" ], + "x-ms-client-request-id": [ "b8e3de77-802f-416d-9f7c-c78105d03f6b" ], "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ] }, "ContentHeaders": { } @@ -60,40 +63,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "c4f87ac9-605d-47d4-a5e0-8202e135f7e6_M7SN1_M7SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], - "x-ms-correlation-request-id": [ "b9fc2f11-801b-48a5-b6ed-3e7fd8f0ee66" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083331Z:b9fc2f11-801b-48a5-b6ed-3e7fd8f0ee66" ], + "x-ms-correlation-request-id": [ "346004a1-1db7-408d-9a75-baebf6f0ccca" ], + "x-ms-client-request-id": [ "b8e3de77-802f-416d-9f7c-c78105d03f6b_RP" ], + "x-ms-messaging-activity-id": [ "ea5e88df-493b-4afc-8b6a-72c735a9daaf" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G13|2024-04-29T13:07:05" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "346004a1-1db7-408d-9a75-baebf6f0ccca" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T130705Z:346004a1-1db7-408d-9a75-baebf6f0ccca" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: DB1F21A27F704E8DBB024A749F6CEA02 Ref B: SEL221051504011 Ref C: 2023-09-18T08:33:30Z" ], - "Date": [ "Mon, 18 Sep 2023 08:33:31 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 2E178422601A4005A1E022B631655164 Ref B: SEL221051504047 Ref C: 2024-04-29T13:07:04Z" ], + "Date": [ "Mon, 29 Apr 2024 13:07:05 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "782" ], + "Content-Length": [ "823" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV2b4cdh6\",\"name\":\"namespaceV2b4cdh6\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev2b4cdh6\",\"createdAt\":\"2023-09-18T08:01:24.34Z\",\"updatedAt\":\"2023-09-18T08:33:01.86Z\",\"serviceBusEndpoint\":\"https://namespaceV2b4cdh6.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV2dmnw8c\",\"name\":\"namespaceV2dmnw8c\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"privateEndpointConnections\":[],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev2dmnw8c\",\"serviceBusEndpoint\":\"https://namespaceV2dmnw8c.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:56:09.3854671Z\",\"updatedAt\":\"2024-04-29T12:56:36.7520883Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}}", "isContentBase64": false } }, - "Remove-AzEventHubNamespaceV2+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV2b4cdh6?api-version=2023-01-01-preview+3": { + "Remove-AzEventHubNamespaceV2+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV2dmnw8c?api-version=2023-01-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV2b4cdh6?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV2dmnw8c?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "227" ], - "x-ms-client-request-id": [ "a6d7a2ce-caa1-4d84-b56a-89fc5538cb00" ], + "x-ms-unique-id": [ "180" ], + "x-ms-client-request-id": [ "b8e3de77-802f-416d-9f7c-c78105d03f6b" ], "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ] }, "ContentHeaders": { } @@ -103,39 +109,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "f4df8c28-71b7-4f58-bdf8-e28444a4abe1_M8CH3_M8CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11989" ], - "x-ms-correlation-request-id": [ "2df548e0-8b8a-4e5d-8d7a-b856d729007d" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083332Z:2df548e0-8b8a-4e5d-8d7a-b856d729007d" ], + "x-ms-correlation-request-id": [ "96591007-89be-4a69-abcc-5812475a376e" ], + "x-ms-client-request-id": [ "b8e3de77-802f-416d-9f7c-c78105d03f6b_RP" ], + "x-ms-messaging-activity-id": [ "a8cf5e94-9787-4be0-9620-84e06e729bc7" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G12|2024-04-29T13:07:07" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "96591007-89be-4a69-abcc-5812475a376e" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240429T130707Z:96591007-89be-4a69-abcc-5812475a376e" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: D8A485D72FAD4428B9820B22B8A1C179 Ref B: SEL221051504011 Ref C: 2023-09-18T08:33:31Z" ], - "Date": [ "Mon, 18 Sep 2023 08:33:32 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 1FF56532FE6A4F2791EAD1089BDA1635 Ref B: SEL221051504047 Ref C: 2024-04-29T13:07:05Z" ], + "Date": [ "Mon, 29 Apr 2024 13:07:07 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "782" ], + "Content-Length": [ "823" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV2b4cdh6\",\"name\":\"namespaceV2b4cdh6\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev2b4cdh6\",\"createdAt\":\"2023-09-18T08:01:24.34Z\",\"updatedAt\":\"2023-09-18T08:33:01.86Z\",\"serviceBusEndpoint\":\"https://namespaceV2b4cdh6.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV2dmnw8c\",\"name\":\"namespaceV2dmnw8c\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"privateEndpointConnections\":[],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev2dmnw8c\",\"serviceBusEndpoint\":\"https://namespaceV2dmnw8c.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:56:09.3854671Z\",\"updatedAt\":\"2024-04-29T12:56:36.7520883Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}}", "isContentBase64": false } }, - "Remove-AzEventHubNamespaceV2+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV2b4cdh6?api-version=2023-01-01-preview+4": { + "Remove-AzEventHubNamespaceV2+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV2dmnw8c?api-version=2023-01-01-preview+4": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV2b4cdh6?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV2dmnw8c?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "228" ], - "x-ms-client-request-id": [ "1ff72810-126e-4e63-ab4a-398806d6c766" ], + "x-ms-unique-id": [ "181" ], + "x-ms-client-request-id": [ "b4e928a3-8556-4695-9206-a8747f2281f0" ], "CommandName": [ "Remove-AzEventHubNamespaceV2" ], "FullCommandName": [ "Remove-AzEventHubNamespace_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -146,17 +155,21 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Location": [ "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/locations/eastus/operationStatus/namespaceV2b4cdh6?api-version=2023-01-01-preview\u0026resourceType=Namespace\u0026t=2023-09-18T08%3a33%3a36\u0026c=MIIHADCCBeigAwIBAgITHgMhaM4gZ0HzxBWAuAAAAyFozjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjMwODAyMDMxNzU2WhcNMjQwNzI3MDMxNzU2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOOzhNB70ZBwsbp8jfRR_PKOMG_uCDbegB2_gFDOKZMO_FN_JbJRPNh1h7ZNDoukj9oG4tI7KLdPeVJZlY-rrXNZ1uYNSQVjW_5Df4MuI-KyTpSFoCOp3TiwuAn-BOqW0MbJxIdEcFYpuGolWK8LFJxpm0yjCkOhdjDgZ4330_2_NIxXUjUwfP14yHf-Hj4MZrzErcHta1wJw_VR3KpxZ_AHpWoVqjotRTeBsvSM0ooxDMwWCEtBiuwlT_mknn_HjKB4gZJz__vVudNZOpMC9LfSwWD6ARuKpft-igloqK_8Renvbqzp8UUzhrGEqAiaiLIdpGEo_2Q-2htJ3trviRkCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSoHbW7ynocEyY6SmRonoHwiWsl0DAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKYeWfNeK4--RDWDXAAns3GQxhL134SJ84r6XxuYE2VaF-1rZtyO5_tXB2JqwHLAAGJYdb2twYqXxZR3p1gyudp9OCvlaHAqZ4ZP_2Spi2mNbemr8GEaopF7f3gXpstAzwJjvAOsaVuphy1hZP8Hk98jaNQ6_OJGTv66Vx2Y930Ckj29807E6IAvzrl8flblVq6UfKm0i6HpkaHFsPK0s9asWs8hyG8yjtPDLZi6XZNGDsOi5XLsxiBLHxi0Vuokek6OvcvkS_OIFZhdCTaa7mc15pRyBWlj7vXCyuyzz6zb55bwtTq-IRQql_cUiw3PTWWAves-Jjh5e-5XHHb8uA0\u0026s=gl-0gAuHF_fC-CgwQ41h4xH4mxXVZfCuTqPVLIAgGgK0wWP7LHa8zpGp6OT-Y86WHyR8dD6sxgnk3vFeoosNIPTzFjH1SPPzjMBzp-zRAkAhX0kAf0XzSLktRcc0aNC8IlLdrxV5fIE6SIuPXt-_OZ7tJD8SDI9dVHA6ol4nW7p7RhZSFEySqr8dVPsuuwz6Frp-6V54BxugOPtueFIxM8GISgBq2LLvgKuv9TusjNRs2eoTedrOgED8-BoTjJGV1NM-hldcCqao9arF6K5qMeDFgsBulkbdLnapn0VgzKeI38qqesTP98cXEaH8Xw425PqCiQyx8_Y1jV6rDnTPzQ\u0026h=Eb63-mIzY7t4ySj-r4bRRkXY7pihINYmpGwUbxat6o8" ], - "x-ms-request-id": [ "3130fea3-d543-43b1-9ec0-7a211ef2a24e_M8SN1_M8SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14998" ], - "x-ms-correlation-request-id": [ "1c953d29-c506-489d-ba8e-b13d3d0691dc" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083336Z:1c953d29-c506-489d-ba8e-b13d3d0691dc" ], + "Location": [ "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/providers/Microsoft.EventHub/locations/eastus/namespaceOperationResults/5231f121-cfd1-48fc-b01f-7f9c7a0baa95?isAsyncHeader=false\u0026resourceName=namespaceV2dmnw8c\u0026resourceType=namespace\u0026api-version=2023-01-01-preview\u0026operationType=Deleted\u0026t=638499928297462566\u0026c=MIIHADCCBeigAwIBAgITfARkblWv9E1UAxL0rgAABGRuVTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMwMDYxMDQ1WhcNMjUwMTI0MDYxMDQ1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL63lNdlvQvkP7LpygshC_1kUR8Go8cQgx8bHhBgpDDVKuiZ9Ac6D19MAApdfH616nszMxe_fI1VBHXniEsjPIV8AXVPDZsYCvRuoo8NS3kXvNixn2PhgEvc7t6mZJpguzRxCvCjQjb129HPMlZfO706DAoq-3Abk2D1ll6oHEIFF-YhjtFxXd-cB4I4sCYZYdG5DFj65hWpQ4wtYur1yA1RMJ8U032dNAijuZrbmCs_Q7P1-y_pCC7VoKqRbeJQhMRROmCpX-TNXW3G9HNh300FJZ-qWZVUJZaa9-gPdJSiDPG41VipfQS_CinB3Zqif61cSyK9AI3YsTsQXtTcR_UCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9DTzFQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA1LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MB0GA1UdDgQWBBRgyIJjirhr5laZASuyXTmIxmTBzjAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAGIGEEgPerVLMQJK1Fk22xrEMyLCfudJmeDIiAi765uzPqt_wmDsdrqpT5yR7rsTQj9D9yYKq4PWalUzuE5QRq1rtTU1dc8FPhkPwX85cYGdXR09ERq9-C-eutCRsjdAXSAcOJW3K1-5fmKCRZyyz74bgucwgUwcP2L2PkiQedpIyTV4u7iYf8SsAmPf_e2bErQYtxk2lNu_26WKVPZczOwS5v9yt6ZQjxJxKVDygkHqUjghX5T6K22gd6d_KXS_ET2uu9Shl7Q9NCQ1Lt12LhDBD8ch5Jky6siBu4P9tSgTHnodazx2wuXj-1eY3Q-Mx3UKOD00XREaD2Gcz-rTEIA\u0026s=GXZfoCAmgdQ3ZFUSn9fNSWFnbj4d5bZMoo-LOrn2sSzRMt6BBpYuh9WPBDOtTG1cN0QEFjukapoAums4_2Pe9khWZzCEAgw2pERy9Ju2sFZg8Gv88AP70fxUEY6ZzwavsEyo7mFyBcQurXfvlJzOnS7ohEy89o3kWGHl-rO4H3Sjd85ThtfPRFePL8UubzT01JrSGKpbnpYW7YUo6qkSOS0pHd3PWXpTs9DXNJYbbujg2UW8nYnyQ2-3KrNkhuINyMVcaYvqqn634SNC89OXH2ppdKEdUblnLc7vihtKuF7KS4ZHkJslIqXpzH-XP-JtfRJKrftrrrB7C9iZnM_kFg\u0026h=-Qwn6hNG4neFZvQuOigrLy5aB5WsjAMHvxQI228HReg" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/providers/Microsoft.EventHub/locations/eastus/namespaceOperationResults/5231f121-cfd1-48fc-b01f-7f9c7a0baa95?isAsyncHeader=true\u0026resourceName=namespaceV2dmnw8c\u0026resourceType=namespace\u0026api-version=2023-01-01-preview\u0026operationType=Deleted\u0026t=638499928297306309\u0026c=MIIHADCCBeigAwIBAgITfARkblWv9E1UAxL0rgAABGRuVTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMwMDYxMDQ1WhcNMjUwMTI0MDYxMDQ1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL63lNdlvQvkP7LpygshC_1kUR8Go8cQgx8bHhBgpDDVKuiZ9Ac6D19MAApdfH616nszMxe_fI1VBHXniEsjPIV8AXVPDZsYCvRuoo8NS3kXvNixn2PhgEvc7t6mZJpguzRxCvCjQjb129HPMlZfO706DAoq-3Abk2D1ll6oHEIFF-YhjtFxXd-cB4I4sCYZYdG5DFj65hWpQ4wtYur1yA1RMJ8U032dNAijuZrbmCs_Q7P1-y_pCC7VoKqRbeJQhMRROmCpX-TNXW3G9HNh300FJZ-qWZVUJZaa9-gPdJSiDPG41VipfQS_CinB3Zqif61cSyK9AI3YsTsQXtTcR_UCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9DTzFQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA1LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MB0GA1UdDgQWBBRgyIJjirhr5laZASuyXTmIxmTBzjAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAGIGEEgPerVLMQJK1Fk22xrEMyLCfudJmeDIiAi765uzPqt_wmDsdrqpT5yR7rsTQj9D9yYKq4PWalUzuE5QRq1rtTU1dc8FPhkPwX85cYGdXR09ERq9-C-eutCRsjdAXSAcOJW3K1-5fmKCRZyyz74bgucwgUwcP2L2PkiQedpIyTV4u7iYf8SsAmPf_e2bErQYtxk2lNu_26WKVPZczOwS5v9yt6ZQjxJxKVDygkHqUjghX5T6K22gd6d_KXS_ET2uu9Shl7Q9NCQ1Lt12LhDBD8ch5Jky6siBu4P9tSgTHnodazx2wuXj-1eY3Q-Mx3UKOD00XREaD2Gcz-rTEIA\u0026s=tn8iGbW05aHNpcmC-yAy8v6A5n8xyBZM3T9RSuAubS_y9Nc-z_TDe2xKPIYQunfme9NqcxyUJZ21Y26WCSpU-HdQkBrUXXnXe3sbatJW3Q-hzVwXK_wE_WS0PPkcoib2panuvwXmvmYxT1xvgxo2Ex7rx3icka2qZfyJzbmcSrM2N0mLecNS6ETWbppEm9ET_O0EEl9Qxxr8paO0wvnLeE-U7ryOrpJWaBqsfx2K3GMBVMAZTwvuNQ_VyFv1y_yaXYZzaK27Wvw39KQOU-lEmjnWD7ziNnszliKtXJaiG57kxl1LrL5slX841120Z1-SPztPv3uYk6CLdTm5-0s5ww\u0026h=zcwjQ0EgIyxSqFd65O4Hu8t-mybOe4aS_6VIOnhjLFc" ], + "x-ms-correlation-request-id": [ "00000001-0000-0000-0002-000000005484" ], + "x-ms-client-request-id": [ "00000001-0000-0000-0002-000000005484" ], + "x-ms-messaging-activity-id": [ "00000001-0000-0000-0002-000000005484" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-29T13:07:09" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], + "x-ms-request-id": [ "a28f3216-3fcc-41b4-99b5-2a655df80fc5" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240429T130709Z:a28f3216-3fcc-41b4-99b5-2a655df80fc5" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: F80D30D5364D40F7B13A674217206891 Ref B: SEL221051504011 Ref C: 2023-09-18T08:33:32Z" ], - "Date": [ "Mon, 18 Sep 2023 08:33:36 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 9F6D7659CAC84EDC8B9C8716C0036BD0 Ref B: SEL221051504047 Ref C: 2024-04-29T13:07:07Z" ], + "Date": [ "Mon, 29 Apr 2024 13:07:09 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -166,61 +179,66 @@ "isContentBase64": false } }, - "Remove-AzEventHubNamespaceV2+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/locations/eastus/operationStatus/namespaceV2b4cdh6?api-version=2023-01-01-preview\u0026resourceType=Namespace\u0026t=2023-09-18T08%3a33%3a36\u0026c=MIIHADCCBeigAwIBAgITHgMhaM4gZ0HzxBWAuAAAAyFozjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjMwODAyMDMxNzU2WhcNMjQwNzI3MDMxNzU2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOOzhNB70ZBwsbp8jfRR_PKOMG_uCDbegB2_gFDOKZMO_FN_JbJRPNh1h7ZNDoukj9oG4tI7KLdPeVJZlY-rrXNZ1uYNSQVjW_5Df4MuI-KyTpSFoCOp3TiwuAn-BOqW0MbJxIdEcFYpuGolWK8LFJxpm0yjCkOhdjDgZ4330_2_NIxXUjUwfP14yHf-Hj4MZrzErcHta1wJw_VR3KpxZ_AHpWoVqjotRTeBsvSM0ooxDMwWCEtBiuwlT_mknn_HjKB4gZJz__vVudNZOpMC9LfSwWD6ARuKpft-igloqK_8Renvbqzp8UUzhrGEqAiaiLIdpGEo_2Q-2htJ3trviRkCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSoHbW7ynocEyY6SmRonoHwiWsl0DAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKYeWfNeK4--RDWDXAAns3GQxhL134SJ84r6XxuYE2VaF-1rZtyO5_tXB2JqwHLAAGJYdb2twYqXxZR3p1gyudp9OCvlaHAqZ4ZP_2Spi2mNbemr8GEaopF7f3gXpstAzwJjvAOsaVuphy1hZP8Hk98jaNQ6_OJGTv66Vx2Y930Ckj29807E6IAvzrl8flblVq6UfKm0i6HpkaHFsPK0s9asWs8hyG8yjtPDLZi6XZNGDsOi5XLsxiBLHxi0Vuokek6OvcvkS_OIFZhdCTaa7mc15pRyBWlj7vXCyuyzz6zb55bwtTq-IRQql_cUiw3PTWWAves-Jjh5e-5XHHb8uA0\u0026s=gl-0gAuHF_fC-CgwQ41h4xH4mxXVZfCuTqPVLIAgGgK0wWP7LHa8zpGp6OT-Y86WHyR8dD6sxgnk3vFeoosNIPTzFjH1SPPzjMBzp-zRAkAhX0kAf0XzSLktRcc0aNC8IlLdrxV5fIE6SIuPXt-_OZ7tJD8SDI9dVHA6ol4nW7p7RhZSFEySqr8dVPsuuwz6Frp-6V54BxugOPtueFIxM8GISgBq2LLvgKuv9TusjNRs2eoTedrOgED8-BoTjJGV1NM-hldcCqao9arF6K5qMeDFgsBulkbdLnapn0VgzKeI38qqesTP98cXEaH8Xw425PqCiQyx8_Y1jV6rDnTPzQ\u0026h=Eb63-mIzY7t4ySj-r4bRRkXY7pihINYmpGwUbxat6o8+5": { + "Remove-AzEventHubNamespaceV2+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/providers/Microsoft.EventHub/locations/eastus/namespaceOperationResults/5231f121-cfd1-48fc-b01f-7f9c7a0baa95?isAsyncHeader=true\u0026resourceName=namespaceV2dmnw8c\u0026resourceType=namespace\u0026api-version=2023-01-01-preview\u0026operationType=Deleted\u0026t=638499928297306309\u0026c=MIIHADCCBeigAwIBAgITfARkblWv9E1UAxL0rgAABGRuVTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMwMDYxMDQ1WhcNMjUwMTI0MDYxMDQ1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL63lNdlvQvkP7LpygshC_1kUR8Go8cQgx8bHhBgpDDVKuiZ9Ac6D19MAApdfH616nszMxe_fI1VBHXniEsjPIV8AXVPDZsYCvRuoo8NS3kXvNixn2PhgEvc7t6mZJpguzRxCvCjQjb129HPMlZfO706DAoq-3Abk2D1ll6oHEIFF-YhjtFxXd-cB4I4sCYZYdG5DFj65hWpQ4wtYur1yA1RMJ8U032dNAijuZrbmCs_Q7P1-y_pCC7VoKqRbeJQhMRROmCpX-TNXW3G9HNh300FJZ-qWZVUJZaa9-gPdJSiDPG41VipfQS_CinB3Zqif61cSyK9AI3YsTsQXtTcR_UCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9DTzFQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA1LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MB0GA1UdDgQWBBRgyIJjirhr5laZASuyXTmIxmTBzjAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAGIGEEgPerVLMQJK1Fk22xrEMyLCfudJmeDIiAi765uzPqt_wmDsdrqpT5yR7rsTQj9D9yYKq4PWalUzuE5QRq1rtTU1dc8FPhkPwX85cYGdXR09ERq9-C-eutCRsjdAXSAcOJW3K1-5fmKCRZyyz74bgucwgUwcP2L2PkiQedpIyTV4u7iYf8SsAmPf_e2bErQYtxk2lNu_26WKVPZczOwS5v9yt6ZQjxJxKVDygkHqUjghX5T6K22gd6d_KXS_ET2uu9Shl7Q9NCQ1Lt12LhDBD8ch5Jky6siBu4P9tSgTHnodazx2wuXj-1eY3Q-Mx3UKOD00XREaD2Gcz-rTEIA\u0026s=tn8iGbW05aHNpcmC-yAy8v6A5n8xyBZM3T9RSuAubS_y9Nc-z_TDe2xKPIYQunfme9NqcxyUJZ21Y26WCSpU-HdQkBrUXXnXe3sbatJW3Q-hzVwXK_wE_WS0PPkcoib2panuvwXmvmYxT1xvgxo2Ex7rx3icka2qZfyJzbmcSrM2N0mLecNS6ETWbppEm9ET_O0EEl9Qxxr8paO0wvnLeE-U7ryOrpJWaBqsfx2K3GMBVMAZTwvuNQ_VyFv1y_yaXYZzaK27Wvw39KQOU-lEmjnWD7ziNnszliKtXJaiG57kxl1LrL5slX841120Z1-SPztPv3uYk6CLdTm5-0s5ww\u0026h=zcwjQ0EgIyxSqFd65O4Hu8t-mybOe4aS_6VIOnhjLFc+5": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/locations/eastus/operationStatus/namespaceV2b4cdh6?api-version=2023-01-01-preview\u0026resourceType=Namespace\u0026t=2023-09-18T08%3a33%3a36\u0026c=MIIHADCCBeigAwIBAgITHgMhaM4gZ0HzxBWAuAAAAyFozjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjMwODAyMDMxNzU2WhcNMjQwNzI3MDMxNzU2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOOzhNB70ZBwsbp8jfRR_PKOMG_uCDbegB2_gFDOKZMO_FN_JbJRPNh1h7ZNDoukj9oG4tI7KLdPeVJZlY-rrXNZ1uYNSQVjW_5Df4MuI-KyTpSFoCOp3TiwuAn-BOqW0MbJxIdEcFYpuGolWK8LFJxpm0yjCkOhdjDgZ4330_2_NIxXUjUwfP14yHf-Hj4MZrzErcHta1wJw_VR3KpxZ_AHpWoVqjotRTeBsvSM0ooxDMwWCEtBiuwlT_mknn_HjKB4gZJz__vVudNZOpMC9LfSwWD6ARuKpft-igloqK_8Renvbqzp8UUzhrGEqAiaiLIdpGEo_2Q-2htJ3trviRkCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSoHbW7ynocEyY6SmRonoHwiWsl0DAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKYeWfNeK4--RDWDXAAns3GQxhL134SJ84r6XxuYE2VaF-1rZtyO5_tXB2JqwHLAAGJYdb2twYqXxZR3p1gyudp9OCvlaHAqZ4ZP_2Spi2mNbemr8GEaopF7f3gXpstAzwJjvAOsaVuphy1hZP8Hk98jaNQ6_OJGTv66Vx2Y930Ckj29807E6IAvzrl8flblVq6UfKm0i6HpkaHFsPK0s9asWs8hyG8yjtPDLZi6XZNGDsOi5XLsxiBLHxi0Vuokek6OvcvkS_OIFZhdCTaa7mc15pRyBWlj7vXCyuyzz6zb55bwtTq-IRQql_cUiw3PTWWAves-Jjh5e-5XHHb8uA0\u0026s=gl-0gAuHF_fC-CgwQ41h4xH4mxXVZfCuTqPVLIAgGgK0wWP7LHa8zpGp6OT-Y86WHyR8dD6sxgnk3vFeoosNIPTzFjH1SPPzjMBzp-zRAkAhX0kAf0XzSLktRcc0aNC8IlLdrxV5fIE6SIuPXt-_OZ7tJD8SDI9dVHA6ol4nW7p7RhZSFEySqr8dVPsuuwz6Frp-6V54BxugOPtueFIxM8GISgBq2LLvgKuv9TusjNRs2eoTedrOgED8-BoTjJGV1NM-hldcCqao9arF6K5qMeDFgsBulkbdLnapn0VgzKeI38qqesTP98cXEaH8Xw425PqCiQyx8_Y1jV6rDnTPzQ\u0026h=Eb63-mIzY7t4ySj-r4bRRkXY7pihINYmpGwUbxat6o8", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/providers/Microsoft.EventHub/locations/eastus/namespaceOperationResults/5231f121-cfd1-48fc-b01f-7f9c7a0baa95?isAsyncHeader=true\u0026resourceName=namespaceV2dmnw8c\u0026resourceType=namespace\u0026api-version=2023-01-01-preview\u0026operationType=Deleted\u0026t=638499928297306309\u0026c=MIIHADCCBeigAwIBAgITfARkblWv9E1UAxL0rgAABGRuVTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMwMDYxMDQ1WhcNMjUwMTI0MDYxMDQ1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL63lNdlvQvkP7LpygshC_1kUR8Go8cQgx8bHhBgpDDVKuiZ9Ac6D19MAApdfH616nszMxe_fI1VBHXniEsjPIV8AXVPDZsYCvRuoo8NS3kXvNixn2PhgEvc7t6mZJpguzRxCvCjQjb129HPMlZfO706DAoq-3Abk2D1ll6oHEIFF-YhjtFxXd-cB4I4sCYZYdG5DFj65hWpQ4wtYur1yA1RMJ8U032dNAijuZrbmCs_Q7P1-y_pCC7VoKqRbeJQhMRROmCpX-TNXW3G9HNh300FJZ-qWZVUJZaa9-gPdJSiDPG41VipfQS_CinB3Zqif61cSyK9AI3YsTsQXtTcR_UCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9DTzFQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA1LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MB0GA1UdDgQWBBRgyIJjirhr5laZASuyXTmIxmTBzjAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAGIGEEgPerVLMQJK1Fk22xrEMyLCfudJmeDIiAi765uzPqt_wmDsdrqpT5yR7rsTQj9D9yYKq4PWalUzuE5QRq1rtTU1dc8FPhkPwX85cYGdXR09ERq9-C-eutCRsjdAXSAcOJW3K1-5fmKCRZyyz74bgucwgUwcP2L2PkiQedpIyTV4u7iYf8SsAmPf_e2bErQYtxk2lNu_26WKVPZczOwS5v9yt6ZQjxJxKVDygkHqUjghX5T6K22gd6d_KXS_ET2uu9Shl7Q9NCQ1Lt12LhDBD8ch5Jky6siBu4P9tSgTHnodazx2wuXj-1eY3Q-Mx3UKOD00XREaD2Gcz-rTEIA\u0026s=tn8iGbW05aHNpcmC-yAy8v6A5n8xyBZM3T9RSuAubS_y9Nc-z_TDe2xKPIYQunfme9NqcxyUJZ21Y26WCSpU-HdQkBrUXXnXe3sbatJW3Q-hzVwXK_wE_WS0PPkcoib2panuvwXmvmYxT1xvgxo2Ex7rx3icka2qZfyJzbmcSrM2N0mLecNS6ETWbppEm9ET_O0EEl9Qxxr8paO0wvnLeE-U7ryOrpJWaBqsfx2K3GMBVMAZTwvuNQ_VyFv1y_yaXYZzaK27Wvw39KQOU-lEmjnWD7ziNnszliKtXJaiG57kxl1LrL5slX841120Z1-SPztPv3uYk6CLdTm5-0s5ww\u0026h=zcwjQ0EgIyxSqFd65O4Hu8t-mybOe4aS_6VIOnhjLFc", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "229" ], - "x-ms-client-request-id": [ "1ff72810-126e-4e63-ab4a-398806d6c766" ], + "x-ms-unique-id": [ "182" ], + "x-ms-client-request-id": [ "b4e928a3-8556-4695-9206-a8747f2281f0" ], "CommandName": [ "Remove-AzEventHubNamespaceV2" ], "FullCommandName": [ "Remove-AzEventHubNamespace_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ] }, "ContentHeaders": { } }, "Response": { - "StatusCode": 204, + "StatusCode": 200, "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "104eb06e-e0b0-4b84-9aa7-bb3015ca76ac_M8SN1_M8SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], - "x-ms-correlation-request-id": [ "0c6c95b9-96f3-4746-a630-ae8e523c80f7" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083406Z:0c6c95b9-96f3-4746-a630-ae8e523c80f7" ], + "x-ms-correlation-request-id": [ "1c2010b5-8397-4152-bc1e-9428d320e314" ], + "x-ms-client-request-id": [ "b4e928a3-8556-4695-9206-a8747f2281f0_RP" ], + "x-ms-messaging-activity-id": [ "48c3276e-4f30-4114-8430-cb46104febfe" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G1|2024-04-29T13:07:41" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], + "x-ms-request-id": [ "1c2010b5-8397-4152-bc1e-9428d320e314" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T130741Z:1c2010b5-8397-4152-bc1e-9428d320e314" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 9084DDC88F864A9E9FCB22A4FE777E03 Ref B: SEL221051504011 Ref C: 2023-09-18T08:34:06Z" ], - "Date": [ "Mon, 18 Sep 2023 08:34:06 GMT" ] + "X-MSEdge-Ref": [ "Ref A: BD76C521C63C4E4E85F2964A7527208B Ref B: SEL221051504047 Ref C: 2024-04-29T13:07:39Z" ], + "Date": [ "Mon, 29 Apr 2024 13:07:40 GMT" ] }, "ContentHeaders": { + "Content-Length": [ "68" ], + "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": null, + "Content": "{\"name\":\"5231f121-cfd1-48fc-b01f-7f9c7a0baa95\",\"status\":\"Succeeded\"}", "isContentBase64": false } }, - "Remove-AzEventHubNamespaceV2+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/locations/eastus/operationStatus/namespaceV2b4cdh6?api-version=2023-01-01-preview\u0026resourceType=Namespace\u0026t=2023-09-18T08%3a33%3a36\u0026c=MIIHADCCBeigAwIBAgITHgMhaM4gZ0HzxBWAuAAAAyFozjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjMwODAyMDMxNzU2WhcNMjQwNzI3MDMxNzU2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOOzhNB70ZBwsbp8jfRR_PKOMG_uCDbegB2_gFDOKZMO_FN_JbJRPNh1h7ZNDoukj9oG4tI7KLdPeVJZlY-rrXNZ1uYNSQVjW_5Df4MuI-KyTpSFoCOp3TiwuAn-BOqW0MbJxIdEcFYpuGolWK8LFJxpm0yjCkOhdjDgZ4330_2_NIxXUjUwfP14yHf-Hj4MZrzErcHta1wJw_VR3KpxZ_AHpWoVqjotRTeBsvSM0ooxDMwWCEtBiuwlT_mknn_HjKB4gZJz__vVudNZOpMC9LfSwWD6ARuKpft-igloqK_8Renvbqzp8UUzhrGEqAiaiLIdpGEo_2Q-2htJ3trviRkCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSoHbW7ynocEyY6SmRonoHwiWsl0DAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKYeWfNeK4--RDWDXAAns3GQxhL134SJ84r6XxuYE2VaF-1rZtyO5_tXB2JqwHLAAGJYdb2twYqXxZR3p1gyudp9OCvlaHAqZ4ZP_2Spi2mNbemr8GEaopF7f3gXpstAzwJjvAOsaVuphy1hZP8Hk98jaNQ6_OJGTv66Vx2Y930Ckj29807E6IAvzrl8flblVq6UfKm0i6HpkaHFsPK0s9asWs8hyG8yjtPDLZi6XZNGDsOi5XLsxiBLHxi0Vuokek6OvcvkS_OIFZhdCTaa7mc15pRyBWlj7vXCyuyzz6zb55bwtTq-IRQql_cUiw3PTWWAves-Jjh5e-5XHHb8uA0\u0026s=gl-0gAuHF_fC-CgwQ41h4xH4mxXVZfCuTqPVLIAgGgK0wWP7LHa8zpGp6OT-Y86WHyR8dD6sxgnk3vFeoosNIPTzFjH1SPPzjMBzp-zRAkAhX0kAf0XzSLktRcc0aNC8IlLdrxV5fIE6SIuPXt-_OZ7tJD8SDI9dVHA6ol4nW7p7RhZSFEySqr8dVPsuuwz6Frp-6V54BxugOPtueFIxM8GISgBq2LLvgKuv9TusjNRs2eoTedrOgED8-BoTjJGV1NM-hldcCqao9arF6K5qMeDFgsBulkbdLnapn0VgzKeI38qqesTP98cXEaH8Xw425PqCiQyx8_Y1jV6rDnTPzQ\u0026h=Eb63-mIzY7t4ySj-r4bRRkXY7pihINYmpGwUbxat6o8+6": { + "Remove-AzEventHubNamespaceV2+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/providers/Microsoft.EventHub/locations/eastus/namespaceOperationResults/5231f121-cfd1-48fc-b01f-7f9c7a0baa95?isAsyncHeader=false\u0026resourceName=namespaceV2dmnw8c\u0026resourceType=namespace\u0026api-version=2023-01-01-preview\u0026operationType=Deleted\u0026t=638499928297462566\u0026c=MIIHADCCBeigAwIBAgITfARkblWv9E1UAxL0rgAABGRuVTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMwMDYxMDQ1WhcNMjUwMTI0MDYxMDQ1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL63lNdlvQvkP7LpygshC_1kUR8Go8cQgx8bHhBgpDDVKuiZ9Ac6D19MAApdfH616nszMxe_fI1VBHXniEsjPIV8AXVPDZsYCvRuoo8NS3kXvNixn2PhgEvc7t6mZJpguzRxCvCjQjb129HPMlZfO706DAoq-3Abk2D1ll6oHEIFF-YhjtFxXd-cB4I4sCYZYdG5DFj65hWpQ4wtYur1yA1RMJ8U032dNAijuZrbmCs_Q7P1-y_pCC7VoKqRbeJQhMRROmCpX-TNXW3G9HNh300FJZ-qWZVUJZaa9-gPdJSiDPG41VipfQS_CinB3Zqif61cSyK9AI3YsTsQXtTcR_UCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9DTzFQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA1LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MB0GA1UdDgQWBBRgyIJjirhr5laZASuyXTmIxmTBzjAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAGIGEEgPerVLMQJK1Fk22xrEMyLCfudJmeDIiAi765uzPqt_wmDsdrqpT5yR7rsTQj9D9yYKq4PWalUzuE5QRq1rtTU1dc8FPhkPwX85cYGdXR09ERq9-C-eutCRsjdAXSAcOJW3K1-5fmKCRZyyz74bgucwgUwcP2L2PkiQedpIyTV4u7iYf8SsAmPf_e2bErQYtxk2lNu_26WKVPZczOwS5v9yt6ZQjxJxKVDygkHqUjghX5T6K22gd6d_KXS_ET2uu9Shl7Q9NCQ1Lt12LhDBD8ch5Jky6siBu4P9tSgTHnodazx2wuXj-1eY3Q-Mx3UKOD00XREaD2Gcz-rTEIA\u0026s=GXZfoCAmgdQ3ZFUSn9fNSWFnbj4d5bZMoo-LOrn2sSzRMt6BBpYuh9WPBDOtTG1cN0QEFjukapoAums4_2Pe9khWZzCEAgw2pERy9Ju2sFZg8Gv88AP70fxUEY6ZzwavsEyo7mFyBcQurXfvlJzOnS7ohEy89o3kWGHl-rO4H3Sjd85ThtfPRFePL8UubzT01JrSGKpbnpYW7YUo6qkSOS0pHd3PWXpTs9DXNJYbbujg2UW8nYnyQ2-3KrNkhuINyMVcaYvqqn634SNC89OXH2ppdKEdUblnLc7vihtKuF7KS4ZHkJslIqXpzH-XP-JtfRJKrftrrrB7C9iZnM_kFg\u0026h=-Qwn6hNG4neFZvQuOigrLy5aB5WsjAMHvxQI228HReg+6": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/locations/eastus/operationStatus/namespaceV2b4cdh6?api-version=2023-01-01-preview\u0026resourceType=Namespace\u0026t=2023-09-18T08%3a33%3a36\u0026c=MIIHADCCBeigAwIBAgITHgMhaM4gZ0HzxBWAuAAAAyFozjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjMwODAyMDMxNzU2WhcNMjQwNzI3MDMxNzU2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOOzhNB70ZBwsbp8jfRR_PKOMG_uCDbegB2_gFDOKZMO_FN_JbJRPNh1h7ZNDoukj9oG4tI7KLdPeVJZlY-rrXNZ1uYNSQVjW_5Df4MuI-KyTpSFoCOp3TiwuAn-BOqW0MbJxIdEcFYpuGolWK8LFJxpm0yjCkOhdjDgZ4330_2_NIxXUjUwfP14yHf-Hj4MZrzErcHta1wJw_VR3KpxZ_AHpWoVqjotRTeBsvSM0ooxDMwWCEtBiuwlT_mknn_HjKB4gZJz__vVudNZOpMC9LfSwWD6ARuKpft-igloqK_8Renvbqzp8UUzhrGEqAiaiLIdpGEo_2Q-2htJ3trviRkCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSoHbW7ynocEyY6SmRonoHwiWsl0DAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKYeWfNeK4--RDWDXAAns3GQxhL134SJ84r6XxuYE2VaF-1rZtyO5_tXB2JqwHLAAGJYdb2twYqXxZR3p1gyudp9OCvlaHAqZ4ZP_2Spi2mNbemr8GEaopF7f3gXpstAzwJjvAOsaVuphy1hZP8Hk98jaNQ6_OJGTv66Vx2Y930Ckj29807E6IAvzrl8flblVq6UfKm0i6HpkaHFsPK0s9asWs8hyG8yjtPDLZi6XZNGDsOi5XLsxiBLHxi0Vuokek6OvcvkS_OIFZhdCTaa7mc15pRyBWlj7vXCyuyzz6zb55bwtTq-IRQql_cUiw3PTWWAves-Jjh5e-5XHHb8uA0\u0026s=gl-0gAuHF_fC-CgwQ41h4xH4mxXVZfCuTqPVLIAgGgK0wWP7LHa8zpGp6OT-Y86WHyR8dD6sxgnk3vFeoosNIPTzFjH1SPPzjMBzp-zRAkAhX0kAf0XzSLktRcc0aNC8IlLdrxV5fIE6SIuPXt-_OZ7tJD8SDI9dVHA6ol4nW7p7RhZSFEySqr8dVPsuuwz6Frp-6V54BxugOPtueFIxM8GISgBq2LLvgKuv9TusjNRs2eoTedrOgED8-BoTjJGV1NM-hldcCqao9arF6K5qMeDFgsBulkbdLnapn0VgzKeI38qqesTP98cXEaH8Xw425PqCiQyx8_Y1jV6rDnTPzQ\u0026h=Eb63-mIzY7t4ySj-r4bRRkXY7pihINYmpGwUbxat6o8", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/providers/Microsoft.EventHub/locations/eastus/namespaceOperationResults/5231f121-cfd1-48fc-b01f-7f9c7a0baa95?isAsyncHeader=false\u0026resourceName=namespaceV2dmnw8c\u0026resourceType=namespace\u0026api-version=2023-01-01-preview\u0026operationType=Deleted\u0026t=638499928297462566\u0026c=MIIHADCCBeigAwIBAgITfARkblWv9E1UAxL0rgAABGRuVTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMwMDYxMDQ1WhcNMjUwMTI0MDYxMDQ1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL63lNdlvQvkP7LpygshC_1kUR8Go8cQgx8bHhBgpDDVKuiZ9Ac6D19MAApdfH616nszMxe_fI1VBHXniEsjPIV8AXVPDZsYCvRuoo8NS3kXvNixn2PhgEvc7t6mZJpguzRxCvCjQjb129HPMlZfO706DAoq-3Abk2D1ll6oHEIFF-YhjtFxXd-cB4I4sCYZYdG5DFj65hWpQ4wtYur1yA1RMJ8U032dNAijuZrbmCs_Q7P1-y_pCC7VoKqRbeJQhMRROmCpX-TNXW3G9HNh300FJZ-qWZVUJZaa9-gPdJSiDPG41VipfQS_CinB3Zqif61cSyK9AI3YsTsQXtTcR_UCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9DTzFQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA1LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MB0GA1UdDgQWBBRgyIJjirhr5laZASuyXTmIxmTBzjAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAGIGEEgPerVLMQJK1Fk22xrEMyLCfudJmeDIiAi765uzPqt_wmDsdrqpT5yR7rsTQj9D9yYKq4PWalUzuE5QRq1rtTU1dc8FPhkPwX85cYGdXR09ERq9-C-eutCRsjdAXSAcOJW3K1-5fmKCRZyyz74bgucwgUwcP2L2PkiQedpIyTV4u7iYf8SsAmPf_e2bErQYtxk2lNu_26WKVPZczOwS5v9yt6ZQjxJxKVDygkHqUjghX5T6K22gd6d_KXS_ET2uu9Shl7Q9NCQ1Lt12LhDBD8ch5Jky6siBu4P9tSgTHnodazx2wuXj-1eY3Q-Mx3UKOD00XREaD2Gcz-rTEIA\u0026s=GXZfoCAmgdQ3ZFUSn9fNSWFnbj4d5bZMoo-LOrn2sSzRMt6BBpYuh9WPBDOtTG1cN0QEFjukapoAums4_2Pe9khWZzCEAgw2pERy9Ju2sFZg8Gv88AP70fxUEY6ZzwavsEyo7mFyBcQurXfvlJzOnS7ohEy89o3kWGHl-rO4H3Sjd85ThtfPRFePL8UubzT01JrSGKpbnpYW7YUo6qkSOS0pHd3PWXpTs9DXNJYbbujg2UW8nYnyQ2-3KrNkhuINyMVcaYvqqn634SNC89OXH2ppdKEdUblnLc7vihtKuF7KS4ZHkJslIqXpzH-XP-JtfRJKrftrrrB7C9iZnM_kFg\u0026h=-Qwn6hNG4neFZvQuOigrLy5aB5WsjAMHvxQI228HReg", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "230" ], - "x-ms-client-request-id": [ "1ff72810-126e-4e63-ab4a-398806d6c766" ], + "x-ms-unique-id": [ "183" ], + "x-ms-client-request-id": [ "b4e928a3-8556-4695-9206-a8747f2281f0" ], "CommandName": [ "Remove-AzEventHubNamespaceV2" ], "FullCommandName": [ "Remove-AzEventHubNamespace_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ] }, "ContentHeaders": { } @@ -230,16 +248,20 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "361b8be6-80b7-43f2-9f48-6ee0ff91de50_M8SN1_M8SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], - "x-ms-correlation-request-id": [ "d1c7d7e7-f880-47ef-aea1-8452e1e079de" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083407Z:d1c7d7e7-f880-47ef-aea1-8452e1e079de" ], + "Location": [ "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/providers/Microsoft.EventHub/locations/eastus/namespaceOperationResults/5231f121-cfd1-48fc-b01f-7f9c7a0baa95?isAsyncHeader=false\u0026resourceName=namespaceV2dmnw8c\u0026resourceType=namespace\u0026api-version=2023-01-01-preview\u0026operationType=Deleted\u0026t=638499928630431518\u0026c=MIIHHjCCBgagAwIBAgITfwKV0ZLKqqC5pXYmSwAEApXRkjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjQwMTMwMDQwMDIzWhcNMjUwMTI0MDQwMDIzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL3r9pIz9EqGL7hkIGyCWYf-iGEEIZub-l1wXGgy_4eykuU0789Lfwih45HdE8dSajY8HHOeTJgXtFKRctvEVoY6uS6XqsmYxRdLcsZCY1jmZssBkruWUaRzazDiW010ropZCynXrFQYtvnimKo7qPCDFQ1SjgldweN0esMkyihnPCi0OqGX1c37m1x9xoH51Wr7fCggiJ0RAwSYC1EI610GaFqK0qPfwFSgtFZ1ys38massMV4shrxjx6v4NNUzSpZXoxgl9R3Q-HHYdui5OlstHf0KFLUGmuwTmxaBTIHI75rmkT0po-txoueIZrjj_0w0WcXRaWC_cFf_p5h1T-0CAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTqKaaymikwcTAnKysLzVZjWspAITAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFgd7P819ocZaPnV6LdPqjb2Rdwy1EuWTLLBF1lXOhiBo3d9NAUc-EwGZXFrLdmj7Vsgyk_n9WVTy2CmGaC7pgZUakNc6E4dLaqY72qqyLEXGSYLc9wcmSL28IB8XdmMfaE-GZEf78Pp8g8npE1OZ8AoPWuTOsI3f5cqhSZ0iz4jvnHThUxHBlT8sBlBMN98YhioCq4BRbv9njVHM-udQ71Lq_kKK0yNzphuX3avpuClvsyu8w2bd9a7BqsjiezBU3ij8cRj-FkaTc2DwPV3pXChlf5pNxSGZnvSEXKrYkvEJpwmkkpr1vWR8hXtCnXTfYpIRkWgKeE9mzgic5wFKng\u0026s=LcqVL8AaaYmiG4xa_h0iBM0ZMrfhxk_ulQDMxgjinjDFjoxv2BCG1u5o5Snl-s1_Ox7iOuOq6yfJZBMfOeDxtoQkWb50WMrYKtgc48I9lSKhLQoppiitVIr5Hh9bSGBIyDPQyXsOGeYXB3ipBltaaqJuwctfn6l7pcWsw3vlPRCa2MLLhJ8odHVGPk8HBI4eVZTM1wV2F9XpRT0RR34BxrKcNo1IW34nbMGafRRLm6YGTqiXq7QFQyIU7LbPVCeUwK0SELq2zUlk0BhGOWZBLPZ7G0EtkfGDERMcHWV8oDzdYoOg9dntemSxjzzG-5WAjLkY9Rryt2Lq6XVsIwK69A\u0026h=4iDYiQ0hHsrLjOdcVW92DBlQn4LZCZrAFWO6HXrZ2T8" ], + "x-ms-correlation-request-id": [ "00000001-0000-0000-0002-000000005260" ], + "x-ms-client-request-id": [ "00000001-0000-0000-0002-000000005260" ], + "x-ms-messaging-activity-id": [ "00000001-0000-0000-0002-000000005260" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G3|2024-04-29T13:07:42" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "23169bce-3e08-4568-8143-534fe299620b" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T130743Z:23169bce-3e08-4568-8143-534fe299620b" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 967219330A1B4F8695C9779184DDD8E9 Ref B: SEL221051504011 Ref C: 2023-09-18T08:34:06Z" ], - "Date": [ "Mon, 18 Sep 2023 08:34:07 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 81399BD4CF6141668496FBCEAABADCC0 Ref B: SEL221051504047 Ref C: 2024-04-29T13:07:41Z" ], + "Date": [ "Mon, 29 Apr 2024 13:07:42 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ] @@ -248,19 +270,19 @@ "isContentBase64": false } }, - "Remove-AzEventHubNamespaceV2+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV2b4cdh6?api-version=2023-01-01-preview+7": { + "Remove-AzEventHubNamespaceV2+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV2dmnw8c?api-version=2023-01-01-preview+7": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV2b4cdh6?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV2dmnw8c?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "231" ], - "x-ms-client-request-id": [ "1adf315b-e80f-455d-88b5-bcfa9de8ec33" ], + "x-ms-unique-id": [ "184" ], + "x-ms-client-request-id": [ "34148fe9-a01d-4bf3-bcea-3c1c39afb0ee" ], "CommandName": [ "Get-AzEventHubNamespaceV2" ], "FullCommandName": [ "Get-AzEventHubNamespace_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -271,30 +293,29 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "ca959c44-1346-4923-93db-3b88b3705792_M6CH3_M6CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], - "x-ms-correlation-request-id": [ "5cb33a50-7ead-4092-ad59-8b12840429c8" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083409Z:5cb33a50-7ead-4092-ad59-8b12840429c8" ], + "x-ms-failure-cause": [ "gateway" ], + "x-ms-request-id": [ "31413598-f85a-44fd-968f-e615525317d1" ], + "x-ms-correlation-request-id": [ "31413598-f85a-44fd-968f-e615525317d1" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T130743Z:31413598-f85a-44fd-968f-e615525317d1" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 2564CA8A64FE40C5AF7813E6EF6E32DC Ref B: SEL221051504011 Ref C: 2023-09-18T08:34:07Z" ], - "Date": [ "Mon, 18 Sep 2023 08:34:09 GMT" ] + "X-MSEdge-Ref": [ "Ref A: D9E33B58629F4B11ABF4F975B3A3EE8D Ref B: SEL221051504047 Ref C: 2024-04-29T13:07:43Z" ], + "Date": [ "Mon, 29 Apr 2024 13:07:42 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "119" ], + "Content-Length": [ "246" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"error\":{\"message\":\"Namespace does not exist. CorrelationId: 5cb33a50-7ead-4092-ad59-8b12840429c8\",\"code\":\"NotFound\"}}", + "Content": "{\"error\":{\"code\":\"ResourceNotFound\",\"message\":\"The Resource \u0027Microsoft.EventHub/namespaces/namespaceV2dmnw8c\u0027 under resource group \u0027Autorest-PS-EventHub-kchdmf\u0027 was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix\"}}", "isContentBase64": false } }, - "Remove-AzEventHubNamespaceV2+[NoContext]+DeleteViaIdentity+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV2b4cdh6?api-version=2023-01-01-preview+1": { + "Remove-AzEventHubNamespaceV2+[NoContext]+DeleteViaIdentity+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV2dmnw8c?api-version=2023-01-01-preview+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV2b4cdh6?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV2dmnw8c?api-version=2023-01-01-preview", "Content": "{\n \"location\": \"eastus\",\n \"sku\": {\n \"name\": \"Standard\",\n \"tier\": \"Standard\"\n }\n}", "isContentBase64": false, "Headers": { @@ -305,87 +326,47 @@ } }, "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "4c0c5ec0-df61-429a-8947-9017fa43aa48_M0DM2_M0DM2" ], - "Server-SB": [ "Service-Bus-Resource-Provider/DM2" ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ "48" ], - "x-ms-correlation-request-id": [ "b9e9f0ab-4905-4d89-b351-4529e447f86b" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083414Z:b9e9f0ab-4905-4d89-b351-4529e447f86b" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 2418E63FD87D4388AD2F596159A27A4A Ref B: SEL221051504011 Ref C: 2023-09-18T08:34:09Z" ], - "Date": [ "Mon, 18 Sep 2023 08:34:14 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "786" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV2b4cdh6\",\"name\":\"namespaceV2b4cdh6\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Created\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev2b4cdh6\",\"createdAt\":\"2023-09-18T08:34:12.657Z\",\"updatedAt\":\"2023-09-18T08:34:12.657Z\",\"serviceBusEndpoint\":\"https://namespaceV2b4cdh6.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "Remove-AzEventHubNamespaceV2+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV2b4cdh6?api-version=2023-01-01-preview+2": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV2b4cdh6?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "233" ], - "x-ms-client-request-id": [ "0efe522d-aada-4076-9ab3-5d3e6228f9a5" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, + "StatusCode": 201, "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "a036359b-60a3-4fe9-9024-3b94282b1eac_M8SN1_M8SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], - "x-ms-correlation-request-id": [ "cb080e64-a4bf-49cb-b698-d08c0c58bbee" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083446Z:cb080e64-a4bf-49cb-b698-d08c0c58bbee" ], + "x-ms-correlation-request-id": [ "9b7379ba-7d07-43db-8250-106c1d851591" ], + "x-ms-client-request-id": [ "35391879-f05b-4f54-8476-42d8de890375_RP" ], + "x-ms-messaging-activity-id": [ "7bee7ec4-0cb7-4bd1-8303-52cb82267d38" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G3|2024-04-29T13:07:47" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "49" ], + "x-ms-request-id": [ "9b7379ba-7d07-43db-8250-106c1d851591" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T130747Z:9b7379ba-7d07-43db-8250-106c1d851591" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 766FA292FFDE4B98B6A1B5D50249B6C5 Ref B: SEL221051504011 Ref C: 2023-09-18T08:34:44Z" ], - "Date": [ "Mon, 18 Sep 2023 08:34:46 GMT" ] + "X-MSEdge-Ref": [ "Ref A: D100786C62D64F6D9A6DCF8A93E2EB61 Ref B: SEL221051504047 Ref C: 2024-04-29T13:07:43Z" ], + "Date": [ "Mon, 29 Apr 2024 13:07:47 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "786" ], + "Content-Length": [ "792" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV2b4cdh6\",\"name\":\"namespaceV2b4cdh6\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Created\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev2b4cdh6\",\"createdAt\":\"2023-09-18T08:34:12.657Z\",\"updatedAt\":\"2023-09-18T08:34:12.657Z\",\"serviceBusEndpoint\":\"https://namespaceV2b4cdh6.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV2dmnw8c\",\"name\":\"namespaceV2dmnw8c\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev2dmnw8c\",\"serviceBusEndpoint\":\"https://namespaceV2dmnw8c.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Creating\",\"status\":\"Creating\",\"createdAt\":\"2024-04-29T12:56:09.3854671Z\",\"updatedAt\":\"2024-04-29T13:07:47.0179692Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}}", "isContentBase64": false } }, - "Remove-AzEventHubNamespaceV2+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV2b4cdh6?api-version=2023-01-01-preview+3": { + "Remove-AzEventHubNamespaceV2+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV2dmnw8c?api-version=2023-01-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV2b4cdh6?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV2dmnw8c?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "234" ], - "x-ms-client-request-id": [ "0efe522d-aada-4076-9ab3-5d3e6228f9a5" ], + "x-ms-unique-id": [ "186" ], + "x-ms-client-request-id": [ "35391879-f05b-4f54-8476-42d8de890375" ], "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ] }, "ContentHeaders": { } @@ -395,40 +376,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "5795596c-67a1-43cc-8285-e8decbea200b_M3SN1_M3SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], - "x-ms-correlation-request-id": [ "b906d36c-b2ef-4d2d-b367-20de53f55e70" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083518Z:b906d36c-b2ef-4d2d-b367-20de53f55e70" ], + "x-ms-correlation-request-id": [ "1bc08a0a-cc2e-435b-9880-e3e80050bcd4" ], + "x-ms-client-request-id": [ "35391879-f05b-4f54-8476-42d8de890375_RP" ], + "x-ms-messaging-activity-id": [ "5d9fae56-7d06-4198-b1e2-80ad23a59d0a" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G9|2024-04-29T13:08:20" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "1bc08a0a-cc2e-435b-9880-e3e80050bcd4" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T130820Z:1bc08a0a-cc2e-435b-9880-e3e80050bcd4" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 3A9C786C396B4F98B6A5DCE463C543DA Ref B: SEL221051504011 Ref C: 2023-09-18T08:35:16Z" ], - "Date": [ "Mon, 18 Sep 2023 08:35:17 GMT" ] + "X-MSEdge-Ref": [ "Ref A: E2386CC4A48249B2998481E6754FD4C3 Ref B: SEL221051504047 Ref C: 2024-04-29T13:08:17Z" ], + "Date": [ "Mon, 29 Apr 2024 13:08:19 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "783" ], + "Content-Length": [ "823" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV2b4cdh6\",\"name\":\"namespaceV2b4cdh6\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev2b4cdh6\",\"createdAt\":\"2023-09-18T08:34:12.657Z\",\"updatedAt\":\"2023-09-18T08:35:02.98Z\",\"serviceBusEndpoint\":\"https://namespaceV2b4cdh6.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV2dmnw8c\",\"name\":\"namespaceV2dmnw8c\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"privateEndpointConnections\":[],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev2dmnw8c\",\"serviceBusEndpoint\":\"https://namespaceV2dmnw8c.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:56:09.3854671Z\",\"updatedAt\":\"2024-04-29T13:08:13.7301716Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}}", "isContentBase64": false } }, - "Remove-AzEventHubNamespaceV2+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV2b4cdh6?api-version=2023-01-01-preview+4": { + "Remove-AzEventHubNamespaceV2+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV2dmnw8c?api-version=2023-01-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV2b4cdh6?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV2dmnw8c?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "235" ], - "x-ms-client-request-id": [ "0efe522d-aada-4076-9ab3-5d3e6228f9a5" ], + "x-ms-unique-id": [ "187" ], + "x-ms-client-request-id": [ "35391879-f05b-4f54-8476-42d8de890375" ], "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ] }, "ContentHeaders": { } @@ -438,39 +422,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "69fe7bc1-0851-412e-a85c-55e40672853d_M8CH3_M8CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], - "x-ms-correlation-request-id": [ "9cae34fe-b146-43b8-87a6-12e2a05cd8f8" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083519Z:9cae34fe-b146-43b8-87a6-12e2a05cd8f8" ], + "x-ms-correlation-request-id": [ "f83d8d9b-1b20-45c0-a7b7-2229316a1a39" ], + "x-ms-client-request-id": [ "35391879-f05b-4f54-8476-42d8de890375_RP" ], + "x-ms-messaging-activity-id": [ "14257a5c-1fef-4f0b-bd6c-909c98fbb224" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G14|2024-04-29T13:08:30" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "f83d8d9b-1b20-45c0-a7b7-2229316a1a39" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T130831Z:f83d8d9b-1b20-45c0-a7b7-2229316a1a39" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 73C8BCFAAB2946ADA61CB9A0716791F6 Ref B: SEL221051504011 Ref C: 2023-09-18T08:35:18Z" ], - "Date": [ "Mon, 18 Sep 2023 08:35:19 GMT" ] + "X-MSEdge-Ref": [ "Ref A: D8B5C0D54D5F4FCFAF130D9B64415413 Ref B: SEL221051504047 Ref C: 2024-04-29T13:08:20Z" ], + "Date": [ "Mon, 29 Apr 2024 13:08:30 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "783" ], + "Content-Length": [ "823" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV2b4cdh6\",\"name\":\"namespaceV2b4cdh6\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":false,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev2b4cdh6\",\"createdAt\":\"2023-09-18T08:34:12.657Z\",\"updatedAt\":\"2023-09-18T08:35:02.98Z\",\"serviceBusEndpoint\":\"https://namespaceV2b4cdh6.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV2dmnw8c\",\"name\":\"namespaceV2dmnw8c\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"privateEndpointConnections\":[],\"zoneRedundant\":false,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev2dmnw8c\",\"serviceBusEndpoint\":\"https://namespaceV2dmnw8c.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:56:09.3854671Z\",\"updatedAt\":\"2024-04-29T13:08:13.7301716Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":1}}", "isContentBase64": false } }, - "Remove-AzEventHubNamespaceV2+[NoContext]+DeleteViaIdentity+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV2b4cdh6?api-version=2023-01-01-preview+5": { + "Remove-AzEventHubNamespaceV2+[NoContext]+DeleteViaIdentity+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV2dmnw8c?api-version=2023-01-01-preview+4": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV2b4cdh6?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV2dmnw8c?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "236" ], - "x-ms-client-request-id": [ "7d1d71ee-8688-4318-92ed-213404a12122" ], + "x-ms-unique-id": [ "188" ], + "x-ms-client-request-id": [ "a601114e-4356-44bf-a2fc-d6fd441b5762" ], "CommandName": [ "Remove-AzEventHubNamespaceV2" ], "FullCommandName": [ "Remove-AzEventHubNamespace_DeleteViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -481,17 +468,21 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Location": [ "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/locations/eastus/operationStatus/namespaceV2b4cdh6?api-version=2023-01-01-preview\u0026resourceType=Namespace\u0026t=2023-09-18T08%3a35%3a22\u0026c=MIIHADCCBeigAwIBAgITHgMhaM4gZ0HzxBWAuAAAAyFozjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjMwODAyMDMxNzU2WhcNMjQwNzI3MDMxNzU2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOOzhNB70ZBwsbp8jfRR_PKOMG_uCDbegB2_gFDOKZMO_FN_JbJRPNh1h7ZNDoukj9oG4tI7KLdPeVJZlY-rrXNZ1uYNSQVjW_5Df4MuI-KyTpSFoCOp3TiwuAn-BOqW0MbJxIdEcFYpuGolWK8LFJxpm0yjCkOhdjDgZ4330_2_NIxXUjUwfP14yHf-Hj4MZrzErcHta1wJw_VR3KpxZ_AHpWoVqjotRTeBsvSM0ooxDMwWCEtBiuwlT_mknn_HjKB4gZJz__vVudNZOpMC9LfSwWD6ARuKpft-igloqK_8Renvbqzp8UUzhrGEqAiaiLIdpGEo_2Q-2htJ3trviRkCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSoHbW7ynocEyY6SmRonoHwiWsl0DAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKYeWfNeK4--RDWDXAAns3GQxhL134SJ84r6XxuYE2VaF-1rZtyO5_tXB2JqwHLAAGJYdb2twYqXxZR3p1gyudp9OCvlaHAqZ4ZP_2Spi2mNbemr8GEaopF7f3gXpstAzwJjvAOsaVuphy1hZP8Hk98jaNQ6_OJGTv66Vx2Y930Ckj29807E6IAvzrl8flblVq6UfKm0i6HpkaHFsPK0s9asWs8hyG8yjtPDLZi6XZNGDsOi5XLsxiBLHxi0Vuokek6OvcvkS_OIFZhdCTaa7mc15pRyBWlj7vXCyuyzz6zb55bwtTq-IRQql_cUiw3PTWWAves-Jjh5e-5XHHb8uA0\u0026s=js7eAU7LEdD299YzKAkOvSaFxkIHq22V6vsOUqjccWcw57wuBkbBhkaLCsjAWgG773oENqsF1IotRjbpw3e3LapmhLATNZ8pGLclnFS6PeCOhvIkcvunInbCJTZoSdm_XG3P-hfiqWbH44Qd21HVZHiEguSmz9BTdLhMwuth8Pl6AoPZLK-z-Ivv8Y1j3L7yA5cs2me4zTM-l_W3F0Cb9QIMssISSZGrkAaIFX0uxn57uFlQplHxU9rQynC3P4TPR3EIErWEmAOxr0hksYLmTq1GNao1Iu2LZMy-EC0EjHfD9VNHwnAur2zfvcaJNXkcmWJDpfKy3j0pOf-9_A_9jQ\u0026h=JUN-zzuaMnPFYHnVZ3HuX9fuQpy2R8PedONNOS6pnIQ" ], - "x-ms-request-id": [ "6ba3d6c8-8cde-447e-ac35-d2de3d3e03f4_M7SN1_M7SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], - "x-ms-correlation-request-id": [ "c9bf8058-cea0-4175-b776-16b560d48f59" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083522Z:c9bf8058-cea0-4175-b776-16b560d48f59" ], + "Location": [ "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/providers/Microsoft.EventHub/locations/eastus/namespaceOperationResults/7ad4acf9-1966-4fb1-ae5e-a6fabc4e822e?isAsyncHeader=false\u0026resourceName=namespaceV2dmnw8c\u0026resourceType=namespace\u0026api-version=2023-01-01-preview\u0026operationType=Deleted\u0026t=638499929133554277\u0026c=MIIHKjCCBhKgAwIBAgITHgRwbFvgB8QvXABGowAABHBsWzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNDI5MDU0OTI2WhcNMjUwNDI0MDU0OTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMI74kkH1s1fyf3u8I9NW48Al606jCyqMV0yJPFfgnXzY0ksG-iZgod2J98qesULbjiYsbXV0sHlD9QSNQU8ZIQZl4DfemNJow8QYsOz2cltqajb66-USZbxABjDvSsGKjICxWLcm-lEWkFg-GDs8LOHMiQgVivfOLn7vDT_tlU3gBy5H5UGQZJbY-elo_utlDtbzZjJPwDoybfFV_XnexkBuSK9pNVgXtOaPWgibTw2p-q5YwtHXjDet3VsWKc1qwD3IlKgLxR_nCg4CBO9Nnw6w41TJKFwDQVN070SUNKYulYf4-9KqXF5dDpB_ftcILJ2TkWDhNwtm10IQy4Lic0CAwEAAaOCBBcwggQTMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBTDbpQqaXJdBMiU7rIDX9nVdRd9VDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMEEGA1UdIAQ6MDgwDAYKKwYBBAGCN3sBATAMBgorBgEEAYI3ewIBMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKxfK_S7hJnYof2MUz_YwGYBOzg_bFpkN8fnmSQBEjC55tA8eliiZ1Y8cgSFYU-LPdEJz2KQssa1GmILoSFme62JtwI7gbHaRG0cHW8LeGSEqeRVYvguFIY17qAqJaIIDLdalEim7FRRdsARusI7yf5l3J-TrUADFhz0zQcaRdXj1tBaLqvHGQxcHxjGDL9TYGvE5QX3gMDaRP4rUEREpn5PnLZ4aKpHcO9mrypJxv7RkgkCc0NIr31WSKhZdw9PUdWvPTPnBEXNqUySJ4YGP66oGk8XPAgXkJBCoAZnTvYi8hum8Ef-2gnF4J2bTC7n-RXSGH7n1eACAZrzg8vxueM\u0026s=nu_67I0e5NGsyfbKpW30X2wOn3qhjwquAIb6hmqc6he6JcXzWdTBRN0mLCmoGELQz89kC3h0SzYpeyF2wT2TomVrybUU6CaeMrYo01Ugw_S_j5KmSdYamKS22tTLVTubUmRd5tY-pajateZoACJvaWNdkQxhZQzrCR_ZWLEeetsLG-ByAlkTQQszICRqNEOuf5Zrt3uBBTvaCoHoatiM3jG9s3wGS2UpX0SOlO3lFEw5yDy73DaXaJvErDRtLI8r7gsBDoddp8qZFBJL0PRsW1NYb2OluU0KDYiFZxob0xiBxPZ8i4UbNBT3dK0cqX6rNNwzMqWAt5g5F92qvTt8ig\u0026h=W1vXQx--dIbqBLAJVdFfB212W2Vx5LuDtym24F44ync" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/providers/Microsoft.EventHub/locations/eastus/namespaceOperationResults/7ad4acf9-1966-4fb1-ae5e-a6fabc4e822e?isAsyncHeader=true\u0026resourceName=namespaceV2dmnw8c\u0026resourceType=namespace\u0026api-version=2023-01-01-preview\u0026operationType=Deleted\u0026t=638499929133398183\u0026c=MIIHKjCCBhKgAwIBAgITHgRwbFvgB8QvXABGowAABHBsWzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNDI5MDU0OTI2WhcNMjUwNDI0MDU0OTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMI74kkH1s1fyf3u8I9NW48Al606jCyqMV0yJPFfgnXzY0ksG-iZgod2J98qesULbjiYsbXV0sHlD9QSNQU8ZIQZl4DfemNJow8QYsOz2cltqajb66-USZbxABjDvSsGKjICxWLcm-lEWkFg-GDs8LOHMiQgVivfOLn7vDT_tlU3gBy5H5UGQZJbY-elo_utlDtbzZjJPwDoybfFV_XnexkBuSK9pNVgXtOaPWgibTw2p-q5YwtHXjDet3VsWKc1qwD3IlKgLxR_nCg4CBO9Nnw6w41TJKFwDQVN070SUNKYulYf4-9KqXF5dDpB_ftcILJ2TkWDhNwtm10IQy4Lic0CAwEAAaOCBBcwggQTMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBTDbpQqaXJdBMiU7rIDX9nVdRd9VDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMEEGA1UdIAQ6MDgwDAYKKwYBBAGCN3sBATAMBgorBgEEAYI3ewIBMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKxfK_S7hJnYof2MUz_YwGYBOzg_bFpkN8fnmSQBEjC55tA8eliiZ1Y8cgSFYU-LPdEJz2KQssa1GmILoSFme62JtwI7gbHaRG0cHW8LeGSEqeRVYvguFIY17qAqJaIIDLdalEim7FRRdsARusI7yf5l3J-TrUADFhz0zQcaRdXj1tBaLqvHGQxcHxjGDL9TYGvE5QX3gMDaRP4rUEREpn5PnLZ4aKpHcO9mrypJxv7RkgkCc0NIr31WSKhZdw9PUdWvPTPnBEXNqUySJ4YGP66oGk8XPAgXkJBCoAZnTvYi8hum8Ef-2gnF4J2bTC7n-RXSGH7n1eACAZrzg8vxueM\u0026s=fdnlSA8XS0MZlmCEc2O-O5jozTJvNxgOqsaFOZwVI19-ajhAauun9C1PUB-EcIz0Gaw1nUQWs_cZ-295whOAawMbvSNGG8I3mao8df8e8J-dO6-6Cwbuy0UcuCuaJZE6nogB04qdLpnh-my2flDD-ZbZjaHS6ek9dzB3GhoAmDuZF4EDH_fWvTksvYqLkf9LUY7cwFcWbOvqmbmc9OQ7Y9iX365KUIxLeyN-UwrZePC9ZVrraqLd3lrE3kgxxqC7oSO3Z86kOOHCdG9iJ7q7Bdnct8vALclimTI52amJvywBElEp_1om5N-jnGDLLPn5xTE38_0sB3bUWUyp1RxIqg\u0026h=D2ntf3ID12Sed3PhmQIbTOzIXJbVq05aRVRRBLcyNiw" ], + "x-ms-correlation-request-id": [ "00000001-0000-0000-0002-000000005992" ], + "x-ms-client-request-id": [ "00000001-0000-0000-0002-000000005992" ], + "x-ms-messaging-activity-id": [ "00000001-0000-0000-0002-000000005992" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G1|2024-04-29T13:08:33" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], + "x-ms-request-id": [ "9582c4ce-31d2-4eec-bc58-102a61f9d544" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T130833Z:9582c4ce-31d2-4eec-bc58-102a61f9d544" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: BDF5DC2597064472B8F9B705FA15E41C Ref B: SEL221051504011 Ref C: 2023-09-18T08:35:19Z" ], - "Date": [ "Mon, 18 Sep 2023 08:35:22 GMT" ] + "X-MSEdge-Ref": [ "Ref A: FB09FCD65D894DCC89E9E193AD8ADD3B Ref B: SEL221051504047 Ref C: 2024-04-29T13:08:31Z" ], + "Date": [ "Mon, 29 Apr 2024 13:08:32 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -501,61 +492,66 @@ "isContentBase64": false } }, - "Remove-AzEventHubNamespaceV2+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/locations/eastus/operationStatus/namespaceV2b4cdh6?api-version=2023-01-01-preview\u0026resourceType=Namespace\u0026t=2023-09-18T08%3a35%3a22\u0026c=MIIHADCCBeigAwIBAgITHgMhaM4gZ0HzxBWAuAAAAyFozjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjMwODAyMDMxNzU2WhcNMjQwNzI3MDMxNzU2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOOzhNB70ZBwsbp8jfRR_PKOMG_uCDbegB2_gFDOKZMO_FN_JbJRPNh1h7ZNDoukj9oG4tI7KLdPeVJZlY-rrXNZ1uYNSQVjW_5Df4MuI-KyTpSFoCOp3TiwuAn-BOqW0MbJxIdEcFYpuGolWK8LFJxpm0yjCkOhdjDgZ4330_2_NIxXUjUwfP14yHf-Hj4MZrzErcHta1wJw_VR3KpxZ_AHpWoVqjotRTeBsvSM0ooxDMwWCEtBiuwlT_mknn_HjKB4gZJz__vVudNZOpMC9LfSwWD6ARuKpft-igloqK_8Renvbqzp8UUzhrGEqAiaiLIdpGEo_2Q-2htJ3trviRkCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSoHbW7ynocEyY6SmRonoHwiWsl0DAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKYeWfNeK4--RDWDXAAns3GQxhL134SJ84r6XxuYE2VaF-1rZtyO5_tXB2JqwHLAAGJYdb2twYqXxZR3p1gyudp9OCvlaHAqZ4ZP_2Spi2mNbemr8GEaopF7f3gXpstAzwJjvAOsaVuphy1hZP8Hk98jaNQ6_OJGTv66Vx2Y930Ckj29807E6IAvzrl8flblVq6UfKm0i6HpkaHFsPK0s9asWs8hyG8yjtPDLZi6XZNGDsOi5XLsxiBLHxi0Vuokek6OvcvkS_OIFZhdCTaa7mc15pRyBWlj7vXCyuyzz6zb55bwtTq-IRQql_cUiw3PTWWAves-Jjh5e-5XHHb8uA0\u0026s=js7eAU7LEdD299YzKAkOvSaFxkIHq22V6vsOUqjccWcw57wuBkbBhkaLCsjAWgG773oENqsF1IotRjbpw3e3LapmhLATNZ8pGLclnFS6PeCOhvIkcvunInbCJTZoSdm_XG3P-hfiqWbH44Qd21HVZHiEguSmz9BTdLhMwuth8Pl6AoPZLK-z-Ivv8Y1j3L7yA5cs2me4zTM-l_W3F0Cb9QIMssISSZGrkAaIFX0uxn57uFlQplHxU9rQynC3P4TPR3EIErWEmAOxr0hksYLmTq1GNao1Iu2LZMy-EC0EjHfD9VNHwnAur2zfvcaJNXkcmWJDpfKy3j0pOf-9_A_9jQ\u0026h=JUN-zzuaMnPFYHnVZ3HuX9fuQpy2R8PedONNOS6pnIQ+6": { + "Remove-AzEventHubNamespaceV2+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/providers/Microsoft.EventHub/locations/eastus/namespaceOperationResults/7ad4acf9-1966-4fb1-ae5e-a6fabc4e822e?isAsyncHeader=true\u0026resourceName=namespaceV2dmnw8c\u0026resourceType=namespace\u0026api-version=2023-01-01-preview\u0026operationType=Deleted\u0026t=638499929133398183\u0026c=MIIHKjCCBhKgAwIBAgITHgRwbFvgB8QvXABGowAABHBsWzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNDI5MDU0OTI2WhcNMjUwNDI0MDU0OTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMI74kkH1s1fyf3u8I9NW48Al606jCyqMV0yJPFfgnXzY0ksG-iZgod2J98qesULbjiYsbXV0sHlD9QSNQU8ZIQZl4DfemNJow8QYsOz2cltqajb66-USZbxABjDvSsGKjICxWLcm-lEWkFg-GDs8LOHMiQgVivfOLn7vDT_tlU3gBy5H5UGQZJbY-elo_utlDtbzZjJPwDoybfFV_XnexkBuSK9pNVgXtOaPWgibTw2p-q5YwtHXjDet3VsWKc1qwD3IlKgLxR_nCg4CBO9Nnw6w41TJKFwDQVN070SUNKYulYf4-9KqXF5dDpB_ftcILJ2TkWDhNwtm10IQy4Lic0CAwEAAaOCBBcwggQTMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBTDbpQqaXJdBMiU7rIDX9nVdRd9VDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMEEGA1UdIAQ6MDgwDAYKKwYBBAGCN3sBATAMBgorBgEEAYI3ewIBMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKxfK_S7hJnYof2MUz_YwGYBOzg_bFpkN8fnmSQBEjC55tA8eliiZ1Y8cgSFYU-LPdEJz2KQssa1GmILoSFme62JtwI7gbHaRG0cHW8LeGSEqeRVYvguFIY17qAqJaIIDLdalEim7FRRdsARusI7yf5l3J-TrUADFhz0zQcaRdXj1tBaLqvHGQxcHxjGDL9TYGvE5QX3gMDaRP4rUEREpn5PnLZ4aKpHcO9mrypJxv7RkgkCc0NIr31WSKhZdw9PUdWvPTPnBEXNqUySJ4YGP66oGk8XPAgXkJBCoAZnTvYi8hum8Ef-2gnF4J2bTC7n-RXSGH7n1eACAZrzg8vxueM\u0026s=fdnlSA8XS0MZlmCEc2O-O5jozTJvNxgOqsaFOZwVI19-ajhAauun9C1PUB-EcIz0Gaw1nUQWs_cZ-295whOAawMbvSNGG8I3mao8df8e8J-dO6-6Cwbuy0UcuCuaJZE6nogB04qdLpnh-my2flDD-ZbZjaHS6ek9dzB3GhoAmDuZF4EDH_fWvTksvYqLkf9LUY7cwFcWbOvqmbmc9OQ7Y9iX365KUIxLeyN-UwrZePC9ZVrraqLd3lrE3kgxxqC7oSO3Z86kOOHCdG9iJ7q7Bdnct8vALclimTI52amJvywBElEp_1om5N-jnGDLLPn5xTE38_0sB3bUWUyp1RxIqg\u0026h=D2ntf3ID12Sed3PhmQIbTOzIXJbVq05aRVRRBLcyNiw+5": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/locations/eastus/operationStatus/namespaceV2b4cdh6?api-version=2023-01-01-preview\u0026resourceType=Namespace\u0026t=2023-09-18T08%3a35%3a22\u0026c=MIIHADCCBeigAwIBAgITHgMhaM4gZ0HzxBWAuAAAAyFozjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjMwODAyMDMxNzU2WhcNMjQwNzI3MDMxNzU2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOOzhNB70ZBwsbp8jfRR_PKOMG_uCDbegB2_gFDOKZMO_FN_JbJRPNh1h7ZNDoukj9oG4tI7KLdPeVJZlY-rrXNZ1uYNSQVjW_5Df4MuI-KyTpSFoCOp3TiwuAn-BOqW0MbJxIdEcFYpuGolWK8LFJxpm0yjCkOhdjDgZ4330_2_NIxXUjUwfP14yHf-Hj4MZrzErcHta1wJw_VR3KpxZ_AHpWoVqjotRTeBsvSM0ooxDMwWCEtBiuwlT_mknn_HjKB4gZJz__vVudNZOpMC9LfSwWD6ARuKpft-igloqK_8Renvbqzp8UUzhrGEqAiaiLIdpGEo_2Q-2htJ3trviRkCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSoHbW7ynocEyY6SmRonoHwiWsl0DAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKYeWfNeK4--RDWDXAAns3GQxhL134SJ84r6XxuYE2VaF-1rZtyO5_tXB2JqwHLAAGJYdb2twYqXxZR3p1gyudp9OCvlaHAqZ4ZP_2Spi2mNbemr8GEaopF7f3gXpstAzwJjvAOsaVuphy1hZP8Hk98jaNQ6_OJGTv66Vx2Y930Ckj29807E6IAvzrl8flblVq6UfKm0i6HpkaHFsPK0s9asWs8hyG8yjtPDLZi6XZNGDsOi5XLsxiBLHxi0Vuokek6OvcvkS_OIFZhdCTaa7mc15pRyBWlj7vXCyuyzz6zb55bwtTq-IRQql_cUiw3PTWWAves-Jjh5e-5XHHb8uA0\u0026s=js7eAU7LEdD299YzKAkOvSaFxkIHq22V6vsOUqjccWcw57wuBkbBhkaLCsjAWgG773oENqsF1IotRjbpw3e3LapmhLATNZ8pGLclnFS6PeCOhvIkcvunInbCJTZoSdm_XG3P-hfiqWbH44Qd21HVZHiEguSmz9BTdLhMwuth8Pl6AoPZLK-z-Ivv8Y1j3L7yA5cs2me4zTM-l_W3F0Cb9QIMssISSZGrkAaIFX0uxn57uFlQplHxU9rQynC3P4TPR3EIErWEmAOxr0hksYLmTq1GNao1Iu2LZMy-EC0EjHfD9VNHwnAur2zfvcaJNXkcmWJDpfKy3j0pOf-9_A_9jQ\u0026h=JUN-zzuaMnPFYHnVZ3HuX9fuQpy2R8PedONNOS6pnIQ", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/providers/Microsoft.EventHub/locations/eastus/namespaceOperationResults/7ad4acf9-1966-4fb1-ae5e-a6fabc4e822e?isAsyncHeader=true\u0026resourceName=namespaceV2dmnw8c\u0026resourceType=namespace\u0026api-version=2023-01-01-preview\u0026operationType=Deleted\u0026t=638499929133398183\u0026c=MIIHKjCCBhKgAwIBAgITHgRwbFvgB8QvXABGowAABHBsWzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNDI5MDU0OTI2WhcNMjUwNDI0MDU0OTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMI74kkH1s1fyf3u8I9NW48Al606jCyqMV0yJPFfgnXzY0ksG-iZgod2J98qesULbjiYsbXV0sHlD9QSNQU8ZIQZl4DfemNJow8QYsOz2cltqajb66-USZbxABjDvSsGKjICxWLcm-lEWkFg-GDs8LOHMiQgVivfOLn7vDT_tlU3gBy5H5UGQZJbY-elo_utlDtbzZjJPwDoybfFV_XnexkBuSK9pNVgXtOaPWgibTw2p-q5YwtHXjDet3VsWKc1qwD3IlKgLxR_nCg4CBO9Nnw6w41TJKFwDQVN070SUNKYulYf4-9KqXF5dDpB_ftcILJ2TkWDhNwtm10IQy4Lic0CAwEAAaOCBBcwggQTMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBTDbpQqaXJdBMiU7rIDX9nVdRd9VDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMEEGA1UdIAQ6MDgwDAYKKwYBBAGCN3sBATAMBgorBgEEAYI3ewIBMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKxfK_S7hJnYof2MUz_YwGYBOzg_bFpkN8fnmSQBEjC55tA8eliiZ1Y8cgSFYU-LPdEJz2KQssa1GmILoSFme62JtwI7gbHaRG0cHW8LeGSEqeRVYvguFIY17qAqJaIIDLdalEim7FRRdsARusI7yf5l3J-TrUADFhz0zQcaRdXj1tBaLqvHGQxcHxjGDL9TYGvE5QX3gMDaRP4rUEREpn5PnLZ4aKpHcO9mrypJxv7RkgkCc0NIr31WSKhZdw9PUdWvPTPnBEXNqUySJ4YGP66oGk8XPAgXkJBCoAZnTvYi8hum8Ef-2gnF4J2bTC7n-RXSGH7n1eACAZrzg8vxueM\u0026s=fdnlSA8XS0MZlmCEc2O-O5jozTJvNxgOqsaFOZwVI19-ajhAauun9C1PUB-EcIz0Gaw1nUQWs_cZ-295whOAawMbvSNGG8I3mao8df8e8J-dO6-6Cwbuy0UcuCuaJZE6nogB04qdLpnh-my2flDD-ZbZjaHS6ek9dzB3GhoAmDuZF4EDH_fWvTksvYqLkf9LUY7cwFcWbOvqmbmc9OQ7Y9iX365KUIxLeyN-UwrZePC9ZVrraqLd3lrE3kgxxqC7oSO3Z86kOOHCdG9iJ7q7Bdnct8vALclimTI52amJvywBElEp_1om5N-jnGDLLPn5xTE38_0sB3bUWUyp1RxIqg\u0026h=D2ntf3ID12Sed3PhmQIbTOzIXJbVq05aRVRRBLcyNiw", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "237" ], - "x-ms-client-request-id": [ "7d1d71ee-8688-4318-92ed-213404a12122" ], + "x-ms-unique-id": [ "189" ], + "x-ms-client-request-id": [ "a601114e-4356-44bf-a2fc-d6fd441b5762" ], "CommandName": [ "Remove-AzEventHubNamespaceV2" ], "FullCommandName": [ "Remove-AzEventHubNamespace_DeleteViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ] }, "ContentHeaders": { } }, "Response": { - "StatusCode": 204, + "StatusCode": 200, "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "6e537964-d66b-46c0-9e5d-f8c6eab00c80_M7SN1_M7SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11991" ], - "x-ms-correlation-request-id": [ "37a60479-d6d5-4c34-b06c-90296d31b23b" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083553Z:37a60479-d6d5-4c34-b06c-90296d31b23b" ], + "x-ms-correlation-request-id": [ "23bdf2e4-c018-400a-9821-450141d0df82" ], + "x-ms-client-request-id": [ "a601114e-4356-44bf-a2fc-d6fd441b5762_RP" ], + "x-ms-messaging-activity-id": [ "8640081f-134d-4740-ae8d-6f49ebb63875" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G10|2024-04-29T13:09:04" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "23bdf2e4-c018-400a-9821-450141d0df82" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T130904Z:23bdf2e4-c018-400a-9821-450141d0df82" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 819C538DA7A84929866F1E1C60396CD2 Ref B: SEL221051504011 Ref C: 2023-09-18T08:35:52Z" ], - "Date": [ "Mon, 18 Sep 2023 08:35:52 GMT" ] + "X-MSEdge-Ref": [ "Ref A: B4BAEB34618E4EEAA6771E159C4AD7B5 Ref B: SEL221051504047 Ref C: 2024-04-29T13:09:03Z" ], + "Date": [ "Mon, 29 Apr 2024 13:09:04 GMT" ] }, "ContentHeaders": { + "Content-Length": [ "68" ], + "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": null, + "Content": "{\"name\":\"7ad4acf9-1966-4fb1-ae5e-a6fabc4e822e\",\"status\":\"Succeeded\"}", "isContentBase64": false } }, - "Remove-AzEventHubNamespaceV2+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/locations/eastus/operationStatus/namespaceV2b4cdh6?api-version=2023-01-01-preview\u0026resourceType=Namespace\u0026t=2023-09-18T08%3a35%3a22\u0026c=MIIHADCCBeigAwIBAgITHgMhaM4gZ0HzxBWAuAAAAyFozjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjMwODAyMDMxNzU2WhcNMjQwNzI3MDMxNzU2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOOzhNB70ZBwsbp8jfRR_PKOMG_uCDbegB2_gFDOKZMO_FN_JbJRPNh1h7ZNDoukj9oG4tI7KLdPeVJZlY-rrXNZ1uYNSQVjW_5Df4MuI-KyTpSFoCOp3TiwuAn-BOqW0MbJxIdEcFYpuGolWK8LFJxpm0yjCkOhdjDgZ4330_2_NIxXUjUwfP14yHf-Hj4MZrzErcHta1wJw_VR3KpxZ_AHpWoVqjotRTeBsvSM0ooxDMwWCEtBiuwlT_mknn_HjKB4gZJz__vVudNZOpMC9LfSwWD6ARuKpft-igloqK_8Renvbqzp8UUzhrGEqAiaiLIdpGEo_2Q-2htJ3trviRkCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSoHbW7ynocEyY6SmRonoHwiWsl0DAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKYeWfNeK4--RDWDXAAns3GQxhL134SJ84r6XxuYE2VaF-1rZtyO5_tXB2JqwHLAAGJYdb2twYqXxZR3p1gyudp9OCvlaHAqZ4ZP_2Spi2mNbemr8GEaopF7f3gXpstAzwJjvAOsaVuphy1hZP8Hk98jaNQ6_OJGTv66Vx2Y930Ckj29807E6IAvzrl8flblVq6UfKm0i6HpkaHFsPK0s9asWs8hyG8yjtPDLZi6XZNGDsOi5XLsxiBLHxi0Vuokek6OvcvkS_OIFZhdCTaa7mc15pRyBWlj7vXCyuyzz6zb55bwtTq-IRQql_cUiw3PTWWAves-Jjh5e-5XHHb8uA0\u0026s=js7eAU7LEdD299YzKAkOvSaFxkIHq22V6vsOUqjccWcw57wuBkbBhkaLCsjAWgG773oENqsF1IotRjbpw3e3LapmhLATNZ8pGLclnFS6PeCOhvIkcvunInbCJTZoSdm_XG3P-hfiqWbH44Qd21HVZHiEguSmz9BTdLhMwuth8Pl6AoPZLK-z-Ivv8Y1j3L7yA5cs2me4zTM-l_W3F0Cb9QIMssISSZGrkAaIFX0uxn57uFlQplHxU9rQynC3P4TPR3EIErWEmAOxr0hksYLmTq1GNao1Iu2LZMy-EC0EjHfD9VNHwnAur2zfvcaJNXkcmWJDpfKy3j0pOf-9_A_9jQ\u0026h=JUN-zzuaMnPFYHnVZ3HuX9fuQpy2R8PedONNOS6pnIQ+7": { + "Remove-AzEventHubNamespaceV2+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/providers/Microsoft.EventHub/locations/eastus/namespaceOperationResults/7ad4acf9-1966-4fb1-ae5e-a6fabc4e822e?isAsyncHeader=false\u0026resourceName=namespaceV2dmnw8c\u0026resourceType=namespace\u0026api-version=2023-01-01-preview\u0026operationType=Deleted\u0026t=638499929133554277\u0026c=MIIHKjCCBhKgAwIBAgITHgRwbFvgB8QvXABGowAABHBsWzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNDI5MDU0OTI2WhcNMjUwNDI0MDU0OTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMI74kkH1s1fyf3u8I9NW48Al606jCyqMV0yJPFfgnXzY0ksG-iZgod2J98qesULbjiYsbXV0sHlD9QSNQU8ZIQZl4DfemNJow8QYsOz2cltqajb66-USZbxABjDvSsGKjICxWLcm-lEWkFg-GDs8LOHMiQgVivfOLn7vDT_tlU3gBy5H5UGQZJbY-elo_utlDtbzZjJPwDoybfFV_XnexkBuSK9pNVgXtOaPWgibTw2p-q5YwtHXjDet3VsWKc1qwD3IlKgLxR_nCg4CBO9Nnw6w41TJKFwDQVN070SUNKYulYf4-9KqXF5dDpB_ftcILJ2TkWDhNwtm10IQy4Lic0CAwEAAaOCBBcwggQTMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBTDbpQqaXJdBMiU7rIDX9nVdRd9VDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMEEGA1UdIAQ6MDgwDAYKKwYBBAGCN3sBATAMBgorBgEEAYI3ewIBMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKxfK_S7hJnYof2MUz_YwGYBOzg_bFpkN8fnmSQBEjC55tA8eliiZ1Y8cgSFYU-LPdEJz2KQssa1GmILoSFme62JtwI7gbHaRG0cHW8LeGSEqeRVYvguFIY17qAqJaIIDLdalEim7FRRdsARusI7yf5l3J-TrUADFhz0zQcaRdXj1tBaLqvHGQxcHxjGDL9TYGvE5QX3gMDaRP4rUEREpn5PnLZ4aKpHcO9mrypJxv7RkgkCc0NIr31WSKhZdw9PUdWvPTPnBEXNqUySJ4YGP66oGk8XPAgXkJBCoAZnTvYi8hum8Ef-2gnF4J2bTC7n-RXSGH7n1eACAZrzg8vxueM\u0026s=nu_67I0e5NGsyfbKpW30X2wOn3qhjwquAIb6hmqc6he6JcXzWdTBRN0mLCmoGELQz89kC3h0SzYpeyF2wT2TomVrybUU6CaeMrYo01Ugw_S_j5KmSdYamKS22tTLVTubUmRd5tY-pajateZoACJvaWNdkQxhZQzrCR_ZWLEeetsLG-ByAlkTQQszICRqNEOuf5Zrt3uBBTvaCoHoatiM3jG9s3wGS2UpX0SOlO3lFEw5yDy73DaXaJvErDRtLI8r7gsBDoddp8qZFBJL0PRsW1NYb2OluU0KDYiFZxob0xiBxPZ8i4UbNBT3dK0cqX6rNNwzMqWAt5g5F92qvTt8ig\u0026h=W1vXQx--dIbqBLAJVdFfB212W2Vx5LuDtym24F44ync+6": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/locations/eastus/operationStatus/namespaceV2b4cdh6?api-version=2023-01-01-preview\u0026resourceType=Namespace\u0026t=2023-09-18T08%3a35%3a22\u0026c=MIIHADCCBeigAwIBAgITHgMhaM4gZ0HzxBWAuAAAAyFozjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjMwODAyMDMxNzU2WhcNMjQwNzI3MDMxNzU2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOOzhNB70ZBwsbp8jfRR_PKOMG_uCDbegB2_gFDOKZMO_FN_JbJRPNh1h7ZNDoukj9oG4tI7KLdPeVJZlY-rrXNZ1uYNSQVjW_5Df4MuI-KyTpSFoCOp3TiwuAn-BOqW0MbJxIdEcFYpuGolWK8LFJxpm0yjCkOhdjDgZ4330_2_NIxXUjUwfP14yHf-Hj4MZrzErcHta1wJw_VR3KpxZ_AHpWoVqjotRTeBsvSM0ooxDMwWCEtBiuwlT_mknn_HjKB4gZJz__vVudNZOpMC9LfSwWD6ARuKpft-igloqK_8Renvbqzp8UUzhrGEqAiaiLIdpGEo_2Q-2htJ3trviRkCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSoHbW7ynocEyY6SmRonoHwiWsl0DAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKYeWfNeK4--RDWDXAAns3GQxhL134SJ84r6XxuYE2VaF-1rZtyO5_tXB2JqwHLAAGJYdb2twYqXxZR3p1gyudp9OCvlaHAqZ4ZP_2Spi2mNbemr8GEaopF7f3gXpstAzwJjvAOsaVuphy1hZP8Hk98jaNQ6_OJGTv66Vx2Y930Ckj29807E6IAvzrl8flblVq6UfKm0i6HpkaHFsPK0s9asWs8hyG8yjtPDLZi6XZNGDsOi5XLsxiBLHxi0Vuokek6OvcvkS_OIFZhdCTaa7mc15pRyBWlj7vXCyuyzz6zb55bwtTq-IRQql_cUiw3PTWWAves-Jjh5e-5XHHb8uA0\u0026s=js7eAU7LEdD299YzKAkOvSaFxkIHq22V6vsOUqjccWcw57wuBkbBhkaLCsjAWgG773oENqsF1IotRjbpw3e3LapmhLATNZ8pGLclnFS6PeCOhvIkcvunInbCJTZoSdm_XG3P-hfiqWbH44Qd21HVZHiEguSmz9BTdLhMwuth8Pl6AoPZLK-z-Ivv8Y1j3L7yA5cs2me4zTM-l_W3F0Cb9QIMssISSZGrkAaIFX0uxn57uFlQplHxU9rQynC3P4TPR3EIErWEmAOxr0hksYLmTq1GNao1Iu2LZMy-EC0EjHfD9VNHwnAur2zfvcaJNXkcmWJDpfKy3j0pOf-9_A_9jQ\u0026h=JUN-zzuaMnPFYHnVZ3HuX9fuQpy2R8PedONNOS6pnIQ", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/providers/Microsoft.EventHub/locations/eastus/namespaceOperationResults/7ad4acf9-1966-4fb1-ae5e-a6fabc4e822e?isAsyncHeader=false\u0026resourceName=namespaceV2dmnw8c\u0026resourceType=namespace\u0026api-version=2023-01-01-preview\u0026operationType=Deleted\u0026t=638499929133554277\u0026c=MIIHKjCCBhKgAwIBAgITHgRwbFvgB8QvXABGowAABHBsWzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNDI5MDU0OTI2WhcNMjUwNDI0MDU0OTI2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMI74kkH1s1fyf3u8I9NW48Al606jCyqMV0yJPFfgnXzY0ksG-iZgod2J98qesULbjiYsbXV0sHlD9QSNQU8ZIQZl4DfemNJow8QYsOz2cltqajb66-USZbxABjDvSsGKjICxWLcm-lEWkFg-GDs8LOHMiQgVivfOLn7vDT_tlU3gBy5H5UGQZJbY-elo_utlDtbzZjJPwDoybfFV_XnexkBuSK9pNVgXtOaPWgibTw2p-q5YwtHXjDet3VsWKc1qwD3IlKgLxR_nCg4CBO9Nnw6w41TJKFwDQVN070SUNKYulYf4-9KqXF5dDpB_ftcILJ2TkWDhNwtm10IQy4Lic0CAwEAAaOCBBcwggQTMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBTDbpQqaXJdBMiU7rIDX9nVdRd9VDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMEEGA1UdIAQ6MDgwDAYKKwYBBAGCN3sBATAMBgorBgEEAYI3ewIBMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAKxfK_S7hJnYof2MUz_YwGYBOzg_bFpkN8fnmSQBEjC55tA8eliiZ1Y8cgSFYU-LPdEJz2KQssa1GmILoSFme62JtwI7gbHaRG0cHW8LeGSEqeRVYvguFIY17qAqJaIIDLdalEim7FRRdsARusI7yf5l3J-TrUADFhz0zQcaRdXj1tBaLqvHGQxcHxjGDL9TYGvE5QX3gMDaRP4rUEREpn5PnLZ4aKpHcO9mrypJxv7RkgkCc0NIr31WSKhZdw9PUdWvPTPnBEXNqUySJ4YGP66oGk8XPAgXkJBCoAZnTvYi8hum8Ef-2gnF4J2bTC7n-RXSGH7n1eACAZrzg8vxueM\u0026s=nu_67I0e5NGsyfbKpW30X2wOn3qhjwquAIb6hmqc6he6JcXzWdTBRN0mLCmoGELQz89kC3h0SzYpeyF2wT2TomVrybUU6CaeMrYo01Ugw_S_j5KmSdYamKS22tTLVTubUmRd5tY-pajateZoACJvaWNdkQxhZQzrCR_ZWLEeetsLG-ByAlkTQQszICRqNEOuf5Zrt3uBBTvaCoHoatiM3jG9s3wGS2UpX0SOlO3lFEw5yDy73DaXaJvErDRtLI8r7gsBDoddp8qZFBJL0PRsW1NYb2OluU0KDYiFZxob0xiBxPZ8i4UbNBT3dK0cqX6rNNwzMqWAt5g5F92qvTt8ig\u0026h=W1vXQx--dIbqBLAJVdFfB212W2Vx5LuDtym24F44ync", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "238" ], - "x-ms-client-request-id": [ "7d1d71ee-8688-4318-92ed-213404a12122" ], + "x-ms-unique-id": [ "190" ], + "x-ms-client-request-id": [ "a601114e-4356-44bf-a2fc-d6fd441b5762" ], "CommandName": [ "Remove-AzEventHubNamespaceV2" ], "FullCommandName": [ "Remove-AzEventHubNamespace_DeleteViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ] }, "ContentHeaders": { } @@ -565,16 +561,20 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "e635291a-69b6-4d12-9385-df7b3f27b0d8_M6SN1_M6SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], - "x-ms-correlation-request-id": [ "0ed3ff58-245f-47b2-8bf2-f7da684bfb85" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083554Z:0ed3ff58-245f-47b2-8bf2-f7da684bfb85" ], + "Location": [ "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/providers/Microsoft.EventHub/locations/eastus/namespaceOperationResults/7ad4acf9-1966-4fb1-ae5e-a6fabc4e822e?isAsyncHeader=false\u0026resourceName=namespaceV2dmnw8c\u0026resourceType=namespace\u0026api-version=2023-01-01-preview\u0026operationType=Deleted\u0026t=638499929452316956\u0026c=MIIHHjCCBgagAwIBAgITfwKV0ZLKqqC5pXYmSwAEApXRkjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjQwMTMwMDQwMDIzWhcNMjUwMTI0MDQwMDIzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL3r9pIz9EqGL7hkIGyCWYf-iGEEIZub-l1wXGgy_4eykuU0789Lfwih45HdE8dSajY8HHOeTJgXtFKRctvEVoY6uS6XqsmYxRdLcsZCY1jmZssBkruWUaRzazDiW010ropZCynXrFQYtvnimKo7qPCDFQ1SjgldweN0esMkyihnPCi0OqGX1c37m1x9xoH51Wr7fCggiJ0RAwSYC1EI610GaFqK0qPfwFSgtFZ1ys38massMV4shrxjx6v4NNUzSpZXoxgl9R3Q-HHYdui5OlstHf0KFLUGmuwTmxaBTIHI75rmkT0po-txoueIZrjj_0w0WcXRaWC_cFf_p5h1T-0CAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTqKaaymikwcTAnKysLzVZjWspAITAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFgd7P819ocZaPnV6LdPqjb2Rdwy1EuWTLLBF1lXOhiBo3d9NAUc-EwGZXFrLdmj7Vsgyk_n9WVTy2CmGaC7pgZUakNc6E4dLaqY72qqyLEXGSYLc9wcmSL28IB8XdmMfaE-GZEf78Pp8g8npE1OZ8AoPWuTOsI3f5cqhSZ0iz4jvnHThUxHBlT8sBlBMN98YhioCq4BRbv9njVHM-udQ71Lq_kKK0yNzphuX3avpuClvsyu8w2bd9a7BqsjiezBU3ij8cRj-FkaTc2DwPV3pXChlf5pNxSGZnvSEXKrYkvEJpwmkkpr1vWR8hXtCnXTfYpIRkWgKeE9mzgic5wFKng\u0026s=fnTeTbMicfFx3k9zdNGUezoIj11lxfDRCtwDFDwudSiPWdMhO25SwH3xD2tPpu2jtRtfMd4rjOPfyCqgER33z1GRuWWWtq0jse5_LMdbjiemlPdqqXAVtq2SXhJKGa9_cCZv0cmOxOAyGQ01kav-hLAO9WYYxODBOBjSui_j_dbxkaZ5p1tLCRZTF9AWd5mo6wgXfCIt2u1z4DoHpNVtXAjrU7ATENsxE2d3Eg6MQEuYbHNomdIaTwUmkOCxyGyuJ5H1yGQuxo5-M0bWuatFi4ox5K-k86_RoMWcC9cvsPNrXl62SkLHEJviXEFZGFrGXDzDgPN8vEQ90E1Kd_NXtw\u0026h=wGbtZdpk7hh7ofnqDMI7FNr5LpqzAzPz4hDrZQavHw8" ], + "x-ms-correlation-request-id": [ "00000001-0000-0000-0002-000000005660" ], + "x-ms-client-request-id": [ "00000001-0000-0000-0002-000000005660" ], + "x-ms-messaging-activity-id": [ "00000001-0000-0000-0002-000000005660" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G10|2024-04-29T13:09:05" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "ed646e98-006f-4950-845c-a18976035bde" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T130905Z:ed646e98-006f-4950-845c-a18976035bde" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 36E0B4CDF3FF418DBB3624773796AB64 Ref B: SEL221051504011 Ref C: 2023-09-18T08:35:53Z" ], - "Date": [ "Mon, 18 Sep 2023 08:35:54 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 30F62EB0E9904ADDBB0F317C7970700C Ref B: SEL221051504047 Ref C: 2024-04-29T13:09:05Z" ], + "Date": [ "Mon, 29 Apr 2024 13:09:04 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ] @@ -583,19 +583,19 @@ "isContentBase64": false } }, - "Remove-AzEventHubNamespaceV2+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV2b4cdh6?api-version=2023-01-01-preview+8": { + "Remove-AzEventHubNamespaceV2+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV2dmnw8c?api-version=2023-01-01-preview+7": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV2b4cdh6?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV2dmnw8c?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "239" ], - "x-ms-client-request-id": [ "2ee09c3d-3f96-44d4-b2d2-a5a227d90eee" ], + "x-ms-unique-id": [ "191" ], + "x-ms-client-request-id": [ "6d9d15de-779e-4bf2-9776-eeb2382da7d1" ], "CommandName": [ "Get-AzEventHubNamespaceV2" ], "FullCommandName": [ "Get-AzEventHubNamespace_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -607,21 +607,21 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "x-ms-failure-cause": [ "gateway" ], - "x-ms-request-id": [ "f54933cf-a989-4acd-8903-4b4f07a9b6fd" ], - "x-ms-correlation-request-id": [ "f54933cf-a989-4acd-8903-4b4f07a9b6fd" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083555Z:f54933cf-a989-4acd-8903-4b4f07a9b6fd" ], + "x-ms-request-id": [ "2825651e-1b9d-4707-9d7b-079353b0d46d" ], + "x-ms-correlation-request-id": [ "2825651e-1b9d-4707-9d7b-079353b0d46d" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T130905Z:2825651e-1b9d-4707-9d7b-079353b0d46d" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: B6149596EF8B4056975CAAA58A719F55 Ref B: SEL221051504011 Ref C: 2023-09-18T08:35:54Z" ], - "Date": [ "Mon, 18 Sep 2023 08:35:54 GMT" ] + "X-MSEdge-Ref": [ "Ref A: F2033467FB684EEF9016C4C4138A961D Ref B: SEL221051504047 Ref C: 2024-04-29T13:09:05Z" ], + "Date": [ "Mon, 29 Apr 2024 13:09:05 GMT" ] }, "ContentHeaders": { "Content-Length": [ "246" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"error\":{\"code\":\"ResourceNotFound\",\"message\":\"The Resource \u0027Microsoft.EventHub/namespaces/namespaceV2b4cdh6\u0027 under resource group \u0027resourceGroupAutoresta2s9gd\u0027 was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix\"}}", + "Content": "{\"error\":{\"code\":\"ResourceNotFound\",\"message\":\"The Resource \u0027Microsoft.EventHub/namespaces/namespaceV2dmnw8c\u0027 under resource group \u0027Autorest-PS-EventHub-kchdmf\u0027 was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix\"}}", "isContentBase64": false } } diff --git a/src/EventHub/EventHub.Autorest/test/Remove-AzEventHubNamespaceV2.Tests.ps1 b/src/EventHub/EventHub.Autorest/test/Remove-AzEventHubNamespaceV2.Tests.ps1 index 20a40ce4783a..e3c59384d290 100644 --- a/src/EventHub/EventHub.Autorest/test/Remove-AzEventHubNamespaceV2.Tests.ps1 +++ b/src/EventHub/EventHub.Autorest/test/Remove-AzEventHubNamespaceV2.Tests.ps1 @@ -16,14 +16,14 @@ if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzEventHubNamespaceV2' Describe 'Remove-AzEventHubNamespaceV2' { It 'Delete' { - $eventhubnamespace = New-AzEventHubNamespaceV2 -ResourceGroupName $env.resourceGroup -Name $env.namespaceV2 -SkuName Standard -Location eastus + $eventhubnamespace = New-AzEventHubNamespaceV2 -ResourceGroupName $env.resourceGroup -Name $env.namespaceV2 -SkuName Standard -Location $env.location Remove-AzEventHubNamespaceV2 -ResourceGroupName $env.resourceGroup -Name $env.namespaceV2 - { Get-AzEventHubNamespaceV2 -ResourceGroupName $env.resourceGroup -Name $env.namespaceV2 } | Should -Throw + { Get-AzEventHubNamespaceV2 -ResourceGroupName $env.resourceGroup -Name $env.namespaceV2 -ErrorAction Stop } | Should -Throw } It 'DeleteViaIdentity' { - $eventhubnamespace = New-AzEventHubNamespaceV2 -ResourceGroupName $env.resourceGroup -Name $env.namespaceV2 -SkuName Standard -Location eastus + $eventhubnamespace = New-AzEventHubNamespaceV2 -ResourceGroupName $env.resourceGroup -Name $env.namespaceV2 -SkuName Standard -Location $env.location Remove-AzEventHubNamespaceV2 -InputObject $eventhubnamespace - { Get-AzEventHubNamespaceV2 -InputObject $eventhubnamespace } | Should -Throw + { Get-AzEventHubNamespaceV2 -InputObject $eventhubnamespace -ErrorAction Stop } | Should -Throw } } diff --git a/src/EventHub/EventHub.Autorest/test/Remove-AzEventHubPrivateEndpointConnection.Recording.json b/src/EventHub/EventHub.Autorest/test/Remove-AzEventHubPrivateEndpointConnection.Recording.json index 78b7082bbe16..3dcaafc61309 100644 --- a/src/EventHub/EventHub.Autorest/test/Remove-AzEventHubPrivateEndpointConnection.Recording.json +++ b/src/EventHub/EventHub.Autorest/test/Remove-AzEventHubPrivateEndpointConnection.Recording.json @@ -1,17 +1,17 @@ { - "Remove-AzEventHubPrivateEndpointConnection+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections?api-version=2023-01-01-preview+1": { + "Remove-AzEventHubPrivateEndpointConnection+[NoContext]+[NoScenario]+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections?api-version=2023-01-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "240" ], - "x-ms-client-request-id": [ "e121ac81-dd3c-4c7f-961f-743610cc0c95" ], + "x-ms-unique-id": [ "192" ], + "x-ms-client-request-id": [ "ca773cce-7cb5-4235-867f-6541744d1cf3" ], "CommandName": [ "Get-AzEventHubPrivateEndpointConnection" ], "FullCommandName": [ "Get-AzEventHubPrivateEndpointConnection_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,38 +22,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], - "x-ms-request-id": [ "49ce8718-eb16-4b55-86d2-9ceef9c03c00" ], - "x-ms-correlation-request-id": [ "49ce8718-eb16-4b55-86d2-9ceef9c03c00" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083607Z:49ce8718-eb16-4b55-86d2-9ceef9c03c00" ], + "x-ms-correlation-request-id": [ "f339e5d5-0a87-4f92-87ae-e498ac132a15" ], + "x-ms-client-request-id": [ "ca773cce-7cb5-4235-867f-6541744d1cf3_RP" ], + "x-ms-messaging-activity-id": [ "2cfcb4dc-4ee7-4d0f-991d-3793c598d9b6" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G14|2024-04-29T13:09:21" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "f339e5d5-0a87-4f92-87ae-e498ac132a15" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T130921Z:f339e5d5-0a87-4f92-87ae-e498ac132a15" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 6C0A551296CC4B5C8897BFD0F8665966 Ref B: SEL221051504011 Ref C: 2023-09-18T08:36:05Z" ], - "Date": [ "Mon, 18 Sep 2023 08:36:06 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 4BDD591F7CA04BA49E90981693F3E8B6 Ref B: SEL221051504047 Ref C: 2024-04-29T13:09:19Z" ], + "Date": [ "Mon, 29 Apr 2024 13:09:20 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1408" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/039cd4e6-b8c0-4b3f-a6c2-41d367f808b5\",\"name\":\"039cd4e6-b8c0-4b3f-a6c2-41d367f808b5\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.Network/privateEndpoints/privateEndpoint-qyfutj\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956\",\"name\":\"cfdfc4e7-f5a8-465f-82a7-c4a77d84a956\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.Network/privateEndpoints/privateEndpoint-352l4o\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/3f4f7599-40f5-43ca-bddc-6527431d9604\",\"name\":\"3f4f7599-40f5-43ca-bddc-6527431d9604\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Network/privateEndpoints/privateEndpoint-i4bc1n\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"\"},\"groupIds\":[\"namespace\"]}},{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8\",\"name\":\"f6111dc9-7599-48ca-a495-78dc8d8f2aa8\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Network/privateEndpoints/privateEndpoint-2upkxh\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}]}", "isContentBase64": false } }, - "Remove-AzEventHubPrivateEndpointConnection+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/039cd4e6-b8c0-4b3f-a6c2-41d367f808b5?api-version=2023-01-01-preview+1": { + "Remove-AzEventHubPrivateEndpointConnection+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/3f4f7599-40f5-43ca-bddc-6527431d9604?api-version=2023-01-01-preview+1": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/039cd4e6-b8c0-4b3f-a6c2-41d367f808b5?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/3f4f7599-40f5-43ca-bddc-6527431d9604?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "241" ], - "x-ms-client-request-id": [ "7f779212-6d74-4e51-8ecf-dfc5a9b2816f" ], + "x-ms-unique-id": [ "193" ], + "x-ms-client-request-id": [ "a863ba91-bd5f-421f-bc5f-55c4da7b88f5" ], "CommandName": [ "Remove-AzEventHubPrivateEndpointConnection" ], "FullCommandName": [ "Remove-AzEventHubPrivateEndpointConnection_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -64,16 +68,20 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Azure-AsyncOperation": [ "https://management.azure.com:443/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/039cd4e6-b8c0-4b3f-a6c2-41d367f808b5/operationStatus/039cd4e6-b8c0-4b3f-a6c2-41d367f808b5?api-version=2023-01-01-preview\u0026operationType=Delete" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], - "x-ms-request-id": [ "2ff02b70-8e12-4812-bb3a-1d2f7b688ec9" ], - "x-ms-correlation-request-id": [ "2ff02b70-8e12-4812-bb3a-1d2f7b688ec9" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083609Z:2ff02b70-8e12-4812-bb3a-1d2f7b688ec9" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/3f4f7599-40f5-43ca-bddc-6527431d9604/operationStatus/3f4f7599-40f5-43ca-bddc-6527431d9604?api-version=2023-01-01-preview\u0026operationType=Delete\u0026t=638499929632487266\u0026c=MIIHHjCCBgagAwIBAgITfwKV0ZLKqqC5pXYmSwAEApXRkjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjQwMTMwMDQwMDIzWhcNMjUwMTI0MDQwMDIzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL3r9pIz9EqGL7hkIGyCWYf-iGEEIZub-l1wXGgy_4eykuU0789Lfwih45HdE8dSajY8HHOeTJgXtFKRctvEVoY6uS6XqsmYxRdLcsZCY1jmZssBkruWUaRzazDiW010ropZCynXrFQYtvnimKo7qPCDFQ1SjgldweN0esMkyihnPCi0OqGX1c37m1x9xoH51Wr7fCggiJ0RAwSYC1EI610GaFqK0qPfwFSgtFZ1ys38massMV4shrxjx6v4NNUzSpZXoxgl9R3Q-HHYdui5OlstHf0KFLUGmuwTmxaBTIHI75rmkT0po-txoueIZrjj_0w0WcXRaWC_cFf_p5h1T-0CAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTqKaaymikwcTAnKysLzVZjWspAITAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFgd7P819ocZaPnV6LdPqjb2Rdwy1EuWTLLBF1lXOhiBo3d9NAUc-EwGZXFrLdmj7Vsgyk_n9WVTy2CmGaC7pgZUakNc6E4dLaqY72qqyLEXGSYLc9wcmSL28IB8XdmMfaE-GZEf78Pp8g8npE1OZ8AoPWuTOsI3f5cqhSZ0iz4jvnHThUxHBlT8sBlBMN98YhioCq4BRbv9njVHM-udQ71Lq_kKK0yNzphuX3avpuClvsyu8w2bd9a7BqsjiezBU3ij8cRj-FkaTc2DwPV3pXChlf5pNxSGZnvSEXKrYkvEJpwmkkpr1vWR8hXtCnXTfYpIRkWgKeE9mzgic5wFKng\u0026s=pHysuZPJYlodplOutFJEjBymJMxgVckMdEjiWFSXqzsDib0Dyi076YxMmAnf8-SEeppk4zc06PLPA4ZHxuzao_yhFS3yIy4caYNoXQevZaJD0aEEa3xpcW9AGk_ysSh_0zZK77sI4NzJK3x-rTQihpIYRIRJCb76ead4rbtJKLGNkqvkECdcG67jU-b-igy3mIJpUZ2fEtYw5ghSKBp1nCmMVyrcHxwq0dZxu9vbELM0Aa65uxLlUvs4WDlwHU8DDJfm5Jbpi--njP_GMgUdDWjX1Y_8Cg6abnWJf4nkaMze83yOhNXRpomzNMuw4CBQQgujACjCZj6sUnET6ncIRA\u0026h=RBE3wxZOvdTZreTkbjloIjU8BPOvNIzl7DBeLHoGzRE" ], + "x-ms-correlation-request-id": [ "00000001-0000-0000-0002-000000002544" ], + "x-ms-client-request-id": [ "00000001-0000-0000-0002-000000002544" ], + "x-ms-messaging-activity-id": [ "00000001-0000-0000-0002-000000002544" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G12|2024-04-29T13:09:23" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14998" ], + "x-ms-request-id": [ "101cd1a7-f640-4835-b48e-abed471dfb64" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T130923Z:101cd1a7-f640-4835-b48e-abed471dfb64" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 7DA0F3DEA5854ED781B3FFCB91450CE1 Ref B: SEL221051504011 Ref C: 2023-09-18T08:36:07Z" ], - "Date": [ "Mon, 18 Sep 2023 08:36:08 GMT" ] + "X-MSEdge-Ref": [ "Ref A: D25B1094AFDF4F52AE963530ED48D3DB Ref B: SEL221051504047 Ref C: 2024-04-29T13:09:21Z" ], + "Date": [ "Mon, 29 Apr 2024 13:09:22 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -83,20 +91,20 @@ "isContentBase64": false } }, - "Remove-AzEventHubPrivateEndpointConnection+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/039cd4e6-b8c0-4b3f-a6c2-41d367f808b5/operationStatus/039cd4e6-b8c0-4b3f-a6c2-41d367f808b5?api-version=2023-01-01-preview\u0026operationType=Delete+2": { + "Remove-AzEventHubPrivateEndpointConnection+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/3f4f7599-40f5-43ca-bddc-6527431d9604/operationStatus/3f4f7599-40f5-43ca-bddc-6527431d9604?api-version=2023-01-01-preview\u0026operationType=Delete\u0026t=638499929632487266\u0026c=MIIHHjCCBgagAwIBAgITfwKV0ZLKqqC5pXYmSwAEApXRkjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjQwMTMwMDQwMDIzWhcNMjUwMTI0MDQwMDIzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL3r9pIz9EqGL7hkIGyCWYf-iGEEIZub-l1wXGgy_4eykuU0789Lfwih45HdE8dSajY8HHOeTJgXtFKRctvEVoY6uS6XqsmYxRdLcsZCY1jmZssBkruWUaRzazDiW010ropZCynXrFQYtvnimKo7qPCDFQ1SjgldweN0esMkyihnPCi0OqGX1c37m1x9xoH51Wr7fCggiJ0RAwSYC1EI610GaFqK0qPfwFSgtFZ1ys38massMV4shrxjx6v4NNUzSpZXoxgl9R3Q-HHYdui5OlstHf0KFLUGmuwTmxaBTIHI75rmkT0po-txoueIZrjj_0w0WcXRaWC_cFf_p5h1T-0CAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTqKaaymikwcTAnKysLzVZjWspAITAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFgd7P819ocZaPnV6LdPqjb2Rdwy1EuWTLLBF1lXOhiBo3d9NAUc-EwGZXFrLdmj7Vsgyk_n9WVTy2CmGaC7pgZUakNc6E4dLaqY72qqyLEXGSYLc9wcmSL28IB8XdmMfaE-GZEf78Pp8g8npE1OZ8AoPWuTOsI3f5cqhSZ0iz4jvnHThUxHBlT8sBlBMN98YhioCq4BRbv9njVHM-udQ71Lq_kKK0yNzphuX3avpuClvsyu8w2bd9a7BqsjiezBU3ij8cRj-FkaTc2DwPV3pXChlf5pNxSGZnvSEXKrYkvEJpwmkkpr1vWR8hXtCnXTfYpIRkWgKeE9mzgic5wFKng\u0026s=pHysuZPJYlodplOutFJEjBymJMxgVckMdEjiWFSXqzsDib0Dyi076YxMmAnf8-SEeppk4zc06PLPA4ZHxuzao_yhFS3yIy4caYNoXQevZaJD0aEEa3xpcW9AGk_ysSh_0zZK77sI4NzJK3x-rTQihpIYRIRJCb76ead4rbtJKLGNkqvkECdcG67jU-b-igy3mIJpUZ2fEtYw5ghSKBp1nCmMVyrcHxwq0dZxu9vbELM0Aa65uxLlUvs4WDlwHU8DDJfm5Jbpi--njP_GMgUdDWjX1Y_8Cg6abnWJf4nkaMze83yOhNXRpomzNMuw4CBQQgujACjCZj6sUnET6ncIRA\u0026h=RBE3wxZOvdTZreTkbjloIjU8BPOvNIzl7DBeLHoGzRE+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/039cd4e6-b8c0-4b3f-a6c2-41d367f808b5/operationStatus/039cd4e6-b8c0-4b3f-a6c2-41d367f808b5?api-version=2023-01-01-preview\u0026operationType=Delete", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/3f4f7599-40f5-43ca-bddc-6527431d9604/operationStatus/3f4f7599-40f5-43ca-bddc-6527431d9604?api-version=2023-01-01-preview\u0026operationType=Delete\u0026t=638499929632487266\u0026c=MIIHHjCCBgagAwIBAgITfwKV0ZLKqqC5pXYmSwAEApXRkjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjQwMTMwMDQwMDIzWhcNMjUwMTI0MDQwMDIzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL3r9pIz9EqGL7hkIGyCWYf-iGEEIZub-l1wXGgy_4eykuU0789Lfwih45HdE8dSajY8HHOeTJgXtFKRctvEVoY6uS6XqsmYxRdLcsZCY1jmZssBkruWUaRzazDiW010ropZCynXrFQYtvnimKo7qPCDFQ1SjgldweN0esMkyihnPCi0OqGX1c37m1x9xoH51Wr7fCggiJ0RAwSYC1EI610GaFqK0qPfwFSgtFZ1ys38massMV4shrxjx6v4NNUzSpZXoxgl9R3Q-HHYdui5OlstHf0KFLUGmuwTmxaBTIHI75rmkT0po-txoueIZrjj_0w0WcXRaWC_cFf_p5h1T-0CAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTqKaaymikwcTAnKysLzVZjWspAITAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFgd7P819ocZaPnV6LdPqjb2Rdwy1EuWTLLBF1lXOhiBo3d9NAUc-EwGZXFrLdmj7Vsgyk_n9WVTy2CmGaC7pgZUakNc6E4dLaqY72qqyLEXGSYLc9wcmSL28IB8XdmMfaE-GZEf78Pp8g8npE1OZ8AoPWuTOsI3f5cqhSZ0iz4jvnHThUxHBlT8sBlBMN98YhioCq4BRbv9njVHM-udQ71Lq_kKK0yNzphuX3avpuClvsyu8w2bd9a7BqsjiezBU3ij8cRj-FkaTc2DwPV3pXChlf5pNxSGZnvSEXKrYkvEJpwmkkpr1vWR8hXtCnXTfYpIRkWgKeE9mzgic5wFKng\u0026s=pHysuZPJYlodplOutFJEjBymJMxgVckMdEjiWFSXqzsDib0Dyi076YxMmAnf8-SEeppk4zc06PLPA4ZHxuzao_yhFS3yIy4caYNoXQevZaJD0aEEa3xpcW9AGk_ysSh_0zZK77sI4NzJK3x-rTQihpIYRIRJCb76ead4rbtJKLGNkqvkECdcG67jU-b-igy3mIJpUZ2fEtYw5ghSKBp1nCmMVyrcHxwq0dZxu9vbELM0Aa65uxLlUvs4WDlwHU8DDJfm5Jbpi--njP_GMgUdDWjX1Y_8Cg6abnWJf4nkaMze83yOhNXRpomzNMuw4CBQQgujACjCZj6sUnET6ncIRA\u0026h=RBE3wxZOvdTZreTkbjloIjU8BPOvNIzl7DBeLHoGzRE", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "242" ], - "x-ms-client-request-id": [ "7f779212-6d74-4e51-8ecf-dfc5a9b2816f" ], + "x-ms-unique-id": [ "194" ], + "x-ms-client-request-id": [ "a863ba91-bd5f-421f-bc5f-55c4da7b88f5" ], "CommandName": [ "Remove-AzEventHubPrivateEndpointConnection" ], "FullCommandName": [ "Remove-AzEventHubPrivateEndpointConnection_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ] }, "ContentHeaders": { } @@ -106,38 +114,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], - "x-ms-request-id": [ "6b162219-eed8-46f6-b27b-e568edffda83" ], - "x-ms-correlation-request-id": [ "6b162219-eed8-46f6-b27b-e568edffda83" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083640Z:6b162219-eed8-46f6-b27b-e568edffda83" ], + "x-ms-correlation-request-id": [ "1b83f832-3a2f-4a94-a9e1-c20946382e8d" ], + "x-ms-client-request-id": [ "a863ba91-bd5f-421f-bc5f-55c4da7b88f5_RP" ], + "x-ms-messaging-activity-id": [ "5494af02-d997-4e44-b615-8378e7cfa00c" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G8|2024-04-29T13:09:54" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "1b83f832-3a2f-4a94-a9e1-c20946382e8d" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T130954Z:1b83f832-3a2f-4a94-a9e1-c20946382e8d" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: A84C3935154A4791B30EF22B777B38FD Ref B: SEL221051504011 Ref C: 2023-09-18T08:36:39Z" ], - "Date": [ "Mon, 18 Sep 2023 08:36:40 GMT" ] + "X-MSEdge-Ref": [ "Ref A: F4142E8EF5F14C45986A0EA0E2EEDBA6 Ref B: SEL221051504047 Ref C: 2024-04-29T13:09:53Z" ], + "Date": [ "Mon, 29 Apr 2024 13:09:54 GMT" ] }, "ContentHeaders": { "Content-Length": [ "400" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/039cd4e6-b8c0-4b3f-a6c2-41d367f808b5/operationStatus/039cd4e6-b8c0-4b3f-a6c2-41d367f808b5/operationStatus/039cd4e6-b8c0-4b3f-a6c2-41d367f808b5\",\"name\":\"039cd4e6-b8c0-4b3f-a6c2-41d367f808b5\",\"status\":\"Succeeded\"}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/3f4f7599-40f5-43ca-bddc-6527431d9604/operationStatus/3f4f7599-40f5-43ca-bddc-6527431d9604/operationStatus/3f4f7599-40f5-43ca-bddc-6527431d9604\",\"name\":\"3f4f7599-40f5-43ca-bddc-6527431d9604\",\"status\":\"Succeeded\"}", "isContentBase64": false } }, - "Remove-AzEventHubPrivateEndpointConnection+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/039cd4e6-b8c0-4b3f-a6c2-41d367f808b5?api-version=2023-01-01-preview+3": { + "Remove-AzEventHubPrivateEndpointConnection+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/3f4f7599-40f5-43ca-bddc-6527431d9604?api-version=2023-01-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/039cd4e6-b8c0-4b3f-a6c2-41d367f808b5?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/3f4f7599-40f5-43ca-bddc-6527431d9604?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "243" ], - "x-ms-client-request-id": [ "9f1454cd-8d24-4192-9710-d7083fc86e1e" ], + "x-ms-unique-id": [ "195" ], + "x-ms-client-request-id": [ "d3822338-57a0-4233-9796-6e910d02ad29" ], "CommandName": [ "Get-AzEventHubPrivateEndpointConnection" ], "FullCommandName": [ "Get-AzEventHubPrivateEndpointConnection_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -148,15 +160,19 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11989" ], - "x-ms-request-id": [ "02a03b3c-e45b-4523-8bc5-1049f73d6826" ], - "x-ms-correlation-request-id": [ "02a03b3c-e45b-4523-8bc5-1049f73d6826" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083642Z:02a03b3c-e45b-4523-8bc5-1049f73d6826" ], + "x-ms-correlation-request-id": [ "5c96b6c5-6424-4d92-911f-eab1809cc91f" ], + "x-ms-client-request-id": [ "d3822338-57a0-4233-9796-6e910d02ad29_RP" ], + "x-ms-messaging-activity-id": [ "1bcd4246-89a1-46e2-9be0-61243b10c0ba" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G14|2024-04-29T13:09:56" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "5c96b6c5-6424-4d92-911f-eab1809cc91f" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T130956Z:5c96b6c5-6424-4d92-911f-eab1809cc91f" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 256191686BC7485F8185B5820BA1ED89 Ref B: SEL221051504011 Ref C: 2023-09-18T08:36:41Z" ], - "Date": [ "Mon, 18 Sep 2023 08:36:42 GMT" ] + "X-MSEdge-Ref": [ "Ref A: DC5AAFEF0C2A41FC83F8F7C66B4F1EA2 Ref B: SEL221051504047 Ref C: 2024-04-29T13:09:54Z" ], + "Date": [ "Mon, 29 Apr 2024 13:09:56 GMT" ] }, "ContentHeaders": { "Content-Length": [ "105" ], @@ -167,19 +183,19 @@ "isContentBase64": false } }, - "Remove-AzEventHubPrivateEndpointConnection+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956?api-version=2023-01-01-preview+1": { + "Remove-AzEventHubPrivateEndpointConnection+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8?api-version=2023-01-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "244" ], - "x-ms-client-request-id": [ "2d115184-53d1-4051-871f-16b01f2bd368" ], + "x-ms-unique-id": [ "196" ], + "x-ms-client-request-id": [ "019b76d4-55b5-43a7-acec-7999373f6537" ], "CommandName": [ "Get-AzEventHubPrivateEndpointConnection" ], "FullCommandName": [ "Get-AzEventHubPrivateEndpointConnection_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -190,38 +206,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-request-id": [ "bc3ad633-c45f-4509-8ca2-ffee11e0fc31" ], - "x-ms-correlation-request-id": [ "bc3ad633-c45f-4509-8ca2-ffee11e0fc31" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083644Z:bc3ad633-c45f-4509-8ca2-ffee11e0fc31" ], + "x-ms-correlation-request-id": [ "22cfba9c-468e-4581-8748-7c1d3e07899b" ], + "x-ms-client-request-id": [ "019b76d4-55b5-43a7-acec-7999373f6537_RP" ], + "x-ms-messaging-activity-id": [ "731a9baa-2816-431b-9efa-f9306ccc83d1" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G14|2024-04-29T13:09:58" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "22cfba9c-468e-4581-8748-7c1d3e07899b" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T130958Z:22cfba9c-468e-4581-8748-7c1d3e07899b" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 58CE96E05F6E4C71AE84C3C3E0011888 Ref B: SEL221051504011 Ref C: 2023-09-18T08:36:42Z" ], - "Date": [ "Mon, 18 Sep 2023 08:36:44 GMT" ] + "X-MSEdge-Ref": [ "Ref A: AD2B441940BA4EA7A9D460EB7621398E Ref B: SEL221051504047 Ref C: 2024-04-29T13:09:56Z" ], + "Date": [ "Mon, 29 Apr 2024 13:09:57 GMT" ] }, "ContentHeaders": { "Content-Length": [ "699" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956\",\"name\":\"cfdfc4e7-f5a8-465f-82a7-c4a77d84a956\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.Network/privateEndpoints/privateEndpoint-352l4o\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8\",\"name\":\"f6111dc9-7599-48ca-a495-78dc8d8f2aa8\",\"type\":\"Microsoft.EventHub/Namespaces/PrivateEndpointConnections\",\"location\":\"eastus\",\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Network/privateEndpoints/privateEndpoint-2upkxh\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"Bye\"},\"groupIds\":[\"namespace\"]}}", "isContentBase64": false } }, - "Remove-AzEventHubPrivateEndpointConnection+[NoContext]+DeleteViaIdentity+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956?api-version=2023-01-01-preview+2": { + "Remove-AzEventHubPrivateEndpointConnection+[NoContext]+DeleteViaIdentity+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8?api-version=2023-01-01-preview+2": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "245" ], - "x-ms-client-request-id": [ "a74c5d61-4b87-4069-bb48-6ed92baa2fd5" ], + "x-ms-unique-id": [ "197" ], + "x-ms-client-request-id": [ "1c0adc7a-ceb0-4fbf-839c-389e9c4291f8" ], "CommandName": [ "Remove-AzEventHubPrivateEndpointConnection" ], "FullCommandName": [ "Remove-AzEventHubPrivateEndpointConnection_DeleteViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -232,16 +252,20 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Azure-AsyncOperation": [ "https://management.azure.com:443/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956/operationStatus/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956?api-version=2023-01-01-preview\u0026operationType=Delete" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], - "x-ms-request-id": [ "d03e3427-5df4-4dbc-8046-0895b549414a" ], - "x-ms-correlation-request-id": [ "d03e3427-5df4-4dbc-8046-0895b549414a" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083646Z:d03e3427-5df4-4dbc-8046-0895b549414a" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8/operationStatus/f6111dc9-7599-48ca-a495-78dc8d8f2aa8?api-version=2023-01-01-preview\u0026operationType=Delete\u0026t=638499930005203244\u0026c=MIIHHjCCBgagAwIBAgITfwKV0ZLKqqC5pXYmSwAEApXRkjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjQwMTMwMDQwMDIzWhcNMjUwMTI0MDQwMDIzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL3r9pIz9EqGL7hkIGyCWYf-iGEEIZub-l1wXGgy_4eykuU0789Lfwih45HdE8dSajY8HHOeTJgXtFKRctvEVoY6uS6XqsmYxRdLcsZCY1jmZssBkruWUaRzazDiW010ropZCynXrFQYtvnimKo7qPCDFQ1SjgldweN0esMkyihnPCi0OqGX1c37m1x9xoH51Wr7fCggiJ0RAwSYC1EI610GaFqK0qPfwFSgtFZ1ys38massMV4shrxjx6v4NNUzSpZXoxgl9R3Q-HHYdui5OlstHf0KFLUGmuwTmxaBTIHI75rmkT0po-txoueIZrjj_0w0WcXRaWC_cFf_p5h1T-0CAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTqKaaymikwcTAnKysLzVZjWspAITAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFgd7P819ocZaPnV6LdPqjb2Rdwy1EuWTLLBF1lXOhiBo3d9NAUc-EwGZXFrLdmj7Vsgyk_n9WVTy2CmGaC7pgZUakNc6E4dLaqY72qqyLEXGSYLc9wcmSL28IB8XdmMfaE-GZEf78Pp8g8npE1OZ8AoPWuTOsI3f5cqhSZ0iz4jvnHThUxHBlT8sBlBMN98YhioCq4BRbv9njVHM-udQ71Lq_kKK0yNzphuX3avpuClvsyu8w2bd9a7BqsjiezBU3ij8cRj-FkaTc2DwPV3pXChlf5pNxSGZnvSEXKrYkvEJpwmkkpr1vWR8hXtCnXTfYpIRkWgKeE9mzgic5wFKng\u0026s=Ex3b_1GbQSCi-SMOyahxquoIEOURM6UgKoPUJFZq2sY5AHpG9qW2lWQotlmgSop-IzohzGWlbgubvniNp2rvuYsohOsMiCmcmk5YvKNlWvo-SXt5L5WX46-LjPxi-FBLMgNrB_e1eE2MlnFaPzyfcsPjVBbjjonOJt6g9SJln1t0AdCCEBiIHOE9Bg1OATIsfXtM9uXIV9zjI_SdtwPHvVhAfpPe_n88R3ZlStqDLgSeGR6XW1h2rk6T7aGEj52LldVsWIVpEGMsrE4ECCLPdLCw3px8DRHmVi4ezPAFjEEKfUbqz-UW3-oDx-9BGPE14KDiHv85WyX1nE-QO_CPoA\u0026h=WrqYZ-3yJcj3EtB5mqlY4ua8gKycszNe_VcGwZyGWkQ" ], + "x-ms-correlation-request-id": [ "00000001-0000-0000-0002-000000005436" ], + "x-ms-client-request-id": [ "00000001-0000-0000-0002-000000005436" ], + "x-ms-messaging-activity-id": [ "00000001-0000-0000-0002-000000005436" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G2|2024-04-29T13:10:00" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], + "x-ms-request-id": [ "d31dc363-654a-4ce8-a490-8e74a7c35256" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T131000Z:d31dc363-654a-4ce8-a490-8e74a7c35256" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: D4899D68C8B248FD950648A60E5B7A46 Ref B: SEL221051504011 Ref C: 2023-09-18T08:36:44Z" ], - "Date": [ "Mon, 18 Sep 2023 08:36:46 GMT" ] + "X-MSEdge-Ref": [ "Ref A: BEEA1C20DC9D4668BB5600D2967FCD6A Ref B: SEL221051504047 Ref C: 2024-04-29T13:09:58Z" ], + "Date": [ "Mon, 29 Apr 2024 13:09:59 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -251,20 +275,20 @@ "isContentBase64": false } }, - "Remove-AzEventHubPrivateEndpointConnection+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956/operationStatus/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956?api-version=2023-01-01-preview\u0026operationType=Delete+3": { + "Remove-AzEventHubPrivateEndpointConnection+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8/operationStatus/f6111dc9-7599-48ca-a495-78dc8d8f2aa8?api-version=2023-01-01-preview\u0026operationType=Delete\u0026t=638499930005203244\u0026c=MIIHHjCCBgagAwIBAgITfwKV0ZLKqqC5pXYmSwAEApXRkjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjQwMTMwMDQwMDIzWhcNMjUwMTI0MDQwMDIzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL3r9pIz9EqGL7hkIGyCWYf-iGEEIZub-l1wXGgy_4eykuU0789Lfwih45HdE8dSajY8HHOeTJgXtFKRctvEVoY6uS6XqsmYxRdLcsZCY1jmZssBkruWUaRzazDiW010ropZCynXrFQYtvnimKo7qPCDFQ1SjgldweN0esMkyihnPCi0OqGX1c37m1x9xoH51Wr7fCggiJ0RAwSYC1EI610GaFqK0qPfwFSgtFZ1ys38massMV4shrxjx6v4NNUzSpZXoxgl9R3Q-HHYdui5OlstHf0KFLUGmuwTmxaBTIHI75rmkT0po-txoueIZrjj_0w0WcXRaWC_cFf_p5h1T-0CAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTqKaaymikwcTAnKysLzVZjWspAITAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFgd7P819ocZaPnV6LdPqjb2Rdwy1EuWTLLBF1lXOhiBo3d9NAUc-EwGZXFrLdmj7Vsgyk_n9WVTy2CmGaC7pgZUakNc6E4dLaqY72qqyLEXGSYLc9wcmSL28IB8XdmMfaE-GZEf78Pp8g8npE1OZ8AoPWuTOsI3f5cqhSZ0iz4jvnHThUxHBlT8sBlBMN98YhioCq4BRbv9njVHM-udQ71Lq_kKK0yNzphuX3avpuClvsyu8w2bd9a7BqsjiezBU3ij8cRj-FkaTc2DwPV3pXChlf5pNxSGZnvSEXKrYkvEJpwmkkpr1vWR8hXtCnXTfYpIRkWgKeE9mzgic5wFKng\u0026s=Ex3b_1GbQSCi-SMOyahxquoIEOURM6UgKoPUJFZq2sY5AHpG9qW2lWQotlmgSop-IzohzGWlbgubvniNp2rvuYsohOsMiCmcmk5YvKNlWvo-SXt5L5WX46-LjPxi-FBLMgNrB_e1eE2MlnFaPzyfcsPjVBbjjonOJt6g9SJln1t0AdCCEBiIHOE9Bg1OATIsfXtM9uXIV9zjI_SdtwPHvVhAfpPe_n88R3ZlStqDLgSeGR6XW1h2rk6T7aGEj52LldVsWIVpEGMsrE4ECCLPdLCw3px8DRHmVi4ezPAFjEEKfUbqz-UW3-oDx-9BGPE14KDiHv85WyX1nE-QO_CPoA\u0026h=WrqYZ-3yJcj3EtB5mqlY4ua8gKycszNe_VcGwZyGWkQ+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956/operationStatus/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956?api-version=2023-01-01-preview\u0026operationType=Delete", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8/operationStatus/f6111dc9-7599-48ca-a495-78dc8d8f2aa8?api-version=2023-01-01-preview\u0026operationType=Delete\u0026t=638499930005203244\u0026c=MIIHHjCCBgagAwIBAgITfwKV0ZLKqqC5pXYmSwAEApXRkjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjQwMTMwMDQwMDIzWhcNMjUwMTI0MDQwMDIzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL3r9pIz9EqGL7hkIGyCWYf-iGEEIZub-l1wXGgy_4eykuU0789Lfwih45HdE8dSajY8HHOeTJgXtFKRctvEVoY6uS6XqsmYxRdLcsZCY1jmZssBkruWUaRzazDiW010ropZCynXrFQYtvnimKo7qPCDFQ1SjgldweN0esMkyihnPCi0OqGX1c37m1x9xoH51Wr7fCggiJ0RAwSYC1EI610GaFqK0qPfwFSgtFZ1ys38massMV4shrxjx6v4NNUzSpZXoxgl9R3Q-HHYdui5OlstHf0KFLUGmuwTmxaBTIHI75rmkT0po-txoueIZrjj_0w0WcXRaWC_cFf_p5h1T-0CAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBTqKaaymikwcTAnKysLzVZjWspAITAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFgd7P819ocZaPnV6LdPqjb2Rdwy1EuWTLLBF1lXOhiBo3d9NAUc-EwGZXFrLdmj7Vsgyk_n9WVTy2CmGaC7pgZUakNc6E4dLaqY72qqyLEXGSYLc9wcmSL28IB8XdmMfaE-GZEf78Pp8g8npE1OZ8AoPWuTOsI3f5cqhSZ0iz4jvnHThUxHBlT8sBlBMN98YhioCq4BRbv9njVHM-udQ71Lq_kKK0yNzphuX3avpuClvsyu8w2bd9a7BqsjiezBU3ij8cRj-FkaTc2DwPV3pXChlf5pNxSGZnvSEXKrYkvEJpwmkkpr1vWR8hXtCnXTfYpIRkWgKeE9mzgic5wFKng\u0026s=Ex3b_1GbQSCi-SMOyahxquoIEOURM6UgKoPUJFZq2sY5AHpG9qW2lWQotlmgSop-IzohzGWlbgubvniNp2rvuYsohOsMiCmcmk5YvKNlWvo-SXt5L5WX46-LjPxi-FBLMgNrB_e1eE2MlnFaPzyfcsPjVBbjjonOJt6g9SJln1t0AdCCEBiIHOE9Bg1OATIsfXtM9uXIV9zjI_SdtwPHvVhAfpPe_n88R3ZlStqDLgSeGR6XW1h2rk6T7aGEj52LldVsWIVpEGMsrE4ECCLPdLCw3px8DRHmVi4ezPAFjEEKfUbqz-UW3-oDx-9BGPE14KDiHv85WyX1nE-QO_CPoA\u0026h=WrqYZ-3yJcj3EtB5mqlY4ua8gKycszNe_VcGwZyGWkQ", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "246" ], - "x-ms-client-request-id": [ "a74c5d61-4b87-4069-bb48-6ed92baa2fd5" ], + "x-ms-unique-id": [ "198" ], + "x-ms-client-request-id": [ "1c0adc7a-ceb0-4fbf-839c-389e9c4291f8" ], "CommandName": [ "Remove-AzEventHubPrivateEndpointConnection" ], "FullCommandName": [ "Remove-AzEventHubPrivateEndpointConnection_DeleteViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ] }, "ContentHeaders": { } @@ -274,38 +298,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-request-id": [ "2b2a840c-1931-41c8-b471-9021aef3b31d" ], - "x-ms-correlation-request-id": [ "2b2a840c-1931-41c8-b471-9021aef3b31d" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083718Z:2b2a840c-1931-41c8-b471-9021aef3b31d" ], + "x-ms-correlation-request-id": [ "cf870e3f-c31e-414f-9ff6-b8041356c8f9" ], + "x-ms-client-request-id": [ "1c0adc7a-ceb0-4fbf-839c-389e9c4291f8_RP" ], + "x-ms-messaging-activity-id": [ "d76890e3-6033-4238-9d8b-20317a5b1244" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G12|2024-04-29T13:10:32" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "cf870e3f-c31e-414f-9ff6-b8041356c8f9" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T131032Z:cf870e3f-c31e-414f-9ff6-b8041356c8f9" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 9EACF534FA37463E848351078863FEAC Ref B: SEL221051504011 Ref C: 2023-09-18T08:37:16Z" ], - "Date": [ "Mon, 18 Sep 2023 08:37:17 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 842632254A964203A1680BDB5AC855A0 Ref B: SEL221051504047 Ref C: 2024-04-29T13:10:30Z" ], + "Date": [ "Mon, 29 Apr 2024 13:10:31 GMT" ] }, "ContentHeaders": { "Content-Length": [ "400" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956/operationStatus/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956/operationStatus/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956\",\"name\":\"cfdfc4e7-f5a8-465f-82a7-c4a77d84a956\",\"status\":\"Succeeded\"}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8/operationStatus/f6111dc9-7599-48ca-a495-78dc8d8f2aa8/operationStatus/f6111dc9-7599-48ca-a495-78dc8d8f2aa8\",\"name\":\"f6111dc9-7599-48ca-a495-78dc8d8f2aa8\",\"status\":\"Succeeded\"}", "isContentBase64": false } }, - "Remove-AzEventHubPrivateEndpointConnection+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956?api-version=2023-01-01-preview+4": { + "Remove-AzEventHubPrivateEndpointConnection+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8?api-version=2023-01-01-preview+4": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/privateEndpointConnections/cfdfc4e7-f5a8-465f-82a7-c4a77d84a956?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/privateEndpointConnections/f6111dc9-7599-48ca-a495-78dc8d8f2aa8?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "247" ], - "x-ms-client-request-id": [ "a371bfed-aa2f-423c-a4ec-fc485117ec13" ], + "x-ms-unique-id": [ "199" ], + "x-ms-client-request-id": [ "2df09c03-e561-4bdf-98b9-ebdbdbb7155a" ], "CommandName": [ "Get-AzEventHubPrivateEndpointConnection" ], "FullCommandName": [ "Get-AzEventHubPrivateEndpointConnection_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -316,15 +344,19 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11990" ], - "x-ms-request-id": [ "1256c2bf-d26a-4bd8-b14f-80cc602a521a" ], - "x-ms-correlation-request-id": [ "1256c2bf-d26a-4bd8-b14f-80cc602a521a" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083720Z:1256c2bf-d26a-4bd8-b14f-80cc602a521a" ], + "x-ms-correlation-request-id": [ "7acfe13b-5b1c-4785-971a-1ba19c1d6695" ], + "x-ms-client-request-id": [ "2df09c03-e561-4bdf-98b9-ebdbdbb7155a_RP" ], + "x-ms-messaging-activity-id": [ "bb8a4782-37d2-4394-89ce-8d0aa869a62e" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G14|2024-04-29T13:10:34" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "7acfe13b-5b1c-4785-971a-1ba19c1d6695" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T131034Z:7acfe13b-5b1c-4785-971a-1ba19c1d6695" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: B8467B6EF121405AADF2406EF6EDB306 Ref B: SEL221051504011 Ref C: 2023-09-18T08:37:18Z" ], - "Date": [ "Mon, 18 Sep 2023 08:37:19 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 494F542252A241CAA057FAE06472417F Ref B: SEL221051504047 Ref C: 2024-04-29T13:10:32Z" ], + "Date": [ "Mon, 29 Apr 2024 13:10:33 GMT" ] }, "ContentHeaders": { "Content-Length": [ "105" ], diff --git a/src/EventHub/EventHub.Autorest/test/Remove-AzEventHubPrivateEndpointConnection.Tests.ps1 b/src/EventHub/EventHub.Autorest/test/Remove-AzEventHubPrivateEndpointConnection.Tests.ps1 index 2fbb3441361d..4fc3f9c0e356 100644 --- a/src/EventHub/EventHub.Autorest/test/Remove-AzEventHubPrivateEndpointConnection.Tests.ps1 +++ b/src/EventHub/EventHub.Autorest/test/Remove-AzEventHubPrivateEndpointConnection.Tests.ps1 @@ -18,12 +18,12 @@ Describe 'Remove-AzEventHubPrivateEndpointConnection' { $listOfPrivateEndpoints = Get-AzEventHubPrivateEndpointConnection -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace It 'Delete' { Remove-AzEventHubPrivateEndpointConnection -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -Name $listOfPrivateEndpoints[0].Name - { Get-AzEventHubPrivateEndpointConnection -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -Name $listOfPrivateEndpoints[0].Name } | Should -Throw + { Get-AzEventHubPrivateEndpointConnection -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -Name $listOfPrivateEndpoints[0].Name -ErrorAction Stop } | Should -Throw } It 'DeleteViaIdentity' { $privateEndpoint = Get-AzEventHubPrivateEndpointConnection -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -Name $listOfPrivateEndpoints[1].Name Remove-AzEventHubPrivateEndpointConnection -InputObject $privateEndpoint - { Get-AzEventHubPrivateEndpointConnection -InputObject $privateEndpoint } | Should -Throw + { Get-AzEventHubPrivateEndpointConnection -InputObject $privateEndpoint -ErrorAction Stop } | Should -Throw } } diff --git a/src/EventHub/EventHub.Autorest/test/Remove-AzEventHubSchemaGroup.Recording.json b/src/EventHub/EventHub.Autorest/test/Remove-AzEventHubSchemaGroup.Recording.json index cfd12d8eb1f2..f81e40f24397 100644 --- a/src/EventHub/EventHub.Autorest/test/Remove-AzEventHubSchemaGroup.Recording.json +++ b/src/EventHub/EventHub.Autorest/test/Remove-AzEventHubSchemaGroup.Recording.json @@ -1,58 +1,62 @@ { - "Remove-AzEventHubSchemaGroup+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/schemagroups/schemaGroupl6t5kq?api-version=2023-01-01-preview+1": { + "Remove-AzEventHubSchemaGroup+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/schemagroups/schemaGroup0owimy?api-version=2023-01-01-preview+1": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/schemagroups/schemaGroupl6t5kq?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/schemagroups/schemaGroup0owimy?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "248" ], - "x-ms-client-request-id": [ "fbcfa5a2-af30-4904-9848-ef5ad903727b" ], + "x-ms-unique-id": [ "200" ], + "x-ms-client-request-id": [ "c359347c-223c-45db-ab7e-a000c3ba9292" ], "CommandName": [ "Remove-AzEventHubSchemaGroup" ], "FullCommandName": [ "Remove-AzEventHubSchemaGroup_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { } }, "Response": { - "StatusCode": 204, + "StatusCode": 200, "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "2e4b2cf0-13bb-4a2c-a66c-103c3f6c1080_M2SN1_M2SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], - "x-ms-correlation-request-id": [ "9cb2a019-64b4-481e-aadd-22769bc92d61" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083734Z:9cb2a019-64b4-481e-aadd-22769bc92d61" ], + "x-ms-correlation-request-id": [ "00000001-0000-0000-0002-000000005484" ], + "x-ms-client-request-id": [ "00000001-0000-0000-0002-000000005484" ], + "x-ms-messaging-activity-id": [ "00000001-0000-0000-0002-000000005484" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-29T13:10:50" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], + "x-ms-request-id": [ "fc8efbbf-4e16-4900-b013-9876a0800655" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T131050Z:fc8efbbf-4e16-4900-b013-9876a0800655" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: A0F49273613549B9976890C92733460C Ref B: SEL221051504011 Ref C: 2023-09-18T08:37:32Z" ], - "Date": [ "Mon, 18 Sep 2023 08:37:33 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 0D2590E5724C4165973957448501DC5E Ref B: SEL221051504047 Ref C: 2024-04-29T13:10:48Z" ], + "Date": [ "Mon, 29 Apr 2024 13:10:49 GMT" ] }, "ContentHeaders": { - "Expires": [ "-1" ] + "Expires": [ "-1" ], + "Content-Length": [ "0" ] }, "Content": null, "isContentBase64": false } }, - "Remove-AzEventHubSchemaGroup+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/schemagroups/schemaGroupl6t5kq?api-version=2023-01-01-preview+2": { + "Remove-AzEventHubSchemaGroup+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/schemagroups/schemaGroup0owimy?api-version=2023-01-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/schemagroups/schemaGroupl6t5kq?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/schemagroups/schemaGroup0owimy?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "249" ], - "x-ms-client-request-id": [ "b767624a-ca4c-42d5-b748-834dba2f25f5" ], + "x-ms-unique-id": [ "201" ], + "x-ms-client-request-id": [ "4e433522-fd9f-46f1-a39e-711058e3e5a5" ], "CommandName": [ "Get-AzEventHubSchemaGroup" ], "FullCommandName": [ "Get-AzEventHubSchemaGroup_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -63,39 +67,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "2d6be225-111a-44ae-a6a0-7985840d67b1_M3SN1_M3SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], - "x-ms-correlation-request-id": [ "76c307c4-bda9-4dc8-a2c6-39889854468d" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083736Z:76c307c4-bda9-4dc8-a2c6-39889854468d" ], + "x-ms-correlation-request-id": [ "204603e8-e258-4e71-9c60-820aaa985cc0" ], + "x-ms-client-request-id": [ "4e433522-fd9f-46f1-a39e-711058e3e5a5_RP" ], + "x-ms-messaging-activity-id": [ "edca6ebb-5bff-481d-b2a5-274e1322c6e0" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G2|2024-04-29T13:10:52" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "204603e8-e258-4e71-9c60-820aaa985cc0" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T131052Z:204603e8-e258-4e71-9c60-820aaa985cc0" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: C9466E6FDF9441B9907CBADD717042B1 Ref B: SEL221051504011 Ref C: 2023-09-18T08:37:34Z" ], - "Date": [ "Mon, 18 Sep 2023 08:37:35 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 864272DA31564697B800190719FDDEFB Ref B: SEL221051504047 Ref C: 2024-04-29T13:10:50Z" ], + "Date": [ "Mon, 29 Apr 2024 13:10:51 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "318" ], - "Content-Type": [ "application/json; charset=utf-8" ], + "Content-Length": [ "75" ], + "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"error\":{\"message\":\"Schema schemaGroupl6t5kq does not exist. TrackingId:2d6be225-111a-44ae-a6a0-7985840d67b1_M3SN1_M3SN1_G9, SystemTracker:namespacenamed5orf8.servicebus.windows.net:$schemagroups/schemaGroupl6t5kq, Timestamp:2023-09-18T08:37:35 CorrelationId: 76c307c4-bda9-4dc8-a2c6-39889854468d\",\"code\":\"NotFound\"}}", + "Content": "{\"error\":{\"code\":\"EntityNotFound\",\"message\":\"Schema Group does not exist\"}}", "isContentBase64": false } }, - "Remove-AzEventHubSchemaGroup+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/schemagroups/schemaGroupzws62u?api-version=2023-01-01-preview+1": { + "Remove-AzEventHubSchemaGroup+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/schemagroups/schemaGroupgbf8s5?api-version=2023-01-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/schemagroups/schemaGroupzws62u?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/schemagroups/schemaGroupgbf8s5?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "250" ], - "x-ms-client-request-id": [ "cc57ba91-eb83-48c7-b446-40c662a7832b" ], + "x-ms-unique-id": [ "202" ], + "x-ms-client-request-id": [ "abd1e7dd-4f64-43f4-95fd-02fa72b4f87f" ], "CommandName": [ "Get-AzEventHubSchemaGroup" ], "FullCommandName": [ "Get-AzEventHubSchemaGroup_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -106,80 +113,87 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "da92a692-59aa-4160-bc72-ea4a6fa4c51a_M9SN1_M9SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-correlation-request-id": [ "aea5d9c6-b7b2-440e-ae48-3cf867171fb4" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083737Z:aea5d9c6-b7b2-440e-ae48-3cf867171fb4" ], + "x-ms-correlation-request-id": [ "bc13667a-cfe3-43c7-a078-f3a21ae87d45" ], + "x-ms-client-request-id": [ "abd1e7dd-4f64-43f4-95fd-02fa72b4f87f_RP" ], + "x-ms-messaging-activity-id": [ "cb052ab3-b484-443b-b05a-2d0bbea41a1a" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G10|2024-04-29T13:10:54" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "bc13667a-cfe3-43c7-a078-f3a21ae87d45" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T131054Z:bc13667a-cfe3-43c7-a078-f3a21ae87d45" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: FAE174F0F1C44AB9AB8186EC24EA6FB0 Ref B: SEL221051504011 Ref C: 2023-09-18T08:37:36Z" ], - "Date": [ "Mon, 18 Sep 2023 08:37:36 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 1BDFE3F8D94542309F36E9034C53E2F9 Ref B: SEL221051504047 Ref C: 2024-04-29T13:10:52Z" ], + "Date": [ "Mon, 29 Apr 2024 13:10:53 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "521" ], + "Content-Length": [ "520" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/schemagroups/schemaGroupzws62u\",\"name\":\"schemaGroupzws62u\",\"type\":\"Microsoft.EventHub/Namespaces/SchemaGroups\",\"location\":\"East US\",\"properties\":{\"updatedAtUtc\":\"2023-09-18T08:29:00.9852689Z\",\"createdAtUtc\":\"2023-09-18T08:29:00.9852689Z\",\"eTag\":\"8b5bf17c-4acf-4124-bf59-a469da2db0dd\",\"groupProperties\":{},\"schemaCompatibility\":\"Backward\",\"schemaType\":\"Avro\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/schemaGroups/schemaGroupgbf8s5\",\"name\":\"schemaGroupgbf8s5\",\"type\":\"Microsoft.EventHub/namespaces/schemagroups\",\"location\":\"eastus\",\"properties\":{\"updatedAtUtc\":\"2024-04-29T13:01:53.3455216Z\",\"createdAtUtc\":\"2024-04-29T13:01:53.3455216Z\",\"eTag\":\"89ba5a5a-18be-430f-be93-69a3a722cb44\",\"groupProperties\":{},\"schemaCompatibility\":\"Backward\",\"schemaType\":\"Avro\"}}", "isContentBase64": false } }, - "Remove-AzEventHubSchemaGroup+[NoContext]+DeleteViaIdentity+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/schemagroups/schemaGroupzws62u?api-version=2023-01-01-preview+2": { + "Remove-AzEventHubSchemaGroup+[NoContext]+DeleteViaIdentity+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/schemagroups/schemaGroupgbf8s5?api-version=2023-01-01-preview+2": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/schemagroups/schemaGroupzws62u?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/schemagroups/schemaGroupgbf8s5?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "251" ], - "x-ms-client-request-id": [ "f0a40095-02db-4d25-b381-ef67c6e61e4f" ], + "x-ms-unique-id": [ "203" ], + "x-ms-client-request-id": [ "7ba1e180-ca29-4fa1-b2c6-fd1a18f8b614" ], "CommandName": [ "Remove-AzEventHubSchemaGroup" ], "FullCommandName": [ "Remove-AzEventHubSchemaGroup_DeleteViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { } }, "Response": { - "StatusCode": 204, + "StatusCode": 200, "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "c322f2a7-8b6d-410a-a15c-8acd25f47af6_M9CH3_M9CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], - "x-ms-correlation-request-id": [ "e836f453-b4d3-4d00-afbd-372d9b22c1fa" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083738Z:e836f453-b4d3-4d00-afbd-372d9b22c1fa" ], + "x-ms-correlation-request-id": [ "00000001-0000-0000-0002-000000005484" ], + "x-ms-client-request-id": [ "00000001-0000-0000-0002-000000005484" ], + "x-ms-messaging-activity-id": [ "00000001-0000-0000-0002-000000005484" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-29T13:10:55" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14998" ], + "x-ms-request-id": [ "10fe93a2-239c-47c8-b833-ffb6357333d5" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T131055Z:10fe93a2-239c-47c8-b833-ffb6357333d5" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: AB772C395BBF433988A5D12E6D984D24 Ref B: SEL221051504011 Ref C: 2023-09-18T08:37:37Z" ], - "Date": [ "Mon, 18 Sep 2023 08:37:37 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 0D95522EAEBB47648AD3AE9FFCA108B2 Ref B: SEL221051504047 Ref C: 2024-04-29T13:10:54Z" ], + "Date": [ "Mon, 29 Apr 2024 13:10:54 GMT" ] }, "ContentHeaders": { - "Expires": [ "-1" ] + "Expires": [ "-1" ], + "Content-Length": [ "0" ] }, "Content": null, "isContentBase64": false } }, - "Remove-AzEventHubSchemaGroup+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/schemagroups/schemaGroupzws62u?api-version=2023-01-01-preview+3": { + "Remove-AzEventHubSchemaGroup+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/schemagroups/schemaGroupgbf8s5?api-version=2023-01-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/schemagroups/schemaGroupzws62u?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/schemagroups/schemaGroupgbf8s5?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "252" ], - "x-ms-client-request-id": [ "e712da34-1bcf-4032-aa19-82908ae87b88" ], + "x-ms-unique-id": [ "204" ], + "x-ms-client-request-id": [ "dfc9d1f2-f060-4b16-97cc-2eb07d20c344" ], "CommandName": [ "Get-AzEventHubSchemaGroup" ], "FullCommandName": [ "Get-AzEventHubSchemaGroup_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -190,23 +204,26 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "2feeacff-79d8-4dfb-b7f5-d8a505be4c3d_M1DM2_M1DM2" ], - "Server-SB": [ "Service-Bus-Resource-Provider/DM2" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11989" ], - "x-ms-correlation-request-id": [ "5a2a892c-79ff-403c-916a-e480f4c8ae12" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083739Z:5a2a892c-79ff-403c-916a-e480f4c8ae12" ], + "x-ms-correlation-request-id": [ "fc0b6da8-3c2b-4d0a-a1ca-5c62cf480af6" ], + "x-ms-client-request-id": [ "dfc9d1f2-f060-4b16-97cc-2eb07d20c344_RP" ], + "x-ms-messaging-activity-id": [ "a219ea99-99f9-4378-afbd-10230b9d6f0f" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G4|2024-04-29T13:10:57" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "fc0b6da8-3c2b-4d0a-a1ca-5c62cf480af6" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T131057Z:fc0b6da8-3c2b-4d0a-a1ca-5c62cf480af6" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 8E1EAD5A898F4E6996D428AADABE74D3 Ref B: SEL221051504011 Ref C: 2023-09-18T08:37:38Z" ], - "Date": [ "Mon, 18 Sep 2023 08:37:38 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 49B70613A84740F79F92DE0EDC3C77EF Ref B: SEL221051504047 Ref C: 2024-04-29T13:10:55Z" ], + "Date": [ "Mon, 29 Apr 2024 13:10:56 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "319" ], - "Content-Type": [ "application/json; charset=utf-8" ], + "Content-Length": [ "75" ], + "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"error\":{\"message\":\"Schema schemaGroupzws62u does not exist. TrackingId:2feeacff-79d8-4dfb-b7f5-d8a505be4c3d_M1DM2_M1DM2_G11, SystemTracker:namespacenamed5orf8.servicebus.windows.net:$schemagroups/schemaGroupzws62u, Timestamp:2023-09-18T08:37:39 CorrelationId: 5a2a892c-79ff-403c-916a-e480f4c8ae12\",\"code\":\"NotFound\"}}", + "Content": "{\"error\":{\"code\":\"EntityNotFound\",\"message\":\"Schema Group does not exist\"}}", "isContentBase64": false } } diff --git a/src/EventHub/EventHub.Autorest/test/Remove-AzEventHubSchemaGroup.Tests.ps1 b/src/EventHub/EventHub.Autorest/test/Remove-AzEventHubSchemaGroup.Tests.ps1 index f4fb69db923c..783f384e5af1 100644 --- a/src/EventHub/EventHub.Autorest/test/Remove-AzEventHubSchemaGroup.Tests.ps1 +++ b/src/EventHub/EventHub.Autorest/test/Remove-AzEventHubSchemaGroup.Tests.ps1 @@ -17,12 +17,12 @@ if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzEventHubSchemaGroup' Describe 'Remove-AzEventHubSchemaGroup' { It 'Delete' { Remove-AzEventHubSchemaGroup -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -Name $env.schemaGroup2 - { Get-AzEventHubSchemaGroup -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -Name $env.schemaGroup2 } | Should -Throw + { Get-AzEventHubSchemaGroup -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -Name $env.schemaGroup2 -ErrorAction Stop } | Should -Throw } It 'DeleteViaIdentity' { $schemaGroup = Get-AzEventHubSchemaGroup -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -Name $env.schemaGroup3 Remove-AzEventHubSchemaGroup -InputObject $schemaGroup - { Get-AzEventHubSchemaGroup -InputObject $schemaGroup } | Should -Throw + { Get-AzEventHubSchemaGroup -InputObject $schemaGroup -ErrorAction Stop } | Should -Throw } } diff --git a/src/EventHub/EventHub.Autorest/test/Set-AzEventHub.Recording.json b/src/EventHub/EventHub.Autorest/test/Set-AzEventHub.Recording.json index 56e9e773dbb6..d3e753a35127 100644 --- a/src/EventHub/EventHub.Autorest/test/Set-AzEventHub.Recording.json +++ b/src/EventHub/EventHub.Autorest/test/Set-AzEventHub.Recording.json @@ -1,17 +1,17 @@ { - "Set-AzEventHub+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHublnw123?api-version=2023-01-01-preview+1": { + "Set-AzEventHub+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHubex7bys?api-version=2023-01-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHublnw123?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHubex7bys?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "253" ], - "x-ms-client-request-id": [ "1006ae46-f891-4866-bea4-dde96491e3be" ], + "x-ms-unique-id": [ "205" ], + "x-ms-client-request-id": [ "7e10bc16-26b4-474e-9771-48b38ab6c506" ], "CommandName": [ "Get-AzEventHub" ], "FullCommandName": [ "Get-AzEventHub_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,36 +22,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11988" ], - "x-ms-request-id": [ "ad4bf8e9-31f8-4356-835d-279ab5426c0a" ], - "x-ms-correlation-request-id": [ "ad4bf8e9-31f8-4356-835d-279ab5426c0a" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083750Z:ad4bf8e9-31f8-4356-835d-279ab5426c0a" ], + "x-ms-correlation-request-id": [ "12d54298-200c-4fcb-a0ec-cbdf21c9efdf" ], + "x-ms-client-request-id": [ "7e10bc16-26b4-474e-9771-48b38ab6c506_RP" ], + "x-ms-messaging-activity-id": [ "09f63645-3311-4fe1-a26d-7961cd873f0f" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G3|2024-04-29T13:11:12" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "12d54298-200c-4fcb-a0ec-cbdf21c9efdf" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T131112Z:12d54298-200c-4fcb-a0ec-cbdf21c9efdf" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: EF32EEE742354CEC8FDC91664A7F1829 Ref B: SEL221051504011 Ref C: 2023-09-18T08:37:49Z" ], - "Date": [ "Mon, 18 Sep 2023 08:37:50 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 4D533465EA724E0EAB25A803B27E8D33 Ref B: SEL221051504047 Ref C: 2024-04-29T13:11:11Z" ], + "Date": [ "Mon, 29 Apr 2024 13:11:11 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "548" ], + "Content-Length": [ "550" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHublnw123\",\"name\":\"eventHublnw123\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs\",\"location\":\"eastus\",\"properties\":{\"retentionDescription\":{\"cleanupPolicy\":\"Delete\",\"retentionTimeInHours\":168},\"messageRetentionInDays\":7,\"partitionCount\":5,\"status\":\"Active\",\"createdAt\":\"2023-09-18T07:56:05.57\",\"updatedAt\":\"2023-09-18T07:56:07.33\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\",\"4\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHubex7bys\",\"name\":\"eventHubex7bys\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs\",\"location\":\"eastus\",\"properties\":{\"retentionDescription\":{\"cleanupPolicy\":\"Delete\",\"retentionTimeInHours\":168},\"messageRetentionInDays\":7,\"partitionCount\":5,\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:50:17.903\",\"updatedAt\":\"2024-04-29T12:50:19.147\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\",\"4\"]}}", "isContentBase64": false } }, - "Set-AzEventHub+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHublnw123?api-version=2023-01-01-preview+2": { + "Set-AzEventHub+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHubex7bys?api-version=2023-01-01-preview+2": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHublnw123?api-version=2023-01-01-preview", - "Content": "{\n \"properties\": {\n \"captureDescription\": {\n \"destination\": {\n \"properties\": {\n \"storageAccountResourceId\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.Storage/storageAccounts/testpsstoragaccount\",\n \"blobContainer\": \"container\",\n \"archiveNameFormat\": \"{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}\"\n },\n \"name\": \"EventHubArchive.AzureBlockBlob\"\n },\n \"enabled\": true,\n \"encoding\": \"Avro\",\n \"intervalInSeconds\": 600,\n \"sizeLimitInBytes\": 11000000,\n \"skipEmptyArchives\": true\n },\n \"retentionDescription\": {\n \"cleanupPolicy\": \"Delete\",\n \"retentionTimeInHours\": 168\n },\n \"messageRetentionInDays\": 7,\n \"partitionCount\": 5,\n \"status\": \"Active\"\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHubex7bys?api-version=2023-01-01-preview", + "Content": "{\n \"properties\": {\n \"captureDescription\": {\n \"destination\": {\n \"properties\": {\n \"storageAccountResourceId\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Storage/storageAccounts/ehpsvgt87wsa1\",\n \"blobContainer\": \"container\",\n \"archiveNameFormat\": \"{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}\"\n },\n \"name\": \"EventHubArchive.AzureBlockBlob\"\n },\n \"enabled\": true,\n \"encoding\": \"Avro\",\n \"intervalInSeconds\": 600,\n \"sizeLimitInBytes\": 11000000,\n \"skipEmptyArchives\": true\n },\n \"retentionDescription\": {\n \"cleanupPolicy\": \"Delete\",\n \"retentionTimeInHours\": 168\n },\n \"messageRetentionInDays\": 7,\n \"partitionCount\": 5,\n \"status\": \"Active\"\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "865" ] + "Content-Length": [ "860" ] } }, "Response": { @@ -59,38 +63,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], - "x-ms-request-id": [ "2a4a2aa8-d4e4-4aa8-ae3a-9dd2bb8282eb" ], - "x-ms-correlation-request-id": [ "2a4a2aa8-d4e4-4aa8-ae3a-9dd2bb8282eb" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083752Z:2a4a2aa8-d4e4-4aa8-ae3a-9dd2bb8282eb" ], + "x-ms-correlation-request-id": [ "920d8055-f6ba-4980-8cba-172fb4a20fb6" ], + "x-ms-client-request-id": [ "713eca4a-e1f1-4c0f-8870-b5e01c281d75_RP" ], + "x-ms-messaging-activity-id": [ "de994470-e147-47da-8425-2955079c653f" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-29T13:11:14" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "920d8055-f6ba-4980-8cba-172fb4a20fb6" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T131114Z:920d8055-f6ba-4980-8cba-172fb4a20fb6" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 3F1BAB594DF34A6197C52DC72E85AAAC Ref B: SEL221051504011 Ref C: 2023-09-18T08:37:50Z" ], - "Date": [ "Mon, 18 Sep 2023 08:37:52 GMT" ] + "X-MSEdge-Ref": [ "Ref A: B5A941C1A5D34817BD2AFB96D5E99DF3 Ref B: SEL221051504047 Ref C: 2024-04-29T13:11:12Z" ], + "Date": [ "Mon, 29 Apr 2024 13:11:14 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1047" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHublnw123\",\"name\":\"eventHublnw123\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs\",\"location\":\"eastus\",\"properties\":{\"retentionDescription\":{\"cleanupPolicy\":\"Delete\",\"retentionTimeInHours\":168},\"messageRetentionInDays\":7,\"partitionCount\":5,\"status\":\"Active\",\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"0001-01-01T00:00:00\",\"partitionIds\":[],\"captureDescription\":{\"enabled\":true,\"encoding\":\"Avro\",\"destination\":{\"name\":\"EventHubArchive.AzureBlockBlob\",\"properties\":{\"storageAccountResourceId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.Storage/storageAccounts/testpsstoragaccount\",\"blobContainer\":\"container\",\"archiveNameFormat\":\"{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}\"}},\"intervalInSeconds\":600,\"sizeLimitInBytes\":11000000,\"skipEmptyArchives\":true}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHubex7bys\",\"name\":\"eventHubex7bys\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs\",\"location\":\"eastus\",\"properties\":{\"retentionDescription\":{\"cleanupPolicy\":\"Delete\",\"retentionTimeInHours\":168},\"messageRetentionInDays\":7,\"partitionCount\":5,\"status\":\"Active\",\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"2024-04-29T13:11:14.693Z\",\"partitionIds\":[],\"captureDescription\":{\"enabled\":true,\"encoding\":\"Avro\",\"destination\":{\"name\":\"EventHubArchive.AzureBlockBlob\",\"properties\":{\"storageAccountResourceId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Storage/storageAccounts/ehpsvgt87wsa1\",\"blobContainer\":\"container\",\"archiveNameFormat\":\"{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}\"}},\"intervalInSeconds\":600,\"sizeLimitInBytes\":11000000,\"skipEmptyArchives\":true}}}", "isContentBase64": false } }, - "Set-AzEventHub+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHubhwo7mf?api-version=2023-01-01-preview+3": { + "Set-AzEventHub+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHubgaq2iy?api-version=2023-01-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHubhwo7mf?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHubgaq2iy?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "255" ], - "x-ms-client-request-id": [ "09452fcc-1b13-48bb-86a3-0708d97b9682" ], + "x-ms-unique-id": [ "207" ], + "x-ms-client-request-id": [ "41a24e7d-fc59-466e-aba0-55b8049c2afd" ], "CommandName": [ "Get-AzEventHub" ], "FullCommandName": [ "Get-AzEventHub_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -101,36 +109,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11987" ], - "x-ms-request-id": [ "db5118b5-df5c-48e0-8c93-d2b5777073fc" ], - "x-ms-correlation-request-id": [ "db5118b5-df5c-48e0-8c93-d2b5777073fc" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083753Z:db5118b5-df5c-48e0-8c93-d2b5777073fc" ], + "x-ms-correlation-request-id": [ "9823580d-8506-461f-88d6-8748082f7abe" ], + "x-ms-client-request-id": [ "41a24e7d-fc59-466e-aba0-55b8049c2afd_RP" ], + "x-ms-messaging-activity-id": [ "a56ccfe7-154a-4655-a649-bdc79987c5d8" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G3|2024-04-29T13:11:16" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "9823580d-8506-461f-88d6-8748082f7abe" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T131116Z:9823580d-8506-461f-88d6-8748082f7abe" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: E9AF0375D69140EBB24271A83ADFB37C Ref B: SEL221051504011 Ref C: 2023-09-18T08:37:53Z" ], - "Date": [ "Mon, 18 Sep 2023 08:37:53 GMT" ] + "X-MSEdge-Ref": [ "Ref A: E569B7789E8A42A0A9B22FCB59DCCCC3 Ref B: SEL221051504047 Ref C: 2024-04-29T13:11:15Z" ], + "Date": [ "Mon, 29 Apr 2024 13:11:15 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1070" ], + "Content-Length": [ "1065" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHubhwo7mf\",\"name\":\"eventHubhwo7mf\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs\",\"location\":\"eastus\",\"properties\":{\"retentionDescription\":{\"cleanupPolicy\":\"Delete\",\"retentionTimeInHours\":168},\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"2023-09-18T07:56:10.323\",\"updatedAt\":\"2023-09-18T07:56:11.327\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\"],\"captureDescription\":{\"enabled\":true,\"encoding\":\"Avro\",\"destination\":{\"name\":\"EventHubArchive.AzureBlockBlob\",\"properties\":{\"storageAccountResourceId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.Storage/storageAccounts/testpsstoragaccount\",\"blobContainer\":\"container\",\"archiveNameFormat\":\"{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}\"}},\"intervalInSeconds\":600,\"sizeLimitInBytes\":11000000,\"skipEmptyArchives\":true}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHubgaq2iy\",\"name\":\"eventHubgaq2iy\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs\",\"location\":\"eastus\",\"properties\":{\"retentionDescription\":{\"cleanupPolicy\":\"Delete\",\"retentionTimeInHours\":168},\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:50:21.917\",\"updatedAt\":\"2024-04-29T12:50:22.803\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\"],\"captureDescription\":{\"enabled\":true,\"encoding\":\"Avro\",\"destination\":{\"name\":\"EventHubArchive.AzureBlockBlob\",\"properties\":{\"storageAccountResourceId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Storage/storageAccounts/ehpsvgt87wsa1\",\"blobContainer\":\"container\",\"archiveNameFormat\":\"{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}\"}},\"intervalInSeconds\":600,\"sizeLimitInBytes\":11000000,\"skipEmptyArchives\":true}}}", "isContentBase64": false } }, - "Set-AzEventHub+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHubhwo7mf?api-version=2023-01-01-preview+4": { + "Set-AzEventHub+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHubgaq2iy?api-version=2023-01-01-preview+4": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHubhwo7mf?api-version=2023-01-01-preview", - "Content": "{\n \"properties\": {\n \"captureDescription\": {\n \"destination\": {\n \"properties\": {\n \"storageAccountResourceId\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.Storage/storageAccounts/testpsstoragaccount\",\n \"blobContainer\": \"container\",\n \"archiveNameFormat\": \"{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}\"\n },\n \"name\": \"EventHubArchive.AzureBlockBlob\"\n },\n \"enabled\": true,\n \"encoding\": \"Avro\",\n \"intervalInSeconds\": 600,\n \"sizeLimitInBytes\": 11000000,\n \"skipEmptyArchives\": true\n },\n \"retentionDescription\": {\n \"cleanupPolicy\": \"Delete\",\n \"retentionTimeInHours\": 90\n },\n \"messageRetentionInDays\": 7,\n \"partitionCount\": 4,\n \"status\": \"Active\"\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHubgaq2iy?api-version=2023-01-01-preview", + "Content": "{\n \"properties\": {\n \"captureDescription\": {\n \"destination\": {\n \"properties\": {\n \"storageAccountResourceId\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Storage/storageAccounts/ehpsvgt87wsa1\",\n \"blobContainer\": \"container\",\n \"archiveNameFormat\": \"{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}\"\n },\n \"name\": \"EventHubArchive.AzureBlockBlob\"\n },\n \"enabled\": true,\n \"encoding\": \"Avro\",\n \"intervalInSeconds\": 600,\n \"sizeLimitInBytes\": 11000000,\n \"skipEmptyArchives\": true\n },\n \"retentionDescription\": {\n \"cleanupPolicy\": \"Delete\",\n \"retentionTimeInHours\": 90\n },\n \"messageRetentionInDays\": 7,\n \"partitionCount\": 4,\n \"status\": \"Active\"\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "864" ] + "Content-Length": [ "859" ] } }, "Response": { @@ -138,29 +150,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], - "x-ms-request-id": [ "42c78635-33f7-40e6-a0a4-ea895d85e400" ], - "x-ms-correlation-request-id": [ "42c78635-33f7-40e6-a0a4-ea895d85e400" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083754Z:42c78635-33f7-40e6-a0a4-ea895d85e400" ], + "x-ms-correlation-request-id": [ "45ea144d-2b02-49ab-8e9e-a9840e982850" ], + "x-ms-client-request-id": [ "f3021130-ef79-43e0-a46e-e5c25dd59966_RP" ], + "x-ms-messaging-activity-id": [ "2b4e14e3-8add-48b0-86f4-63ffc61690d9" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G6|2024-04-29T13:11:18" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-request-id": [ "45ea144d-2b02-49ab-8e9e-a9840e982850" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T131118Z:45ea144d-2b02-49ab-8e9e-a9840e982850" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: ABCF9C0940E64F549CED4088A057CCA7 Ref B: SEL221051504011 Ref C: 2023-09-18T08:37:53Z" ], - "Date": [ "Mon, 18 Sep 2023 08:37:54 GMT" ] + "X-MSEdge-Ref": [ "Ref A: C93F5903E45A4DA58B50105ED5A39DDB Ref B: SEL221051504047 Ref C: 2024-04-29T13:11:16Z" ], + "Date": [ "Mon, 29 Apr 2024 13:11:18 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1046" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHubhwo7mf\",\"name\":\"eventHubhwo7mf\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs\",\"location\":\"eastus\",\"properties\":{\"retentionDescription\":{\"cleanupPolicy\":\"Delete\",\"retentionTimeInHours\":90},\"messageRetentionInDays\":4,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"0001-01-01T00:00:00\",\"partitionIds\":[],\"captureDescription\":{\"enabled\":true,\"encoding\":\"Avro\",\"destination\":{\"name\":\"EventHubArchive.AzureBlockBlob\",\"properties\":{\"storageAccountResourceId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.Storage/storageAccounts/testpsstoragaccount\",\"blobContainer\":\"container\",\"archiveNameFormat\":\"{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}\"}},\"intervalInSeconds\":600,\"sizeLimitInBytes\":11000000,\"skipEmptyArchives\":true}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHubgaq2iy\",\"name\":\"eventHubgaq2iy\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs\",\"location\":\"eastus\",\"properties\":{\"retentionDescription\":{\"cleanupPolicy\":\"Delete\",\"retentionTimeInHours\":90},\"messageRetentionInDays\":4,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"2024-04-29T13:11:18.627Z\",\"partitionIds\":[],\"captureDescription\":{\"enabled\":true,\"encoding\":\"Avro\",\"destination\":{\"name\":\"EventHubArchive.AzureBlockBlob\",\"properties\":{\"storageAccountResourceId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Storage/storageAccounts/ehpsvgt87wsa1\",\"blobContainer\":\"container\",\"archiveNameFormat\":\"{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}\"}},\"intervalInSeconds\":600,\"sizeLimitInBytes\":11000000,\"skipEmptyArchives\":true}}}", "isContentBase64": false } }, - "Set-AzEventHub+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo/eventhubs/eventHubl1cbzj?api-version=2023-01-01-preview+5": { + "Set-AzEventHub+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV14e6stf/eventhubs/eventHubk6tygo?api-version=2023-01-01-preview+5": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo/eventhubs/eventHubl1cbzj?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV14e6stf/eventhubs/eventHubk6tygo?api-version=2023-01-01-preview", "Content": "{\n}", "isContentBase64": false, "Headers": { @@ -175,38 +191,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-request-id": [ "fa6e0e9c-d1ac-4d21-985a-13f6e60e9eb4" ], - "x-ms-correlation-request-id": [ "fa6e0e9c-d1ac-4d21-985a-13f6e60e9eb4" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083757Z:fa6e0e9c-d1ac-4d21-985a-13f6e60e9eb4" ], + "x-ms-correlation-request-id": [ "751128f7-5d15-4240-a67e-3f78bcc2f302" ], + "x-ms-client-request-id": [ "646d9f5b-a3ba-4eaa-b35c-92ee17b3157d_RP" ], + "x-ms-messaging-activity-id": [ "0cdd99c2-4d7e-416d-8950-94eea86e5690" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G13|2024-04-29T13:11:22" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-request-id": [ "751128f7-5d15-4240-a67e-3f78bcc2f302" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T131122Z:751128f7-5d15-4240-a67e-3f78bcc2f302" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 003ADCE66BDC47C0A1F5BD649E3BB1E7 Ref B: SEL221051504011 Ref C: 2023-09-18T08:37:55Z" ], - "Date": [ "Mon, 18 Sep 2023 08:37:56 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 1078E785DDDE4258BC2CF3D3F50E652B Ref B: SEL221051504047 Ref C: 2024-04-29T13:11:18Z" ], + "Date": [ "Mon, 29 Apr 2024 13:11:22 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "545" ], + "Content-Length": [ "546" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo/eventhubs/eventHubl1cbzj\",\"name\":\"eventHubl1cbzj\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs\",\"location\":\"eastus\",\"properties\":{\"retentionDescription\":{\"cleanupPolicy\":\"Delete\",\"retentionTimeInHours\":168},\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"2023-09-18T08:37:56.79Z\",\"updatedAt\":\"2023-09-18T08:37:57.057Z\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV14e6stf/eventhubs/eventHubk6tygo\",\"name\":\"eventHubk6tygo\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs\",\"location\":\"eastus\",\"properties\":{\"retentionDescription\":{\"cleanupPolicy\":\"Delete\",\"retentionTimeInHours\":168},\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"2024-04-29T13:11:21.957Z\",\"updatedAt\":\"2024-04-29T13:11:22.303Z\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\"]}}", "isContentBase64": false } }, - "Set-AzEventHub+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo/eventhubs/eventHubl1cbzj?api-version=2023-01-01-preview+6": { + "Set-AzEventHub+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV14e6stf/eventhubs/eventHubk6tygo?api-version=2023-01-01-preview+6": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo/eventhubs/eventHubl1cbzj?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV14e6stf/eventhubs/eventHubk6tygo?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "258" ], - "x-ms-client-request-id": [ "45265f50-bbb0-4141-a359-d4f9c32fd897" ], + "x-ms-unique-id": [ "210" ], + "x-ms-client-request-id": [ "557af6e3-8155-4d00-b4a1-7074d73b5606" ], "CommandName": [ "Get-AzEventHub" ], "FullCommandName": [ "Get-AzEventHub_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -217,36 +237,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], - "x-ms-request-id": [ "0cd9c244-770a-43d9-8676-454e80104f13" ], - "x-ms-correlation-request-id": [ "0cd9c244-770a-43d9-8676-454e80104f13" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083758Z:0cd9c244-770a-43d9-8676-454e80104f13" ], + "x-ms-correlation-request-id": [ "716e1eee-63db-4956-9179-db620b8980e6" ], + "x-ms-client-request-id": [ "557af6e3-8155-4d00-b4a1-7074d73b5606_RP" ], + "x-ms-messaging-activity-id": [ "2e64849b-74e0-4e9a-8faa-ee8386dfd921" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G1|2024-04-29T13:11:23" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "716e1eee-63db-4956-9179-db620b8980e6" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T131123Z:716e1eee-63db-4956-9179-db620b8980e6" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 746163A4EED2475A8FB19BA5400D7730 Ref B: SEL221051504011 Ref C: 2023-09-18T08:37:57Z" ], - "Date": [ "Mon, 18 Sep 2023 08:37:57 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 54990196B0014274AA767C22A5000506 Ref B: SEL221051504047 Ref C: 2024-04-29T13:11:22Z" ], + "Date": [ "Mon, 29 Apr 2024 13:11:22 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "543" ], + "Content-Length": [ "544" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo/eventhubs/eventHubl1cbzj\",\"name\":\"eventHubl1cbzj\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs\",\"location\":\"eastus\",\"properties\":{\"retentionDescription\":{\"cleanupPolicy\":\"Delete\",\"retentionTimeInHours\":168},\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"2023-09-18T08:37:56.79\",\"updatedAt\":\"2023-09-18T08:37:57.057\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV14e6stf/eventhubs/eventHubk6tygo\",\"name\":\"eventHubk6tygo\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs\",\"location\":\"eastus\",\"properties\":{\"retentionDescription\":{\"cleanupPolicy\":\"Delete\",\"retentionTimeInHours\":168},\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"2024-04-29T13:11:21.957\",\"updatedAt\":\"2024-04-29T13:11:22.303\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\"]}}", "isContentBase64": false } }, - "Set-AzEventHub+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo/eventhubs/eventHubl1cbzj?api-version=2023-01-01-preview+7": { + "Set-AzEventHub+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV14e6stf/eventhubs/eventHubk6tygo?api-version=2023-01-01-preview+7": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo/eventhubs/eventHubl1cbzj?api-version=2023-01-01-preview", - "Content": "{\n \"properties\": {\n \"captureDescription\": {\n \"destination\": {\n \"identity\": {\n \"type\": \"UserAssigned\",\n \"userAssignedIdentity\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\"\n },\n \"properties\": {\n \"storageAccountResourceId\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.Storage/storageAccounts/testpsstoragaccount\",\n \"blobContainer\": \"container\",\n \"archiveNameFormat\": \"{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}\"\n },\n \"name\": \"EventHubArchive.AzureBlockBlob\"\n },\n \"enabled\": true,\n \"encoding\": \"Avro\",\n \"intervalInSeconds\": 600,\n \"sizeLimitInBytes\": 11000000,\n \"skipEmptyArchives\": true\n },\n \"retentionDescription\": {\n \"cleanupPolicy\": \"Delete\",\n \"retentionTimeInHours\": 168\n },\n \"messageRetentionInDays\": 7,\n \"partitionCount\": 4,\n \"status\": \"Active\"\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV14e6stf/eventhubs/eventHubk6tygo?api-version=2023-01-01-preview", + "Content": "{\n \"properties\": {\n \"captureDescription\": {\n \"destination\": {\n \"identity\": {\n \"type\": \"UserAssigned\",\n \"userAssignedIdentity\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi2\"\n },\n \"properties\": {\n \"storageAccountResourceId\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Storage/storageAccounts/ehpsvgt87wsa1\",\n \"blobContainer\": \"container\",\n \"archiveNameFormat\": \"{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}\"\n },\n \"name\": \"EventHubArchive.AzureBlockBlob\"\n },\n \"enabled\": true,\n \"encoding\": \"Avro\",\n \"intervalInSeconds\": 600,\n \"sizeLimitInBytes\": 11000000,\n \"skipEmptyArchives\": true\n },\n \"retentionDescription\": {\n \"cleanupPolicy\": \"Delete\",\n \"retentionTimeInHours\": 168\n },\n \"messageRetentionInDays\": 7,\n \"partitionCount\": 4,\n \"status\": \"Active\"\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "1121" ] + "Content-Length": [ "1135" ] } }, "Response": { @@ -254,29 +278,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], - "x-ms-request-id": [ "50c3fae0-b7fd-4a76-8adb-37808ba834ec" ], - "x-ms-correlation-request-id": [ "50c3fae0-b7fd-4a76-8adb-37808ba834ec" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083759Z:50c3fae0-b7fd-4a76-8adb-37808ba834ec" ], + "x-ms-correlation-request-id": [ "62c08dd2-fc18-4bf6-9a3e-f16b1f04975d" ], + "x-ms-client-request-id": [ "2155bd20-14dc-4269-8354-e3ea254a1cbc_RP" ], + "x-ms-messaging-activity-id": [ "601308e2-19ed-4fd0-8577-d954e18190d4" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G1|2024-04-29T13:11:24" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-request-id": [ "62c08dd2-fc18-4bf6-9a3e-f16b1f04975d" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T131124Z:62c08dd2-fc18-4bf6-9a3e-f16b1f04975d" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: A2EE591B0C11415892BC5F1E25B88926 Ref B: SEL221051504011 Ref C: 2023-09-18T08:37:58Z" ], - "Date": [ "Mon, 18 Sep 2023 08:37:58 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 8BAD17D6C06843BB9650351B77808114 Ref B: SEL221051504047 Ref C: 2024-04-29T13:11:23Z" ], + "Date": [ "Mon, 29 Apr 2024 13:11:23 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1258" ], + "Content-Length": [ "1277" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV19d35wo/eventhubs/eventHubl1cbzj\",\"name\":\"eventHubl1cbzj\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs\",\"location\":\"eastus\",\"properties\":{\"retentionDescription\":{\"cleanupPolicy\":\"Delete\",\"retentionTimeInHours\":168},\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"0001-01-01T00:00:00\",\"partitionIds\":[],\"captureDescription\":{\"enabled\":true,\"encoding\":\"Avro\",\"destination\":{\"name\":\"EventHubArchive.AzureBlockBlob\",\"properties\":{\"storageAccountResourceId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.Storage/storageAccounts/testpsstoragaccount\",\"blobContainer\":\"container\",\"archiveNameFormat\":\"{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\"}},\"intervalInSeconds\":600,\"sizeLimitInBytes\":11000000,\"skipEmptyArchives\":true}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV14e6stf/eventhubs/eventHubk6tygo\",\"name\":\"eventHubk6tygo\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs\",\"location\":\"eastus\",\"properties\":{\"retentionDescription\":{\"cleanupPolicy\":\"Delete\",\"retentionTimeInHours\":168},\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"2024-04-29T13:11:24.423Z\",\"partitionIds\":[],\"captureDescription\":{\"enabled\":true,\"encoding\":\"Avro\",\"destination\":{\"name\":\"EventHubArchive.AzureBlockBlob\",\"properties\":{\"storageAccountResourceId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Storage/storageAccounts/ehpsvgt87wsa1\",\"blobContainer\":\"container\",\"archiveNameFormat\":\"{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi2\"}},\"intervalInSeconds\":600,\"sizeLimitInBytes\":11000000,\"skipEmptyArchives\":true}}}", "isContentBase64": false } }, - "Set-AzEventHub+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventhub?api-version=2023-01-01-preview+1": { + "Set-AzEventHub+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventhub?api-version=2023-01-01-preview+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventhub?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventhub?api-version=2023-01-01-preview", "Content": "{\n}", "isContentBase64": false, "Headers": { @@ -291,38 +319,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], - "x-ms-request-id": [ "97b5ee47-0997-4655-9671-3af3392a2297" ], - "x-ms-correlation-request-id": [ "97b5ee47-0997-4655-9671-3af3392a2297" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083802Z:97b5ee47-0997-4655-9671-3af3392a2297" ], + "x-ms-correlation-request-id": [ "6f35b3f1-4400-4b79-8c18-f41f55aa9469" ], + "x-ms-client-request-id": [ "2b02731c-bd32-483d-b8c0-532896ba7f27_RP" ], + "x-ms-messaging-activity-id": [ "17d21ec3-5033-4af9-8283-228bdd955a91" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G12|2024-04-29T13:11:27" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "6f35b3f1-4400-4b79-8c18-f41f55aa9469" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T131128Z:6f35b3f1-4400-4b79-8c18-f41f55aa9469" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: B623B46103AA4DE0B4D5352ACC5B8928 Ref B: SEL221051504011 Ref C: 2023-09-18T08:37:59Z" ], - "Date": [ "Mon, 18 Sep 2023 08:38:01 GMT" ] + "X-MSEdge-Ref": [ "Ref A: A9985406769348CB8BED3AB7E1B86827 Ref B: SEL221051504047 Ref C: 2024-04-29T13:11:25Z" ], + "Date": [ "Mon, 29 Apr 2024 13:11:27 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "534" ], + "Content-Length": [ "535" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventhub\",\"name\":\"eventhub\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs\",\"location\":\"eastus\",\"properties\":{\"retentionDescription\":{\"cleanupPolicy\":\"Delete\",\"retentionTimeInHours\":168},\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"2023-09-18T08:38:01.49Z\",\"updatedAt\":\"2023-09-18T08:38:01.62Z\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventhub\",\"name\":\"eventhub\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs\",\"location\":\"eastus\",\"properties\":{\"retentionDescription\":{\"cleanupPolicy\":\"Delete\",\"retentionTimeInHours\":168},\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"2024-04-29T13:11:27.437Z\",\"updatedAt\":\"2024-04-29T13:11:27.55Z\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\"]}}", "isContentBase64": false } }, - "Set-AzEventHub+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventhub?api-version=2023-01-01-preview+2": { + "Set-AzEventHub+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventhub?api-version=2023-01-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventhub?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventhub?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "261" ], - "x-ms-client-request-id": [ "a8b75c98-8cf9-4807-a382-27deb6032a76" ], + "x-ms-unique-id": [ "213" ], + "x-ms-client-request-id": [ "82cf876f-53a1-4432-8fd9-58fb4064b8d2" ], "CommandName": [ "Get-AzEventHub" ], "FullCommandName": [ "Get-AzEventHub_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -333,38 +365,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-request-id": [ "82af3db8-d4ab-4f56-9900-27e9f00867a4" ], - "x-ms-correlation-request-id": [ "82af3db8-d4ab-4f56-9900-27e9f00867a4" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083803Z:82af3db8-d4ab-4f56-9900-27e9f00867a4" ], + "x-ms-correlation-request-id": [ "f43580be-5ee3-49c5-b63b-e1a99c75ab34" ], + "x-ms-client-request-id": [ "82cf876f-53a1-4432-8fd9-58fb4064b8d2_RP" ], + "x-ms-messaging-activity-id": [ "8bb48423-ce2c-481f-83a1-eedb8af57d2b" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G7|2024-04-29T13:11:29" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-request-id": [ "f43580be-5ee3-49c5-b63b-e1a99c75ab34" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T131129Z:f43580be-5ee3-49c5-b63b-e1a99c75ab34" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: DECAADF6BF054410BAAE7EC7F8E48041 Ref B: SEL221051504011 Ref C: 2023-09-18T08:38:02Z" ], - "Date": [ "Mon, 18 Sep 2023 08:38:03 GMT" ] + "X-MSEdge-Ref": [ "Ref A: E65935D60A45461297D94A1A67E9EA23 Ref B: SEL221051504047 Ref C: 2024-04-29T13:11:28Z" ], + "Date": [ "Mon, 29 Apr 2024 13:11:28 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "532" ], + "Content-Length": [ "533" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventhub\",\"name\":\"eventhub\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs\",\"location\":\"eastus\",\"properties\":{\"retentionDescription\":{\"cleanupPolicy\":\"Delete\",\"retentionTimeInHours\":168},\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"2023-09-18T08:38:01.49\",\"updatedAt\":\"2023-09-18T08:38:01.62\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventhub\",\"name\":\"eventhub\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs\",\"location\":\"eastus\",\"properties\":{\"retentionDescription\":{\"cleanupPolicy\":\"Delete\",\"retentionTimeInHours\":168},\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"2024-04-29T13:11:27.437\",\"updatedAt\":\"2024-04-29T13:11:27.55\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\"]}}", "isContentBase64": false } }, - "Set-AzEventHub+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventhub?api-version=2023-01-01-preview+3": { + "Set-AzEventHub+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventhub?api-version=2023-01-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventhub?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventhub?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "262" ], - "x-ms-client-request-id": [ "5fef239d-a3f7-4e91-98cb-2d8f9117a6f5" ], + "x-ms-unique-id": [ "214" ], + "x-ms-client-request-id": [ "91acfaf4-342a-4c13-a8d6-06712cfe6c72" ], "CommandName": [ "Get-AzEventHub" ], "FullCommandName": [ "Get-AzEventHub_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -375,36 +411,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11990" ], - "x-ms-request-id": [ "88ed7b1d-cc4f-4e56-86ac-d033c3313e23" ], - "x-ms-correlation-request-id": [ "88ed7b1d-cc4f-4e56-86ac-d033c3313e23" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083804Z:88ed7b1d-cc4f-4e56-86ac-d033c3313e23" ], + "x-ms-correlation-request-id": [ "ec56821e-9b4d-46ee-9012-95821a848406" ], + "x-ms-client-request-id": [ "91acfaf4-342a-4c13-a8d6-06712cfe6c72_RP" ], + "x-ms-messaging-activity-id": [ "368b2a76-8910-4228-8028-01252107ab5d" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G2|2024-04-29T13:11:31" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "ec56821e-9b4d-46ee-9012-95821a848406" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T131131Z:ec56821e-9b4d-46ee-9012-95821a848406" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: AFC6B5E269184B8781425AB87630F625 Ref B: SEL221051504011 Ref C: 2023-09-18T08:38:03Z" ], - "Date": [ "Mon, 18 Sep 2023 08:38:03 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 7E0FC4566E8C4AADA7CC44981DB96092 Ref B: SEL221051504047 Ref C: 2024-04-29T13:11:29Z" ], + "Date": [ "Mon, 29 Apr 2024 13:11:30 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "532" ], + "Content-Length": [ "533" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventhub\",\"name\":\"eventhub\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs\",\"location\":\"eastus\",\"properties\":{\"retentionDescription\":{\"cleanupPolicy\":\"Delete\",\"retentionTimeInHours\":168},\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"2023-09-18T08:38:01.49\",\"updatedAt\":\"2023-09-18T08:38:01.62\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventhub\",\"name\":\"eventhub\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs\",\"location\":\"eastus\",\"properties\":{\"retentionDescription\":{\"cleanupPolicy\":\"Delete\",\"retentionTimeInHours\":168},\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"2024-04-29T13:11:27.437\",\"updatedAt\":\"2024-04-29T13:11:27.55\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\"]}}", "isContentBase64": false } }, - "Set-AzEventHub+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventhub?api-version=2023-01-01-preview+4": { + "Set-AzEventHub+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventhub?api-version=2023-01-01-preview+4": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventhub?api-version=2023-01-01-preview", - "Content": "{\n \"properties\": {\n \"captureDescription\": {\n \"destination\": {\n \"properties\": {\n \"storageAccountResourceId\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.Storage/storageAccounts/testpsstoragaccount\",\n \"blobContainer\": \"container\",\n \"archiveNameFormat\": \"{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}\"\n },\n \"name\": \"EventHubArchive.AzureBlockBlob\"\n },\n \"enabled\": true,\n \"encoding\": \"Avro\",\n \"intervalInSeconds\": 600,\n \"sizeLimitInBytes\": 11000000,\n \"skipEmptyArchives\": true\n },\n \"retentionDescription\": {\n \"cleanupPolicy\": \"Delete\",\n \"retentionTimeInHours\": 168\n },\n \"messageRetentionInDays\": 7,\n \"partitionCount\": 4,\n \"status\": \"Active\"\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventhub?api-version=2023-01-01-preview", + "Content": "{\n \"properties\": {\n \"captureDescription\": {\n \"destination\": {\n \"properties\": {\n \"storageAccountResourceId\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Storage/storageAccounts/ehpsvgt87wsa1\",\n \"blobContainer\": \"container\",\n \"archiveNameFormat\": \"{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}\"\n },\n \"name\": \"EventHubArchive.AzureBlockBlob\"\n },\n \"enabled\": true,\n \"encoding\": \"Avro\",\n \"intervalInSeconds\": 600,\n \"sizeLimitInBytes\": 11000000,\n \"skipEmptyArchives\": true\n },\n \"retentionDescription\": {\n \"cleanupPolicy\": \"Delete\",\n \"retentionTimeInHours\": 168\n },\n \"messageRetentionInDays\": 7,\n \"partitionCount\": 4,\n \"status\": \"Active\"\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "865" ] + "Content-Length": [ "860" ] } }, "Response": { @@ -412,38 +452,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], - "x-ms-request-id": [ "c5c36258-2de1-478a-b5fc-35171f142242" ], - "x-ms-correlation-request-id": [ "c5c36258-2de1-478a-b5fc-35171f142242" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083806Z:c5c36258-2de1-478a-b5fc-35171f142242" ], + "x-ms-correlation-request-id": [ "90b38f0f-dc28-4521-91e3-33f8a463e51c" ], + "x-ms-client-request-id": [ "cbc453bd-e9f2-4417-8863-8c298a218f8b_RP" ], + "x-ms-messaging-activity-id": [ "101d812c-11e1-4cdf-84fe-6c39fa9321c6" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G10|2024-04-29T13:11:33" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "90b38f0f-dc28-4521-91e3-33f8a463e51c" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240429T131133Z:90b38f0f-dc28-4521-91e3-33f8a463e51c" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 606918603475484B8C4004D5954112C5 Ref B: SEL221051504011 Ref C: 2023-09-18T08:38:04Z" ], - "Date": [ "Mon, 18 Sep 2023 08:38:05 GMT" ] + "X-MSEdge-Ref": [ "Ref A: AEC1273952FD4E09B6B81C4973262690 Ref B: SEL221051504047 Ref C: 2024-04-29T13:11:31Z" ], + "Date": [ "Mon, 29 Apr 2024 13:11:33 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1035" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventhub\",\"name\":\"eventhub\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs\",\"location\":\"eastus\",\"properties\":{\"retentionDescription\":{\"cleanupPolicy\":\"Delete\",\"retentionTimeInHours\":168},\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"0001-01-01T00:00:00\",\"partitionIds\":[],\"captureDescription\":{\"enabled\":true,\"encoding\":\"Avro\",\"destination\":{\"name\":\"EventHubArchive.AzureBlockBlob\",\"properties\":{\"storageAccountResourceId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.Storage/storageAccounts/testpsstoragaccount\",\"blobContainer\":\"container\",\"archiveNameFormat\":\"{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}\"}},\"intervalInSeconds\":600,\"sizeLimitInBytes\":11000000,\"skipEmptyArchives\":true}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventhub\",\"name\":\"eventhub\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs\",\"location\":\"eastus\",\"properties\":{\"retentionDescription\":{\"cleanupPolicy\":\"Delete\",\"retentionTimeInHours\":168},\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"2024-04-29T13:11:33.717Z\",\"partitionIds\":[],\"captureDescription\":{\"enabled\":true,\"encoding\":\"Avro\",\"destination\":{\"name\":\"EventHubArchive.AzureBlockBlob\",\"properties\":{\"storageAccountResourceId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Storage/storageAccounts/ehpsvgt87wsa1\",\"blobContainer\":\"container\",\"archiveNameFormat\":\"{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}\"}},\"intervalInSeconds\":600,\"sizeLimitInBytes\":11000000,\"skipEmptyArchives\":true}}}", "isContentBase64": false } }, - "Set-AzEventHub+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventhub?api-version=2023-01-01-preview+5": { + "Set-AzEventHub+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventhub?api-version=2023-01-01-preview+5": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventhub?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventhub?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "264" ], - "x-ms-client-request-id": [ "12cb71df-0c6f-42d6-bb07-81901398c0fe" ], + "x-ms-unique-id": [ "216" ], + "x-ms-client-request-id": [ "84def0a4-7503-4f1d-b13d-5e19ec9e794c" ], "CommandName": [ "Get-AzEventHub" ], "FullCommandName": [ "Get-AzEventHub_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -454,36 +498,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], - "x-ms-request-id": [ "2c415a59-b557-4455-8ba6-beb08b594291" ], - "x-ms-correlation-request-id": [ "2c415a59-b557-4455-8ba6-beb08b594291" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083807Z:2c415a59-b557-4455-8ba6-beb08b594291" ], + "x-ms-correlation-request-id": [ "4e1cfb47-992c-4be9-8781-7175bd335802" ], + "x-ms-client-request-id": [ "84def0a4-7503-4f1d-b13d-5e19ec9e794c_RP" ], + "x-ms-messaging-activity-id": [ "f16d5820-4c13-4141-9754-3b8c82b75f34" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G2|2024-04-29T13:11:34" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "4e1cfb47-992c-4be9-8781-7175bd335802" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T131134Z:4e1cfb47-992c-4be9-8781-7175bd335802" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 375F15DB9694407DB4CB62F5C6B0846C Ref B: SEL221051504011 Ref C: 2023-09-18T08:38:07Z" ], - "Date": [ "Mon, 18 Sep 2023 08:38:06 GMT" ] + "X-MSEdge-Ref": [ "Ref A: CFB64A12370A4D25971A4FE7B1ABD3C9 Ref B: SEL221051504047 Ref C: 2024-04-29T13:11:33Z" ], + "Date": [ "Mon, 29 Apr 2024 13:11:33 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1057" ], + "Content-Length": [ "1053" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventhub\",\"name\":\"eventhub\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs\",\"location\":\"eastus\",\"properties\":{\"retentionDescription\":{\"cleanupPolicy\":\"Delete\",\"retentionTimeInHours\":168},\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"2023-09-18T08:38:01.49\",\"updatedAt\":\"2023-09-18T08:38:05.997\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\"],\"captureDescription\":{\"enabled\":true,\"encoding\":\"Avro\",\"destination\":{\"name\":\"EventHubArchive.AzureBlockBlob\",\"properties\":{\"storageAccountResourceId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.Storage/storageAccounts/testpsstoragaccount\",\"blobContainer\":\"container\",\"archiveNameFormat\":\"{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}\"}},\"intervalInSeconds\":600,\"sizeLimitInBytes\":11000000,\"skipEmptyArchives\":true}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventhub\",\"name\":\"eventhub\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs\",\"location\":\"eastus\",\"properties\":{\"retentionDescription\":{\"cleanupPolicy\":\"Delete\",\"retentionTimeInHours\":168},\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"2024-04-29T13:11:27.437\",\"updatedAt\":\"2024-04-29T13:11:33.717\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\"],\"captureDescription\":{\"enabled\":true,\"encoding\":\"Avro\",\"destination\":{\"name\":\"EventHubArchive.AzureBlockBlob\",\"properties\":{\"storageAccountResourceId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Storage/storageAccounts/ehpsvgt87wsa1\",\"blobContainer\":\"container\",\"archiveNameFormat\":\"{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}\"}},\"intervalInSeconds\":600,\"sizeLimitInBytes\":11000000,\"skipEmptyArchives\":true}}}", "isContentBase64": false } }, - "Set-AzEventHub+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventhub?api-version=2023-01-01-preview+6": { + "Set-AzEventHub+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventhub?api-version=2023-01-01-preview+6": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventhub?api-version=2023-01-01-preview", - "Content": "{\n \"properties\": {\n \"captureDescription\": {\n \"destination\": {\n \"properties\": {\n \"storageAccountResourceId\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.Storage/storageAccounts/testpsstoragaccount\",\n \"blobContainer\": \"container\",\n \"archiveNameFormat\": \"{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}\"\n },\n \"name\": \"EventHubArchive.AzureBlockBlob\"\n },\n \"enabled\": false,\n \"encoding\": \"Avro\",\n \"intervalInSeconds\": 600,\n \"sizeLimitInBytes\": 11000000,\n \"skipEmptyArchives\": true\n },\n \"retentionDescription\": {\n \"cleanupPolicy\": \"Delete\",\n \"retentionTimeInHours\": 168\n },\n \"messageRetentionInDays\": 7,\n \"partitionCount\": 4,\n \"status\": \"Active\"\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventhub?api-version=2023-01-01-preview", + "Content": "{\n \"properties\": {\n \"captureDescription\": {\n \"destination\": {\n \"properties\": {\n \"storageAccountResourceId\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Storage/storageAccounts/ehpsvgt87wsa1\",\n \"blobContainer\": \"container\",\n \"archiveNameFormat\": \"{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}\"\n },\n \"name\": \"EventHubArchive.AzureBlockBlob\"\n },\n \"enabled\": false,\n \"encoding\": \"Avro\",\n \"intervalInSeconds\": 600,\n \"sizeLimitInBytes\": 11000000,\n \"skipEmptyArchives\": true\n },\n \"retentionDescription\": {\n \"cleanupPolicy\": \"Delete\",\n \"retentionTimeInHours\": 168\n },\n \"messageRetentionInDays\": 7,\n \"partitionCount\": 4,\n \"status\": \"Active\"\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "866" ] + "Content-Length": [ "861" ] } }, "Response": { @@ -491,38 +539,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-request-id": [ "0df906e1-0d06-4b56-8d99-5e742133ad84" ], - "x-ms-correlation-request-id": [ "0df906e1-0d06-4b56-8d99-5e742133ad84" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083810Z:0df906e1-0d06-4b56-8d99-5e742133ad84" ], + "x-ms-correlation-request-id": [ "dffce46b-6f94-433e-87eb-29a869fa8ab3" ], + "x-ms-client-request-id": [ "89b314e4-8351-43db-a46b-d45db3d6b8e2_RP" ], + "x-ms-messaging-activity-id": [ "c79ce3be-8ebe-4878-b182-b5bc63c7ae1e" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G8|2024-04-29T13:11:35" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "dffce46b-6f94-433e-87eb-29a869fa8ab3" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T131136Z:dffce46b-6f94-433e-87eb-29a869fa8ab3" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 57FAF18F9F174F21BF498C0BDFCE5183 Ref B: SEL221051504011 Ref C: 2023-09-18T08:38:07Z" ], - "Date": [ "Mon, 18 Sep 2023 08:38:10 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 6BE9DBFB84BB43A696099F411236FD38 Ref B: SEL221051504047 Ref C: 2024-04-29T13:11:34Z" ], + "Date": [ "Mon, 29 Apr 2024 13:11:35 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1036" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventhub\",\"name\":\"eventhub\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs\",\"location\":\"eastus\",\"properties\":{\"retentionDescription\":{\"cleanupPolicy\":\"Delete\",\"retentionTimeInHours\":168},\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"0001-01-01T00:00:00\",\"partitionIds\":[],\"captureDescription\":{\"enabled\":false,\"encoding\":\"Avro\",\"destination\":{\"name\":\"EventHubArchive.AzureBlockBlob\",\"properties\":{\"storageAccountResourceId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.Storage/storageAccounts/testpsstoragaccount\",\"blobContainer\":\"container\",\"archiveNameFormat\":\"{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}\"}},\"intervalInSeconds\":600,\"sizeLimitInBytes\":11000000,\"skipEmptyArchives\":true}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventhub\",\"name\":\"eventhub\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs\",\"location\":\"eastus\",\"properties\":{\"retentionDescription\":{\"cleanupPolicy\":\"Delete\",\"retentionTimeInHours\":168},\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"2024-04-29T13:11:35.943Z\",\"partitionIds\":[],\"captureDescription\":{\"enabled\":false,\"encoding\":\"Avro\",\"destination\":{\"name\":\"EventHubArchive.AzureBlockBlob\",\"properties\":{\"storageAccountResourceId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Storage/storageAccounts/ehpsvgt87wsa1\",\"blobContainer\":\"container\",\"archiveNameFormat\":\"{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}\"}},\"intervalInSeconds\":600,\"sizeLimitInBytes\":11000000,\"skipEmptyArchives\":true}}}", "isContentBase64": false } }, - "Set-AzEventHub+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventhub?api-version=2023-01-01-preview+7": { + "Set-AzEventHub+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventhub?api-version=2023-01-01-preview+7": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventhub?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventhub?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "266" ], - "x-ms-client-request-id": [ "c9736013-322f-4872-ad0d-5073390ae270" ], + "x-ms-unique-id": [ "218" ], + "x-ms-client-request-id": [ "41ed84b6-7bfd-4aff-83a8-8a2ccd07212d" ], "CommandName": [ "Get-AzEventHub" ], "FullCommandName": [ "Get-AzEventHub_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -533,36 +585,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], - "x-ms-request-id": [ "f294a6ea-b658-41b1-9c1f-6fe84845cbac" ], - "x-ms-correlation-request-id": [ "f294a6ea-b658-41b1-9c1f-6fe84845cbac" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083811Z:f294a6ea-b658-41b1-9c1f-6fe84845cbac" ], + "x-ms-correlation-request-id": [ "fb82dbf2-573e-4f75-a745-66d87463a9fd" ], + "x-ms-client-request-id": [ "41ed84b6-7bfd-4aff-83a8-8a2ccd07212d_RP" ], + "x-ms-messaging-activity-id": [ "c88d3252-2b0d-487f-8497-43ca8906582d" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G3|2024-04-29T13:11:37" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "fb82dbf2-573e-4f75-a745-66d87463a9fd" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T131137Z:fb82dbf2-573e-4f75-a745-66d87463a9fd" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 705BECE8CC1C4966993709D53896D21D Ref B: SEL221051504011 Ref C: 2023-09-18T08:38:10Z" ], - "Date": [ "Mon, 18 Sep 2023 08:38:10 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 19051E67A5D3486C93368927209E53FB Ref B: SEL221051504047 Ref C: 2024-04-29T13:11:36Z" ], + "Date": [ "Mon, 29 Apr 2024 13:11:36 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1057" ], + "Content-Length": [ "1054" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventhub\",\"name\":\"eventhub\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs\",\"location\":\"eastus\",\"properties\":{\"retentionDescription\":{\"cleanupPolicy\":\"Delete\",\"retentionTimeInHours\":168},\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"2023-09-18T08:38:01.49\",\"updatedAt\":\"2023-09-18T08:38:10.61\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\"],\"captureDescription\":{\"enabled\":false,\"encoding\":\"Avro\",\"destination\":{\"name\":\"EventHubArchive.AzureBlockBlob\",\"properties\":{\"storageAccountResourceId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.Storage/storageAccounts/testpsstoragaccount\",\"blobContainer\":\"container\",\"archiveNameFormat\":\"{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}\"}},\"intervalInSeconds\":600,\"sizeLimitInBytes\":11000000,\"skipEmptyArchives\":true}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventhub\",\"name\":\"eventhub\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs\",\"location\":\"eastus\",\"properties\":{\"retentionDescription\":{\"cleanupPolicy\":\"Delete\",\"retentionTimeInHours\":168},\"messageRetentionInDays\":7,\"partitionCount\":4,\"status\":\"Active\",\"createdAt\":\"2024-04-29T13:11:27.437\",\"updatedAt\":\"2024-04-29T13:11:35.943\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\"],\"captureDescription\":{\"enabled\":false,\"encoding\":\"Avro\",\"destination\":{\"name\":\"EventHubArchive.AzureBlockBlob\",\"properties\":{\"storageAccountResourceId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Storage/storageAccounts/ehpsvgt87wsa1\",\"blobContainer\":\"container\",\"archiveNameFormat\":\"{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}\"}},\"intervalInSeconds\":600,\"sizeLimitInBytes\":11000000,\"skipEmptyArchives\":true}}}", "isContentBase64": false } }, - "Set-AzEventHub+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventhub?api-version=2023-01-01-preview+8": { + "Set-AzEventHub+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventhub?api-version=2023-01-01-preview+8": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventhub?api-version=2023-01-01-preview", - "Content": "{\n \"properties\": {\n \"captureDescription\": {\n \"destination\": {\n \"properties\": {\n \"storageAccountResourceId\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.Storage/storageAccounts/testpsstoragaccount\",\n \"blobContainer\": \"container\",\n \"archiveNameFormat\": \"{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}\"\n },\n \"name\": \"EventHubArchive.AzureBlockBlob\"\n },\n \"enabled\": false,\n \"encoding\": \"Avro\",\n \"intervalInSeconds\": 600,\n \"sizeLimitInBytes\": 11000000,\n \"skipEmptyArchives\": true\n },\n \"retentionDescription\": {\n \"cleanupPolicy\": \"Delete\",\n \"retentionTimeInHours\": 168\n },\n \"messageRetentionInDays\": 7,\n \"partitionCount\": 8,\n \"status\": \"Active\"\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventhub?api-version=2023-01-01-preview", + "Content": "{\n \"properties\": {\n \"captureDescription\": {\n \"destination\": {\n \"properties\": {\n \"storageAccountResourceId\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Storage/storageAccounts/ehpsvgt87wsa1\",\n \"blobContainer\": \"container\",\n \"archiveNameFormat\": \"{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}\"\n },\n \"name\": \"EventHubArchive.AzureBlockBlob\"\n },\n \"enabled\": false,\n \"encoding\": \"Avro\",\n \"intervalInSeconds\": 600,\n \"sizeLimitInBytes\": 11000000,\n \"skipEmptyArchives\": true\n },\n \"retentionDescription\": {\n \"cleanupPolicy\": \"Delete\",\n \"retentionTimeInHours\": 168\n },\n \"messageRetentionInDays\": 7,\n \"partitionCount\": 8,\n \"status\": \"Active\"\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "866" ] + "Content-Length": [ "861" ] } }, "Response": { @@ -570,22 +626,26 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-request-id": [ "3659a3b0-c84c-45d7-8c41-7bf98d26942e" ], - "x-ms-correlation-request-id": [ "3659a3b0-c84c-45d7-8c41-7bf98d26942e" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083813Z:3659a3b0-c84c-45d7-8c41-7bf98d26942e" ], + "x-ms-correlation-request-id": [ "affebaf1-39c6-4d6e-bb6d-9202a58cde00" ], + "x-ms-client-request-id": [ "2abdbcfd-40ab-431b-ab39-b99f14f146cf_RP" ], + "x-ms-messaging-activity-id": [ "8291ef0d-59f3-4bef-be4a-ce87d5bbc1e8" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G2|2024-04-29T13:11:39" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "affebaf1-39c6-4d6e-bb6d-9202a58cde00" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T131139Z:affebaf1-39c6-4d6e-bb6d-9202a58cde00" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 0401B1E46BD847918C95DD3A01791840 Ref B: SEL221051504011 Ref C: 2023-09-18T08:38:11Z" ], - "Date": [ "Mon, 18 Sep 2023 08:38:12 GMT" ] + "X-MSEdge-Ref": [ "Ref A: EE154587E95547828BCAA0518A9688E5 Ref B: SEL221051504047 Ref C: 2024-04-29T13:11:37Z" ], + "Date": [ "Mon, 29 Apr 2024 13:11:38 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1067" ], + "Content-Length": [ "1065" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventhub\",\"name\":\"eventhub\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs\",\"location\":\"eastus\",\"properties\":{\"retentionDescription\":{\"cleanupPolicy\":\"Delete\",\"retentionTimeInHours\":168},\"messageRetentionInDays\":7,\"partitionCount\":8,\"status\":\"Active\",\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"0001-01-01T00:00:00\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\"],\"captureDescription\":{\"enabled\":false,\"encoding\":\"Avro\",\"destination\":{\"name\":\"EventHubArchive.AzureBlockBlob\",\"properties\":{\"storageAccountResourceId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.Storage/storageAccounts/testpsstoragaccount\",\"blobContainer\":\"container\",\"archiveNameFormat\":\"{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}\"}},\"intervalInSeconds\":600,\"sizeLimitInBytes\":11000000,\"skipEmptyArchives\":true}}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventhub\",\"name\":\"eventhub\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs\",\"location\":\"eastus\",\"properties\":{\"retentionDescription\":{\"cleanupPolicy\":\"Delete\",\"retentionTimeInHours\":168},\"messageRetentionInDays\":7,\"partitionCount\":8,\"status\":\"Active\",\"createdAt\":\"0001-01-01T00:00:00\",\"updatedAt\":\"2024-04-29T13:11:39.3Z\",\"partitionIds\":[\"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\"],\"captureDescription\":{\"enabled\":false,\"encoding\":\"Avro\",\"destination\":{\"name\":\"EventHubArchive.AzureBlockBlob\",\"properties\":{\"storageAccountResourceId\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Storage/storageAccounts/ehpsvgt87wsa1\",\"blobContainer\":\"container\",\"archiveNameFormat\":\"{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}\"}},\"intervalInSeconds\":600,\"sizeLimitInBytes\":11000000,\"skipEmptyArchives\":true}}}", "isContentBase64": false } } diff --git a/src/EventHub/EventHub.Autorest/test/Set-AzEventHub.Tests.ps1 b/src/EventHub/EventHub.Autorest/test/Set-AzEventHub.Tests.ps1 index 7a7c878166c1..51eb074f7105 100644 --- a/src/EventHub/EventHub.Autorest/test/Set-AzEventHub.Tests.ps1 +++ b/src/EventHub/EventHub.Autorest/test/Set-AzEventHub.Tests.ps1 @@ -63,7 +63,7 @@ Describe 'Set-AzEventHub' { It 'SetViaIdentityExpanded' { $eventhub = New-AzEventHub -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -Name eventhub - { Set-AzEventHub -InputObject $eventhub } | Should -Throw 'Please specify the property you want to update on the -InputObject' + { Set-AzEventHub -InputObject $eventhub -ErrorAction Stop } | Should -Throw 'Please specify the property you want to update on the -InputObject' $eventhub = Set-AzEventHub -InputObject $eventhub -ArchiveNameFormat "{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}" -BlobContainer $env.blobContainer -CaptureEnabled -DestinationName EventHubArchive.AzureBlockBlob -Encoding Avro -IntervalInSeconds 600 -SizeLimitInBytes 11000000 -SkipEmptyArchive -StorageAccountResourceId $env.storageAccountId $eventhub.PartitionCount | Should -Be 4 diff --git a/src/EventHub/EventHub.Autorest/test/Set-AzEventHubApplicationGroup.Recording.json b/src/EventHub/EventHub.Autorest/test/Set-AzEventHubApplicationGroup.Recording.json deleted file mode 100644 index 1052728197d2..000000000000 --- a/src/EventHub/EventHub.Autorest/test/Set-AzEventHubApplicationGroup.Recording.json +++ /dev/null @@ -1,374 +0,0 @@ -{ - "Set-AzEventHubApplicationGroup+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGrouphloeqm?api-version=2023-01-01-preview+1": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGrouphloeqm?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "268" ], - "x-ms-client-request-id": [ "59286748-cac6-40d8-9f6c-6545ca023f4d" ], - "CommandName": [ "Get-AzEventHubApplicationGroup" ], - "FullCommandName": [ "Get-AzEventHubApplicationGroup_Get" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], - "Authorization": [ "[Filtered]" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "b268593f-198f-406e-bfd6-307d2211948b_M9SN1_M9SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], - "x-ms-correlation-request-id": [ "fc80f1c6-6084-4ff1-92c4-c0878a435ece" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083827Z:fc80f1c6-6084-4ff1-92c4-c0878a435ece" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 9BFA4E4BAE5A4A8A8526CE6D89CCA0B2 Ref B: SEL221051504011 Ref C: 2023-09-18T08:38:24Z" ], - "Date": [ "Mon, 18 Sep 2023 08:38:26 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "541" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGrouphloeqm\",\"name\":\"appGrouphloeqm\",\"type\":\"\",\"location\":\"East US\",\"properties\":{\"clientAppGroupIdentifier\":\"NamespaceSASKeyName=key1\",\"policies\":[{\"type\":\"ThrottlingPolicy\",\"name\":\"t1\",\"metricId\":\"IncomingMessages\",\"rateLimitThreshold\":10000},{\"type\":\"ThrottlingPolicy\",\"name\":\"t2\",\"metricId\":\"OutgoingBytes\",\"rateLimitThreshold\":20000}],\"isEnabled\":true}}", - "isContentBase64": false - } - }, - "Set-AzEventHubApplicationGroup+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGrouphloeqm?api-version=2023-01-01-preview+2": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGrouphloeqm?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "269" ], - "x-ms-client-request-id": [ "eb7c5c3c-a89c-476e-a80b-02aec51721b0" ], - "CommandName": [ "Get-AzEventHubApplicationGroup" ], - "FullCommandName": [ "Get-AzEventHubApplicationGroup_Get" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], - "Authorization": [ "[Filtered]" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "738c55de-6159-4ce5-8621-a55cd383258a_M1CH3_M1CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-correlation-request-id": [ "a7d03519-f0e2-4cb2-9a33-f98ae4514307" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083830Z:a7d03519-f0e2-4cb2-9a33-f98ae4514307" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 93CD7BE1F6D640A493782C4FCE532434 Ref B: SEL221051504011 Ref C: 2023-09-18T08:38:27Z" ], - "Date": [ "Mon, 18 Sep 2023 08:38:30 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "541" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGrouphloeqm\",\"name\":\"appGrouphloeqm\",\"type\":\"\",\"location\":\"East US\",\"properties\":{\"clientAppGroupIdentifier\":\"NamespaceSASKeyName=key1\",\"policies\":[{\"type\":\"ThrottlingPolicy\",\"name\":\"t1\",\"metricId\":\"IncomingMessages\",\"rateLimitThreshold\":10000},{\"type\":\"ThrottlingPolicy\",\"name\":\"t2\",\"metricId\":\"OutgoingBytes\",\"rateLimitThreshold\":20000}],\"isEnabled\":true}}", - "isContentBase64": false - } - }, - "Set-AzEventHubApplicationGroup+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGrouphloeqm?api-version=2023-01-01-preview+3": { - "Request": { - "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGrouphloeqm?api-version=2023-01-01-preview", - "Content": "{\n \"properties\": {\n \"isEnabled\": true,\n \"clientAppGroupIdentifier\": \"NamespaceSASKeyName=key1\",\n \"policies\": [\n {\n \"name\": \"t1\",\n \"type\": \"ThrottlingPolicy\",\n \"rateLimitThreshold\": 10000,\n \"metricId\": \"IncomingMessages\"\n },\n {\n \"name\": \"t2\",\n \"type\": \"ThrottlingPolicy\",\n \"rateLimitThreshold\": 20000,\n \"metricId\": \"OutgoingBytes\"\n },\n {\n \"name\": \"t3\",\n \"type\": \"ThrottlingPolicy\",\n \"rateLimitThreshold\": 12000,\n \"metricId\": \"OutgoingMessages\"\n }\n ]\n }\n}", - "isContentBase64": false, - "Headers": { - }, - "ContentHeaders": { - "Content-Type": [ "application/json" ], - "Content-Length": [ "581" ] - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "b78f51c0-fd4c-4525-b48e-ddbadbfbc678_M10CH3_M10CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-correlation-request-id": [ "c7795187-8eed-464c-972a-ad3dc456401f" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083833Z:c7795187-8eed-464c-972a-ad3dc456401f" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 324CC24C7EAA40CC9992342FF6E99C79 Ref B: SEL221051504011 Ref C: 2023-09-18T08:38:30Z" ], - "Date": [ "Mon, 18 Sep 2023 08:38:32 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "638" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGrouphloeqm\",\"name\":\"appGrouphloeqm\",\"type\":\"\",\"location\":\"East US\",\"properties\":{\"clientAppGroupIdentifier\":\"NamespaceSASKeyName=key1\",\"policies\":[{\"type\":\"ThrottlingPolicy\",\"name\":\"t1\",\"metricId\":\"IncomingMessages\",\"rateLimitThreshold\":10000},{\"type\":\"ThrottlingPolicy\",\"name\":\"t2\",\"metricId\":\"OutgoingBytes\",\"rateLimitThreshold\":20000},{\"type\":\"ThrottlingPolicy\",\"name\":\"t3\",\"metricId\":\"OutgoingMessages\",\"rateLimitThreshold\":12000}],\"isEnabled\":true}}", - "isContentBase64": false - } - }, - "Set-AzEventHubApplicationGroup+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGrouphloeqm?api-version=2023-01-01-preview+1": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGrouphloeqm?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "271" ], - "x-ms-client-request-id": [ "447a993d-7088-411e-bb83-7f68e991c28d" ], - "CommandName": [ "Get-AzEventHubApplicationGroup" ], - "FullCommandName": [ "Get-AzEventHubApplicationGroup_Get" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], - "Authorization": [ "[Filtered]" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "705a3c20-1d3b-4c73-8fd5-ec370a7f2de8_M3CH3_M3CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], - "x-ms-correlation-request-id": [ "6652766e-a611-4b1d-bd40-e18bf0dc3b9d" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083836Z:6652766e-a611-4b1d-bd40-e18bf0dc3b9d" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 5C146A37630E4BEF8AF71BB3FAE3C405 Ref B: SEL221051504011 Ref C: 2023-09-18T08:38:34Z" ], - "Date": [ "Mon, 18 Sep 2023 08:38:35 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "638" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGrouphloeqm\",\"name\":\"appGrouphloeqm\",\"type\":\"\",\"location\":\"East US\",\"properties\":{\"clientAppGroupIdentifier\":\"NamespaceSASKeyName=key1\",\"policies\":[{\"type\":\"ThrottlingPolicy\",\"name\":\"t1\",\"metricId\":\"IncomingMessages\",\"rateLimitThreshold\":10000},{\"type\":\"ThrottlingPolicy\",\"name\":\"t2\",\"metricId\":\"OutgoingBytes\",\"rateLimitThreshold\":20000},{\"type\":\"ThrottlingPolicy\",\"name\":\"t3\",\"metricId\":\"OutgoingMessages\",\"rateLimitThreshold\":12000}],\"isEnabled\":true}}", - "isContentBase64": false - } - }, - "Set-AzEventHubApplicationGroup+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGrouphloeqm?api-version=2023-01-01-preview+2": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGrouphloeqm?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "272" ], - "x-ms-client-request-id": [ "edf9cc4f-66d7-4b39-9dea-70158806db0e" ], - "CommandName": [ "Get-AzEventHubApplicationGroup" ], - "FullCommandName": [ "Get-AzEventHubApplicationGroup_GetViaIdentity" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], - "Authorization": [ "[Filtered]" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "d9bfdae7-9178-4668-8cc4-9bc9881482f3_M8SN1_M8SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], - "x-ms-correlation-request-id": [ "e83959c7-2532-4ff0-ba37-7307ccc2af08" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083838Z:e83959c7-2532-4ff0-ba37-7307ccc2af08" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 69B62AB3A1DD4708AC19ADE08F065836 Ref B: SEL221051504011 Ref C: 2023-09-18T08:38:36Z" ], - "Date": [ "Mon, 18 Sep 2023 08:38:37 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "638" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGrouphloeqm\",\"name\":\"appGrouphloeqm\",\"type\":\"\",\"location\":\"East US\",\"properties\":{\"clientAppGroupIdentifier\":\"NamespaceSASKeyName=key1\",\"policies\":[{\"type\":\"ThrottlingPolicy\",\"name\":\"t1\",\"metricId\":\"IncomingMessages\",\"rateLimitThreshold\":10000},{\"type\":\"ThrottlingPolicy\",\"name\":\"t2\",\"metricId\":\"OutgoingBytes\",\"rateLimitThreshold\":20000},{\"type\":\"ThrottlingPolicy\",\"name\":\"t3\",\"metricId\":\"OutgoingMessages\",\"rateLimitThreshold\":12000}],\"isEnabled\":true}}", - "isContentBase64": false - } - }, - "Set-AzEventHubApplicationGroup+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGrouphloeqm?api-version=2023-01-01-preview+3": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGrouphloeqm?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "273" ], - "x-ms-client-request-id": [ "c8a5a64e-4bfa-4af2-9efd-7000b0d5c127" ], - "CommandName": [ "Get-AzEventHubApplicationGroup" ], - "FullCommandName": [ "Get-AzEventHubApplicationGroup_GetViaIdentity" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], - "Authorization": [ "[Filtered]" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "74242d24-fab8-41b8-97d9-45d50dbf428f_M3SN1_M3SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], - "x-ms-correlation-request-id": [ "21bc60f4-437c-4d02-9932-1804110d39f1" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083840Z:21bc60f4-437c-4d02-9932-1804110d39f1" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 72E4852536FC46F7B11FB0F279CD20BE Ref B: SEL221051504011 Ref C: 2023-09-18T08:38:38Z" ], - "Date": [ "Mon, 18 Sep 2023 08:38:39 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "638" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGrouphloeqm\",\"name\":\"appGrouphloeqm\",\"type\":\"\",\"location\":\"East US\",\"properties\":{\"clientAppGroupIdentifier\":\"NamespaceSASKeyName=key1\",\"policies\":[{\"type\":\"ThrottlingPolicy\",\"name\":\"t1\",\"metricId\":\"IncomingMessages\",\"rateLimitThreshold\":10000},{\"type\":\"ThrottlingPolicy\",\"name\":\"t2\",\"metricId\":\"OutgoingBytes\",\"rateLimitThreshold\":20000},{\"type\":\"ThrottlingPolicy\",\"name\":\"t3\",\"metricId\":\"OutgoingMessages\",\"rateLimitThreshold\":12000}],\"isEnabled\":true}}", - "isContentBase64": false - } - }, - "Set-AzEventHubApplicationGroup+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGrouphloeqm?api-version=2023-01-01-preview+4": { - "Request": { - "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGrouphloeqm?api-version=2023-01-01-preview", - "Content": "{\n \"properties\": {\n \"isEnabled\": true,\n \"clientAppGroupIdentifier\": \"NamespaceSASKeyName=key1\",\n \"policies\": [\n {\n \"name\": \"t1\",\n \"type\": \"ThrottlingPolicy\",\n \"rateLimitThreshold\": 10000,\n \"metricId\": \"IncomingMessages\"\n },\n {\n \"name\": \"t2\",\n \"type\": \"ThrottlingPolicy\",\n \"rateLimitThreshold\": 20000,\n \"metricId\": \"OutgoingBytes\"\n },\n {\n \"name\": \"t3\",\n \"type\": \"ThrottlingPolicy\",\n \"rateLimitThreshold\": 12000,\n \"metricId\": \"OutgoingMessages\"\n },\n {\n \"name\": \"t4\",\n \"type\": \"ThrottlingPolicy\",\n \"rateLimitThreshold\": 13000,\n \"metricId\": \"IncomingBytes\"\n }\n ]\n }\n}", - "isContentBase64": false, - "Headers": { - }, - "ContentHeaders": { - "Content-Type": [ "application/json" ], - "Content-Length": [ "729" ] - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "46bbf73d-bb01-4146-9243-2bb90a917c1a_M0SN1_M0SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], - "x-ms-correlation-request-id": [ "acf786dd-4cbd-4836-aa93-3c1c924a92c3" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083844Z:acf786dd-4cbd-4836-aa93-3c1c924a92c3" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: BDB920319DDC4801B8E60D2117E167FD Ref B: SEL221051504011 Ref C: 2023-09-18T08:38:40Z" ], - "Date": [ "Mon, 18 Sep 2023 08:38:43 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "732" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGrouphloeqm\",\"name\":\"appGrouphloeqm\",\"type\":\"\",\"location\":\"East US\",\"properties\":{\"clientAppGroupIdentifier\":\"NamespaceSASKeyName=key1\",\"policies\":[{\"type\":\"ThrottlingPolicy\",\"name\":\"t1\",\"metricId\":\"IncomingMessages\",\"rateLimitThreshold\":10000},{\"type\":\"ThrottlingPolicy\",\"name\":\"t2\",\"metricId\":\"OutgoingBytes\",\"rateLimitThreshold\":20000},{\"type\":\"ThrottlingPolicy\",\"name\":\"t3\",\"metricId\":\"OutgoingMessages\",\"rateLimitThreshold\":12000},{\"type\":\"ThrottlingPolicy\",\"name\":\"t4\",\"metricId\":\"IncomingBytes\",\"rateLimitThreshold\":13000}],\"isEnabled\":true}}", - "isContentBase64": false - } - }, - "Set-AzEventHubApplicationGroup+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGrouphloeqm?api-version=2023-01-01-preview+5": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGrouphloeqm?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "275" ], - "x-ms-client-request-id": [ "32051bb1-4445-4a9d-9f5c-c5b942719225" ], - "CommandName": [ "Get-AzEventHubApplicationGroup" ], - "FullCommandName": [ "Get-AzEventHubApplicationGroup_GetViaIdentity" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], - "Authorization": [ "[Filtered]" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "0914db2e-89ff-4363-8eff-28624def66f6_M8SN1_M8SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-correlation-request-id": [ "13f52d61-ece8-4baf-b9fb-428401bcf72f" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083849Z:13f52d61-ece8-4baf-b9fb-428401bcf72f" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: B4386D43149F41B380A8C1714C502A3B Ref B: SEL221051504011 Ref C: 2023-09-18T08:38:44Z" ], - "Date": [ "Mon, 18 Sep 2023 08:38:48 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "732" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGrouphloeqm\",\"name\":\"appGrouphloeqm\",\"type\":\"\",\"location\":\"East US\",\"properties\":{\"clientAppGroupIdentifier\":\"NamespaceSASKeyName=key1\",\"policies\":[{\"type\":\"ThrottlingPolicy\",\"name\":\"t1\",\"metricId\":\"IncomingMessages\",\"rateLimitThreshold\":10000},{\"type\":\"ThrottlingPolicy\",\"name\":\"t2\",\"metricId\":\"OutgoingBytes\",\"rateLimitThreshold\":20000},{\"type\":\"ThrottlingPolicy\",\"name\":\"t3\",\"metricId\":\"OutgoingMessages\",\"rateLimitThreshold\":12000},{\"type\":\"ThrottlingPolicy\",\"name\":\"t4\",\"metricId\":\"IncomingBytes\",\"rateLimitThreshold\":13000}],\"isEnabled\":true}}", - "isContentBase64": false - } - }, - "Set-AzEventHubApplicationGroup+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGrouphloeqm?api-version=2023-01-01-preview+6": { - "Request": { - "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGrouphloeqm?api-version=2023-01-01-preview", - "Content": "{\n \"properties\": {\n \"isEnabled\": false,\n \"clientAppGroupIdentifier\": \"NamespaceSASKeyName=key1\",\n \"policies\": [\n {\n \"name\": \"t1\",\n \"type\": \"ThrottlingPolicy\",\n \"rateLimitThreshold\": 10000,\n \"metricId\": \"IncomingMessages\"\n },\n {\n \"name\": \"t2\",\n \"type\": \"ThrottlingPolicy\",\n \"rateLimitThreshold\": 20000,\n \"metricId\": \"OutgoingBytes\"\n },\n {\n \"name\": \"t3\",\n \"type\": \"ThrottlingPolicy\",\n \"rateLimitThreshold\": 12000,\n \"metricId\": \"OutgoingMessages\"\n },\n {\n \"name\": \"t4\",\n \"type\": \"ThrottlingPolicy\",\n \"rateLimitThreshold\": 13000,\n \"metricId\": \"IncomingBytes\"\n }\n ]\n }\n}", - "isContentBase64": false, - "Headers": { - }, - "ContentHeaders": { - "Content-Type": [ "application/json" ], - "Content-Length": [ "730" ] - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "e22cc252-ccc0-49ac-b715-0969ead6f844_M8SN1_M8SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-correlation-request-id": [ "984e9506-45b6-489d-9233-17993f884862" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083850Z:984e9506-45b6-489d-9233-17993f884862" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 699B2268A1F94E99B918AE3088A60E6B Ref B: SEL221051504011 Ref C: 2023-09-18T08:38:49Z" ], - "Date": [ "Mon, 18 Sep 2023 08:38:49 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "733" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/applicationGroups/appGrouphloeqm\",\"name\":\"appGrouphloeqm\",\"type\":\"\",\"location\":\"East US\",\"properties\":{\"clientAppGroupIdentifier\":\"NamespaceSASKeyName=key1\",\"policies\":[{\"type\":\"ThrottlingPolicy\",\"name\":\"t1\",\"metricId\":\"IncomingMessages\",\"rateLimitThreshold\":10000},{\"type\":\"ThrottlingPolicy\",\"name\":\"t2\",\"metricId\":\"OutgoingBytes\",\"rateLimitThreshold\":20000},{\"type\":\"ThrottlingPolicy\",\"name\":\"t3\",\"metricId\":\"OutgoingMessages\",\"rateLimitThreshold\":12000},{\"type\":\"ThrottlingPolicy\",\"name\":\"t4\",\"metricId\":\"IncomingBytes\",\"rateLimitThreshold\":13000}],\"isEnabled\":false}}", - "isContentBase64": false - } - } -} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/test/Set-AzEventHubApplicationGroup.Tests.ps1 b/src/EventHub/EventHub.Autorest/test/Set-AzEventHubApplicationGroup.Tests.ps1 index c74fb855996e..11790cfc0414 100644 --- a/src/EventHub/EventHub.Autorest/test/Set-AzEventHubApplicationGroup.Tests.ps1 +++ b/src/EventHub/EventHub.Autorest/test/Set-AzEventHubApplicationGroup.Tests.ps1 @@ -15,7 +15,7 @@ if(($null -eq $TestName) -or ($TestName -contains 'Set-AzEventHubApplicationGrou } Describe 'Set-AzEventHubApplicationGroup' { - It 'SetExpanded' { + It 'SetExpanded' -Skip { $t3 = New-AzEventHubThrottlingPolicyConfig -Name t3 -MetricId OutgoingMessages -RateLimitThreshold 12000 $appGroup = Get-AzEventHubApplicationGroup -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -Name $env.appGroup2 $appGroup.Policy += $t3 @@ -26,12 +26,12 @@ Describe 'Set-AzEventHubApplicationGroup' { $updateAppGroup.ClientAppGroupIdentifier | Should -Be $appGroup.ClientAppGroupIdentifier } - It 'SetViaIdentityExpanded' { + It 'SetViaIdentityExpanded' -Skip { $t4 = New-AzEventHubThrottlingPolicyConfig -Name t4 -MetricId IncomingBytes -RateLimitThreshold 13000 $appGroup = Get-AzEventHubApplicationGroup -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace -Name $env.appGroup2 $appGroup.Policy += $t4 - { Set-AzEventHubApplicationGroup -InputObject $appGroup } | Should -Throw 'Please specify the property you want to update on the -InputObject' + { Set-AzEventHubApplicationGroup -InputObject $appGroup -ErrorAction Stop } | Should -Throw 'Please specify the property you want to update on the -InputObject' $updateAppGroup = Set-AzEventHubApplicationGroup -InputObject $appGroup -Policy $appGroup.Policy $updateAppGroup.Name | Should -Be $env.appGroup2 diff --git a/src/EventHub/EventHub.Autorest/test/Set-AzEventHubAuthorizationRule.Recording.json b/src/EventHub/EventHub.Autorest/test/Set-AzEventHubAuthorizationRule.Recording.json index e237cfe764e2..a2c0a08e4bce 100644 --- a/src/EventHub/EventHub.Autorest/test/Set-AzEventHubAuthorizationRule.Recording.json +++ b/src/EventHub/EventHub.Autorest/test/Set-AzEventHubAuthorizationRule.Recording.json @@ -1,17 +1,17 @@ { - "Set-AzEventHubAuthorizationRule+[NoContext]+SetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/auth-rule9ld078?api-version=2023-01-01-preview+1": { + "Set-AzEventHubAuthorizationRule+[NoContext]+SetExpandedNamespace+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/auth-rule85shx1?api-version=2023-01-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/auth-rule9ld078?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/auth-rule85shx1?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "277" ], - "x-ms-client-request-id": [ "2f8d4de8-fd87-4c92-8d72-151769dd0171" ], + "x-ms-unique-id": [ "220" ], + "x-ms-client-request-id": [ "55757cb2-5648-462c-903c-88323e40e36e" ], "CommandName": [ "Az.EventHub.private\\Get-AzEventHubNamespaceAuthorizationRule_Get" ], "FullCommandName": [ "Get-AzEventHubNamespaceAuthorizationRule_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,29 +22,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-request-id": [ "5d77744d-dd0b-4aba-a801-ddbece6795ff" ], - "x-ms-correlation-request-id": [ "5d77744d-dd0b-4aba-a801-ddbece6795ff" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083902Z:5d77744d-dd0b-4aba-a801-ddbece6795ff" ], + "x-ms-correlation-request-id": [ "56ec562b-3bb9-44a8-b9a1-9549069779fa" ], + "x-ms-client-request-id": [ "55757cb2-5648-462c-903c-88323e40e36e_RP" ], + "x-ms-messaging-activity-id": [ "c72fe197-455f-4b1e-9d34-c44032a66796" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G8|2024-04-29T13:12:08" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "56ec562b-3bb9-44a8-b9a1-9549069779fa" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T131208Z:56ec562b-3bb9-44a8-b9a1-9549069779fa" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 5E5B2F4BB1DB4E6F9B3C948F7C183348 Ref B: SEL221051504011 Ref C: 2023-09-18T08:39:00Z" ], - "Date": [ "Mon, 18 Sep 2023 08:39:01 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 6B4AE03A8E864EA1B54A27AFAD55DB46 Ref B: SEL221051504047 Ref C: 2024-04-29T13:12:06Z" ], + "Date": [ "Mon, 29 Apr 2024 13:12:07 GMT" ] }, "ContentHeaders": { "Content-Length": [ "352" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationrules/auth-rule9ld078\",\"name\":\"auth-rule9ld078\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationrules/auth-rule85shx1\",\"name\":\"auth-rule85shx1\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}}", "isContentBase64": false } }, - "Set-AzEventHubAuthorizationRule+[NoContext]+SetExpandedNamespace+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/auth-rule9ld078?api-version=2023-01-01-preview+2": { + "Set-AzEventHubAuthorizationRule+[NoContext]+SetExpandedNamespace+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/auth-rule85shx1?api-version=2023-01-01-preview+2": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/auth-rule9ld078?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/auth-rule85shx1?api-version=2023-01-01-preview", "Content": "{\n \"properties\": {\n \"rights\": [ \"Listen\" ]\n }\n}", "isContentBase64": false, "Headers": { @@ -59,38 +63,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1197" ], - "x-ms-request-id": [ "375e844b-945f-47f2-a791-e3fc110bd652" ], - "x-ms-correlation-request-id": [ "375e844b-945f-47f2-a791-e3fc110bd652" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083909Z:375e844b-945f-47f2-a791-e3fc110bd652" ], + "x-ms-correlation-request-id": [ "bd2e0fb0-00d8-4ae2-87f5-993378127727" ], + "x-ms-client-request-id": [ "ddb9c919-8fbc-423b-8b92-33e9a8caab76_RP" ], + "x-ms-messaging-activity-id": [ "5a78efd9-4f18-40ab-bd31-0a7082289ba6" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G10|2024-04-29T13:12:16" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "bd2e0fb0-00d8-4ae2-87f5-993378127727" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T131216Z:bd2e0fb0-00d8-4ae2-87f5-993378127727" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: AAF4800D60C442BEB31FB92221803760 Ref B: SEL221051504011 Ref C: 2023-09-18T08:39:02Z" ], - "Date": [ "Mon, 18 Sep 2023 08:39:08 GMT" ] + "X-MSEdge-Ref": [ "Ref A: F34121860B574374804C345C3A64C624 Ref B: SEL221051504047 Ref C: 2024-04-29T13:12:08Z" ], + "Date": [ "Mon, 29 Apr 2024 13:12:15 GMT" ] }, "ContentHeaders": { "Content-Length": [ "336" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/auth-rule9ld078\",\"name\":\"auth-rule9ld078\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/auth-rule85shx1\",\"name\":\"auth-rule85shx1\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\"]}}", "isContentBase64": false } }, - "Set-AzEventHubAuthorizationRule+[NoContext]+SetExpandedEntity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules/auth-ruleirhsyq?api-version=2023-01-01-preview+1": { + "Set-AzEventHubAuthorizationRule+[NoContext]+SetExpandedEntity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules/auth-rulef5iq9n?api-version=2023-01-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules/auth-ruleirhsyq?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules/auth-rulef5iq9n?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "279" ], - "x-ms-client-request-id": [ "7ad963fc-679b-48ab-ad97-17ac8d1974ec" ], + "x-ms-unique-id": [ "222" ], + "x-ms-client-request-id": [ "d4f00891-832b-4e9b-bb34-a2172140b802" ], "CommandName": [ "Az.EventHub.private\\Get-AzEventHubAuthorizationRule_Get" ], "FullCommandName": [ "Get-AzEventHubAuthorizationRule_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -101,29 +109,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-request-id": [ "86cb0e43-000e-4db2-a915-4e97051f5cbe" ], - "x-ms-correlation-request-id": [ "86cb0e43-000e-4db2-a915-4e97051f5cbe" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083910Z:86cb0e43-000e-4db2-a915-4e97051f5cbe" ], + "x-ms-correlation-request-id": [ "5ee88533-089d-4d4c-939d-dbffb38870e6" ], + "x-ms-client-request-id": [ "d4f00891-832b-4e9b-bb34-a2172140b802_RP" ], + "x-ms-messaging-activity-id": [ "41a2da8b-c711-445f-8fe2-53e117c872ac" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G8|2024-04-29T13:12:18" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "5ee88533-089d-4d4c-939d-dbffb38870e6" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T131218Z:5ee88533-089d-4d4c-939d-dbffb38870e6" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 5A0D51B7325847E98D3E5A2718BA2713 Ref B: SEL221051504011 Ref C: 2023-09-18T08:39:10Z" ], - "Date": [ "Mon, 18 Sep 2023 08:39:09 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 752D0F3C7CE342058879E1E1F9C26B88 Ref B: SEL221051504047 Ref C: 2024-04-29T13:12:16Z" ], + "Date": [ "Mon, 29 Apr 2024 13:12:17 GMT" ] }, "ContentHeaders": { "Content-Length": [ "371" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationrules/auth-ruleirhsyq\",\"name\":\"auth-ruleirhsyq\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationrules/auth-rulef5iq9n\",\"name\":\"auth-rulef5iq9n\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\"]}}", "isContentBase64": false } }, - "Set-AzEventHubAuthorizationRule+[NoContext]+SetExpandedEntity+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules/auth-ruleirhsyq?api-version=2023-01-01-preview+2": { + "Set-AzEventHubAuthorizationRule+[NoContext]+SetExpandedEntity+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules/auth-rulef5iq9n?api-version=2023-01-01-preview+2": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules/auth-ruleirhsyq?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules/auth-rulef5iq9n?api-version=2023-01-01-preview", "Content": "{\n \"properties\": {\n \"rights\": [ \"Send\" ]\n }\n}", "isContentBase64": false, "Headers": { @@ -138,38 +150,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], - "x-ms-request-id": [ "bd7d957e-e050-44dc-b821-a2f6b15d738d" ], - "x-ms-correlation-request-id": [ "bd7d957e-e050-44dc-b821-a2f6b15d738d" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083911Z:bd7d957e-e050-44dc-b821-a2f6b15d738d" ], + "x-ms-correlation-request-id": [ "affcd744-d379-4cd1-a741-98bffbfcb190" ], + "x-ms-client-request-id": [ "530f0516-ea9c-470d-af22-d15f9d090c0e_RP" ], + "x-ms-messaging-activity-id": [ "1c837b6f-90a1-4e10-9dc2-15ea432589af" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G6|2024-04-29T13:12:21" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1197" ], + "x-ms-request-id": [ "affcd744-d379-4cd1-a741-98bffbfcb190" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240429T131221Z:affcd744-d379-4cd1-a741-98bffbfcb190" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 35D2D20FB62145B4B3A4F4510FEC4605 Ref B: SEL221051504011 Ref C: 2023-09-18T08:39:10Z" ], - "Date": [ "Mon, 18 Sep 2023 08:39:10 GMT" ] + "X-MSEdge-Ref": [ "Ref A: F1A4D5F22BE74CE191177DF783940543 Ref B: SEL221051504047 Ref C: 2024-04-29T13:12:18Z" ], + "Date": [ "Mon, 29 Apr 2024 13:12:20 GMT" ] }, "ContentHeaders": { "Content-Length": [ "349" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules/auth-ruleirhsyq\",\"name\":\"auth-ruleirhsyq\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/authorizationrules\",\"properties\":{\"rights\":[\"Send\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules/auth-rulef5iq9n\",\"name\":\"auth-rulef5iq9n\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/authorizationrules\",\"properties\":{\"rights\":[\"Send\"]}}", "isContentBase64": false } }, - "Set-AzEventHubAuthorizationRule+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/auth-rule9ld078?api-version=2023-01-01-preview+1": { + "Set-AzEventHubAuthorizationRule+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/auth-rule85shx1?api-version=2023-01-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/auth-rule9ld078?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/auth-rule85shx1?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "281" ], - "x-ms-client-request-id": [ "59dc5b78-7628-4f4f-9811-86a8235257a1" ], + "x-ms-unique-id": [ "224" ], + "x-ms-client-request-id": [ "c3233f49-564c-4e49-8c20-6e8ac1714d2a" ], "CommandName": [ "Az.EventHub.private\\Get-AzEventHubNamespaceAuthorizationRule_Get" ], "FullCommandName": [ "Get-AzEventHubNamespaceAuthorizationRule_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -180,38 +196,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-request-id": [ "7bd687cb-0510-4bb0-bd79-71a5e61bf8fe" ], - "x-ms-correlation-request-id": [ "7bd687cb-0510-4bb0-bd79-71a5e61bf8fe" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083912Z:7bd687cb-0510-4bb0-bd79-71a5e61bf8fe" ], + "x-ms-correlation-request-id": [ "2a345ce9-0c06-43fa-8f50-fe3530cb3aad" ], + "x-ms-client-request-id": [ "c3233f49-564c-4e49-8c20-6e8ac1714d2a_RP" ], + "x-ms-messaging-activity-id": [ "28c0a856-3308-4af5-9422-c5fc259a1e34" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G9|2024-04-29T13:12:22" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "2a345ce9-0c06-43fa-8f50-fe3530cb3aad" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T131222Z:2a345ce9-0c06-43fa-8f50-fe3530cb3aad" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 7556DC4E948345069AFE52E01536662B Ref B: SEL221051504011 Ref C: 2023-09-18T08:39:11Z" ], - "Date": [ "Mon, 18 Sep 2023 08:39:11 GMT" ] + "X-MSEdge-Ref": [ "Ref A: DCF670F745D34F9D92387475FF81D81C Ref B: SEL221051504047 Ref C: 2024-04-29T13:12:21Z" ], + "Date": [ "Mon, 29 Apr 2024 13:12:21 GMT" ] }, "ContentHeaders": { "Content-Length": [ "336" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationrules/auth-rule9ld078\",\"name\":\"auth-rule9ld078\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationrules/auth-rule85shx1\",\"name\":\"auth-rule85shx1\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\"]}}", "isContentBase64": false } }, - "Set-AzEventHubAuthorizationRule+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/auth-rule9ld078?api-version=2023-01-01-preview+2": { + "Set-AzEventHubAuthorizationRule+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/auth-rule85shx1?api-version=2023-01-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/auth-rule9ld078?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/auth-rule85shx1?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "282" ], - "x-ms-client-request-id": [ "d8cedbda-89a1-49ba-aaf8-03b9ba576a29" ], + "x-ms-unique-id": [ "225" ], + "x-ms-client-request-id": [ "c619edfd-1f72-4718-ae88-bc4de530c3cd" ], "CommandName": [ "Az.EventHub.private\\Get-AzEventHubNamespaceAuthorizationRule_GetViaIdentity" ], "FullCommandName": [ "Get-AzEventHubNamespaceAuthorizationRule_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -222,29 +242,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], - "x-ms-request-id": [ "0ad14017-7711-4644-afc9-a1bfe51da70c" ], - "x-ms-correlation-request-id": [ "0ad14017-7711-4644-afc9-a1bfe51da70c" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083914Z:0ad14017-7711-4644-afc9-a1bfe51da70c" ], + "x-ms-correlation-request-id": [ "9c99d7bb-1c9f-4213-9958-12d0dbc78242" ], + "x-ms-client-request-id": [ "c619edfd-1f72-4718-ae88-bc4de530c3cd_RP" ], + "x-ms-messaging-activity-id": [ "af045d27-1e86-428a-874f-9b070a5cab03" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G13|2024-04-29T13:12:24" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "9c99d7bb-1c9f-4213-9958-12d0dbc78242" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T131224Z:9c99d7bb-1c9f-4213-9958-12d0dbc78242" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: CB2E67DE75694930911280ADA4F23755 Ref B: SEL221051504011 Ref C: 2023-09-18T08:39:12Z" ], - "Date": [ "Mon, 18 Sep 2023 08:39:13 GMT" ] + "X-MSEdge-Ref": [ "Ref A: CF35DC5CA98543BCAC98E7491F115016 Ref B: SEL221051504047 Ref C: 2024-04-29T13:12:22Z" ], + "Date": [ "Mon, 29 Apr 2024 13:12:24 GMT" ] }, "ContentHeaders": { "Content-Length": [ "336" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationrules/auth-rule9ld078\",\"name\":\"auth-rule9ld078\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationrules/auth-rule85shx1\",\"name\":\"auth-rule85shx1\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Listen\"]}}", "isContentBase64": false } }, - "Set-AzEventHubAuthorizationRule+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/auth-rule9ld078?api-version=2023-01-01-preview+3": { + "Set-AzEventHubAuthorizationRule+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/auth-rule85shx1?api-version=2023-01-01-preview+3": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/auth-rule9ld078?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/auth-rule85shx1?api-version=2023-01-01-preview", "Content": "{\n \"properties\": {\n \"rights\": [ \"Manage\", \"Send\", \"Listen\" ]\n }\n}", "isContentBase64": false, "Headers": { @@ -259,38 +283,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1197" ], - "x-ms-request-id": [ "76003960-e7a6-4333-8830-be6210d732bf" ], - "x-ms-correlation-request-id": [ "76003960-e7a6-4333-8830-be6210d732bf" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083921Z:76003960-e7a6-4333-8830-be6210d732bf" ], + "x-ms-correlation-request-id": [ "63ef8817-5ee8-4a5a-82eb-4f0f5ffaf335" ], + "x-ms-client-request-id": [ "3cd96f1e-e71d-4688-b085-7135a238a9b3_RP" ], + "x-ms-messaging-activity-id": [ "c5c707b3-3007-4958-af59-79fbf4a1841f" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G2|2024-04-29T13:12:31" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-request-id": [ "63ef8817-5ee8-4a5a-82eb-4f0f5ffaf335" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T131231Z:63ef8817-5ee8-4a5a-82eb-4f0f5ffaf335" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 2B7D2D3B931B41D5B2BDD9F4579008DB Ref B: SEL221051504011 Ref C: 2023-09-18T08:39:14Z" ], - "Date": [ "Mon, 18 Sep 2023 08:39:20 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 56F2573579CE40F1B3E631E29F1FB9CD Ref B: SEL221051504047 Ref C: 2024-04-29T13:12:24Z" ], + "Date": [ "Mon, 29 Apr 2024 13:12:30 GMT" ] }, "ContentHeaders": { "Content-Length": [ "352" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/authorizationRules/auth-rule9ld078\",\"name\":\"auth-rule9ld078\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/authorizationRules/auth-rule85shx1\",\"name\":\"auth-rule85shx1\",\"type\":\"Microsoft.EventHub/Namespaces/AuthorizationRules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}}", "isContentBase64": false } }, - "Set-AzEventHubAuthorizationRule+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules/auth-ruleirhsyq?api-version=2023-01-01-preview+4": { + "Set-AzEventHubAuthorizationRule+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules/auth-rulef5iq9n?api-version=2023-01-01-preview+4": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules/auth-ruleirhsyq?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules/auth-rulef5iq9n?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "284" ], - "x-ms-client-request-id": [ "f785e470-a5fe-40a2-8982-294c2a0b67cb" ], + "x-ms-unique-id": [ "227" ], + "x-ms-client-request-id": [ "ae001721-546e-45a0-b1e7-7a70231c6297" ], "CommandName": [ "Az.EventHub.private\\Get-AzEventHubAuthorizationRule_Get" ], "FullCommandName": [ "Get-AzEventHubAuthorizationRule_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -301,38 +329,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-request-id": [ "6ae7051f-2150-4c34-b88d-2a05b7a7bafe" ], - "x-ms-correlation-request-id": [ "6ae7051f-2150-4c34-b88d-2a05b7a7bafe" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083922Z:6ae7051f-2150-4c34-b88d-2a05b7a7bafe" ], + "x-ms-correlation-request-id": [ "09ef3ab9-98c9-493c-a256-ecf7ee1d273a" ], + "x-ms-client-request-id": [ "ae001721-546e-45a0-b1e7-7a70231c6297_RP" ], + "x-ms-messaging-activity-id": [ "af74d8dd-7fdd-47c7-b468-1338d30aaf46" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G13|2024-04-29T13:12:32" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "09ef3ab9-98c9-493c-a256-ecf7ee1d273a" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T131232Z:09ef3ab9-98c9-493c-a256-ecf7ee1d273a" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: C1E3268C89184B6C8352523EEE05E762 Ref B: SEL221051504011 Ref C: 2023-09-18T08:39:21Z" ], - "Date": [ "Mon, 18 Sep 2023 08:39:22 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 9F55D493A889440AAFD50B1A721EF865 Ref B: SEL221051504047 Ref C: 2024-04-29T13:12:31Z" ], + "Date": [ "Mon, 29 Apr 2024 13:12:31 GMT" ] }, "ContentHeaders": { "Content-Length": [ "369" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationrules/auth-ruleirhsyq\",\"name\":\"auth-ruleirhsyq\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Send\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationrules/auth-rulef5iq9n\",\"name\":\"auth-rulef5iq9n\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Send\"]}}", "isContentBase64": false } }, - "Set-AzEventHubAuthorizationRule+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules/auth-ruleirhsyq?api-version=2023-01-01-preview+5": { + "Set-AzEventHubAuthorizationRule+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules/auth-rulef5iq9n?api-version=2023-01-01-preview+5": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules/auth-ruleirhsyq?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules/auth-rulef5iq9n?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "285" ], - "x-ms-client-request-id": [ "a259139d-f876-4989-83d5-5ce06edc0a8c" ], + "x-ms-unique-id": [ "228" ], + "x-ms-client-request-id": [ "6cce5d2c-ad0a-4e04-aa18-148761df4406" ], "CommandName": [ "Az.EventHub.private\\Get-AzEventHubAuthorizationRule_GetViaIdentity" ], "FullCommandName": [ "Get-AzEventHubAuthorizationRule_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -343,29 +375,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], - "x-ms-request-id": [ "633dc574-16fb-440b-8b34-6de06324cbb1" ], - "x-ms-correlation-request-id": [ "633dc574-16fb-440b-8b34-6de06324cbb1" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083924Z:633dc574-16fb-440b-8b34-6de06324cbb1" ], + "x-ms-correlation-request-id": [ "64742bde-891c-439e-ad25-c63103df1155" ], + "x-ms-client-request-id": [ "6cce5d2c-ad0a-4e04-aa18-148761df4406_RP" ], + "x-ms-messaging-activity-id": [ "e1dd61b1-b1de-4ab3-86e2-bb6718da3efb" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G3|2024-04-29T13:12:33" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "64742bde-891c-439e-ad25-c63103df1155" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T131233Z:64742bde-891c-439e-ad25-c63103df1155" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: D362618CA56745869950045C9B15156A Ref B: SEL221051504011 Ref C: 2023-09-18T08:39:23Z" ], - "Date": [ "Mon, 18 Sep 2023 08:39:24 GMT" ] + "X-MSEdge-Ref": [ "Ref A: B539CA2EF24A40F1907A211DA2BFB686 Ref B: SEL221051504047 Ref C: 2024-04-29T13:12:32Z" ], + "Date": [ "Mon, 29 Apr 2024 13:12:32 GMT" ] }, "ContentHeaders": { "Content-Length": [ "369" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationrules/auth-ruleirhsyq\",\"name\":\"auth-ruleirhsyq\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Send\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationrules/auth-rulef5iq9n\",\"name\":\"auth-rulef5iq9n\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/authorizationrules\",\"location\":\"eastus\",\"properties\":{\"rights\":[\"Send\"]}}", "isContentBase64": false } }, - "Set-AzEventHubAuthorizationRule+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules/auth-ruleirhsyq?api-version=2023-01-01-preview+6": { + "Set-AzEventHubAuthorizationRule+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules/auth-rulef5iq9n?api-version=2023-01-01-preview+6": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules/auth-ruleirhsyq?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules/auth-rulef5iq9n?api-version=2023-01-01-preview", "Content": "{\n \"properties\": {\n \"rights\": [ \"Manage\", \"Send\", \"Listen\" ]\n }\n}", "isContentBase64": false, "Headers": { @@ -380,22 +416,26 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1197" ], - "x-ms-request-id": [ "ce6ee52d-d3e0-4c46-8c43-6b8094f843d4" ], - "x-ms-correlation-request-id": [ "ce6ee52d-d3e0-4c46-8c43-6b8094f843d4" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083926Z:ce6ee52d-d3e0-4c46-8c43-6b8094f843d4" ], + "x-ms-correlation-request-id": [ "8b2e87cd-257a-496e-a198-01f37c947bc0" ], + "x-ms-client-request-id": [ "f84b7abf-0bae-4749-87c2-681343fc9647_RP" ], + "x-ms-messaging-activity-id": [ "d3bd6a73-d983-4bc6-89be-96fa35d9dee0" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G3|2024-04-29T13:12:34" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "8b2e87cd-257a-496e-a198-01f37c947bc0" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T131234Z:8b2e87cd-257a-496e-a198-01f37c947bc0" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 31FBE448FFC841829C428AC03E5A71B7 Ref B: SEL221051504011 Ref C: 2023-09-18T08:39:24Z" ], - "Date": [ "Mon, 18 Sep 2023 08:39:25 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 103808EEE8C04B3D9A60CF7CC283E51D Ref B: SEL221051504047 Ref C: 2024-04-29T13:12:33Z" ], + "Date": [ "Mon, 29 Apr 2024 13:12:33 GMT" ] }, "ContentHeaders": { "Content-Length": [ "367" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/authorizationRules/auth-ruleirhsyq\",\"name\":\"auth-ruleirhsyq\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/authorizationrules\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/authorizationRules/auth-rulef5iq9n\",\"name\":\"auth-rulef5iq9n\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/authorizationrules\",\"properties\":{\"rights\":[\"Manage\",\"Send\",\"Listen\"]}}", "isContentBase64": false } } diff --git a/src/EventHub/EventHub.Autorest/test/Set-AzEventHubCluster.Tests.ps1 b/src/EventHub/EventHub.Autorest/test/Set-AzEventHubCluster.Tests.ps1 index 87d3718f6c22..0972a4356be8 100644 --- a/src/EventHub/EventHub.Autorest/test/Set-AzEventHubCluster.Tests.ps1 +++ b/src/EventHub/EventHub.Autorest/test/Set-AzEventHubCluster.Tests.ps1 @@ -25,7 +25,7 @@ Describe 'Set-AzEventHubCluster' { It 'SetViaIdentityExpanded' -skip { $cluster = Get-AzEventHubCluster -ResourceGroupName $env.clusterResourceGroup -Name $env.cluster - { Set-AzEventHubCluster -InputObject $cluster } | Should -Throw 'Please specify the property you want to update on the -InputObject' + { Set-AzEventHubCluster -InputObject $cluster -ErrorAction Stop } | Should -Throw 'Please specify the property you want to update on the -InputObject' $cluster = Set-AzEventHubCluster -InputObject $cluster -Tag @{a='b'} $cluster.ResourceGroupName | Should -Be $env.clusterResourceGroup diff --git a/src/EventHub/EventHub.Autorest/test/Set-AzEventHubConsumerGroup.Recording.json b/src/EventHub/EventHub.Autorest/test/Set-AzEventHubConsumerGroup.Recording.json index 44ba02bc6968..977d02773580 100644 --- a/src/EventHub/EventHub.Autorest/test/Set-AzEventHubConsumerGroup.Recording.json +++ b/src/EventHub/EventHub.Autorest/test/Set-AzEventHubConsumerGroup.Recording.json @@ -1,17 +1,17 @@ { - "Set-AzEventHubConsumerGroup+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/consumergroups/%24Default?api-version=2023-01-01-preview+1": { + "Set-AzEventHubConsumerGroup+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/consumergroups/%24Default?api-version=2023-01-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/consumergroups/%24Default?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/consumergroups/%24Default?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "287" ], - "x-ms-client-request-id": [ "74ae3231-3ff4-4b8b-bc8c-cce2af70be25" ], + "x-ms-unique-id": [ "230" ], + "x-ms-client-request-id": [ "054dc337-5abe-45af-9693-86467e7630d1" ], "CommandName": [ "Get-AzEventHubConsumerGroup" ], "FullCommandName": [ "Get-AzEventHubConsumerGroup_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,29 +22,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-request-id": [ "3616d460-0ebe-4061-9434-2f4d5a56c6dc" ], - "x-ms-correlation-request-id": [ "3616d460-0ebe-4061-9434-2f4d5a56c6dc" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083950Z:3616d460-0ebe-4061-9434-2f4d5a56c6dc" ], + "x-ms-correlation-request-id": [ "14149404-400f-4102-89be-3506e61c74ba" ], + "x-ms-client-request-id": [ "054dc337-5abe-45af-9693-86467e7630d1_RP" ], + "x-ms-messaging-activity-id": [ "379d8a46-a46b-4002-b622-697f53850011" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G3|2024-04-29T13:13:02" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "14149404-400f-4102-89be-3506e61c74ba" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T131302Z:14149404-400f-4102-89be-3506e61c74ba" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 951BDBBC57E0434D8F07CF3E1F72EAA4 Ref B: SEL221051504011 Ref C: 2023-09-18T08:39:50Z" ], - "Date": [ "Mon, 18 Sep 2023 08:39:50 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 14B75429CE124AD2A257AD16346B1165 Ref B: SEL221051504047 Ref C: 2024-04-29T13:13:02Z" ], + "Date": [ "Mon, 29 Apr 2024 13:13:02 GMT" ] }, "ContentHeaders": { "Content-Length": [ "407" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/consumergroups/$Default\",\"name\":\"$Default\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/consumergroups\",\"location\":\"eastus\",\"properties\":{\"createdAt\":\"2023-09-18T07:33:57.778Z\",\"updatedAt\":\"2023-09-18T07:33:57.856Z\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/consumergroups/$Default\",\"name\":\"$Default\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/consumergroups\",\"location\":\"eastus\",\"properties\":{\"createdAt\":\"2024-04-29T12:37:46.654Z\",\"updatedAt\":\"2024-04-29T12:37:46.685Z\"}}", "isContentBase64": false } }, - "Set-AzEventHubConsumerGroup+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/consumergroups/$Default?api-version=2023-01-01-preview+2": { + "Set-AzEventHubConsumerGroup+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/consumergroups/$Default?api-version=2023-01-01-preview+2": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/consumergroups/$Default?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/consumergroups/$Default?api-version=2023-01-01-preview", "Content": "{\n \"properties\": {\n \"userMetadata\": \"Second Metadata\"\n }\n}", "isContentBase64": false, "Headers": { @@ -59,38 +63,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], - "x-ms-request-id": [ "2f397ac1-4411-4a13-91d4-5a0ae0eb143a" ], - "x-ms-correlation-request-id": [ "2f397ac1-4411-4a13-91d4-5a0ae0eb143a" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083952Z:2f397ac1-4411-4a13-91d4-5a0ae0eb143a" ], + "x-ms-correlation-request-id": [ "4c495bd4-51e5-466e-9aac-72441baa93a0" ], + "x-ms-client-request-id": [ "4683a1d4-361d-413b-a449-e4a1bdcf5a80_RP" ], + "x-ms-messaging-activity-id": [ "264f9d12-25b7-4513-9cfb-3b05c59372d9" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G11|2024-04-29T13:13:03" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "4c495bd4-51e5-466e-9aac-72441baa93a0" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T131303Z:4c495bd4-51e5-466e-9aac-72441baa93a0" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 8702EE4E31DB4EB9B43250E15D931EE3 Ref B: SEL221051504011 Ref C: 2023-09-18T08:39:50Z" ], - "Date": [ "Mon, 18 Sep 2023 08:39:51 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 63377022E1D14D9386626B03724E58FF Ref B: SEL221051504047 Ref C: 2024-04-29T13:13:02Z" ], + "Date": [ "Mon, 29 Apr 2024 13:13:03 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "448" ], + "Content-Length": [ "446" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/consumergroups/$Default\",\"name\":\"$Default\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/consumergroups\",\"location\":\"eastus\",\"properties\":{\"createdAt\":\"2023-09-18T08:39:52.2026962Z\",\"updatedAt\":\"2023-09-18T08:39:52.2026962Z\",\"userMetadata\":\"Second Metadata\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/consumergroups/$Default\",\"name\":\"$Default\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/consumergroups\",\"location\":\"eastus\",\"properties\":{\"createdAt\":\"2024-04-29T13:13:03.704724Z\",\"updatedAt\":\"2024-04-29T13:13:03.704724Z\",\"userMetadata\":\"Second Metadata\"}}", "isContentBase64": false } }, - "Set-AzEventHubConsumerGroup+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/consumergroups/%24Default?api-version=2023-01-01-preview+1": { + "Set-AzEventHubConsumerGroup+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/consumergroups/%24Default?api-version=2023-01-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/consumergroups/%24Default?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/consumergroups/%24Default?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "289" ], - "x-ms-client-request-id": [ "bfb0407e-55ba-49c6-8c82-8afae9d99835" ], + "x-ms-unique-id": [ "232" ], + "x-ms-client-request-id": [ "df88a9b9-d4d4-4115-a572-c38881adb6fa" ], "CommandName": [ "Get-AzEventHubConsumerGroup" ], "FullCommandName": [ "Get-AzEventHubConsumerGroup_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -101,38 +109,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-request-id": [ "632f9965-d034-4519-9922-39d339e7f80b" ], - "x-ms-correlation-request-id": [ "632f9965-d034-4519-9922-39d339e7f80b" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083954Z:632f9965-d034-4519-9922-39d339e7f80b" ], + "x-ms-correlation-request-id": [ "99bb750b-f51e-476e-92b3-b9d474a79bfa" ], + "x-ms-client-request-id": [ "df88a9b9-d4d4-4115-a572-c38881adb6fa_RP" ], + "x-ms-messaging-activity-id": [ "c3cb811a-0c07-4b28-a1fe-9ed0c50c70c5" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G13|2024-04-29T13:13:04" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "99bb750b-f51e-476e-92b3-b9d474a79bfa" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T131304Z:99bb750b-f51e-476e-92b3-b9d474a79bfa" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 475F3B6F446040C79643ADD1C3A82B26 Ref B: SEL221051504011 Ref C: 2023-09-18T08:39:52Z" ], - "Date": [ "Mon, 18 Sep 2023 08:39:53 GMT" ] + "X-MSEdge-Ref": [ "Ref A: B73A04D66F8D4D52B79E9DF60225E780 Ref B: SEL221051504047 Ref C: 2024-04-29T13:13:03Z" ], + "Date": [ "Mon, 29 Apr 2024 13:13:03 GMT" ] }, "ContentHeaders": { "Content-Length": [ "440" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/consumergroups/$Default\",\"name\":\"$Default\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/consumergroups\",\"location\":\"eastus\",\"properties\":{\"createdAt\":\"2023-09-18T07:33:57.778Z\",\"updatedAt\":\"2023-09-18T07:33:57.856Z\",\"userMetadata\":\"Second Metadata\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/consumergroups/$Default\",\"name\":\"$Default\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/consumergroups\",\"location\":\"eastus\",\"properties\":{\"createdAt\":\"2024-04-29T12:37:46.654Z\",\"updatedAt\":\"2024-04-29T12:37:46.685Z\",\"userMetadata\":\"Second Metadata\"}}", "isContentBase64": false } }, - "Set-AzEventHubConsumerGroup+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/consumergroups/$Default?api-version=2023-01-01-preview+2": { + "Set-AzEventHubConsumerGroup+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/consumergroups/$Default?api-version=2023-01-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/consumergroups/$Default?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/consumergroups/$Default?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "290" ], - "x-ms-client-request-id": [ "7d6a56de-f340-448c-a5e7-de51a306d709" ], + "x-ms-unique-id": [ "233" ], + "x-ms-client-request-id": [ "4d60b70b-5b25-4741-8dc8-501958d844cb" ], "CommandName": [ "Get-AzEventHubConsumerGroup" ], "FullCommandName": [ "Get-AzEventHubConsumerGroup_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -143,29 +155,33 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-request-id": [ "2c0eb4d6-e55d-4c8e-81c2-faa170524e93" ], - "x-ms-correlation-request-id": [ "2c0eb4d6-e55d-4c8e-81c2-faa170524e93" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083954Z:2c0eb4d6-e55d-4c8e-81c2-faa170524e93" ], + "x-ms-correlation-request-id": [ "a2c04c1c-4a5c-4e88-a801-e695cfb52a37" ], + "x-ms-client-request-id": [ "4d60b70b-5b25-4741-8dc8-501958d844cb_RP" ], + "x-ms-messaging-activity-id": [ "21a8b6bd-ac59-446f-b1ad-984b3ec333a1" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G8|2024-04-29T13:13:04" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "a2c04c1c-4a5c-4e88-a801-e695cfb52a37" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T131305Z:a2c04c1c-4a5c-4e88-a801-e695cfb52a37" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 3D372A83D2F34EEC8D6D1BC26ECE0C24 Ref B: SEL221051504011 Ref C: 2023-09-18T08:39:54Z" ], - "Date": [ "Mon, 18 Sep 2023 08:39:54 GMT" ] + "X-MSEdge-Ref": [ "Ref A: A20E611D07AA433FA3996D51DD0E3EE8 Ref B: SEL221051504047 Ref C: 2024-04-29T13:13:04Z" ], + "Date": [ "Mon, 29 Apr 2024 13:13:04 GMT" ] }, "ContentHeaders": { "Content-Length": [ "440" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/consumergroups/$Default\",\"name\":\"$Default\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/consumergroups\",\"location\":\"eastus\",\"properties\":{\"createdAt\":\"2023-09-18T07:33:57.778Z\",\"updatedAt\":\"2023-09-18T07:33:57.856Z\",\"userMetadata\":\"Second Metadata\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/consumergroups/$Default\",\"name\":\"$Default\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/consumergroups\",\"location\":\"eastus\",\"properties\":{\"createdAt\":\"2024-04-29T12:37:46.654Z\",\"updatedAt\":\"2024-04-29T12:37:46.685Z\",\"userMetadata\":\"Second Metadata\"}}", "isContentBase64": false } }, - "Set-AzEventHubConsumerGroup+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/consumergroups/$Default?api-version=2023-01-01-preview+3": { + "Set-AzEventHubConsumerGroup+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/consumergroups/$Default?api-version=2023-01-01-preview+3": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/consumergroups/$Default?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/consumergroups/$Default?api-version=2023-01-01-preview", "Content": "{\n \"properties\": {\n \"userMetadata\": \"Third Metadata\"\n }\n}", "isContentBase64": false, "Headers": { @@ -180,22 +196,26 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-request-id": [ "4f352fb8-67a4-4646-b90e-6ece292e6025" ], - "x-ms-correlation-request-id": [ "4f352fb8-67a4-4646-b90e-6ece292e6025" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T083955Z:4f352fb8-67a4-4646-b90e-6ece292e6025" ], + "x-ms-correlation-request-id": [ "51decbba-9394-44e1-8fc8-e8c862710b23" ], + "x-ms-client-request-id": [ "d51258e3-5eed-4dc4-a91d-2c6f5d643937_RP" ], + "x-ms-messaging-activity-id": [ "87149f75-8d42-4719-9853-400885ebfb2a" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G8|2024-04-29T13:13:05" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "51decbba-9394-44e1-8fc8-e8c862710b23" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T131305Z:51decbba-9394-44e1-8fc8-e8c862710b23" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: E7437C3FEDF2498095F50D6508095DCF Ref B: SEL221051504011 Ref C: 2023-09-18T08:39:54Z" ], - "Date": [ "Mon, 18 Sep 2023 08:39:54 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 88D50B967E054A96BD19AE73B34ED80E Ref B: SEL221051504047 Ref C: 2024-04-29T13:13:05Z" ], + "Date": [ "Mon, 29 Apr 2024 13:13:04 GMT" ] }, "ContentHeaders": { "Content-Length": [ "447" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/eventhubs/eventHub504uah/consumergroups/$Default\",\"name\":\"$Default\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/consumergroups\",\"location\":\"eastus\",\"properties\":{\"createdAt\":\"2023-09-18T08:39:55.4561397Z\",\"updatedAt\":\"2023-09-18T08:39:55.4561397Z\",\"userMetadata\":\"Third Metadata\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/eventhubs/eventHub789hmt/consumergroups/$Default\",\"name\":\"$Default\",\"type\":\"Microsoft.EventHub/namespaces/eventhubs/consumergroups\",\"location\":\"eastus\",\"properties\":{\"createdAt\":\"2024-04-29T13:13:05.5212574Z\",\"updatedAt\":\"2024-04-29T13:13:05.5212574Z\",\"userMetadata\":\"Third Metadata\"}}", "isContentBase64": false } } diff --git a/src/EventHub/EventHub.Autorest/test/Set-AzEventHubGeoDRConfigurationBreakPair.Recording.json b/src/EventHub/EventHub.Autorest/test/Set-AzEventHubGeoDRConfigurationBreakPair.Recording.json index e6fea30fa388..2c9e1758b79b 100644 --- a/src/EventHub/EventHub.Autorest/test/Set-AzEventHubGeoDRConfigurationBreakPair.Recording.json +++ b/src/EventHub/EventHub.Autorest/test/Set-AzEventHubGeoDRConfigurationBreakPair.Recording.json @@ -1,17 +1,17 @@ { - "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+1": { + "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "292" ], - "x-ms-client-request-id": [ "1395a3eb-576f-411c-aafa-88cf60b8d6f8" ], + "x-ms-unique-id": [ "235" ], + "x-ms-client-request-id": [ "83c86056-f276-4d3e-af91-2759f7f32e0c" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,39 +22,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "1feb65ef-2919-47a7-bebc-cda617ba7650_M0CH3_M0CH3" ], + "x-ms-request-id": [ "beb56fcf-351b-40fb-b697-9673ad92643c_M11CH3_M11CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-correlation-request-id": [ "d8366d2a-4c85-40be-ba46-1168fb30e878" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T084008Z:d8366d2a-4c85-40be-ba46-1168fb30e878" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "2d9a4c22-5cbc-429e-b4e2-90620b2915b2" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T131322Z:2d9a4c22-5cbc-429e-b4e2-90620b2915b2" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: D0BA0BF2E80C4FCFAB6B75AD61CD74D9 Ref B: SEL221051504011 Ref C: 2023-09-18T08:40:06Z" ], - "Date": [ "Mon, 18 Sep 2023 08:40:08 GMT" ] + "X-MSEdge-Ref": [ "Ref A: D917B50760224B6496FD71A42A6EA5E1 Ref B: SEL221051504047 Ref C: 2024-04-29T13:13:18Z" ], + "Date": [ "Mon, 29 Apr 2024 13:13:21 GMT" ] }, "ContentHeaders": { "Content-Length": [ "590" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\",\"pendingReplicationOperationsCount\":0}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\",\"pendingReplicationOperationsCount\":0}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+Break+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so/breakPairing?api-version=2023-01-01-preview+2": { + "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+Break+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof/breakPairing?api-version=2023-01-01-preview+2": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so/breakPairing?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof/breakPairing?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "293" ], - "x-ms-client-request-id": [ "f3f2940b-f315-487f-a938-b8ccb62e3452" ], + "x-ms-unique-id": [ "236" ], + "x-ms-client-request-id": [ "4f07119c-68ba-4403-a640-85143c8be7a9" ], "CommandName": [ "Az.EventHub.private\\Invoke-AzEventHubBreakDisasterRecoveryConfigPairing_Break" ], "FullCommandName": [ "Invoke-AzEventHubBreakDisasterRecoveryConfigPairing_Break" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -65,16 +66,17 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "ef71697e-0219-40b0-9ddc-bd464047861c_M6SN1_M6SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], - "x-ms-correlation-request-id": [ "b196c60e-5217-441c-b6c1-bc6410a26b95" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T084010Z:b196c60e-5217-441c-b6c1-bc6410a26b95" ], + "x-ms-request-id": [ "3a0591bd-d70a-42e8-9746-17dc707b98ae_M11CH3_M11CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-correlation-request-id": [ "2b3d87b0-74af-41c0-b285-becbc14007a4" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T131323Z:2b3d87b0-74af-41c0-b285-becbc14007a4" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: B51FE255FC714348A6EFC98EA751DA4D Ref B: SEL221051504011 Ref C: 2023-09-18T08:40:09Z" ], - "Date": [ "Mon, 18 Sep 2023 08:40:10 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 153067C9C1F94A2F800F05423C03DB96 Ref B: SEL221051504047 Ref C: 2024-04-29T13:13:22Z" ], + "Date": [ "Mon, 29 Apr 2024 13:13:22 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -84,19 +86,19 @@ "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+3": { + "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "294" ], - "x-ms-client-request-id": [ "4ae55942-a72d-40da-9671-c5672aa46a09" ], + "x-ms-unique-id": [ "237" ], + "x-ms-client-request-id": [ "e68cfd4e-fb7e-4800-ab57-50241e76c242" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -107,39 +109,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "7d336641-215b-40d4-b56f-6ac39491098d_M9CH3_M9CH3" ], + "x-ms-request-id": [ "76c19af5-521f-4bb0-9db9-db2951798910_M11CH3_M11CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], - "x-ms-correlation-request-id": [ "0e9e04c6-78ef-4617-95cb-b58420f511a0" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T084012Z:0e9e04c6-78ef-4617-95cb-b58420f511a0" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "60cd2d37-2525-4543-95b4-986c83e665eb" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T131324Z:60cd2d37-2525-4543-95b4-986c83e665eb" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: E2A63AC909AB4E0F8ADA6CCBE7E3F700 Ref B: SEL221051504011 Ref C: 2023-09-18T08:40:11Z" ], - "Date": [ "Mon, 18 Sep 2023 08:40:11 GMT" ] + "X-MSEdge-Ref": [ "Ref A: A1BDDAF234FA42E4A0936064B1AD26CC Ref B: SEL221051504047 Ref C: 2024-04-29T13:13:23Z" ], + "Date": [ "Mon, 29 Apr 2024 13:13:23 GMT" ] }, "ContentHeaders": { "Content-Length": [ "551" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+4": { + "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+4": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "295" ], - "x-ms-client-request-id": [ "de9c83db-4092-447f-902b-f69459ad985a" ], + "x-ms-unique-id": [ "238" ], + "x-ms-client-request-id": [ "264afea3-633a-4e4b-b46f-6b5964f4ddbb" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -150,39 +153,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "c37b1c7b-9617-4999-8916-fd47f0173afc_M5SN1_M5SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11990" ], - "x-ms-correlation-request-id": [ "6e24e8f2-0312-4904-8c87-9b742773c8ae" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T084024Z:6e24e8f2-0312-4904-8c87-9b742773c8ae" ], + "x-ms-request-id": [ "cb7be0a5-7a25-42bc-8f6c-f065a0ddafb2_M2CH3_M2CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "40f1ab28-059a-431d-aab9-3e29db1702ce" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240429T131335Z:40f1ab28-059a-431d-aab9-3e29db1702ce" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: A24215D8B8B74DD79316728ABD868244 Ref B: SEL221051504011 Ref C: 2023-09-18T08:40:23Z" ], - "Date": [ "Mon, 18 Sep 2023 08:40:23 GMT" ] + "X-MSEdge-Ref": [ "Ref A: BA0D86E552EB4F208A828113CFE9974B Ref B: SEL221051504047 Ref C: 2024-04-29T13:13:34Z" ], + "Date": [ "Mon, 29 Apr 2024 13:13:34 GMT" ] }, "ContentHeaders": { "Content-Length": [ "551" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+5": { + "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+5": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "296" ], - "x-ms-client-request-id": [ "6ae6bcdd-9e75-4aaf-82a3-7f42004cd0b0" ], + "x-ms-unique-id": [ "239" ], + "x-ms-client-request-id": [ "a04f34dd-ed08-44c4-9408-c46405cc891a" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -193,39 +197,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "02be81ca-8ecf-4d57-a1a8-42080458da72_M2CH3_M2CH3" ], + "x-ms-request-id": [ "77271398-f9f5-44ca-b708-1f4fc2d6fb49_M7CH3_M7CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-correlation-request-id": [ "20de8fc7-533f-45f2-9006-c5d3c6bc8a83" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T084037Z:20de8fc7-533f-45f2-9006-c5d3c6bc8a83" ], + "x-ms-correlation-request-id": [ "3f4d3e2b-2ef8-45ea-8f43-2dd691776b7d" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T131347Z:3f4d3e2b-2ef8-45ea-8f43-2dd691776b7d" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 47E9355C52E64A799E889CD8517DBC56 Ref B: SEL221051504011 Ref C: 2023-09-18T08:40:34Z" ], - "Date": [ "Mon, 18 Sep 2023 08:40:36 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 9B3F1374C2B4489B84301FBCD2A649B2 Ref B: SEL221051504047 Ref C: 2024-04-29T13:13:45Z" ], + "Date": [ "Mon, 29 Apr 2024 13:13:46 GMT" ] }, "ContentHeaders": { "Content-Length": [ "551" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+6": { + "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+6": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "297" ], - "x-ms-client-request-id": [ "e569e0fe-67c6-4c49-ac52-b0f359e80c37" ], + "x-ms-unique-id": [ "240" ], + "x-ms-client-request-id": [ "015ccf0b-a006-4974-bbfe-2c3f3533dbd7" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -236,39 +241,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "3d60b3b1-a689-4b11-8f20-a944b3bd62a4_M6SN1_M6SN1" ], + "x-ms-request-id": [ "250735c9-cb6f-4347-b62b-69cbbef62e4f_M8SN1_M8SN1" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], - "x-ms-correlation-request-id": [ "32070a44-501f-4d87-98ed-4575c4ffcbf1" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T084050Z:32070a44-501f-4d87-98ed-4575c4ffcbf1" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "5108af70-cdb9-4e9d-8708-7a5805a96984" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T131358Z:5108af70-cdb9-4e9d-8708-7a5805a96984" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: BC4AB73F3A3F4803901AAEFFB1871A90 Ref B: SEL221051504011 Ref C: 2023-09-18T08:40:47Z" ], - "Date": [ "Mon, 18 Sep 2023 08:40:49 GMT" ] + "X-MSEdge-Ref": [ "Ref A: A205D34D6808444497906B8E96235190 Ref B: SEL221051504047 Ref C: 2024-04-29T13:13:57Z" ], + "Date": [ "Mon, 29 Apr 2024 13:13:57 GMT" ] }, "ContentHeaders": { "Content-Length": [ "551" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+7": { + "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+7": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "298" ], - "x-ms-client-request-id": [ "e6974f9f-8d14-4b6c-ab14-8cdb3663c44c" ], + "x-ms-unique-id": [ "241" ], + "x-ms-client-request-id": [ "acbb2256-0a9e-482b-82e9-cc014eefb530" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -279,39 +285,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "055383ef-5bad-47c8-85b3-665a235ac617_M6SN1_M6SN1" ], + "x-ms-request-id": [ "85242cf2-de10-4da2-89a4-6e54a29ce261_M4SN1_M4SN1" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], - "x-ms-correlation-request-id": [ "1e688406-6982-408a-bc7b-ea4e11e132fe" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T084101Z:1e688406-6982-408a-bc7b-ea4e11e132fe" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "aa8a2a9c-0349-4bc9-ad02-ac3363a05dd4" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T131410Z:aa8a2a9c-0349-4bc9-ad02-ac3363a05dd4" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 73814BB6BC574EDA9AA971E0E0F616EF Ref B: SEL221051504011 Ref C: 2023-09-18T08:41:00Z" ], - "Date": [ "Mon, 18 Sep 2023 08:41:00 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 61452130C58C4AB6AEC1833D2B41C246 Ref B: SEL221051504047 Ref C: 2024-04-29T13:14:08Z" ], + "Date": [ "Mon, 29 Apr 2024 13:14:10 GMT" ] }, "ContentHeaders": { "Content-Length": [ "551" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+8": { + "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+8": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "299" ], - "x-ms-client-request-id": [ "b3ffee92-2ff6-4b98-addf-9dc5c6569924" ], + "x-ms-unique-id": [ "242" ], + "x-ms-client-request-id": [ "96282403-b797-4a70-98c2-1743be0d0a90" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -322,39 +329,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "3a0402df-981e-41a6-86f9-ce23afd0f67b_M5SN1_M5SN1" ], + "x-ms-request-id": [ "60308b76-c0ad-4b1b-84ee-f090b36a264a_M11SN1_M11SN1" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11989" ], - "x-ms-correlation-request-id": [ "523c68c1-1b1a-4e9f-8d9e-2f0cab7f94bd" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T084112Z:523c68c1-1b1a-4e9f-8d9e-2f0cab7f94bd" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "a6964018-d72a-40c3-a39f-b0deda4c7603" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T131422Z:a6964018-d72a-40c3-a39f-b0deda4c7603" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: CD98B23FD3F04C959A3B7DF5D2310708 Ref B: SEL221051504011 Ref C: 2023-09-18T08:41:11Z" ], - "Date": [ "Mon, 18 Sep 2023 08:41:11 GMT" ] + "X-MSEdge-Ref": [ "Ref A: F0E9678A97EA4A4999D47ACA5FEDB101 Ref B: SEL221051504047 Ref C: 2024-04-29T13:14:20Z" ], + "Date": [ "Mon, 29 Apr 2024 13:14:22 GMT" ] }, "ContentHeaders": { "Content-Length": [ "551" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+9": { + "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+9": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "300" ], - "x-ms-client-request-id": [ "5302b421-b813-467f-8059-dc1892219192" ], + "x-ms-unique-id": [ "243" ], + "x-ms-client-request-id": [ "5c49ee51-da3d-4438-ab33-fefc89c15317" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -365,39 +373,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "86674e6d-b5ab-4e10-a93b-8277c33d0080_M5CH3_M5CH3" ], + "x-ms-request-id": [ "cc1c8bf3-ef5c-4d3e-ab83-52bd9ca6a6ce_M9CH3_M9CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], - "x-ms-correlation-request-id": [ "1eeeed8b-43e0-42e5-bc9a-f4be02686fb9" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T084124Z:1eeeed8b-43e0-42e5-bc9a-f4be02686fb9" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-correlation-request-id": [ "9e8f24dd-2249-44ee-b3d0-8fa44b35616e" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T131433Z:9e8f24dd-2249-44ee-b3d0-8fa44b35616e" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: A0DFF9FE623F4491BBB3884332ED04E5 Ref B: SEL221051504011 Ref C: 2023-09-18T08:41:22Z" ], - "Date": [ "Mon, 18 Sep 2023 08:41:24 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 339CFCBFF9B940C1996CAC8716523E77 Ref B: SEL221051504047 Ref C: 2024-04-29T13:14:32Z" ], + "Date": [ "Mon, 29 Apr 2024 13:14:33 GMT" ] }, "ContentHeaders": { "Content-Length": [ "551" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+10": { + "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+10": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "301" ], - "x-ms-client-request-id": [ "e23ade9c-3704-4d0f-afe4-5072729fecff" ], + "x-ms-unique-id": [ "244" ], + "x-ms-client-request-id": [ "b2cff061-41a1-4ac4-904f-fc30ac5a64a3" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -408,31 +417,32 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "11372cad-1fab-47bb-add3-24f5dc2db082_M1SN1_M1SN1" ], + "x-ms-request-id": [ "4c223cef-2c47-48eb-b9a8-b385ddbbc48d_M7SN1_M7SN1" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], + "x-ms-throttling-version": [ "v1" ], "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-correlation-request-id": [ "ac1d1353-b062-45c6-aae3-3d076041b556" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T084136Z:ac1d1353-b062-45c6-aae3-3d076041b556" ], + "x-ms-correlation-request-id": [ "ca5cebd0-3ad1-4ad0-9ae3-3e9ab7c1a4cf" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T131445Z:ca5cebd0-3ad1-4ad0-9ae3-3e9ab7c1a4cf" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 5F5C637A68C14413B3B957B8B6CD5635 Ref B: SEL221051504011 Ref C: 2023-09-18T08:41:34Z" ], - "Date": [ "Mon, 18 Sep 2023 08:41:36 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 5D4CD2D16B1C4AB1ADB51B8E88B6D122 Ref B: SEL221051504047 Ref C: 2024-04-29T13:14:43Z" ], + "Date": [ "Mon, 29 Apr 2024 13:14:45 GMT" ] }, "ContentHeaders": { "Content-Length": [ "412" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"\",\"role\":\"PrimaryNotReplicating\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"\",\"role\":\"PrimaryNotReplicating\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+Break+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+11": { + "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+Break+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+11": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", - "Content": "{\n \"properties\": {\n \"partnerNamespace\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\"\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", + "Content": "{\n \"properties\": {\n \"partnerNamespace\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\"\n }\n}", "isContentBase64": false, "Headers": { }, @@ -446,39 +456,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "d7f16634-1eae-4e16-b553-938800601543_M8CH3_M8CH3" ], + "x-ms-request-id": [ "62cd9f5f-0fca-4e90-a1fd-10d2ca9aad90_M11CH3_M11CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-correlation-request-id": [ "fb095e41-d490-4ee0-af0f-62893f2754c9" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T084155Z:fb095e41-d490-4ee0-af0f-62893f2754c9" ], + "x-ms-correlation-request-id": [ "18a06f10-da53-4242-a044-c0c42f181a4f" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T131504Z:18a06f10-da53-4242-a044-c0c42f181a4f" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 5A57D8C8FA4A4192BCB24EE46807D5EB Ref B: SEL221051504011 Ref C: 2023-09-18T08:41:46Z" ], - "Date": [ "Mon, 18 Sep 2023 08:41:55 GMT" ] + "X-MSEdge-Ref": [ "Ref A: E957B091A28D46BA82764C899C7EB88D Ref B: SEL221051504047 Ref C: 2024-04-29T13:14:55Z" ], + "Date": [ "Mon, 29 Apr 2024 13:15:04 GMT" ] }, "ContentHeaders": { "Content-Length": [ "551" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+12": { + "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+12": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "303" ], - "x-ms-client-request-id": [ "49cd0634-c38d-4c71-8963-53dfe0a82118" ], + "x-ms-unique-id": [ "246" ], + "x-ms-client-request-id": [ "d6ec62b6-e276-42f1-a789-071af0ea5bef" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -489,39 +500,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "c0afc15a-b3db-4c06-b1bf-2e0aa47d1a76_M11CH3_M11CH3" ], + "x-ms-request-id": [ "5a532551-baf7-4e60-a696-20aee8cc98df_M5CH3_M5CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-correlation-request-id": [ "6ffbee5e-976b-4e0c-bbef-0702b3c06712" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T084156Z:6ffbee5e-976b-4e0c-bbef-0702b3c06712" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-correlation-request-id": [ "f1583655-9ded-4511-b2d2-1443f38a701e" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T131505Z:f1583655-9ded-4511-b2d2-1443f38a701e" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: F17B57850E244F0CA7E6045D061EA623 Ref B: SEL221051504011 Ref C: 2023-09-18T08:41:55Z" ], - "Date": [ "Mon, 18 Sep 2023 08:41:56 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 1936E6E23F824CC099F420780E58F018 Ref B: SEL221051504047 Ref C: 2024-04-29T13:15:04Z" ], + "Date": [ "Mon, 29 Apr 2024 13:15:05 GMT" ] }, "ContentHeaders": { "Content-Length": [ "551" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+13": { + "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+13": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "304" ], - "x-ms-client-request-id": [ "d547b8e0-56f8-4981-99dd-943444d7c99f" ], + "x-ms-unique-id": [ "247" ], + "x-ms-client-request-id": [ "cf4cda8c-e8ab-442a-bfda-62b40c3ed59b" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -532,39 +544,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "794f9739-e735-4339-9816-4488d2c82422_M5CH3_M5CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-correlation-request-id": [ "ba07c556-23ab-447b-bcf4-e1cda3911ab9" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T084208Z:ba07c556-23ab-447b-bcf4-e1cda3911ab9" ], + "x-ms-request-id": [ "b2e14079-6ea8-4a37-99a7-fd02a04224d2_M11SN1_M11SN1" ], + "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "8dc7ab93-7a38-4ae1-848a-8ced3d88e41e" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T131517Z:8dc7ab93-7a38-4ae1-848a-8ced3d88e41e" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 519B0C54A88E44DCBFD999C1CCDCD293 Ref B: SEL221051504011 Ref C: 2023-09-18T08:42:07Z" ], - "Date": [ "Mon, 18 Sep 2023 08:42:08 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 074F81D044B446649B073EF99063ED4E Ref B: SEL221051504047 Ref C: 2024-04-29T13:15:15Z" ], + "Date": [ "Mon, 29 Apr 2024 13:15:17 GMT" ] }, "ContentHeaders": { "Content-Length": [ "551" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+14": { + "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+14": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "305" ], - "x-ms-client-request-id": [ "d85db85d-97b5-4540-996a-8aca3c88d878" ], + "x-ms-unique-id": [ "248" ], + "x-ms-client-request-id": [ "cff56927-a746-455c-9489-d5413e0ecae6" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -575,39 +588,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "60f1c968-2eb9-4c05-99c9-9b51055e8137_M2CH3_M2CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11988" ], - "x-ms-correlation-request-id": [ "3f19b8ff-7ffe-4249-a1c9-332cbff540b8" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T084220Z:3f19b8ff-7ffe-4249-a1c9-332cbff540b8" ], + "x-ms-request-id": [ "1adff859-cbd4-463d-a5f3-92fb55f361a7_M8SN1_M8SN1" ], + "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "10ada8ea-0021-4a14-9531-632fe835c90d" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T131529Z:10ada8ea-0021-4a14-9531-632fe835c90d" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 99C368F1E1FC49AC95A599597DEA3986 Ref B: SEL221051504011 Ref C: 2023-09-18T08:42:18Z" ], - "Date": [ "Mon, 18 Sep 2023 08:42:20 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 36FA121351034A64B9940AF6D20CBED7 Ref B: SEL221051504047 Ref C: 2024-04-29T13:15:27Z" ], + "Date": [ "Mon, 29 Apr 2024 13:15:29 GMT" ] }, "ContentHeaders": { "Content-Length": [ "551" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+15": { + "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+15": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "306" ], - "x-ms-client-request-id": [ "7482b277-fe8f-499d-aecd-f102cd3599fa" ], + "x-ms-unique-id": [ "249" ], + "x-ms-client-request-id": [ "7bc90fbc-1f51-46a0-b03e-38dea9a35e56" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -618,39 +632,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "57f743da-d424-4ad8-a21d-a45404e6709d_M5CH3_M5CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-correlation-request-id": [ "89280481-ae2b-4b66-8d84-c9e69e6f7e21" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T084232Z:89280481-ae2b-4b66-8d84-c9e69e6f7e21" ], + "x-ms-request-id": [ "a15d4581-96d6-4b81-846d-e1259133de73_M9SN1_M9SN1" ], + "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "82b3fe31-c282-4ea9-95d4-6e958e2f0fac" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T131541Z:82b3fe31-c282-4ea9-95d4-6e958e2f0fac" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 9C6C32353B4C47BA8B9CCD3D280E8927 Ref B: SEL221051504011 Ref C: 2023-09-18T08:42:30Z" ], - "Date": [ "Mon, 18 Sep 2023 08:42:31 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 7240E6C1EA0F47399334B6EB7AE346CA Ref B: SEL221051504047 Ref C: 2024-04-29T13:15:40Z" ], + "Date": [ "Mon, 29 Apr 2024 13:15:41 GMT" ] }, "ContentHeaders": { "Content-Length": [ "551" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+16": { + "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+16": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "307" ], - "x-ms-client-request-id": [ "e4a601ae-cd9f-4251-b2af-12379a45938c" ], + "x-ms-unique-id": [ "250" ], + "x-ms-client-request-id": [ "9984fb62-a7fc-4443-a34a-37331230faf3" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -661,39 +676,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "c726b81b-97c8-4073-bc46-72ba333d99fc_M4SN1_M4SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11990" ], - "x-ms-correlation-request-id": [ "16d060ed-b3e9-4afb-bf10-16e595fdbfa3" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T084243Z:16d060ed-b3e9-4afb-bf10-16e595fdbfa3" ], + "x-ms-request-id": [ "20b0c5ec-1d4c-4680-a9c5-d4f32b1fdd43_M7CH3_M7CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "e0e3375f-8314-422a-ad9e-4e0bf0221aaf" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T131552Z:e0e3375f-8314-422a-ad9e-4e0bf0221aaf" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: DB694604042748E9B1A1629E0485D326 Ref B: SEL221051504011 Ref C: 2023-09-18T08:42:42Z" ], - "Date": [ "Mon, 18 Sep 2023 08:42:43 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 6A49B80FDE054987AD43979FE775AF2C Ref B: SEL221051504047 Ref C: 2024-04-29T13:15:51Z" ], + "Date": [ "Mon, 29 Apr 2024 13:15:52 GMT" ] }, "ContentHeaders": { "Content-Length": [ "551" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+17": { + "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+17": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "308" ], - "x-ms-client-request-id": [ "e132d101-2c68-480a-b68e-c4f6f500b37e" ], + "x-ms-unique-id": [ "251" ], + "x-ms-client-request-id": [ "4c4b6182-32c0-43a3-9807-07d25cf59172" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -704,39 +720,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "c3b9e210-5ef3-4d12-a491-1ac52f44cf8d_M7SN1_M7SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], - "x-ms-correlation-request-id": [ "8cdaadb7-00e2-40bb-8973-e163f52baed9" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T084255Z:8cdaadb7-00e2-40bb-8973-e163f52baed9" ], + "x-ms-request-id": [ "ccda4d4d-b82e-4930-8d76-76584d709208_M11CH3_M11CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-correlation-request-id": [ "abbebada-c1c9-44cf-b4bd-ecd0212477fa" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240429T131604Z:abbebada-c1c9-44cf-b4bd-ecd0212477fa" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 1947DF48A03D493CAB36B9D4E1A52102 Ref B: SEL221051504011 Ref C: 2023-09-18T08:42:53Z" ], - "Date": [ "Mon, 18 Sep 2023 08:42:55 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 7E049628B5704E0C99B976A4EF13E1FF Ref B: SEL221051504047 Ref C: 2024-04-29T13:16:02Z" ], + "Date": [ "Mon, 29 Apr 2024 13:16:04 GMT" ] }, "ContentHeaders": { "Content-Length": [ "551" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+18": { + "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+18": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "309" ], - "x-ms-client-request-id": [ "20f2bb8b-bab7-419e-a39a-ad6ff368c50a" ], + "x-ms-unique-id": [ "252" ], + "x-ms-client-request-id": [ "ecc237b3-e18e-47da-9527-93b47094a3ad" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -747,39 +764,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "b5b22046-4910-404d-a39d-45bc026fae63_M8CH3_M8CH3" ], + "x-ms-request-id": [ "939ca266-e0b2-46e0-bc94-dcd64bd1749a_M4CH3_M4CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], - "x-ms-correlation-request-id": [ "6b10ca82-9ddc-497f-8ad8-886a38ac572b" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T084306Z:6b10ca82-9ddc-497f-8ad8-886a38ac572b" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "5958a283-273a-4a92-816a-2293a2ee73c4" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T131616Z:5958a283-273a-4a92-816a-2293a2ee73c4" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 294B19CD70464F5F9E9396BFDFDF9C26 Ref B: SEL221051504011 Ref C: 2023-09-18T08:43:05Z" ], - "Date": [ "Mon, 18 Sep 2023 08:43:06 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 2577716C5A8E458D848F68C83DC027A8 Ref B: SEL221051504047 Ref C: 2024-04-29T13:16:14Z" ], + "Date": [ "Mon, 29 Apr 2024 13:16:15 GMT" ] }, "ContentHeaders": { "Content-Length": [ "551" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+19": { + "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+19": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "310" ], - "x-ms-client-request-id": [ "225f4ff7-4924-470c-91d6-62094fdc958b" ], + "x-ms-unique-id": [ "253" ], + "x-ms-client-request-id": [ "28653fa4-d11d-4142-8b94-05b374ebd3ac" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -790,39 +808,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "da16aae8-33bc-4b38-a4be-ddd823de9942_M2CH3_M2CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11987" ], - "x-ms-correlation-request-id": [ "744e36f0-ed6a-4245-9614-af170a7853a4" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T084318Z:744e36f0-ed6a-4245-9614-af170a7853a4" ], + "x-ms-request-id": [ "c1ebf6b7-b5e8-4efe-96a3-1b917dec134a_M9SN1_M9SN1" ], + "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "c5241862-61b0-4bac-9f82-280e1ee19507" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T131627Z:c5241862-61b0-4bac-9f82-280e1ee19507" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 0BC3A6A94D1546C8B9F8E403CE1D3CFD Ref B: SEL221051504011 Ref C: 2023-09-18T08:43:17Z" ], - "Date": [ "Mon, 18 Sep 2023 08:43:18 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 48D338F0E1EF4FBA86D4460D8CD5E1C9 Ref B: SEL221051504047 Ref C: 2024-04-29T13:16:26Z" ], + "Date": [ "Mon, 29 Apr 2024 13:16:27 GMT" ] }, "ContentHeaders": { "Content-Length": [ "551" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+20": { + "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+Break+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+20": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "311" ], - "x-ms-client-request-id": [ "65db530a-ac06-416b-8e02-da678e5058c7" ], + "x-ms-unique-id": [ "254" ], + "x-ms-client-request-id": [ "583ffe9e-f079-4449-830a-c9308bc07e1d" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -833,39 +852,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "5595187a-ba4c-40b5-9cc4-ad90ddb527aa_M11CH3_M11CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], - "x-ms-correlation-request-id": [ "fefb3135-aacf-4528-9fd8-9a79406bc904" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T084330Z:fefb3135-aacf-4528-9fd8-9a79406bc904" ], + "x-ms-request-id": [ "ca2ef70e-8623-448e-92bb-866b1dd249af_M11SN1_M11SN1" ], + "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "c99900cb-6ae0-46e5-aab8-b0ba5769a198" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T131639Z:c99900cb-6ae0-46e5-aab8-b0ba5769a198" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: AB95F11D35D545239C8F473CA978C983 Ref B: SEL221051504011 Ref C: 2023-09-18T08:43:28Z" ], - "Date": [ "Mon, 18 Sep 2023 08:43:30 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 95996A0D2BF541EA8A77CB6CAC7AB635 Ref B: SEL221051504047 Ref C: 2024-04-29T13:16:37Z" ], + "Date": [ "Mon, 29 Apr 2024 13:16:39 GMT" ] }, "ContentHeaders": { "Content-Length": [ "590" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\",\"pendingReplicationOperationsCount\":0}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\",\"pendingReplicationOperationsCount\":0}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+1": { + "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "312" ], - "x-ms-client-request-id": [ "f6c85794-81ec-4426-b4a0-d621e2842ea0" ], + "x-ms-unique-id": [ "255" ], + "x-ms-client-request-id": [ "75b8d997-33d8-4aee-bd2a-3287774abb3b" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -876,39 +896,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "d3a57b5c-aa79-4fde-843d-3b41c9bbf615_M1SN1_M1SN1" ], + "x-ms-request-id": [ "7f782526-8406-4f83-a1cf-883657ed5abf_M8SN1_M8SN1" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11990" ], - "x-ms-correlation-request-id": [ "5047e473-bfbd-415c-b5be-dc29637a2c13" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T084342Z:5047e473-bfbd-415c-b5be-dc29637a2c13" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "60c2c4ba-92da-42fe-bc07-e94df2a253c4" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T131651Z:60c2c4ba-92da-42fe-bc07-e94df2a253c4" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 78BBF8C592AC4CE0801BBAA46C366838 Ref B: SEL221051504011 Ref C: 2023-09-18T08:43:40Z" ], - "Date": [ "Mon, 18 Sep 2023 08:43:42 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 82EB9C2F16DA48C8A312D363C89E178C Ref B: SEL221051504047 Ref C: 2024-04-29T13:16:49Z" ], + "Date": [ "Mon, 29 Apr 2024 13:16:51 GMT" ] }, "ContentHeaders": { "Content-Length": [ "590" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\",\"pendingReplicationOperationsCount\":0}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\",\"pendingReplicationOperationsCount\":0}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+2": { + "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "313" ], - "x-ms-client-request-id": [ "f0c18d6b-553a-4e27-af64-88e4742d13ed" ], + "x-ms-unique-id": [ "256" ], + "x-ms-client-request-id": [ "f0b89cf7-f59b-4b17-85de-f563c5ecd8bd" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -919,39 +940,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "02192e0e-3dc3-41ac-982e-89680b896d53_M5SN1_M5SN1" ], + "x-ms-request-id": [ "15540e00-61c0-4590-91d6-f225cf2ff0d5_M8SN1_M8SN1" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11989" ], - "x-ms-correlation-request-id": [ "37fcafe9-8c43-41e6-9ce8-10bcf600df1d" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T084346Z:37fcafe9-8c43-41e6-9ce8-10bcf600df1d" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "cf924c67-e621-4d19-96c7-01360d9f452f" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T131653Z:cf924c67-e621-4d19-96c7-01360d9f452f" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: E2CCEF5A54D148A5A301740DCB7EEAB5 Ref B: SEL221051504011 Ref C: 2023-09-18T08:43:43Z" ], - "Date": [ "Mon, 18 Sep 2023 08:43:45 GMT" ] + "X-MSEdge-Ref": [ "Ref A: BFB2DBD0E253430393CC1FA86C923D5C Ref B: SEL221051504047 Ref C: 2024-04-29T13:16:51Z" ], + "Date": [ "Mon, 29 Apr 2024 13:16:53 GMT" ] }, "ContentHeaders": { "Content-Length": [ "590" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\",\"pendingReplicationOperationsCount\":0}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\",\"pendingReplicationOperationsCount\":0}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourcegroupautoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespacenamejwm6p8/disasterRecoveryConfigs/aliasyfh2so/breakPairing?api-version=2023-01-01-preview+3": { + "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-eventhub-kchdmf/providers/Microsoft.EventHub/namespaces/namespacenameil6w7t/disasterRecoveryConfigs/aliasp8gxof/breakPairing?api-version=2023-01-01-preview+3": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourcegroupautoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespacenamejwm6p8/disasterRecoveryConfigs/aliasyfh2so/breakPairing?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-eventhub-kchdmf/providers/Microsoft.EventHub/namespaces/namespacenameil6w7t/disasterRecoveryConfigs/aliasp8gxof/breakPairing?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "314" ], - "x-ms-client-request-id": [ "994d608f-3728-401d-9a8d-716ee97f57d3" ], + "x-ms-unique-id": [ "257" ], + "x-ms-client-request-id": [ "ed458228-f1e2-4f0e-b04b-18024a411e3f" ], "CommandName": [ "Az.EventHub.private\\Invoke-AzEventHubBreakDisasterRecoveryConfigPairing_Break" ], "FullCommandName": [ "Invoke-AzEventHubBreakDisasterRecoveryConfigPairing_Break" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -962,16 +984,17 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "dfc4b092-b11f-48e8-8b32-e7ab2a7be085_M11CH3_M11CH3" ], + "x-ms-request-id": [ "37b99d59-6355-4791-920e-cd04e392ec2e_M5CH3_M5CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-correlation-request-id": [ "08ba585f-4503-4c05-bcf7-8cad5be6ff7e" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T084348Z:08ba585f-4503-4c05-bcf7-8cad5be6ff7e" ], + "x-ms-correlation-request-id": [ "3eafd80b-c407-4c8d-b75d-9e31b19703b2" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T131655Z:3eafd80b-c407-4c8d-b75d-9e31b19703b2" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 89234A939E744AF9A966C14C37CF047C Ref B: SEL221051504011 Ref C: 2023-09-18T08:43:46Z" ], - "Date": [ "Mon, 18 Sep 2023 08:43:48 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 0BB5FDEB95774B71B03CF015A333A639 Ref B: SEL221051504047 Ref C: 2024-04-29T13:16:53Z" ], + "Date": [ "Mon, 29 Apr 2024 13:16:55 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -981,19 +1004,19 @@ "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+4": { + "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+4": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "315" ], - "x-ms-client-request-id": [ "3c2c5da1-081a-4989-a4ce-774a86d8c0a5" ], + "x-ms-unique-id": [ "258" ], + "x-ms-client-request-id": [ "8d856694-5c0d-485d-80ef-96b11a69bbae" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1004,39 +1027,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "c0199a45-7bec-4ba4-9c51-89093e5ebaac_M10CH3_M10CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-correlation-request-id": [ "4502e4c4-4654-4e2f-9297-24623c3382b7" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T084350Z:4502e4c4-4654-4e2f-9297-24623c3382b7" ], + "x-ms-request-id": [ "e670649c-2bab-4aae-83e2-52c0a759ae31_M1SN1_M1SN1" ], + "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "2d4adde7-9247-41b1-b29d-ba6d21174a4d" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T131657Z:2d4adde7-9247-41b1-b29d-ba6d21174a4d" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 9D276995A48246D3B368A715BAB20C9B Ref B: SEL221051504011 Ref C: 2023-09-18T08:43:48Z" ], - "Date": [ "Mon, 18 Sep 2023 08:43:50 GMT" ] + "X-MSEdge-Ref": [ "Ref A: B732C5BB84A3487B80EB9FB94F21700D Ref B: SEL221051504047 Ref C: 2024-04-29T13:16:55Z" ], + "Date": [ "Mon, 29 Apr 2024 13:16:56 GMT" ] }, "ContentHeaders": { "Content-Length": [ "551" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+5": { + "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+5": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "316" ], - "x-ms-client-request-id": [ "f9e0a5c5-122a-4da9-a159-6dcc63368202" ], + "x-ms-unique-id": [ "259" ], + "x-ms-client-request-id": [ "5fc32ab3-a16d-40a7-a63b-9d9156d39507" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1047,39 +1071,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "497b4434-ffd9-43ac-a78f-9e19f08f43ed_M9SN1_M9SN1" ], + "x-ms-request-id": [ "0a7eb0ce-7aa6-4988-a395-880dbe1dab39_M1SN1_M1SN1" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-correlation-request-id": [ "82f26041-a143-48b0-ba10-003493781b6f" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T084402Z:82f26041-a143-48b0-ba10-003493781b6f" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "1b818e70-4a90-48ca-83f2-94395de205f5" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T131708Z:1b818e70-4a90-48ca-83f2-94395de205f5" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 4C0C7310C15742E8AF01B1E85F60FDCB Ref B: SEL221051504011 Ref C: 2023-09-18T08:44:00Z" ], - "Date": [ "Mon, 18 Sep 2023 08:44:02 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 8D5C731CCC1747FC92187BACF2543FF0 Ref B: SEL221051504047 Ref C: 2024-04-29T13:17:07Z" ], + "Date": [ "Mon, 29 Apr 2024 13:17:08 GMT" ] }, "ContentHeaders": { "Content-Length": [ "551" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+6": { + "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+6": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "317" ], - "x-ms-client-request-id": [ "85e5c5e3-66bb-43cf-98dd-782cb362b820" ], + "x-ms-unique-id": [ "260" ], + "x-ms-client-request-id": [ "af792b61-ebae-4031-a93a-28c670b4c1d0" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1090,39 +1115,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "25e7ddaa-ae60-43df-b683-33f47e98f26e_M1CH3_M1CH3" ], + "x-ms-request-id": [ "f21568d7-9112-4ad7-8527-6087b3e2a90e_M8CH3_M8CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-correlation-request-id": [ "22346034-1529-4917-b6bd-a59b7c6eddfe" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T084414Z:22346034-1529-4917-b6bd-a59b7c6eddfe" ], + "x-ms-correlation-request-id": [ "e1cf6f7a-4d91-4b70-a0ec-86d28ade4c99" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T131720Z:e1cf6f7a-4d91-4b70-a0ec-86d28ade4c99" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 25AE96A9B56E46BE8B30A087A06A686E Ref B: SEL221051504011 Ref C: 2023-09-18T08:44:12Z" ], - "Date": [ "Mon, 18 Sep 2023 08:44:13 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 14D5DCBF1DE34A95A04A2C00372D7E8E Ref B: SEL221051504047 Ref C: 2024-04-29T13:17:18Z" ], + "Date": [ "Mon, 29 Apr 2024 13:17:19 GMT" ] }, "ContentHeaders": { "Content-Length": [ "551" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+7": { + "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+7": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "318" ], - "x-ms-client-request-id": [ "27e93207-7183-4205-a59a-3c3cc2c88cc8" ], + "x-ms-unique-id": [ "261" ], + "x-ms-client-request-id": [ "090d8cc0-50f0-4209-a3b6-0e6cc84f2f80" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1133,39 +1159,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "75ad0f96-89fb-43bf-b1d0-314d87110757_M0SN1_M0SN1" ], + "x-ms-request-id": [ "c20e979d-844a-49b9-9120-0c78e49cf1c5_M1SN1_M1SN1" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-correlation-request-id": [ "05552523-7195-45be-bd18-c2a4ff462011" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T084425Z:05552523-7195-45be-bd18-c2a4ff462011" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "296b2ea2-9d4d-4e99-8f53-03758c31e4ed" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T131731Z:296b2ea2-9d4d-4e99-8f53-03758c31e4ed" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: F3BFDD6A9ACF4F049E4302B80C21CA97 Ref B: SEL221051504011 Ref C: 2023-09-18T08:44:24Z" ], - "Date": [ "Mon, 18 Sep 2023 08:44:25 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 1EFB8AAE5D5041E98110308FCD991F0B Ref B: SEL221051504047 Ref C: 2024-04-29T13:17:30Z" ], + "Date": [ "Mon, 29 Apr 2024 13:17:31 GMT" ] }, "ContentHeaders": { "Content-Length": [ "551" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+8": { + "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+8": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "319" ], - "x-ms-client-request-id": [ "77d5db3b-2ac7-4d6a-94c1-74160a4344b9" ], + "x-ms-unique-id": [ "262" ], + "x-ms-client-request-id": [ "06f50747-06df-4e51-97e9-93d9f7339898" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1176,39 +1203,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "7f792dc6-3ca3-4ae6-8a05-c3129c45aea9_M9SN1_M9SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-correlation-request-id": [ "9088b3da-d0cb-4fbe-80c7-ccfe9d6c5d03" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T084437Z:9088b3da-d0cb-4fbe-80c7-ccfe9d6c5d03" ], + "x-ms-request-id": [ "e687d8c3-7360-4a98-ad45-aeef70439704_M9CH3_M9CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "b2a3285d-f4ac-415c-93fe-998a543bdb9e" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T131743Z:b2a3285d-f4ac-415c-93fe-998a543bdb9e" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 439175E7E47C400FA86B52464532048A Ref B: SEL221051504011 Ref C: 2023-09-18T08:44:35Z" ], - "Date": [ "Mon, 18 Sep 2023 08:44:37 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 3A40291F0D9541D09C312541BC4D4BB7 Ref B: SEL221051504047 Ref C: 2024-04-29T13:17:41Z" ], + "Date": [ "Mon, 29 Apr 2024 13:17:42 GMT" ] }, "ContentHeaders": { "Content-Length": [ "551" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+9": { + "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+9": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "320" ], - "x-ms-client-request-id": [ "a244ce29-1c59-413d-84c0-9356873005a3" ], + "x-ms-unique-id": [ "263" ], + "x-ms-client-request-id": [ "abd714b5-2348-480c-972c-d2915a2dafa1" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1219,39 +1247,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "1b165faa-189c-4358-8c01-21809144de5a_M3CH3_M3CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11991" ], - "x-ms-correlation-request-id": [ "4ee48222-4a8e-4b9a-8746-f09f3171c08a" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T084449Z:4ee48222-4a8e-4b9a-8746-f09f3171c08a" ], + "x-ms-request-id": [ "58454d95-4174-4f94-8ae0-a8758f62daf2_M5SN1_M5SN1" ], + "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "0bea5338-bf1c-487f-897c-30e8966d0d02" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T131754Z:0bea5338-bf1c-487f-897c-30e8966d0d02" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: C04F4B835C814C77A90FC4EBFBC54931 Ref B: SEL221051504011 Ref C: 2023-09-18T08:44:47Z" ], - "Date": [ "Mon, 18 Sep 2023 08:44:49 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 42C68FC12A4B4786B3B5716122FC0A8C Ref B: SEL221051504047 Ref C: 2024-04-29T13:17:53Z" ], + "Date": [ "Mon, 29 Apr 2024 13:17:54 GMT" ] }, "ContentHeaders": { "Content-Length": [ "551" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+10": { + "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+10": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "321" ], - "x-ms-client-request-id": [ "5736ab71-b113-4910-9aa9-2a1f442f5e78" ], + "x-ms-unique-id": [ "264" ], + "x-ms-client-request-id": [ "1bf16146-c1d3-4cc9-af25-b0b60c750a70" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1262,39 +1291,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "541f5365-8fb2-4f6c-be9a-82dac5944a03_M2CH3_M2CH3" ], + "x-ms-request-id": [ "ecb6032b-1c29-4da7-95ee-a7a9c8978c02_M7CH3_M7CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], - "x-ms-correlation-request-id": [ "a43d515e-f7dd-4de7-8306-b9f3106261cf" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T084503Z:a43d515e-f7dd-4de7-8306-b9f3106261cf" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "74e398f2-891a-44f2-befb-f07f2992bfd0" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T131806Z:74e398f2-891a-44f2-befb-f07f2992bfd0" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 4C5FAB1B190341678D33AA88E2E33C4B Ref B: SEL221051504011 Ref C: 2023-09-18T08:45:00Z" ], - "Date": [ "Mon, 18 Sep 2023 08:45:03 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 54D856F6D64D470589F7E51350C21BCD Ref B: SEL221051504047 Ref C: 2024-04-29T13:18:04Z" ], + "Date": [ "Mon, 29 Apr 2024 13:18:06 GMT" ] }, "ContentHeaders": { "Content-Length": [ "551" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+11": { + "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+11": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "322" ], - "x-ms-client-request-id": [ "60868a52-45df-44da-8bf3-3143d7a5b4fb" ], + "x-ms-unique-id": [ "265" ], + "x-ms-client-request-id": [ "8cb8aecf-e7f1-4fb8-865a-fa56c1ab5860" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1305,31 +1335,32 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "679e1db7-fc1b-4541-bcd4-bba7b011fb72_M9CH3_M9CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11990" ], - "x-ms-correlation-request-id": [ "b6c97a17-e3c0-4e6f-8cdf-8dbf3778cd3f" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T084515Z:b6c97a17-e3c0-4e6f-8cdf-8dbf3778cd3f" ], + "x-ms-request-id": [ "85e6337e-6330-4472-a37f-c3ccd70e7424_M11SN1_M11SN1" ], + "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "bb7641ab-9f49-4dac-8512-90e37c07b88e" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T131818Z:bb7641ab-9f49-4dac-8512-90e37c07b88e" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 27A09AA25C71491A8E8E3784FDE1904B Ref B: SEL221051504011 Ref C: 2023-09-18T08:45:13Z" ], - "Date": [ "Mon, 18 Sep 2023 08:45:14 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 6C6D375490EF40F0AC1D6265F7CCB696 Ref B: SEL221051504047 Ref C: 2024-04-29T13:18:16Z" ], + "Date": [ "Mon, 29 Apr 2024 13:18:17 GMT" ] }, "ContentHeaders": { "Content-Length": [ "412" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"\",\"role\":\"PrimaryNotReplicating\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"\",\"role\":\"PrimaryNotReplicating\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+12": { + "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+12": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", - "Content": "{\n \"properties\": {\n \"partnerNamespace\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\"\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", + "Content": "{\n \"properties\": {\n \"partnerNamespace\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\"\n }\n}", "isContentBase64": false, "Headers": { }, @@ -1343,39 +1374,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "2425352c-da23-4d17-ab71-385ca8a087d2_M3SN1_M3SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], + "x-ms-request-id": [ "435720b3-5ccf-4773-9264-65dae9459612_M10CH3_M10CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-correlation-request-id": [ "0f3532f2-5cb3-4662-af2b-86d18d2b011e" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T084535Z:0f3532f2-5cb3-4662-af2b-86d18d2b011e" ], + "x-ms-correlation-request-id": [ "cd4677f2-1e23-4592-a462-6d580dd914e5" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T131837Z:cd4677f2-1e23-4592-a462-6d580dd914e5" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: D5BFE25446E84C6FA3B92395ABA44610 Ref B: SEL221051504011 Ref C: 2023-09-18T08:45:25Z" ], - "Date": [ "Mon, 18 Sep 2023 08:45:34 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 8BB8AB8BBA7647B59FB5697150B2585E Ref B: SEL221051504047 Ref C: 2024-04-29T13:18:28Z" ], + "Date": [ "Mon, 29 Apr 2024 13:18:36 GMT" ] }, "ContentHeaders": { "Content-Length": [ "551" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+13": { + "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+13": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "324" ], - "x-ms-client-request-id": [ "7499b997-5514-46f9-b1cf-9349b8aba4d6" ], + "x-ms-unique-id": [ "267" ], + "x-ms-client-request-id": [ "777611c3-a89d-4aef-9fb6-dcbceaf76641" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1386,39 +1418,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "6ced7cac-dc9c-4367-b95c-3b5b1a56f865_M6SN1_M6SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], - "x-ms-correlation-request-id": [ "84c281ff-23bf-4866-8985-4aca8c9d38b7" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T084537Z:84c281ff-23bf-4866-8985-4aca8c9d38b7" ], + "x-ms-request-id": [ "fdbc2e9a-7737-473e-998f-b590999c1bc7_M10CH3_M10CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "65064598-9139-4932-ba73-3f314dd87152" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T131837Z:65064598-9139-4932-ba73-3f314dd87152" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 1B866B6EF46F4B80ACC6129E05F0997D Ref B: SEL221051504011 Ref C: 2023-09-18T08:45:35Z" ], - "Date": [ "Mon, 18 Sep 2023 08:45:37 GMT" ] + "X-MSEdge-Ref": [ "Ref A: A3FC8D79911B44DB835B4CB19AFC25B3 Ref B: SEL221051504047 Ref C: 2024-04-29T13:18:37Z" ], + "Date": [ "Mon, 29 Apr 2024 13:18:37 GMT" ] }, "ContentHeaders": { "Content-Length": [ "551" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+14": { + "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+14": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "325" ], - "x-ms-client-request-id": [ "af26571d-ddee-48ef-ac9e-cc10cb080617" ], + "x-ms-unique-id": [ "268" ], + "x-ms-client-request-id": [ "cca9c9f1-009c-4fb3-aabd-8e14fa2b15c6" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1429,39 +1462,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "5a6daf0b-4432-4e7f-a7f0-8e42259dde55_M10CH3_M10CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], - "x-ms-correlation-request-id": [ "4bd6110d-0fd6-49ee-8177-ea1a87d42c8a" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T084549Z:4bd6110d-0fd6-49ee-8177-ea1a87d42c8a" ], + "x-ms-request-id": [ "072957e2-4500-4aa1-bb77-f57fba9fd26e_M1SN1_M1SN1" ], + "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "33d61838-3abe-476d-b805-42b0c0197e33" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T131849Z:33d61838-3abe-476d-b805-42b0c0197e33" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 5AF337119CF349BF9A436ADCA138FD4C Ref B: SEL221051504011 Ref C: 2023-09-18T08:45:47Z" ], - "Date": [ "Mon, 18 Sep 2023 08:45:49 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 632478627EBD4DD3AFB5A2292FECFB59 Ref B: SEL221051504047 Ref C: 2024-04-29T13:18:47Z" ], + "Date": [ "Mon, 29 Apr 2024 13:18:49 GMT" ] }, "ContentHeaders": { "Content-Length": [ "551" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+15": { + "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+15": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "326" ], - "x-ms-client-request-id": [ "5dc06ca8-e4fb-4981-8461-7c788e7637a5" ], + "x-ms-unique-id": [ "269" ], + "x-ms-client-request-id": [ "dad39596-e14b-4847-b405-1348886d986e" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1472,39 +1506,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "34d567b8-f093-42c0-9bad-ed4bc82dc9af_M10SN1_M10SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11989" ], - "x-ms-correlation-request-id": [ "b1607e30-bf1c-4d4d-b957-9611fef68680" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T084602Z:b1607e30-bf1c-4d4d-b957-9611fef68680" ], + "x-ms-request-id": [ "4a95f1c9-5121-425c-8a36-67db01cff026_M10CH3_M10CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "f6d6c4d0-4516-4a76-ad47-36ceb55dc345" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T131901Z:f6d6c4d0-4516-4a76-ad47-36ceb55dc345" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: E2A2BF14B82043CABD7111D1EB3B70D6 Ref B: SEL221051504011 Ref C: 2023-09-18T08:46:00Z" ], - "Date": [ "Mon, 18 Sep 2023 08:46:01 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 063FC3B5056B4048A7F85541975E9D2A Ref B: SEL221051504047 Ref C: 2024-04-29T13:18:59Z" ], + "Date": [ "Mon, 29 Apr 2024 13:19:00 GMT" ] }, "ContentHeaders": { "Content-Length": [ "551" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+16": { + "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+16": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "327" ], - "x-ms-client-request-id": [ "1dde334d-8a45-4650-b597-566475873cd1" ], + "x-ms-unique-id": [ "270" ], + "x-ms-client-request-id": [ "aa408bee-e9ad-4cb5-9265-0ceb22358658" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1515,39 +1550,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "32d47049-f69e-4ab8-a49f-47e4a856bddf_M8SN1_M8SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], - "x-ms-correlation-request-id": [ "9dce9c05-365e-4d26-908b-7e5b4bc37c75" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T084614Z:9dce9c05-365e-4d26-908b-7e5b4bc37c75" ], + "x-ms-request-id": [ "6c6b7faf-5c37-4431-8365-499b2e4bdc90_M0CH3_M0CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "3d7f80bc-073c-49d3-b3bf-262ae0fd7739" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T131914Z:3d7f80bc-073c-49d3-b3bf-262ae0fd7739" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 0EAEDE0FFB2140C48A2B220C552A91B4 Ref B: SEL221051504011 Ref C: 2023-09-18T08:46:12Z" ], - "Date": [ "Mon, 18 Sep 2023 08:46:13 GMT" ] + "X-MSEdge-Ref": [ "Ref A: C18F1842FCC14A0ABAAF3E14C262C8B5 Ref B: SEL221051504047 Ref C: 2024-04-29T13:19:11Z" ], + "Date": [ "Mon, 29 Apr 2024 13:19:13 GMT" ] }, "ContentHeaders": { "Content-Length": [ "551" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+17": { + "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+17": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "328" ], - "x-ms-client-request-id": [ "65dd92fb-18cd-4273-b80e-0d5894cd6c1a" ], + "x-ms-unique-id": [ "271" ], + "x-ms-client-request-id": [ "85773002-07ae-46a8-b377-adb90ea77562" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1558,39 +1594,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "97afdba2-978d-4ce0-b205-0a8e461899c3_M8CH3_M8CH3" ], + "x-ms-request-id": [ "aa1823a2-b7a9-401a-b666-308bf7e137dc_M10CH3_M10CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-correlation-request-id": [ "22caf3b0-2200-48fc-b128-d8b1e9874c80" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T084625Z:22caf3b0-2200-48fc-b128-d8b1e9874c80" ], + "x-ms-correlation-request-id": [ "2661bf00-b817-4f1c-9ec1-fc5592a9dfa8" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240429T131926Z:2661bf00-b817-4f1c-9ec1-fc5592a9dfa8" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: DBAA4ED6FEF44E96A63E95A3ADC78E40 Ref B: SEL221051504011 Ref C: 2023-09-18T08:46:24Z" ], - "Date": [ "Mon, 18 Sep 2023 08:46:25 GMT" ] + "X-MSEdge-Ref": [ "Ref A: FFAB78C7EA7747E1B3FF0853D6A0F223 Ref B: SEL221051504047 Ref C: 2024-04-29T13:19:24Z" ], + "Date": [ "Mon, 29 Apr 2024 13:19:26 GMT" ] }, "ContentHeaders": { "Content-Length": [ "551" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+18": { + "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+18": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "329" ], - "x-ms-client-request-id": [ "246a4ce3-b295-4c41-bd72-4b750d9c6038" ], + "x-ms-unique-id": [ "272" ], + "x-ms-client-request-id": [ "a78da6e9-d356-482c-9d93-b6a461ab28d9" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1601,39 +1638,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "c8fea25f-fdf8-40c3-a357-0ccfffd80a37_M9SN1_M9SN1" ], + "x-ms-request-id": [ "f8ea65a9-042d-43b5-964d-df8c02517491_M11SN1_M11SN1" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-correlation-request-id": [ "2b152900-e48e-4b5f-9e15-930828a9d02f" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T084637Z:2b152900-e48e-4b5f-9e15-930828a9d02f" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "11dfa861-a720-4b6c-bb54-250a790d2232" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T131938Z:11dfa861-a720-4b6c-bb54-250a790d2232" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 093AAE9244524703B9DF3E581A201A14 Ref B: SEL221051504011 Ref C: 2023-09-18T08:46:35Z" ], - "Date": [ "Mon, 18 Sep 2023 08:46:37 GMT" ] + "X-MSEdge-Ref": [ "Ref A: A67B45387B1D40AAAD1511A3329AED0B Ref B: SEL221051504047 Ref C: 2024-04-29T13:19:36Z" ], + "Date": [ "Mon, 29 Apr 2024 13:19:37 GMT" ] }, "ContentHeaders": { "Content-Length": [ "551" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+19": { + "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+19": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "330" ], - "x-ms-client-request-id": [ "a2930117-9b8c-45a7-890e-b6895d2cee03" ], + "x-ms-unique-id": [ "273" ], + "x-ms-client-request-id": [ "17c93552-7682-4808-99b0-9d90076f3cba" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1644,39 +1682,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "bc3a6dd0-ec3b-431f-9932-4e074ea26641_M9SN1_M9SN1" ], + "x-ms-request-id": [ "29aa0b44-9d00-411f-88e2-974fe8f12a8e_M1SN1_M1SN1" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-correlation-request-id": [ "017e0b3b-7952-4bb7-b0ea-dcad0309b034" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T084649Z:017e0b3b-7952-4bb7-b0ea-dcad0309b034" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-correlation-request-id": [ "0a5b309f-0f3f-47e9-a465-7d351b6f4a79" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T131949Z:0a5b309f-0f3f-47e9-a465-7d351b6f4a79" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 2517F73F80FA470AABDBEEED32A289E1 Ref B: SEL221051504011 Ref C: 2023-09-18T08:46:47Z" ], - "Date": [ "Mon, 18 Sep 2023 08:46:48 GMT" ] + "X-MSEdge-Ref": [ "Ref A: B19329F0220F40EAB9B5731D49D85BCC Ref B: SEL221051504047 Ref C: 2024-04-29T13:19:48Z" ], + "Date": [ "Mon, 29 Apr 2024 13:19:48 GMT" ] }, "ContentHeaders": { "Content-Length": [ "551" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+20": { + "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+20": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "331" ], - "x-ms-client-request-id": [ "c1940e51-6d91-4b6f-81ee-d28d1737c8f2" ], + "x-ms-unique-id": [ "274" ], + "x-ms-client-request-id": [ "a23b542d-52f2-4cd7-b8dc-5ad175057c10" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1687,39 +1726,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "0d6d2f8c-6e70-43fd-b386-81e0963350d0_M8SN1_M8SN1" ], + "x-ms-request-id": [ "6b75ff23-8c4c-4c8e-823a-9293f59a1179_M4SN1_M4SN1" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], - "x-ms-correlation-request-id": [ "f84e74cd-2883-4806-9208-f2b7b63f6044" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T084701Z:f84e74cd-2883-4806-9208-f2b7b63f6044" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "33eb33e9-27f4-4acb-9386-70217cb37319" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T132001Z:33eb33e9-27f4-4acb-9386-70217cb37319" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 6A189EF41ACD4A3DB5BEF27CFEFDE47C Ref B: SEL221051504011 Ref C: 2023-09-18T08:46:59Z" ], - "Date": [ "Mon, 18 Sep 2023 08:47:00 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 96702132B74647E1857C8BDFB58305FD Ref B: SEL221051504047 Ref C: 2024-04-29T13:19:59Z" ], + "Date": [ "Mon, 29 Apr 2024 13:20:01 GMT" ] }, "ContentHeaders": { "Content-Length": [ "551" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+21": { + "Set-AzEventHubGeoDRConfigurationBreakPair+[NoContext]+BreakViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+21": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "332" ], - "x-ms-client-request-id": [ "b1b1d98b-e31d-45a7-a487-c58ecdc9ebb1" ], + "x-ms-unique-id": [ "275" ], + "x-ms-client-request-id": [ "95040aaa-2f54-46c2-866c-1a5fdd851009" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1730,23 +1770,24 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "65ee063e-b9ab-48e7-a8da-7b0322beecf0_M7SN1_M7SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-correlation-request-id": [ "86d0716c-bf24-4db0-9c3c-64d8f08228d5" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T084714Z:86d0716c-bf24-4db0-9c3c-64d8f08228d5" ], + "x-ms-request-id": [ "51fe5d67-8a54-4b09-a0a9-35015e3e746b_M9CH3_M9CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "341e61ce-dadb-4335-9e89-a20e1a7f8196" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T132014Z:341e61ce-dadb-4335-9e89-a20e1a7f8196" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 2D44BD7026E24910BED362A1254C2294 Ref B: SEL221051504011 Ref C: 2023-09-18T08:47:11Z" ], - "Date": [ "Mon, 18 Sep 2023 08:47:13 GMT" ] + "X-MSEdge-Ref": [ "Ref A: A163C17B17DF4C39AE30F6127321F6B3 Ref B: SEL221051504047 Ref C: 2024-04-29T13:20:12Z" ], + "Date": [ "Mon, 29 Apr 2024 13:20:13 GMT" ] }, "ContentHeaders": { "Content-Length": [ "590" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\",\"pendingReplicationOperationsCount\":0}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\",\"pendingReplicationOperationsCount\":0}}", "isContentBase64": false } } diff --git a/src/EventHub/EventHub.Autorest/test/Set-AzEventHubGeoDRConfigurationBreakPair.Tests.ps1 b/src/EventHub/EventHub.Autorest/test/Set-AzEventHubGeoDRConfigurationBreakPair.Tests.ps1 index c39406dbe213..6aad848feb6e 100644 --- a/src/EventHub/EventHub.Autorest/test/Set-AzEventHubGeoDRConfigurationBreakPair.Tests.ps1 +++ b/src/EventHub/EventHub.Autorest/test/Set-AzEventHubGeoDRConfigurationBreakPair.Tests.ps1 @@ -15,12 +15,14 @@ if(($null -eq $TestName) -or ($TestName -contains 'Set-AzEventHubGeoDRConfigurat } Describe 'Set-AzEventHubGeoDRConfigurationBreakPair' { - It 'Break' { + It 'Break' -skip:$($env.secondaryLocation -eq '') { Set-AzEventHubGeoDRConfigurationBreakPair -ResourceGroupName $env.resourceGroup -NamespaceName $env.primaryNamespace -Name $env.alias - + while($drConfig.ProvisioningState -ne "Succeeded"){ $drConfig = Get-AzEventHubGeoDRConfiguration -Name $env.alias -ResourceGroupName $env.resourceGroup -NamespaceName $env.primaryNamespace - Start-TestSleep 10 + if ($TestMode -ne 'playback') { + Start-Sleep 10 + } } $drConfig.Name | Should -Be $env.alias @@ -32,18 +34,22 @@ Describe 'Set-AzEventHubGeoDRConfigurationBreakPair' { while($drConfig.ProvisioningState -ne "Succeeded"){ $drConfig = Get-AzEventHubGeoDRConfiguration -Name $env.alias -ResourceGroupName $env.resourceGroup -NamespaceName $env.primaryNamespace - Start-TestSleep 10 + if ($TestMode -ne 'playback') { + Start-Sleep 10 + } } } - It 'BreakViaIdentity' { + It 'BreakViaIdentity' -skip:$($env.secondaryLocation -eq '') { $drConfig = Get-AzEventHubGeoDRConfiguration -Name $env.alias -ResourceGroupName $env.resourceGroup -NamespaceName $env.primaryNamespace Set-AzEventHubGeoDRConfigurationBreakPair -InputObject $drConfig - + do{ $drConfig = Get-AzEventHubGeoDRConfiguration -Name $env.alias -ResourceGroupName $env.resourceGroup -NamespaceName $env.primaryNamespace - Start-TestSleep 10 + if ($TestMode -ne 'playback') { + Start-Sleep 10 + } } while($drConfig.ProvisioningState -ne "Succeeded") $drConfig.Name | Should -Be $env.alias @@ -52,10 +58,12 @@ Describe 'Set-AzEventHubGeoDRConfigurationBreakPair' { $drConfig.Role | Should -Be "PrimaryNotReplicating" $drConfig = New-AzEventHubGeoDRConfiguration -Name $env.alias -ResourceGroupName $env.resourceGroup -NamespaceName $env.primaryNamespace -PartnerNamespace $env.secondaryNamespaceResourceId - + while($drConfig.ProvisioningState -ne "Succeeded"){ $drConfig = Get-AzEventHubGeoDRConfiguration -Name $env.alias -ResourceGroupName $env.resourceGroup -NamespaceName $env.primaryNamespace - Start-TestSleep 10 + if ($TestMode -ne 'playback') { + Start-Sleep 10 + } } } } diff --git a/src/EventHub/EventHub.Autorest/test/Set-AzEventHubGeoDRConfigurationFailOver.Recording.json b/src/EventHub/EventHub.Autorest/test/Set-AzEventHubGeoDRConfigurationFailOver.Recording.json index 29853a9b962c..361175f53a72 100644 --- a/src/EventHub/EventHub.Autorest/test/Set-AzEventHubGeoDRConfigurationFailOver.Recording.json +++ b/src/EventHub/EventHub.Autorest/test/Set-AzEventHubGeoDRConfigurationFailOver.Recording.json @@ -1,17 +1,17 @@ { - "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+1": { + "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "333" ], - "x-ms-client-request-id": [ "7350ca11-66bb-4428-bf6e-7f2bb6f004a0" ], + "x-ms-unique-id": [ "276" ], + "x-ms-client-request-id": [ "a85888bb-8389-4036-8de3-7d0cf927c1dc" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,39 +22,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "26c2f99c-eb52-489e-9bff-860346ed635a_M3CH3_M3CH3" ], + "x-ms-request-id": [ "47357099-184c-4743-a8e4-0ba1b5d86cb7_M3CH3_M3CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], - "x-ms-correlation-request-id": [ "cbe01d44-9c3c-4275-b21e-928f07b8a00c" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T084735Z:cbe01d44-9c3c-4275-b21e-928f07b8a00c" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "c14534eb-2520-494a-a153-3abe8011d102" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T132040Z:c14534eb-2520-494a-a153-3abe8011d102" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: AAA125C235874A138324D13CCD38A1D7 Ref B: SEL221051504011 Ref C: 2023-09-18T08:47:34Z" ], - "Date": [ "Mon, 18 Sep 2023 08:47:35 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 836DA0D3933F4604A9D1E4E0BC9B85EB Ref B: SEL221051504047 Ref C: 2024-04-29T13:20:38Z" ], + "Date": [ "Mon, 29 Apr 2024 13:20:39 GMT" ] }, "ContentHeaders": { "Content-Length": [ "554" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+Fail+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so/failover?api-version=2023-01-01-preview+2": { + "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+Fail+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof/failover?api-version=2023-01-01-preview+2": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so/failover?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof/failover?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "334" ], - "x-ms-client-request-id": [ "b6baeffb-fab8-41b7-9794-105fc91e574c" ], + "x-ms-unique-id": [ "277" ], + "x-ms-client-request-id": [ "af0c167c-3ff4-42e5-a356-3bee402f2656" ], "CommandName": [ "Az.EventHub.private\\Invoke-AzEventHubFailDisasterRecoveryConfigOver_Fail" ], "FullCommandName": [ "Invoke-AzEventHubFailDisasterRecoveryConfigOver_Fail" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -65,16 +66,17 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "e6b04d2e-e23e-4919-9265-b7328f775cb5_M11CH3_M11CH3" ], + "x-ms-request-id": [ "02e71136-eb52-4ad7-98be-f196c1aa101f_M8CH3_M8CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-correlation-request-id": [ "a8f95778-15f8-40cd-af9c-73bd8efe1291" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T084740Z:a8f95778-15f8-40cd-af9c-73bd8efe1291" ], + "x-ms-correlation-request-id": [ "162a63e6-0cab-4795-a871-bdb4462f45b3" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T132042Z:162a63e6-0cab-4795-a871-bdb4462f45b3" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: A7ADE3FA2576470182DE76890DAC14FE Ref B: SEL221051504011 Ref C: 2023-09-18T08:47:36Z" ], - "Date": [ "Mon, 18 Sep 2023 08:47:39 GMT" ] + "X-MSEdge-Ref": [ "Ref A: A0A14ECF6E7C40D7A94D355B44B7AB34 Ref B: SEL221051504047 Ref C: 2024-04-29T13:20:40Z" ], + "Date": [ "Mon, 29 Apr 2024 13:20:41 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -84,19 +86,19 @@ "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+3": { + "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "335" ], - "x-ms-client-request-id": [ "b8f7701b-bfbc-4cc2-8e7e-8d8a5fd176ba" ], + "x-ms-unique-id": [ "278" ], + "x-ms-client-request-id": [ "73ac0fd3-47d3-48fc-9f42-a68ea308e907" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -107,39 +109,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "14f4e6aa-fa35-4a0b-91b7-572f1ecedd1c_M3SN1_M3SN1" ], + "x-ms-request-id": [ "33ec3f60-aab5-4f3b-8884-7170f227feba_M8SN1_M8SN1" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], - "x-ms-correlation-request-id": [ "66494fc9-3993-49b6-8759-08ec04eb06f2" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T084742Z:66494fc9-3993-49b6-8759-08ec04eb06f2" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "5f8be8b6-bc90-4dc0-b2ec-e8f9d6cf2216" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T132043Z:5f8be8b6-bc90-4dc0-b2ec-e8f9d6cf2216" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 5CE6C117360544C5A0E008431CB3B017 Ref B: SEL221051504011 Ref C: 2023-09-18T08:47:40Z" ], - "Date": [ "Mon, 18 Sep 2023 08:47:41 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 34285D7467334BB9BA815CC53CBE24C5 Ref B: SEL221051504047 Ref C: 2024-04-29T13:20:42Z" ], + "Date": [ "Mon, 29 Apr 2024 13:20:42 GMT" ] }, "ContentHeaders": { "Content-Length": [ "553" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+4": { + "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+4": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "336" ], - "x-ms-client-request-id": [ "27b30b1a-2391-40a3-92f0-1d38a5915a87" ], + "x-ms-unique-id": [ "279" ], + "x-ms-client-request-id": [ "ab2eec95-37c2-4435-b108-63960e80b594" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -150,39 +153,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "a59a7121-656a-4903-8293-0baa52a4ec04_M10CH3_M10CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], - "x-ms-correlation-request-id": [ "5ed5b16e-0dc8-4ed3-bc57-81fe77944ab1" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T084755Z:5ed5b16e-0dc8-4ed3-bc57-81fe77944ab1" ], + "x-ms-request-id": [ "df5ba4a5-c680-405e-914f-89ffa4ef918b_M3DM2_M3DM2" ], + "Server-SB": [ "Service-Bus-Resource-Provider/DM2" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "55cb7ae8-a451-43d9-8e12-da219bd09647" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T132054Z:55cb7ae8-a451-43d9-8e12-da219bd09647" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: E7C23060E9484175BF25DAD8B7E8DE60 Ref B: SEL221051504011 Ref C: 2023-09-18T08:47:52Z" ], - "Date": [ "Mon, 18 Sep 2023 08:47:54 GMT" ] + "X-MSEdge-Ref": [ "Ref A: E1EBF056DF3049218FA278A847251971 Ref B: SEL221051504047 Ref C: 2024-04-29T13:20:53Z" ], + "Date": [ "Mon, 29 Apr 2024 13:20:54 GMT" ] }, "ContentHeaders": { "Content-Length": [ "553" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+5": { + "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+5": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "337" ], - "x-ms-client-request-id": [ "fad1d302-f930-431a-85bd-3648505f4861" ], + "x-ms-unique-id": [ "280" ], + "x-ms-client-request-id": [ "6969009a-bb82-44f6-bb2a-6f3d8ccf8e00" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -193,39 +197,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "070d0dc9-390b-4df2-aad3-ea0e00815bd8_M10CH3_M10CH3" ], + "x-ms-request-id": [ "908ac265-d2ed-468e-8b01-e5293202857d_M6CH3_M6CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], - "x-ms-correlation-request-id": [ "9fcf275e-037c-4cd5-845d-ee90cbc7f588" ], - "x-ms-routing-request-id": [ "KOREASOUTH:20230918T084808Z:9fcf275e-037c-4cd5-845d-ee90cbc7f588" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-correlation-request-id": [ "f4ccb1b3-8430-46df-a14b-56596e81f309" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T132107Z:f4ccb1b3-8430-46df-a14b-56596e81f309" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: F6612703A4034DE0BF6E69B4B61C6588 Ref B: SEL221051504011 Ref C: 2023-09-18T08:48:06Z" ], - "Date": [ "Mon, 18 Sep 2023 08:48:08 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 25D14CE0F0B64B009950B67641BC6C43 Ref B: SEL221051504047 Ref C: 2024-04-29T13:21:04Z" ], + "Date": [ "Mon, 29 Apr 2024 13:21:06 GMT" ] }, "ContentHeaders": { "Content-Length": [ "553" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+6": { + "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+6": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "338" ], - "x-ms-client-request-id": [ "2c3aecd7-6722-475d-96aa-1405e638af4d" ], + "x-ms-unique-id": [ "281" ], + "x-ms-client-request-id": [ "703b2850-57f1-4f39-9136-9fbcf54529ac" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -236,39 +241,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "8b48a261-4a9c-4f6b-860f-f8a7d754b8df_M3SN1_M3SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], + "x-ms-request-id": [ "62d97811-006c-44b9-8efc-d7b18e6cb1f8_M4CH3_M4CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], - "x-ms-correlation-request-id": [ "6d6630fc-9457-4987-8b58-b8b14ace52b8" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T084820Z:6d6630fc-9457-4987-8b58-b8b14ace52b8" ], + "x-ms-correlation-request-id": [ "fa4e82e1-8e04-44a5-b015-64cb8017059d" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T132118Z:fa4e82e1-8e04-44a5-b015-64cb8017059d" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: B87EFBADE3AA4BC98861B39D0853A229 Ref B: SEL221051504011 Ref C: 2023-09-18T08:48:19Z" ], - "Date": [ "Mon, 18 Sep 2023 08:48:19 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 5795BEC601D84C4D824CB9386BDC2AA7 Ref B: SEL221051504047 Ref C: 2024-04-29T13:21:17Z" ], + "Date": [ "Mon, 29 Apr 2024 13:21:17 GMT" ] }, "ContentHeaders": { "Content-Length": [ "553" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+7": { + "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+7": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "339" ], - "x-ms-client-request-id": [ "b073f53f-9913-45ab-beda-5cc21c3e34bc" ], + "x-ms-unique-id": [ "282" ], + "x-ms-client-request-id": [ "dc76b172-a60e-4e53-9bda-afae70ddb697" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -279,39 +285,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "74c7614f-dd90-4c40-a2a6-35c0d51c579a_M11SN1_M11SN1" ], + "x-ms-request-id": [ "3739c683-8661-493d-b3d6-986b721b6365_M8SN1_M8SN1" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], - "x-ms-correlation-request-id": [ "f1eb8d65-4832-48d0-b743-56af94970975" ], - "x-ms-routing-request-id": [ "EASTASIA:20230918T084832Z:f1eb8d65-4832-48d0-b743-56af94970975" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-correlation-request-id": [ "d851684a-3ee6-430b-ad01-a88a404fc85c" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T132128Z:d851684a-3ee6-430b-ad01-a88a404fc85c" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 1F7A889EE0FF4771A2C0AD3BE084A1BD Ref B: SEL221051504011 Ref C: 2023-09-18T08:48:30Z" ], - "Date": [ "Mon, 18 Sep 2023 08:48:31 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 4926BA86DCF84ECF8BCEE1E21EBEDB20 Ref B: SEL221051504047 Ref C: 2024-04-29T13:21:28Z" ], + "Date": [ "Mon, 29 Apr 2024 13:21:28 GMT" ] }, "ContentHeaders": { "Content-Length": [ "553" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+8": { + "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+8": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "340" ], - "x-ms-client-request-id": [ "3dc631ee-70e8-4656-96ca-eb3b9b2a67a3" ], + "x-ms-unique-id": [ "283" ], + "x-ms-client-request-id": [ "bee11837-66a2-4f5e-8f7e-e1ba9a21b3be" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -322,39 +329,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "7b251a24-8816-4e44-8181-172f68008277_M1DM2_M1DM2" ], - "Server-SB": [ "Service-Bus-Resource-Provider/DM2" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], - "x-ms-correlation-request-id": [ "23960d9e-b9d5-4fe4-8ba8-ce62c229faec" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T084844Z:23960d9e-b9d5-4fe4-8ba8-ce62c229faec" ], + "x-ms-request-id": [ "6fe5e6c5-bb9e-43b6-bbd6-f5e0a0f268c6_M9SN1_M9SN1" ], + "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-correlation-request-id": [ "f4f2faf7-cda1-4a7f-8454-4253c1994870" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T132140Z:f4f2faf7-cda1-4a7f-8454-4253c1994870" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 07C21872678B45AAA440F66E1B7E693C Ref B: SEL221051504011 Ref C: 2023-09-18T08:48:42Z" ], - "Date": [ "Mon, 18 Sep 2023 08:48:44 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 7F82FE4670C649D38E22B0C78B09D010 Ref B: SEL221051504047 Ref C: 2024-04-29T13:21:38Z" ], + "Date": [ "Mon, 29 Apr 2024 13:21:39 GMT" ] }, "ContentHeaders": { "Content-Length": [ "553" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+9": { + "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+9": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "341" ], - "x-ms-client-request-id": [ "8925d478-cfc5-4c29-b512-76e8f7b2d774" ], + "x-ms-unique-id": [ "284" ], + "x-ms-client-request-id": [ "e15b9013-f1f4-435e-a7fc-f34d93258a53" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -365,39 +373,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "f2f664c5-4183-4087-8c16-3de8a4787249_M3CH3_M3CH3" ], + "x-ms-request-id": [ "e3c390bc-6d44-4772-af67-6b2e2a3f7dea_M1CH3_M1CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], - "x-ms-correlation-request-id": [ "492e5ddf-5d8e-413f-8cb8-3c9c51f46273" ], - "x-ms-routing-request-id": [ "KOREASOUTH:20230918T084856Z:492e5ddf-5d8e-413f-8cb8-3c9c51f46273" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "cc487b0e-5704-4455-a2f6-9408917b1d76" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T132151Z:cc487b0e-5704-4455-a2f6-9408917b1d76" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 53F9845AB83649C3971BBCE0F0EA6AC6 Ref B: SEL221051504011 Ref C: 2023-09-18T08:48:54Z" ], - "Date": [ "Mon, 18 Sep 2023 08:48:56 GMT" ] + "X-MSEdge-Ref": [ "Ref A: AA29D87BF39F49A9B5C9436BA734F83E Ref B: SEL221051504047 Ref C: 2024-04-29T13:21:50Z" ], + "Date": [ "Mon, 29 Apr 2024 13:21:50 GMT" ] }, "ContentHeaders": { "Content-Length": [ "553" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+10": { + "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+10": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "342" ], - "x-ms-client-request-id": [ "df558a22-fe69-4724-9655-a50518943b21" ], + "x-ms-unique-id": [ "285" ], + "x-ms-client-request-id": [ "9774f755-fadc-4301-8ae5-7ba89693131c" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -408,39 +417,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "a46c6441-0ddd-4b7b-9036-a2ef0d787c91_M9CH3_M9CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], - "x-ms-correlation-request-id": [ "408d82fc-6a32-4832-93c2-17700254c108" ], - "x-ms-routing-request-id": [ "EASTASIA:20230918T084908Z:408d82fc-6a32-4832-93c2-17700254c108" ], + "x-ms-request-id": [ "5e816067-f56a-4a0d-bc06-ae4cbbcb747b_M4SN1_M4SN1" ], + "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "392437bc-a08a-4796-8d2f-00120395ecdc" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T132203Z:392437bc-a08a-4796-8d2f-00120395ecdc" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 05B81B0AED404E9480B036C750069903 Ref B: SEL221051504011 Ref C: 2023-09-18T08:49:06Z" ], - "Date": [ "Mon, 18 Sep 2023 08:49:07 GMT" ] + "X-MSEdge-Ref": [ "Ref A: B890BF10C6ED49D18938E87FF67819BD Ref B: SEL221051504047 Ref C: 2024-04-29T13:22:01Z" ], + "Date": [ "Mon, 29 Apr 2024 13:22:03 GMT" ] }, "ContentHeaders": { "Content-Length": [ "411" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"\",\"role\":\"PrimaryNotReplicating\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"\",\"role\":\"PrimaryNotReplicating\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+11": { + "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+11": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "343" ], - "x-ms-client-request-id": [ "112eeb33-d707-4a22-80fa-65c2ad0e30dc" ], + "x-ms-unique-id": [ "286" ], + "x-ms-client-request-id": [ "5b8c1f8c-92c6-42be-9f74-963363e50bca" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -451,39 +461,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "98e719a5-409e-4e6b-a5f7-d702c290e0ae_M4CH3_M4CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-correlation-request-id": [ "03f86b3c-2fea-4225-80af-4a6080fc319e" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T084920Z:03f86b3c-2fea-4225-80af-4a6080fc319e" ], + "x-ms-request-id": [ "d7a59015-5ae9-4dc8-b729-29c09f364b0b_M8SN1_M8SN1" ], + "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-correlation-request-id": [ "900ba68c-54e5-46bd-b279-db20fe10fd9c" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T132214Z:900ba68c-54e5-46bd-b279-db20fe10fd9c" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 32053624CAED4991A60157E2DC5A249D Ref B: SEL221051504011 Ref C: 2023-09-18T08:49:18Z" ], - "Date": [ "Mon, 18 Sep 2023 08:49:19 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 4B601AA8E58D40249FFB8622BD0689EE Ref B: SEL221051504047 Ref C: 2024-04-29T13:22:14Z" ], + "Date": [ "Mon, 29 Apr 2024 13:22:14 GMT" ] }, "ContentHeaders": { "Content-Length": [ "412" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"\",\"role\":\"PrimaryNotReplicating\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"\",\"role\":\"PrimaryNotReplicating\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+Fail+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+12": { + "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+Fail+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+12": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "344" ], - "x-ms-client-request-id": [ "e3ac7949-32f0-470b-b527-db329db6ce54" ], + "x-ms-unique-id": [ "287" ], + "x-ms-client-request-id": [ "9156e805-41d1-4e24-b50d-18247c991330" ], "CommandName": [ "Remove-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Remove-AzEventHubGeoDRConfiguration_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -494,16 +505,17 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "9f4bb035-49d8-4520-9342-9f080b2aeb99_M11CH3_M11CH3" ], + "x-ms-request-id": [ "19aec8e2-7268-40fe-a5df-f8f3ab7b93eb_M6CH3_M6CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], - "x-ms-correlation-request-id": [ "7a88f882-a9c4-45d0-a8c4-a7a6e53df7d6" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T084933Z:7a88f882-a9c4-45d0-a8c4-a7a6e53df7d6" ], + "x-ms-correlation-request-id": [ "2ca87394-14f3-44f6-9332-8ee33a87802d" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T132226Z:2ca87394-14f3-44f6-9332-8ee33a87802d" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: EBE84F74FAF94F05ABF2486043C8B215 Ref B: SEL221051504011 Ref C: 2023-09-18T08:49:30Z" ], - "Date": [ "Mon, 18 Sep 2023 08:49:33 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 43056EADB93345D7B786FE87E04946DC Ref B: SEL221051504047 Ref C: 2024-04-29T13:22:25Z" ], + "Date": [ "Mon, 29 Apr 2024 13:22:25 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -513,11 +525,11 @@ "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+Fail+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+13": { + "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+Fail+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+13": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", - "Content": "{\n \"properties\": {\n \"partnerNamespace\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\"\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", + "Content": "{\n \"properties\": {\n \"partnerNamespace\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\"\n }\n}", "isContentBase64": false, "Headers": { }, @@ -531,39 +543,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "f34c8864-1185-4ad1-be29-ad2e67db04c4_M1SN1_M1SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], - "x-ms-correlation-request-id": [ "133e357f-9a15-411f-bfb6-ad5ddc4e4aa9" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T085245Z:133e357f-9a15-411f-bfb6-ad5ddc4e4aa9" ], + "x-ms-request-id": [ "31047d55-4b13-4bd1-a0b5-d788e5298a11_M10CH3_M10CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-correlation-request-id": [ "c2697844-7cb1-4f13-8479-977f5e33b97b" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T132537Z:c2697844-7cb1-4f13-8479-977f5e33b97b" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 9104261AAAC34646BBA15E820E0FE302 Ref B: SEL221051503025 Ref C: 2023-09-18T08:52:34Z" ], - "Date": [ "Mon, 18 Sep 2023 08:52:44 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 5126899944444A37A60CF7E2926A1C95 Ref B: SEL221051503021 Ref C: 2024-04-29T13:25:26Z" ], + "Date": [ "Mon, 29 Apr 2024 13:25:37 GMT" ] }, "ContentHeaders": { "Content-Length": [ "551" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+14": { + "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+14": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "346" ], - "x-ms-client-request-id": [ "10335403-4134-4e10-8244-b5482544106c" ], + "x-ms-unique-id": [ "289" ], + "x-ms-client-request-id": [ "8c586492-d9d2-4e9c-b425-66edd940eb03" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -574,39 +587,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "00225733-b6d0-4621-b7cd-c486e62f18c9_M3SN1_M3SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], + "x-ms-request-id": [ "f813c3d8-517c-45b1-8bc3-e4273dc8afe2_M6CH3_M6CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], - "x-ms-correlation-request-id": [ "9760fe0a-c467-4e94-a17f-239f611d5ca5" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T085247Z:9760fe0a-c467-4e94-a17f-239f611d5ca5" ], + "x-ms-correlation-request-id": [ "0de4a326-6fe1-47bb-b2cd-86558e686d6a" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T132540Z:0de4a326-6fe1-47bb-b2cd-86558e686d6a" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 9E9B83F2D26241BA9065EEE81761617E Ref B: SEL221051503025 Ref C: 2023-09-18T08:52:45Z" ], - "Date": [ "Mon, 18 Sep 2023 08:52:46 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 2DC7EEAD0ABA49B881824D42AE31B2CA Ref B: SEL221051503021 Ref C: 2024-04-29T13:25:38Z" ], + "Date": [ "Mon, 29 Apr 2024 13:25:39 GMT" ] }, "ContentHeaders": { "Content-Length": [ "551" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+15": { + "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+15": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "347" ], - "x-ms-client-request-id": [ "bda0ae14-1287-4945-b194-3f163d8929e6" ], + "x-ms-unique-id": [ "290" ], + "x-ms-client-request-id": [ "a44def82-a3ae-452c-9f01-fb7f6d7b4668" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -617,39 +631,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "8d652320-8a81-4efd-a361-3b6df126ea03_M0SN1_M0SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], - "x-ms-correlation-request-id": [ "58629703-0af5-4c55-bd24-dca05697aa76" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T085300Z:58629703-0af5-4c55-bd24-dca05697aa76" ], + "x-ms-request-id": [ "3d4c9f94-910d-4631-b15e-cf6353bba059_M0CH3_M0CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "4f79579e-8597-459a-95ff-67a0f59c030a" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T132552Z:4f79579e-8597-459a-95ff-67a0f59c030a" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: C017A434FD8D462A845CE18A5046C950 Ref B: SEL221051503025 Ref C: 2023-09-18T08:52:57Z" ], - "Date": [ "Mon, 18 Sep 2023 08:52:59 GMT" ] + "X-MSEdge-Ref": [ "Ref A: E679162EE61A4231B3BF5821284FD2DF Ref B: SEL221051503021 Ref C: 2024-04-29T13:25:50Z" ], + "Date": [ "Mon, 29 Apr 2024 13:25:52 GMT" ] }, "ContentHeaders": { "Content-Length": [ "551" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+16": { + "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+16": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "348" ], - "x-ms-client-request-id": [ "6832cfd6-7b2a-45b8-a38a-28833ee684e6" ], + "x-ms-unique-id": [ "291" ], + "x-ms-client-request-id": [ "674068aa-b36b-48c3-a1f1-7cc4de38feee" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -660,39 +675,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "e2994f22-1910-4da0-a945-cc202f9f253f_M3CH3_M3CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11991" ], - "x-ms-correlation-request-id": [ "3de4761b-b0b9-4beb-9bab-a13010ff8a89" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T085312Z:3de4761b-b0b9-4beb-9bab-a13010ff8a89" ], + "x-ms-request-id": [ "ec20aabb-83dc-4a25-ba4a-1987fc2c042c_M3SN1_M3SN1" ], + "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "5ff830cb-400a-4485-ae2c-7d98c9aea1b6" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T132604Z:5ff830cb-400a-4485-ae2c-7d98c9aea1b6" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 01FEFC19E7184839A743E2BCC1CF7983 Ref B: SEL221051503025 Ref C: 2023-09-18T08:53:10Z" ], - "Date": [ "Mon, 18 Sep 2023 08:53:11 GMT" ] + "X-MSEdge-Ref": [ "Ref A: A1715A2CBC9140BCADEE44A569F6CCE2 Ref B: SEL221051503021 Ref C: 2024-04-29T13:26:02Z" ], + "Date": [ "Mon, 29 Apr 2024 13:26:04 GMT" ] }, "ContentHeaders": { "Content-Length": [ "551" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+17": { + "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+17": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "349" ], - "x-ms-client-request-id": [ "eb8ed881-6294-447f-b38e-aa5707c042f9" ], + "x-ms-unique-id": [ "292" ], + "x-ms-client-request-id": [ "2ab6b44b-cce2-4dfa-84ec-3323d45744b4" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -703,39 +719,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "38ebcc69-c38e-469b-97bf-e171b6675a50_M11CH3_M11CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], - "x-ms-correlation-request-id": [ "eaa59831-897f-422d-894e-b9c32c1140e2" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T085323Z:eaa59831-897f-422d-894e-b9c32c1140e2" ], + "x-ms-request-id": [ "d13f123e-e76a-470c-a49e-ea3f07eb535e_M7SN1_M7SN1" ], + "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-correlation-request-id": [ "b0646fb2-7f84-46c1-a1c9-54c5e80c264f" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T132616Z:b0646fb2-7f84-46c1-a1c9-54c5e80c264f" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: A1BEBFF1979B46D781EB20BC2BA24874 Ref B: SEL221051503025 Ref C: 2023-09-18T08:53:22Z" ], - "Date": [ "Mon, 18 Sep 2023 08:53:23 GMT" ] + "X-MSEdge-Ref": [ "Ref A: B16BB5A72B264C6C9DA4F3DBE2962BB0 Ref B: SEL221051503021 Ref C: 2024-04-29T13:26:14Z" ], + "Date": [ "Mon, 29 Apr 2024 13:26:16 GMT" ] }, "ContentHeaders": { "Content-Length": [ "551" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+18": { + "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+18": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "350" ], - "x-ms-client-request-id": [ "aa69a8d3-9704-429a-8fd8-b1d04db7f039" ], + "x-ms-unique-id": [ "293" ], + "x-ms-client-request-id": [ "8d0d2ff9-f405-4666-bfb4-e4152e9f8032" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -746,39 +763,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "2bbb9011-caa4-40a7-929d-c54cb53539aa_M0DM2_M0DM2" ], - "Server-SB": [ "Service-Bus-Resource-Provider/DM2" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-correlation-request-id": [ "5ded6970-a93a-400a-aa94-2d0cc57566d7" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T085335Z:5ded6970-a93a-400a-aa94-2d0cc57566d7" ], + "x-ms-request-id": [ "6389ea42-ce7f-4f99-918b-157bd29105c8_M11SN1_M11SN1" ], + "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "f83a218a-2a36-4192-9daf-56e77bdf34a3" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T132629Z:f83a218a-2a36-4192-9daf-56e77bdf34a3" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: C77C0D6CA5604AA299EE009989778191 Ref B: SEL221051503025 Ref C: 2023-09-18T08:53:34Z" ], - "Date": [ "Mon, 18 Sep 2023 08:53:35 GMT" ] + "X-MSEdge-Ref": [ "Ref A: F4A1A8684F724F37BB32CD37BB69DD48 Ref B: SEL221051503021 Ref C: 2024-04-29T13:26:26Z" ], + "Date": [ "Mon, 29 Apr 2024 13:26:28 GMT" ] }, "ContentHeaders": { "Content-Length": [ "551" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+19": { + "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+19": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "351" ], - "x-ms-client-request-id": [ "0d7d9edf-c28b-4fef-80e1-3784d9fbce0d" ], + "x-ms-unique-id": [ "294" ], + "x-ms-client-request-id": [ "f2c3454e-c197-486f-8fee-5dadb20fc02d" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -789,39 +807,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "22947e0d-3399-455a-acc6-d8e593b81629_M5CH3_M5CH3" ], + "x-ms-request-id": [ "8866cc9b-3747-4cad-851f-3745df61d526_M11CH3_M11CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-correlation-request-id": [ "ee95439c-7e67-4ea9-8697-62c0ff0724b8" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T085348Z:ee95439c-7e67-4ea9-8697-62c0ff0724b8" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "575a14c6-51c0-4af3-a5f5-49661f653284" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T132640Z:575a14c6-51c0-4af3-a5f5-49661f653284" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: D29A6771D07E40DF88D6A7565817EB6D Ref B: SEL221051503025 Ref C: 2023-09-18T08:53:46Z" ], - "Date": [ "Mon, 18 Sep 2023 08:53:47 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 92C70A1970584E999821F59C2E0ADA95 Ref B: SEL221051503021 Ref C: 2024-04-29T13:26:39Z" ], + "Date": [ "Mon, 29 Apr 2024 13:26:40 GMT" ] }, "ContentHeaders": { "Content-Length": [ "551" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+20": { + "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+20": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "352" ], - "x-ms-client-request-id": [ "fbe46dd8-1da4-4c72-9618-8bc0ebe08738" ], + "x-ms-unique-id": [ "295" ], + "x-ms-client-request-id": [ "4159dda7-f384-4ea7-a42d-efd410439e1f" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -832,39 +851,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "506f4b72-b673-43a4-8338-9b17bdf4e8b4_M5SN1_M5SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11989" ], - "x-ms-correlation-request-id": [ "f531fb2a-1cf5-4f9a-ab03-c0a8d9829418" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T085400Z:f531fb2a-1cf5-4f9a-ab03-c0a8d9829418" ], + "x-ms-request-id": [ "a80b7e85-886c-48c7-8229-c0096d6ff2f0_M4CH3_M4CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "106d1dc7-15ae-4d0e-b96d-a0d39f85fc90" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T132652Z:106d1dc7-15ae-4d0e-b96d-a0d39f85fc90" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 6F444237AEF24C938BB00CA66F8247AF Ref B: SEL221051503025 Ref C: 2023-09-18T08:53:58Z" ], - "Date": [ "Mon, 18 Sep 2023 08:53:59 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 9FBFE61D0D6D47D38D5AA657C67C5462 Ref B: SEL221051503021 Ref C: 2024-04-29T13:26:50Z" ], + "Date": [ "Mon, 29 Apr 2024 13:26:51 GMT" ] }, "ContentHeaders": { "Content-Length": [ "551" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+21": { + "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+21": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "353" ], - "x-ms-client-request-id": [ "3e219549-57dd-4c54-afa0-5febc38ba1c3" ], + "x-ms-unique-id": [ "296" ], + "x-ms-client-request-id": [ "8f71199f-0030-4935-b09c-1f0318a14e11" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -875,39 +895,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "9eaa2183-eaf5-489e-a88b-843e18d989b1_M11CH3_M11CH3" ], + "x-ms-request-id": [ "1c4d9017-30e0-47dd-98c8-c9f8f4753cd8_M8CH3_M8CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], - "x-ms-correlation-request-id": [ "01eae87b-220d-4381-a004-3eb8029d799e" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T085412Z:01eae87b-220d-4381-a004-3eb8029d799e" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "a98587fc-96e6-4d05-9b1c-e79b22b59ccf" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T132703Z:a98587fc-96e6-4d05-9b1c-e79b22b59ccf" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 3160F007AEE34137AF34B998488EDC14 Ref B: SEL221051503025 Ref C: 2023-09-18T08:54:10Z" ], - "Date": [ "Mon, 18 Sep 2023 08:54:11 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 8FC18368D53B48B8B6C87D8EEBE99A70 Ref B: SEL221051503021 Ref C: 2024-04-29T13:27:02Z" ], + "Date": [ "Mon, 29 Apr 2024 13:27:03 GMT" ] }, "ContentHeaders": { "Content-Length": [ "551" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+22": { + "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+Fail+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+22": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "354" ], - "x-ms-client-request-id": [ "0c5b6de4-4ee0-45da-84c7-a3ddac908968" ], + "x-ms-unique-id": [ "297" ], + "x-ms-client-request-id": [ "b0c25089-ed07-4173-8315-52fc8050c431" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -918,39 +939,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "0ef20e51-a3a2-414f-bb69-7f0821e46d21_M7SN1_M7SN1" ], + "x-ms-request-id": [ "d2bba7fb-ec1b-4d0a-9969-a98a536e87dc_M11SN1_M11SN1" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-correlation-request-id": [ "38a2ba9a-2179-4ef5-9b31-bad64b8414b9" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T085424Z:38a2ba9a-2179-4ef5-9b31-bad64b8414b9" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "deed5bdb-5247-42e0-893e-b091970b3fc8" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T132715Z:deed5bdb-5247-42e0-893e-b091970b3fc8" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: AF95614FDC674826B2F6156A5F39CB2E Ref B: SEL221051503025 Ref C: 2023-09-18T08:54:22Z" ], - "Date": [ "Mon, 18 Sep 2023 08:54:23 GMT" ] + "X-MSEdge-Ref": [ "Ref A: D5CF656142D04CCD8C3291823A0A9B20 Ref B: SEL221051503021 Ref C: 2024-04-29T13:27:13Z" ], + "Date": [ "Mon, 29 Apr 2024 13:27:15 GMT" ] }, "ContentHeaders": { "Content-Length": [ "590" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz\",\"role\":\"Primary\",\"type\":\"MetadataReplication\",\"pendingReplicationOperationsCount\":0}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta\",\"role\":\"Primary\",\"type\":\"MetadataReplication\",\"pendingReplicationOperationsCount\":0}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+FailViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+1": { + "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+FailViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "355" ], - "x-ms-client-request-id": [ "df11f353-17ff-4e6b-9a6d-986681069f31" ], + "x-ms-unique-id": [ "298" ], + "x-ms-client-request-id": [ "1ae2da05-8799-4eb0-ab5b-19acac048652" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -961,39 +983,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "e9a6c39d-4f8c-421e-8bc3-49fb3b7f0e37_M5CH3_M5CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], - "x-ms-correlation-request-id": [ "9be518a8-c32f-473a-9b3f-1869ce91a031" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T085436Z:9be518a8-c32f-473a-9b3f-1869ce91a031" ], + "x-ms-request-id": [ "f9094ee4-5fd9-47c2-9259-ffbf232736f5_M7SN1_M7SN1" ], + "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "43609095-5e04-4bad-94bc-1c5c8981f156" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T132727Z:43609095-5e04-4bad-94bc-1c5c8981f156" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 2C27C6662BB546F3B8C6C09F7C465D76 Ref B: SEL221051503025 Ref C: 2023-09-18T08:54:34Z" ], - "Date": [ "Mon, 18 Sep 2023 08:54:35 GMT" ] + "X-MSEdge-Ref": [ "Ref A: B9C518E4CF654C0B9FA4A7117C0EA5F2 Ref B: SEL221051503021 Ref C: 2024-04-29T13:27:25Z" ], + "Date": [ "Mon, 29 Apr 2024 13:27:26 GMT" ] }, "ContentHeaders": { "Content-Length": [ "554" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+FailViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+2": { + "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+FailViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "356" ], - "x-ms-client-request-id": [ "323fad15-186d-46c8-8e0d-f6101bdb2af6" ], + "x-ms-unique-id": [ "299" ], + "x-ms-client-request-id": [ "7f28d5c8-ad9c-4b33-be13-e382dd5c0a10" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1004,39 +1027,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "87e78474-c7bc-404b-9fa5-50534297dde6_M2CH3_M2CH3" ], + "x-ms-request-id": [ "bb1f6dc2-c7d0-4944-86cf-678630778600_M5CH3_M5CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], - "x-ms-correlation-request-id": [ "da9b599a-77ed-43db-a165-638f9960159f" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T085438Z:da9b599a-77ed-43db-a165-638f9960159f" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "bab4067f-7b16-40e9-95e6-227d65728185" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T132729Z:bab4067f-7b16-40e9-95e6-227d65728185" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 19504166A19E42DA9F8E30E6E3AB7E5C Ref B: SEL221051503025 Ref C: 2023-09-18T08:54:37Z" ], - "Date": [ "Mon, 18 Sep 2023 08:54:37 GMT" ] + "X-MSEdge-Ref": [ "Ref A: F0261E104FB044E784BFD1FAEAB655B5 Ref B: SEL221051503021 Ref C: 2024-04-29T13:27:27Z" ], + "Date": [ "Mon, 29 Apr 2024 13:27:28 GMT" ] }, "ContentHeaders": { "Content-Length": [ "554" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+FailViaIdentity+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourcegroupautoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespacenameyr61dz/disasterRecoveryConfigs/aliasyfh2so/failover?api-version=2023-01-01-preview+3": { + "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+FailViaIdentity+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-eventhub-kchdmf/providers/Microsoft.EventHub/namespaces/namespacename7pzlta/disasterRecoveryConfigs/aliasp8gxof/failover?api-version=2023-01-01-preview+3": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourcegroupautoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespacenameyr61dz/disasterRecoveryConfigs/aliasyfh2so/failover?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-eventhub-kchdmf/providers/Microsoft.EventHub/namespaces/namespacename7pzlta/disasterRecoveryConfigs/aliasp8gxof/failover?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "357" ], - "x-ms-client-request-id": [ "4f742031-8637-4cbd-8d00-14857e77507f" ], + "x-ms-unique-id": [ "300" ], + "x-ms-client-request-id": [ "dae411bf-0a75-411c-822e-d30fad8083a7" ], "CommandName": [ "Az.EventHub.private\\Invoke-AzEventHubFailDisasterRecoveryConfigOver_Fail" ], "FullCommandName": [ "Invoke-AzEventHubFailDisasterRecoveryConfigOver_Fail" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1047,16 +1071,17 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "ef7d41c9-0790-4b35-94b3-ee55b2faf071_M1CH3_M1CH3" ], + "x-ms-request-id": [ "1dd40a45-d9b4-4d39-bd2e-6c61c49d8f40_M4CH3_M4CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-correlation-request-id": [ "9afbe2ea-a7ea-4c83-91b9-e23b28097bce" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T085440Z:9afbe2ea-a7ea-4c83-91b9-e23b28097bce" ], + "x-ms-correlation-request-id": [ "61326f2b-c20d-40af-8f2f-4200e2b80234" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T132730Z:61326f2b-c20d-40af-8f2f-4200e2b80234" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 1D22A5EC5B5F454EA9B34671926CA34E Ref B: SEL221051503025 Ref C: 2023-09-18T08:54:38Z" ], - "Date": [ "Mon, 18 Sep 2023 08:54:39 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 46E47C5B57A244CE86E582A2BE92F190 Ref B: SEL221051503021 Ref C: 2024-04-29T13:27:29Z" ], + "Date": [ "Mon, 29 Apr 2024 13:27:30 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -1066,19 +1091,19 @@ "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+FailViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+4": { + "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+FailViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+4": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "358" ], - "x-ms-client-request-id": [ "eded4eb8-3161-4230-bad1-132387735db2" ], + "x-ms-unique-id": [ "301" ], + "x-ms-client-request-id": [ "f33d6571-1e51-4819-8f28-338378e0e018" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1089,39 +1114,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "ff1b8644-22b8-447f-8c1d-2ec04023e21a_M4CH3_M4CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], - "x-ms-correlation-request-id": [ "1066a029-7923-4958-8011-df0e5eedecd1" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T085441Z:1066a029-7923-4958-8011-df0e5eedecd1" ], + "x-ms-request-id": [ "8070f1be-bbd6-4a08-b532-2ed437a6d864_M3SN1_M3SN1" ], + "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-correlation-request-id": [ "8d34c64e-19c2-4e5b-8da4-9d2d27672525" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T132733Z:8d34c64e-19c2-4e5b-8da4-9d2d27672525" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 48FBB41709FD4C0A84C3A9F5AFBA029C Ref B: SEL221051503025 Ref C: 2023-09-18T08:54:40Z" ], - "Date": [ "Mon, 18 Sep 2023 08:54:40 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 8AB26FE7222541EF96D836E6812D97F8 Ref B: SEL221051503021 Ref C: 2024-04-29T13:27:30Z" ], + "Date": [ "Mon, 29 Apr 2024 13:27:32 GMT" ] }, "ContentHeaders": { "Content-Length": [ "553" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+FailViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+5": { + "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+FailViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+5": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "359" ], - "x-ms-client-request-id": [ "a538f45b-94b3-4754-be24-a59a81f0fde6" ], + "x-ms-unique-id": [ "302" ], + "x-ms-client-request-id": [ "4de5bc89-6084-44c2-8bfc-9afa5472b58e" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1132,39 +1158,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "c9d75eb8-7d43-4330-8f00-ea3fc5f7e4b8_M2SN1_M2SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-correlation-request-id": [ "8616654f-ac65-4a2f-8208-b13929170d4e" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T085452Z:8616654f-ac65-4a2f-8208-b13929170d4e" ], + "x-ms-request-id": [ "960a9c90-66fd-4a3e-b459-88131a0efb91_M6CH3_M6CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "9bbcc782-16ef-4607-920d-db3596b8e8ae" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T132744Z:9bbcc782-16ef-4607-920d-db3596b8e8ae" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 5E6013B9B2034CEBA6CCF4A4586B97B5 Ref B: SEL221051503025 Ref C: 2023-09-18T08:54:51Z" ], - "Date": [ "Mon, 18 Sep 2023 08:54:52 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 0B46C90370D043488268241942489356 Ref B: SEL221051503021 Ref C: 2024-04-29T13:27:43Z" ], + "Date": [ "Mon, 29 Apr 2024 13:27:43 GMT" ] }, "ContentHeaders": { "Content-Length": [ "553" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+FailViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+6": { + "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+FailViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+6": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "360" ], - "x-ms-client-request-id": [ "99aa7766-50b7-4e1e-addf-cf1efb786129" ], + "x-ms-unique-id": [ "303" ], + "x-ms-client-request-id": [ "4002cdb1-5ce8-479d-b3fb-a79b0608a0a0" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1175,39 +1202,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "79e24dee-c76b-464e-8c66-4f2b321c52a3_M5SN1_M5SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], - "x-ms-correlation-request-id": [ "c828696c-cb1f-4b10-abcd-5448a11eb536" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T085507Z:c828696c-cb1f-4b10-abcd-5448a11eb536" ], + "x-ms-request-id": [ "7017dced-fa21-4921-aa79-60597f968a44_M4CH3_M4CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "81c7348e-ced0-4e52-90b4-6e03eb613fc3" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T132755Z:81c7348e-ced0-4e52-90b4-6e03eb613fc3" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 5E02D6888B1844A389AAE63E40E7284D Ref B: SEL221051503025 Ref C: 2023-09-18T08:55:03Z" ], - "Date": [ "Mon, 18 Sep 2023 08:55:06 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 6213DE517FA8417B9BEF7290F1A8B1DC Ref B: SEL221051503021 Ref C: 2024-04-29T13:27:54Z" ], + "Date": [ "Mon, 29 Apr 2024 13:27:55 GMT" ] }, "ContentHeaders": { "Content-Length": [ "553" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+FailViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+7": { + "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+FailViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+7": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "361" ], - "x-ms-client-request-id": [ "b65b3700-6050-4d72-a163-912fd3681f59" ], + "x-ms-unique-id": [ "304" ], + "x-ms-client-request-id": [ "28617956-0489-4f1a-bd29-3986380d8b35" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1218,39 +1246,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "53ac4951-5772-4bca-a4a4-86523adec784_M2CH3_M2CH3" ], + "x-ms-request-id": [ "d1689b61-77b8-4a45-9e28-e48c8b6bd937_M7CH3_M7CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11988" ], - "x-ms-correlation-request-id": [ "affa44da-b144-4653-a6b0-a45337db254a" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T085519Z:affa44da-b144-4653-a6b0-a45337db254a" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-correlation-request-id": [ "0ab9791b-296b-4992-98c5-805f3e13d924" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240429T132807Z:0ab9791b-296b-4992-98c5-805f3e13d924" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 6B90E36BDC744139B9953279CEA129E4 Ref B: SEL221051503025 Ref C: 2023-09-18T08:55:17Z" ], - "Date": [ "Mon, 18 Sep 2023 08:55:18 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 707CAF8D3C8341588D749C8F0AAEA23A Ref B: SEL221051503021 Ref C: 2024-04-29T13:28:05Z" ], + "Date": [ "Mon, 29 Apr 2024 13:28:06 GMT" ] }, "ContentHeaders": { "Content-Length": [ "553" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+FailViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+8": { + "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+FailViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+8": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "362" ], - "x-ms-client-request-id": [ "83dbfe21-602a-4326-bbef-700a58e44f3e" ], + "x-ms-unique-id": [ "305" ], + "x-ms-client-request-id": [ "abe60e25-d651-4f6f-9f63-d2489dd0cd90" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1261,39 +1290,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "ec1e8527-c23d-4340-938f-2f51c60b5090_M9CH3_M9CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], - "x-ms-correlation-request-id": [ "8ca22c0e-f8f2-424e-9b6b-fce63767f531" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T085534Z:8ca22c0e-f8f2-424e-9b6b-fce63767f531" ], + "x-ms-request-id": [ "842c082c-f45b-4bac-be98-e02787f75dd4_M3SN1_M3SN1" ], + "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "392d8d89-f381-4ce4-b50c-a2b46e134194" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240429T132818Z:392d8d89-f381-4ce4-b50c-a2b46e134194" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: C56ACC8A1E654296B9D0D1F897DFDCC1 Ref B: SEL221051503025 Ref C: 2023-09-18T08:55:29Z" ], - "Date": [ "Mon, 18 Sep 2023 08:55:34 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 88AC11E0E38142C1A59963F8632F1B2D Ref B: SEL221051503021 Ref C: 2024-04-29T13:28:17Z" ], + "Date": [ "Mon, 29 Apr 2024 13:28:18 GMT" ] }, "ContentHeaders": { "Content-Length": [ "553" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+FailViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+9": { + "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+FailViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+9": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "363" ], - "x-ms-client-request-id": [ "c1a59294-6db5-4cd1-bfba-51240539c119" ], + "x-ms-unique-id": [ "306" ], + "x-ms-client-request-id": [ "a304dbc8-eb4a-4cfe-8f33-6b414f4b1f8f" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1304,39 +1334,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "19df75b3-4b8c-4bdd-b705-a92265ba79d8_M1CH3_M1CH3" ], + "x-ms-request-id": [ "2b9bb203-a686-4bc9-acdf-b3130504fa45_M7CH3_M7CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], - "x-ms-correlation-request-id": [ "d091b657-4b31-417e-a2d6-b8d0c4694293" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T085545Z:d091b657-4b31-417e-a2d6-b8d0c4694293" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-correlation-request-id": [ "124878f8-7490-4c80-a2a3-12c8955a8907" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T132830Z:124878f8-7490-4c80-a2a3-12c8955a8907" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: E91DD8347DFD42C9AD2658720E39A344 Ref B: SEL221051503025 Ref C: 2023-09-18T08:55:44Z" ], - "Date": [ "Mon, 18 Sep 2023 08:55:45 GMT" ] + "X-MSEdge-Ref": [ "Ref A: BD35ED25FD8E47C6B8FEA04862B125A7 Ref B: SEL221051503021 Ref C: 2024-04-29T13:28:29Z" ], + "Date": [ "Mon, 29 Apr 2024 13:28:30 GMT" ] }, "ContentHeaders": { "Content-Length": [ "553" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+FailViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+10": { + "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+FailViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+10": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "364" ], - "x-ms-client-request-id": [ "21e88344-1dd2-4e3e-8226-5e2eb12dc5ce" ], + "x-ms-unique-id": [ "307" ], + "x-ms-client-request-id": [ "650bb5bd-d853-45d2-bb18-16b7c7a22439" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1347,39 +1378,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "5f50e789-17a7-487a-ae73-0fbb28b1ec78_M6CH3_M6CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11990" ], - "x-ms-correlation-request-id": [ "856791ed-f735-4adf-be2c-f69b17b976da" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T085557Z:856791ed-f735-4adf-be2c-f69b17b976da" ], + "x-ms-request-id": [ "da65a76a-d1f8-4b96-8bdc-e1dc78fc4494_M3SN1_M3SN1" ], + "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "0913ea30-6266-428f-b9e8-1fd50cf2bbb5" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T132842Z:0913ea30-6266-428f-b9e8-1fd50cf2bbb5" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: C037B64451C1451BAEDEDF3D88A7F648 Ref B: SEL221051503025 Ref C: 2023-09-18T08:55:55Z" ], - "Date": [ "Mon, 18 Sep 2023 08:55:57 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 00E55BE972F448939E3439927BCBC1D8 Ref B: SEL221051503021 Ref C: 2024-04-29T13:28:40Z" ], + "Date": [ "Mon, 29 Apr 2024 13:28:41 GMT" ] }, "ContentHeaders": { "Content-Length": [ "553" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t\",\"role\":\"Secondary\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+FailViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+11": { + "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+FailViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+11": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "365" ], - "x-ms-client-request-id": [ "c9def005-c5ed-4c5e-aa89-2869027b2196" ], + "x-ms-unique-id": [ "308" ], + "x-ms-client-request-id": [ "5a57a3d5-257d-497a-b927-c8fda1f0930c" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1390,39 +1422,84 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "b02ff611-a967-4926-80e2-201cb4f53173_M8SN1_M8SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-correlation-request-id": [ "eee24036-57c0-4048-830e-4fe9ee21f5cd" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T085608Z:eee24036-57c0-4048-830e-4fe9ee21f5cd" ], + "x-ms-request-id": [ "87d68875-d7eb-4649-8c14-dea2af08025c_M9CH3_M9CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "33a2ee74-8d57-4c42-ae75-9178d4afb261" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T132853Z:33a2ee74-8d57-4c42-ae75-9178d4afb261" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 7550DC623B1F4971813FE00345DB123C Ref B: SEL221051503025 Ref C: 2023-09-18T08:56:07Z" ], - "Date": [ "Mon, 18 Sep 2023 08:56:08 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 851C40C327FF4BCC82D4F8A15B5AFF89 Ref B: SEL221051503021 Ref C: 2024-04-29T13:28:52Z" ], + "Date": [ "Mon, 29 Apr 2024 13:28:52 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "411" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Accepted\",\"partnerNamespace\":\"\",\"role\":\"PrimaryNotReplicating\",\"type\":\"MetadataReplication\"}}", + "isContentBase64": false + } + }, + "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+FailViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+12": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "309" ], + "x-ms-client-request-id": [ "07b9b2a3-8af9-4b36-8473-240022312020" ], + "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], + "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-request-id": [ "be7ad718-7c04-43f1-ab7f-5cf7aa3f20ec_M5CH3_M5CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "b0c19a21-6aba-4cd5-ad26-7551016e15d7" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T132905Z:b0c19a21-6aba-4cd5-ad26-7551016e15d7" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 845D1C942B9045C0B1D37DA3A0FBCBB6 Ref B: SEL221051503021 Ref C: 2024-04-29T13:29:03Z" ], + "Date": [ "Mon, 29 Apr 2024 13:29:04 GMT" ] }, "ContentHeaders": { "Content-Length": [ "412" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so\",\"name\":\"aliasyfh2so\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"\",\"role\":\"PrimaryNotReplicating\",\"type\":\"MetadataReplication\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof\",\"name\":\"aliasp8gxof\",\"type\":\"Microsoft.EventHub/Namespaces/disasterrecoveryconfigs\",\"properties\":{\"provisioningState\":\"Succeeded\",\"partnerNamespace\":\"\",\"role\":\"PrimaryNotReplicating\",\"type\":\"MetadataReplication\"}}", "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+FailViaIdentity+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+12": { + "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+FailViaIdentity+$DELETE+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+13": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "366" ], - "x-ms-client-request-id": [ "945d05fe-0974-4f1a-80fe-d40ea718ffeb" ], + "x-ms-unique-id": [ "310" ], + "x-ms-client-request-id": [ "83c9052c-4aa3-4c43-aaee-1af6942bd60a" ], "CommandName": [ "Remove-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Remove-AzEventHubGeoDRConfiguration_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1433,16 +1510,17 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "632aa4ef-fad3-4037-8c2d-3dd203545020_M4CH3_M4CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14998" ], - "x-ms-correlation-request-id": [ "ade3c1c8-ca73-4245-8ff4-7c6e14589d16" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T085623Z:ade3c1c8-ca73-4245-8ff4-7c6e14589d16" ], + "x-ms-request-id": [ "02b2ffc3-f051-4724-8578-03c95b67f699_M9SN1_M9SN1" ], + "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], + "x-ms-correlation-request-id": [ "a6027332-d2ab-41b9-8e07-82e346f2f929" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T132917Z:a6027332-d2ab-41b9-8e07-82e346f2f929" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 9F421E2DCC454795A059F14D5612E2E4 Ref B: SEL221051503025 Ref C: 2023-09-18T08:56:19Z" ], - "Date": [ "Mon, 18 Sep 2023 08:56:23 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 73D6B03A7EB54CCE95D64409A600A132 Ref B: SEL221051503021 Ref C: 2024-04-29T13:29:15Z" ], + "Date": [ "Mon, 29 Apr 2024 13:29:17 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -1452,19 +1530,19 @@ "isContentBase64": false } }, - "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+FailViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview+13": { + "Set-AzEventHubGeoDRConfigurationFailOver+[NoContext]+FailViaIdentity+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview+14": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8/disasterRecoveryConfigs/aliasyfh2so?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t/disasterRecoveryConfigs/aliasp8gxof?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "367" ], - "x-ms-client-request-id": [ "b307e436-d559-4e30-8592-4ebc126572a7" ], + "x-ms-unique-id": [ "311" ], + "x-ms-client-request-id": [ "b6ffd999-2fc7-4351-9fff-fce0cec92281" ], "CommandName": [ "Get-AzEventHubGeoDRConfiguration" ], "FullCommandName": [ "Get-AzEventHubGeoDRConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1475,23 +1553,24 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "61589895-3d61-4e46-a30c-f362c7a33953_M8SN1_M8SN1" ], + "x-ms-request-id": [ "7f406f14-7226-42c5-a068-aca7d45c6a2f_M10SN1_M10SN1" ], "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], - "x-ms-correlation-request-id": [ "331ecd3d-58de-4325-be7d-e63e698e8d51" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T085925Z:331ecd3d-58de-4325-be7d-e63e698e8d51" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "3180da47-540f-4de8-bd36-0e5779d3abd1" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T133219Z:3180da47-540f-4de8-bd36-0e5779d3abd1" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 627BF0C34F7D4D3BB6A1C173A126F1E4 Ref B: SEL221051503037 Ref C: 2023-09-18T08:59:24Z" ], - "Date": [ "Mon, 18 Sep 2023 08:59:25 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 80B48A7107B641CAAEC2C06458361F34 Ref B: SEL221051504023 Ref C: 2024-04-29T13:32:17Z" ], + "Date": [ "Mon, 29 Apr 2024 13:32:18 GMT" ] }, "ContentHeaders": { "Content-Length": [ "187" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"error\":{\"message\":\"Alias \u0027aliasyfh2so\u0027 does not exist or is not associated with namespace \u0027namespaceNamejwm6p8\u0027. CorrelationId: 331ecd3d-58de-4325-be7d-e63e698e8d51\",\"code\":\"NotFound\"}}", + "Content": "{\"error\":{\"message\":\"Alias \u0027aliasp8gxof\u0027 does not exist or is not associated with namespace \u0027namespaceNameil6w7t\u0027. CorrelationId: 3180da47-540f-4de8-bd36-0e5779d3abd1\",\"code\":\"NotFound\"}}", "isContentBase64": false } } diff --git a/src/EventHub/EventHub.Autorest/test/Set-AzEventHubGeoDRConfigurationFailOver.Tests.ps1 b/src/EventHub/EventHub.Autorest/test/Set-AzEventHubGeoDRConfigurationFailOver.Tests.ps1 index 74d7a841eae5..d35a71e9986b 100644 --- a/src/EventHub/EventHub.Autorest/test/Set-AzEventHubGeoDRConfigurationFailOver.Tests.ps1 +++ b/src/EventHub/EventHub.Autorest/test/Set-AzEventHubGeoDRConfigurationFailOver.Tests.ps1 @@ -15,12 +15,14 @@ if(($null -eq $TestName) -or ($TestName -contains 'Set-AzEventHubGeoDRConfigurat } Describe 'Set-AzEventHubGeoDRConfigurationFailOver' { - It 'Fail' { + It 'Fail' -skip:$($env.secondaryLocation -eq '') { Set-AzEventHubGeoDRConfigurationFailOver -ResourceGroupName $env.resourceGroup -NamespaceName $env.secondaryNamespace -Name $env.alias - + while($drConfig.ProvisioningState -ne "Succeeded"){ $drConfig = Get-AzEventHubGeoDRConfiguration -Name $env.alias -ResourceGroupName $env.resourceGroup -NamespaceName $env.secondaryNamespace - Start-TestSleep 10 + if ($TestMode -ne 'playback') { + Start-Sleep 10 + } } $drConfig.Name | Should -Be $env.alias @@ -29,22 +31,28 @@ Describe 'Set-AzEventHubGeoDRConfigurationFailOver' { $drConfig.Role | Should -Be "PrimaryNotReplicating" $drConfig = Remove-AzEventHubGeoDRConfiguration -Name $env.alias -ResourceGroupName $env.resourceGroup -NamespaceName $env.secondaryNamespace - Start-TestSleep 180 + if ($TestMode -ne 'playback') { + Start-Sleep 180 + } $drConfig = New-AzEventHubGeoDRConfiguration -Name $env.alias -ResourceGroupName $env.resourceGroup -NamespaceName $env.primaryNamespace -PartnerNamespace $env.secondaryNamespaceResourceId - + while($drConfig.ProvisioningState -ne "Succeeded"){ $drConfig = Get-AzEventHubGeoDRConfiguration -Name $env.alias -ResourceGroupName $env.resourceGroup -NamespaceName $env.primaryNamespace - Start-TestSleep 10 + if ($TestMode -ne 'playback') { + Start-Sleep 10 + } } } - It 'FailViaIdentity' { + It 'FailViaIdentity' -skip:$($env.secondaryLocation -eq '') { $drConfig = Get-AzEventHubGeoDRConfiguration -Name $env.alias -ResourceGroupName $env.resourceGroup -NamespaceName $env.secondaryNamespace - + Set-AzEventHubGeoDRConfigurationFailOver -InputObject $drConfig - + do { $drConfig = Get-AzEventHubGeoDRConfiguration -Name $env.alias -ResourceGroupName $env.resourceGroup -NamespaceName $env.secondaryNamespace - Start-TestSleep 10 + if ($TestMode -ne 'playback') { + Start-Sleep 10 + } } while($drConfig.ProvisioningState -ne "Succeeded") $drConfig.Name | Should -Be $env.alias @@ -53,8 +61,11 @@ Describe 'Set-AzEventHubGeoDRConfigurationFailOver' { $drConfig.Role | Should -Be "PrimaryNotReplicating" $drConfig = Remove-AzEventHubGeoDRConfiguration -Name $env.alias -ResourceGroupName $env.resourceGroup -NamespaceName $env.secondaryNamespace - Start-TestSleep 180 + + if ($TestMode -ne 'playback') { + Start-Sleep 180 + } - { Get-AzEventHubGeoDRConfiguration -Name $env.alias -ResourceGroupName $env.resourceGroup -NamespaceName $env.primaryNamespace } | Should -Throw + { Get-AzEventHubGeoDRConfiguration -Name $env.alias -ResourceGroupName $env.resourceGroup -NamespaceName $env.primaryNamespace -ErrorAction Stop } | Should -Throw } } diff --git a/src/EventHub/EventHub.Autorest/test/Set-AzEventHubNamespaceV2.Recording.json b/src/EventHub/EventHub.Autorest/test/Set-AzEventHubNamespaceV2.Recording.json index 23fdf9d1b89d..41a27cd7cc78 100644 --- a/src/EventHub/EventHub.Autorest/test/Set-AzEventHubNamespaceV2.Recording.json +++ b/src/EventHub/EventHub.Autorest/test/Set-AzEventHubNamespaceV2.Recording.json @@ -1,17 +1,17 @@ { - "Set-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt?api-version=2023-01-01-preview+1": { + "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "368" ], - "x-ms-client-request-id": [ "23689324-1b4e-4a8e-b5d2-076ab45dabad" ], + "x-ms-unique-id": [ "312" ], + "x-ms-client-request-id": [ "d5b231c9-22b9-4571-bff3-78d8896d7cc8" ], "CommandName": [ "Get-AzEventHubNamespaceV2" ], "FullCommandName": [ "Get-AzEventHubNamespace_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,1896 +22,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "f75d09c9-0f26-4370-b0a4-177f36da1e22_M6CH3_M6CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], - "x-ms-correlation-request-id": [ "b770aa60-820d-4d65-9a79-a97c8bf22fc8" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T085946Z:b770aa60-820d-4d65-9a79-a97c8bf22fc8" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 0FD63B9F4843454090718A68C6C2273A Ref B: SEL221051503037 Ref C: 2023-09-18T08:59:45Z" ], - "Date": [ "Mon, 18 Sep 2023 08:59:45 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "2047" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt\",\"name\":\"namespaceV5nrf8kt\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{\"clientId\":\"38a989a1-3fab-4015-b546-cbcf7a67aa89\",\"principalId\":\"624205aa-192c-4303-9606-990d06cbd997\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{\"clientId\":\"440d7336-c408-4327-ad13-10a4e71aad64\",\"principalId\":\"1bdb6af0-4284-47f4-b049-94aa2868d90b\"}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":false},\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5nrf8kt\",\"createdAt\":\"2023-09-18T08:11:40.49Z\",\"updatedAt\":\"2023-09-18T08:19:01.53Z\",\"serviceBusEndpoint\":\"https://namespaceV5nrf8kt.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt?api-version=2023-01-01-preview+2": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "369" ], - "x-ms-client-request-id": [ "106c674d-96c3-4e46-bd14-ccf437569ce1" ], - "CommandName": [ "Get-AzEventHubNamespace" ], - "FullCommandName": [ "Get-AzEventHubNamespace_Get" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], - "Authorization": [ "[Filtered]" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "5fe4335d-82a8-4b71-acce-fbbde758be6b_M5CH3_M5CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-correlation-request-id": [ "47480b16-383b-4b12-aa47-a8b1859af7ce" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T085947Z:47480b16-383b-4b12-aa47-a8b1859af7ce" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 5C2A822D89FA4C20921BC9AE58CC1583 Ref B: SEL221051503037 Ref C: 2023-09-18T08:59:46Z" ], - "Date": [ "Mon, 18 Sep 2023 08:59:47 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "2047" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt\",\"name\":\"namespaceV5nrf8kt\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{\"clientId\":\"38a989a1-3fab-4015-b546-cbcf7a67aa89\",\"principalId\":\"624205aa-192c-4303-9606-990d06cbd997\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{\"clientId\":\"440d7336-c408-4327-ad13-10a4e71aad64\",\"principalId\":\"1bdb6af0-4284-47f4-b049-94aa2868d90b\"}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":false},\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5nrf8kt\",\"createdAt\":\"2023-09-18T08:11:40.49Z\",\"updatedAt\":\"2023-09-18T08:19:01.53Z\",\"serviceBusEndpoint\":\"https://namespaceV5nrf8kt.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt?api-version=2023-01-01-preview+3": { - "Request": { - "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt?api-version=2023-01-01-preview", - "Content": "{\n \"location\": \"North Europe\",\n \"sku\": {\n \"name\": \"Premium\",\n \"tier\": \"Premium\",\n \"capacity\": 1\n },\n \"identity\": {\n \"type\": \"UserAssigned\",\n \"userAssignedIdentities\": {\n \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\": {\n },\n \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\": {\n }\n }\n },\n \"properties\": {\n \"encryption\": {\n \"keyVaultProperties\": [\n {\n \"identity\": {\n \"userAssignedIdentity\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"\n },\n \"keyName\": \"key1\",\n \"keyVaultUri\": \"https://keyvaultnameoqye7t.vault.azure.net\",\n \"keyVersion\": \"\"\n },\n {\n \"identity\": {\n \"userAssignedIdentity\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"\n },\n \"keyName\": \"key2\",\n \"keyVaultUri\": \"https://keyvaultnameoqye7t.vault.azure.net\",\n \"keyVersion\": \"\"\n },\n {\n \"identity\": {\n \"userAssignedIdentity\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"\n },\n \"keyName\": \"key3\",\n \"keyVaultUri\": \"https://keyVaultNameoqye7t.vault.azure.net/\"\n }\n ],\n \"keySource\": \"Microsoft.KeyVault\",\n \"requireInfrastructureEncryption\": false\n },\n \"minimumTlsVersion\": \"1.2\",\n \"isAutoInflateEnabled\": false,\n \"publicNetworkAccess\": \"Enabled\",\n \"maximumThroughputUnits\": 0,\n \"kafkaEnabled\": true,\n \"zoneRedundant\": true,\n \"disableLocalAuth\": false\n }\n}", - "isContentBase64": false, - "Headers": { - }, - "ContentHeaders": { - "Content-Type": [ "application/json" ], - "Content-Length": [ "2042" ] - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "cd91e9e9-ab23-4ff6-94c1-eb5fc770f45c_M5CH3_M5CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ "49" ], - "x-ms-correlation-request-id": [ "cab5e1ea-3a73-4fdd-b48b-8ecd1a01682d" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T090005Z:cab5e1ea-3a73-4fdd-b48b-8ecd1a01682d" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 1481AB155D674EA4AC6460C762F2B48A Ref B: SEL221051503037 Ref C: 2023-09-18T08:59:47Z" ], - "Date": [ "Mon, 18 Sep 2023 09:00:05 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "2335" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt\",\"name\":\"namespaceV5nrf8kt\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{\"clientId\":\"38a989a1-3fab-4015-b546-cbcf7a67aa89\",\"principalId\":\"624205aa-192c-4303-9606-990d06cbd997\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{\"clientId\":\"440d7336-c408-4327-ad13-10a4e71aad64\",\"principalId\":\"1bdb6af0-4284-47f4-b049-94aa2868d90b\"}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key3\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":false},\"kafkaEnabled\":true,\"provisioningState\":\"Updating\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5nrf8kt\",\"createdAt\":\"2023-09-18T08:11:40.49Z\",\"updatedAt\":\"2023-09-18T09:00:01.96Z\",\"serviceBusEndpoint\":\"https://namespaceV5nrf8kt.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt?api-version=2023-01-01-preview+4": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "371" ], - "x-ms-client-request-id": [ "32bb7ace-c132-45e0-83ee-1bddd05de14e" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateViaIdentity" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateViaIdentity" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "0529c422-6553-4bc7-947f-e9797be2b880_M1SN1_M1SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11991" ], - "x-ms-correlation-request-id": [ "de534b55-8fae-46ad-88f6-7eced70d3c84" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T090035Z:de534b55-8fae-46ad-88f6-7eced70d3c84" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 9041479B0EA24034AC5A913D1CDB278E Ref B: SEL221051503037 Ref C: 2023-09-18T09:00:35Z" ], - "Date": [ "Mon, 18 Sep 2023 09:00:35 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "2332" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt\",\"name\":\"namespaceV5nrf8kt\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{\"clientId\":\"38a989a1-3fab-4015-b546-cbcf7a67aa89\",\"principalId\":\"624205aa-192c-4303-9606-990d06cbd997\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{\"clientId\":\"440d7336-c408-4327-ad13-10a4e71aad64\",\"principalId\":\"1bdb6af0-4284-47f4-b049-94aa2868d90b\"}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key3\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":false},\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5nrf8kt\",\"createdAt\":\"2023-09-18T08:11:40.49Z\",\"updatedAt\":\"2023-09-18T09:00:04.89Z\",\"serviceBusEndpoint\":\"https://namespaceV5nrf8kt.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt?api-version=2023-01-01-preview+5": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "372" ], - "x-ms-client-request-id": [ "32bb7ace-c132-45e0-83ee-1bddd05de14e" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateViaIdentity" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateViaIdentity" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "34919c17-e424-4cf6-8566-807ef4242ca7_M3CH3_M3CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], - "x-ms-correlation-request-id": [ "37e5c630-7bde-448d-ac30-bcc2f281b301" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T090036Z:37e5c630-7bde-448d-ac30-bcc2f281b301" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: ADD19242592C4127B87719D8522FE2D5 Ref B: SEL221051503037 Ref C: 2023-09-18T09:00:35Z" ], - "Date": [ "Mon, 18 Sep 2023 09:00:36 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "2332" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV5nrf8kt\",\"name\":\"namespaceV5nrf8kt\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{\"clientId\":\"38a989a1-3fab-4015-b546-cbcf7a67aa89\",\"principalId\":\"624205aa-192c-4303-9606-990d06cbd997\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{\"clientId\":\"440d7336-c408-4327-ad13-10a4e71aad64\",\"principalId\":\"1bdb6af0-4284-47f4-b049-94aa2868d90b\"}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}},{\"keyName\":\"key3\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\",\"identity\":{\"userAssignedIdentity\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\"}}],\"requireInfrastructureEncryption\":false},\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev5nrf8kt\",\"createdAt\":\"2023-09-18T08:11:40.49Z\",\"updatedAt\":\"2023-09-18T09:00:04.89Z\",\"serviceBusEndpoint\":\"https://namespaceV5nrf8kt.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s?api-version=2023-01-01-preview+6": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "373" ], - "x-ms-client-request-id": [ "a350283e-df79-4545-a584-7215d88b7651" ], - "CommandName": [ "Get-AzEventHubNamespaceV2" ], - "FullCommandName": [ "Get-AzEventHubNamespace_Get" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], - "Authorization": [ "[Filtered]" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "0feb319f-ede7-4be4-8e51-e0824dd8e802_M2CH3_M2CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11987" ], - "x-ms-correlation-request-id": [ "1ea5c08d-0a0b-4f38-b864-d748d5f8d7df" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T090037Z:1ea5c08d-0a0b-4f38-b864-d748d5f8d7df" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 2910C5CE05B64069A6456DE456BBAE93 Ref B: SEL221051503037 Ref C: 2023-09-18T09:00:36Z" ], - "Date": [ "Mon, 18 Sep 2023 09:00:37 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "928" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s\",\"name\":\"namespaceNamewze84s\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"07331995-dc52-4f9b-898b-98ac4f0f5c53\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamewze84s\",\"createdAt\":\"2023-09-18T07:32:31.713Z\",\"updatedAt\":\"2023-09-18T07:39:50.78Z\",\"serviceBusEndpoint\":\"https://namespaceNamewze84s.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s?api-version=2023-01-01-preview+7": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "374" ], - "x-ms-client-request-id": [ "deba5193-07bd-4438-b692-e91a2b572c9f" ], - "CommandName": [ "Get-AzEventHubNamespace" ], - "FullCommandName": [ "Get-AzEventHubNamespace_Get" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], - "Authorization": [ "[Filtered]" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "369e4d66-ee2f-4ee4-8f58-36ed3db29d83_M4SN1_M4SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], - "x-ms-correlation-request-id": [ "6cfa09bd-ae5a-475d-aefa-edcf736b53b3" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T090039Z:6cfa09bd-ae5a-475d-aefa-edcf736b53b3" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 8B8B2EB5FDF141E590E4114361404CC2 Ref B: SEL221051503037 Ref C: 2023-09-18T09:00:37Z" ], - "Date": [ "Mon, 18 Sep 2023 09:00:39 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "928" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s\",\"name\":\"namespaceNamewze84s\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"07331995-dc52-4f9b-898b-98ac4f0f5c53\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamewze84s\",\"createdAt\":\"2023-09-18T07:32:31.713Z\",\"updatedAt\":\"2023-09-18T07:39:50.78Z\",\"serviceBusEndpoint\":\"https://namespaceNamewze84s.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s?api-version=2023-01-01-preview+8": { - "Request": { - "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s?api-version=2023-01-01-preview", - "Content": "{\n \"location\": \"East US\",\n \"sku\": {\n \"name\": \"Premium\",\n \"tier\": \"Premium\",\n \"capacity\": 1\n },\n \"identity\": {\n \"type\": \"SystemAssigned\"\n },\n \"properties\": {\n \"encryption\": {\n \"keyVaultProperties\": [\n {\n \"keyName\": \"key1\",\n \"keyVaultUri\": \"https://keyVaultNameoqye7t.vault.azure.net/\"\n },\n {\n \"keyName\": \"key2\",\n \"keyVaultUri\": \"https://keyVaultNameoqye7t.vault.azure.net/\"\n }\n ],\n \"keySource\": \"Microsoft.KeyVault\"\n },\n \"minimumTlsVersion\": \"1.2\",\n \"isAutoInflateEnabled\": false,\n \"publicNetworkAccess\": \"Enabled\",\n \"maximumThroughputUnits\": 0,\n \"kafkaEnabled\": true,\n \"zoneRedundant\": true,\n \"disableLocalAuth\": false\n }\n}", - "isContentBase64": false, - "Headers": { - }, - "ContentHeaders": { - "Content-Type": [ "application/json" ], - "Content-Length": [ "748" ] - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "8b32d510-2f12-4139-8466-928786014262_M8CH3_M8CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ "49" ], - "x-ms-correlation-request-id": [ "bbbb53aa-e21d-47a6-8ec5-3b57c1017b76" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T090051Z:bbbb53aa-e21d-47a6-8ec5-3b57c1017b76" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 1014AD82A3EF4BC291773CB9455FA3A7 Ref B: SEL221051503037 Ref C: 2023-09-18T09:00:39Z" ], - "Date": [ "Mon, 18 Sep 2023 09:00:51 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1231" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s\",\"name\":\"namespaceNamewze84s\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"07331995-dc52-4f9b-898b-98ac4f0f5c53\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"kafkaEnabled\":true,\"provisioningState\":\"Updating\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamewze84s\",\"createdAt\":\"2023-09-18T07:32:31.713Z\",\"updatedAt\":\"2023-09-18T09:00:49.303Z\",\"serviceBusEndpoint\":\"https://namespaceNamewze84s.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s?api-version=2023-01-01-preview+9": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "376" ], - "x-ms-client-request-id": [ "ee06bbcc-69cb-450a-9e44-1a8c817adffd" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateViaIdentity" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateViaIdentity" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "550612ce-38f8-4a49-ac74-5ae7fd8f7734_M10SN1_M10SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-correlation-request-id": [ "310bfe02-6d85-4c7b-a93d-afdad3a941e2" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T090123Z:310bfe02-6d85-4c7b-a93d-afdad3a941e2" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 8127B1623CB249B79475C26AC2F73C8F Ref B: SEL221051503037 Ref C: 2023-09-18T09:01:21Z" ], - "Date": [ "Mon, 18 Sep 2023 09:01:22 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1224" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s\",\"name\":\"namespaceNamewze84s\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"07331995-dc52-4f9b-898b-98ac4f0f5c53\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamewze84s\",\"createdAt\":\"2023-09-18T07:32:31.713Z\",\"updatedAt\":\"2023-09-18T09:00:52Z\",\"serviceBusEndpoint\":\"https://namespaceNamewze84s.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s?api-version=2023-01-01-preview+10": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "377" ], - "x-ms-client-request-id": [ "ee06bbcc-69cb-450a-9e44-1a8c817adffd" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateViaIdentity" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateViaIdentity" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "aad62151-c160-42df-95af-f70e28cc8d2a_M8CH3_M8CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], - "x-ms-correlation-request-id": [ "043e4fda-b834-4095-92ed-753a0b136c6a" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T090126Z:043e4fda-b834-4095-92ed-753a0b136c6a" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: A86C84286C2D4E799FA0DD76381BB28B Ref B: SEL221051503037 Ref C: 2023-09-18T09:01:23Z" ], - "Date": [ "Mon, 18 Sep 2023 09:01:25 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1224" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s\",\"name\":\"namespaceNamewze84s\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"07331995-dc52-4f9b-898b-98ac4f0f5c53\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamewze84s\",\"createdAt\":\"2023-09-18T07:32:31.713Z\",\"updatedAt\":\"2023-09-18T09:00:52Z\",\"serviceBusEndpoint\":\"https://namespaceNamewze84s.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s?api-version=2023-01-01-preview+11": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "378" ], - "x-ms-client-request-id": [ "08f7caa6-2078-4cb0-bda8-8e02eedd5f39" ], - "CommandName": [ "Get-AzEventHubNamespace" ], - "FullCommandName": [ "Get-AzEventHubNamespace_Get" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], - "Authorization": [ "[Filtered]" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "61a666e9-222c-4517-9f06-74d897424166_M3SN1_M3SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-correlation-request-id": [ "d9a58b81-dfd0-4eae-b132-e40706e78d29" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T090127Z:d9a58b81-dfd0-4eae-b132-e40706e78d29" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 2C1AF48D3C5343A2A9B7C6FB0948A0E2 Ref B: SEL221051503037 Ref C: 2023-09-18T09:01:26Z" ], - "Date": [ "Mon, 18 Sep 2023 09:01:27 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1224" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s\",\"name\":\"namespaceNamewze84s\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"07331995-dc52-4f9b-898b-98ac4f0f5c53\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamewze84s\",\"createdAt\":\"2023-09-18T07:32:31.713Z\",\"updatedAt\":\"2023-09-18T09:00:52Z\",\"serviceBusEndpoint\":\"https://namespaceNamewze84s.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s?api-version=2023-01-01-preview+12": { - "Request": { - "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s?api-version=2023-01-01-preview", - "Content": "{\n \"location\": \"East US\",\n \"sku\": {\n \"name\": \"Premium\",\n \"tier\": \"Premium\",\n \"capacity\": 1\n },\n \"identity\": {\n \"type\": \"SystemAssigned\"\n },\n \"properties\": {\n \"encryption\": {\n \"keyVaultProperties\": [\n {\n \"keyName\": \"key1\",\n \"keyVaultUri\": \"https://keyvaultnameoqye7t.vault.azure.net\",\n \"keyVersion\": \"\"\n },\n {\n \"keyName\": \"key2\",\n \"keyVaultUri\": \"https://keyvaultnameoqye7t.vault.azure.net\",\n \"keyVersion\": \"\"\n },\n {\n \"keyName\": \"key3\",\n \"keyVaultUri\": \"https://keyVaultNameoqye7t.vault.azure.net/\"\n }\n ],\n \"keySource\": \"Microsoft.KeyVault\",\n \"requireInfrastructureEncryption\": false\n },\n \"minimumTlsVersion\": \"1.2\",\n \"isAutoInflateEnabled\": false,\n \"publicNetworkAccess\": \"Enabled\",\n \"maximumThroughputUnits\": 0,\n \"kafkaEnabled\": true,\n \"zoneRedundant\": true,\n \"disableLocalAuth\": false\n }\n}", - "isContentBase64": false, - "Headers": { - }, - "ContentHeaders": { - "Content-Type": [ "application/json" ], - "Content-Length": [ "971" ] - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "ee8e37f8-bf00-49ca-961f-19a318626a3a_M9CH3_M9CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ "49" ], - "x-ms-correlation-request-id": [ "2cf89f79-eeea-4880-99f5-b41f9df0cc60" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T090141Z:2cf89f79-eeea-4880-99f5-b41f9df0cc60" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 6E3444EABAF249B2BE46E22F49435184 Ref B: SEL221051503037 Ref C: 2023-09-18T09:01:27Z" ], - "Date": [ "Mon, 18 Sep 2023 09:01:41 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1324" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s\",\"name\":\"namespaceNamewze84s\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"07331995-dc52-4f9b-898b-98ac4f0f5c53\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key3\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"kafkaEnabled\":true,\"provisioningState\":\"Updating\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamewze84s\",\"createdAt\":\"2023-09-18T07:32:31.713Z\",\"updatedAt\":\"2023-09-18T09:01:39.55Z\",\"serviceBusEndpoint\":\"https://namespaceNamewze84s.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s?api-version=2023-01-01-preview+13": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "380" ], - "x-ms-client-request-id": [ "39f5233c-a164-4916-94e5-2837169260e1" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateViaIdentity" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateViaIdentity" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "1624acbb-97ff-4112-8bdf-66a7d811c447_M10CH3_M10CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-correlation-request-id": [ "eb4c507e-8919-4a74-9404-84b3898d2f59" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T090212Z:eb4c507e-8919-4a74-9404-84b3898d2f59" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 256B4DE84D3442B3BE8A4BB14BB0DF45 Ref B: SEL221051503037 Ref C: 2023-09-18T09:02:11Z" ], - "Date": [ "Mon, 18 Sep 2023 09:02:11 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1321" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s\",\"name\":\"namespaceNamewze84s\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"07331995-dc52-4f9b-898b-98ac4f0f5c53\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key3\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamewze84s\",\"createdAt\":\"2023-09-18T07:32:31.713Z\",\"updatedAt\":\"2023-09-18T09:01:43.13Z\",\"serviceBusEndpoint\":\"https://namespaceNamewze84s.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s?api-version=2023-01-01-preview+14": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "381" ], - "x-ms-client-request-id": [ "39f5233c-a164-4916-94e5-2837169260e1" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateViaIdentity" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateViaIdentity" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "0bb4207e-d87e-4eb7-a154-334554cecd10_M2SN1_M2SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11991" ], - "x-ms-correlation-request-id": [ "be7cbb42-08cb-40f0-a3fd-ecd1995ae280" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T090212Z:be7cbb42-08cb-40f0-a3fd-ecd1995ae280" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: AC75EEF5C4474D24B79B96CC468A2B96 Ref B: SEL221051503037 Ref C: 2023-09-18T09:02:12Z" ], - "Date": [ "Mon, 18 Sep 2023 09:02:12 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1321" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s\",\"name\":\"namespaceNamewze84s\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"07331995-dc52-4f9b-898b-98ac4f0f5c53\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key3\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamewze84s\",\"createdAt\":\"2023-09-18T07:32:31.713Z\",\"updatedAt\":\"2023-09-18T09:01:43.13Z\",\"serviceBusEndpoint\":\"https://namespaceNamewze84s.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s?api-version=2023-01-01-preview+15": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "382" ], - "x-ms-client-request-id": [ "137fcb4d-fff8-4e3a-80ac-faf94393030d" ], - "CommandName": [ "Get-AzEventHubNamespace" ], - "FullCommandName": [ "Get-AzEventHubNamespace_Get" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], - "Authorization": [ "[Filtered]" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "5bc7aa6e-f463-45b1-939b-34053eee35a2_M0CH3_M0CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-correlation-request-id": [ "245a4cae-0ece-4db9-b4f3-83e4f5f82bd7" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T090215Z:245a4cae-0ece-4db9-b4f3-83e4f5f82bd7" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: FD926B170C254E8A9BAEC099E21C5334 Ref B: SEL221051503037 Ref C: 2023-09-18T09:02:13Z" ], - "Date": [ "Mon, 18 Sep 2023 09:02:15 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1321" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s\",\"name\":\"namespaceNamewze84s\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"07331995-dc52-4f9b-898b-98ac4f0f5c53\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key2\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key3\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamewze84s\",\"createdAt\":\"2023-09-18T07:32:31.713Z\",\"updatedAt\":\"2023-09-18T09:01:43.13Z\",\"serviceBusEndpoint\":\"https://namespaceNamewze84s.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s?api-version=2023-01-01-preview+16": { - "Request": { - "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s?api-version=2023-01-01-preview", - "Content": "{\n \"location\": \"East US\",\n \"sku\": {\n \"name\": \"Premium\",\n \"tier\": \"Premium\",\n \"capacity\": 1\n },\n \"identity\": {\n \"type\": \"SystemAssigned\"\n },\n \"properties\": {\n \"encryption\": {\n \"keyVaultProperties\": [\n {\n \"keyName\": \"key1\",\n \"keyVaultUri\": \"https://keyvaultnameoqye7t.vault.azure.net\",\n \"keyVersion\": \"\"\n },\n {\n \"keyName\": \"key3\",\n \"keyVaultUri\": \"https://keyVaultNameoqye7t.vault.azure.net/\"\n }\n ],\n \"keySource\": \"Microsoft.KeyVault\",\n \"requireInfrastructureEncryption\": false\n },\n \"minimumTlsVersion\": \"1.2\",\n \"isAutoInflateEnabled\": false,\n \"publicNetworkAccess\": \"Enabled\",\n \"maximumThroughputUnits\": 0,\n \"kafkaEnabled\": true,\n \"zoneRedundant\": true,\n \"disableLocalAuth\": false\n }\n}", - "isContentBase64": false, - "Headers": { - }, - "ContentHeaders": { - "Content-Type": [ "application/json" ], - "Content-Length": [ "823" ] - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "5eff836a-6de4-4b50-80ee-9f0f3f4858ce_M1SN1_M1SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ "49" ], - "x-ms-correlation-request-id": [ "a11b2ca3-b50d-4a5d-aadf-f3f22af29196" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T090232Z:a11b2ca3-b50d-4a5d-aadf-f3f22af29196" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 5457687127F94A138C086E8FA38D7B59 Ref B: SEL221051503037 Ref C: 2023-09-18T09:02:15Z" ], - "Date": [ "Mon, 18 Sep 2023 09:02:31 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1231" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s\",\"name\":\"namespaceNamewze84s\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"07331995-dc52-4f9b-898b-98ac4f0f5c53\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key3\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"kafkaEnabled\":true,\"provisioningState\":\"Updating\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamewze84s\",\"createdAt\":\"2023-09-18T07:32:31.713Z\",\"updatedAt\":\"2023-09-18T09:02:29.157Z\",\"serviceBusEndpoint\":\"https://namespaceNamewze84s.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s?api-version=2023-01-01-preview+17": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "384" ], - "x-ms-client-request-id": [ "b58a3311-cb09-4215-8948-9132169e491a" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateViaIdentity" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateViaIdentity" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "bffacc8b-9406-4dfe-8a1d-244811ac8f58_M8CH3_M8CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], - "x-ms-correlation-request-id": [ "99f37b13-627f-4c5f-9f5a-39171027bd2d" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T090302Z:99f37b13-627f-4c5f-9f5a-39171027bd2d" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: CB6B5385D92F49CB91366A37F4927900 Ref B: SEL221051503037 Ref C: 2023-09-18T09:03:02Z" ], - "Date": [ "Mon, 18 Sep 2023 09:03:01 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1228" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s\",\"name\":\"namespaceNamewze84s\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"07331995-dc52-4f9b-898b-98ac4f0f5c53\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key3\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamewze84s\",\"createdAt\":\"2023-09-18T07:32:31.713Z\",\"updatedAt\":\"2023-09-18T09:02:31.753Z\",\"serviceBusEndpoint\":\"https://namespaceNamewze84s.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s?api-version=2023-01-01-preview+18": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "385" ], - "x-ms-client-request-id": [ "b58a3311-cb09-4215-8948-9132169e491a" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateViaIdentity" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateViaIdentity" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "16613e0d-21e9-499b-9489-b01620758cd5_M0SN1_M0SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], - "x-ms-correlation-request-id": [ "da583850-0f3b-40ab-9e90-5d7675e10e3e" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T090303Z:da583850-0f3b-40ab-9e90-5d7675e10e3e" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 98BB10715A2A4C88852F03812D09108A Ref B: SEL221051503037 Ref C: 2023-09-18T09:03:02Z" ], - "Date": [ "Mon, 18 Sep 2023 09:03:02 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1228" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s\",\"name\":\"namespaceNamewze84s\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"07331995-dc52-4f9b-898b-98ac4f0f5c53\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key3\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamewze84s\",\"createdAt\":\"2023-09-18T07:32:31.713Z\",\"updatedAt\":\"2023-09-18T09:02:31.753Z\",\"serviceBusEndpoint\":\"https://namespaceNamewze84s.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s?api-version=2023-01-01-preview+19": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "386" ], - "x-ms-client-request-id": [ "e8ae2483-0f81-4330-b48e-5ed8e3758af1" ], - "CommandName": [ "Get-AzEventHubNamespace" ], - "FullCommandName": [ "Get-AzEventHubNamespace_Get" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], - "Authorization": [ "[Filtered]" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "89f70a2e-40dc-4aa5-b49c-9f809f0b61c1_M3CH3_M3CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-correlation-request-id": [ "ae36b3b7-dbd5-478a-8cf9-d5a6ea4b0d7d" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T090305Z:ae36b3b7-dbd5-478a-8cf9-d5a6ea4b0d7d" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 471E711838B745B0ACB88AC94E448464 Ref B: SEL221051503037 Ref C: 2023-09-18T09:03:03Z" ], - "Date": [ "Mon, 18 Sep 2023 09:03:04 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1228" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s\",\"name\":\"namespaceNamewze84s\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"07331995-dc52-4f9b-898b-98ac4f0f5c53\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key3\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamewze84s\",\"createdAt\":\"2023-09-18T07:32:31.713Z\",\"updatedAt\":\"2023-09-18T09:02:31.753Z\",\"serviceBusEndpoint\":\"https://namespaceNamewze84s.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s?api-version=2023-01-01-preview+20": { - "Request": { - "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s?api-version=2023-01-01-preview", - "Content": "{\n \"location\": \"East US\",\n \"sku\": {\n \"name\": \"Premium\",\n \"tier\": \"Premium\",\n \"capacity\": 1\n },\n \"identity\": {\n \"type\": \"SystemAssigned, UserAssigned\",\n \"userAssignedIdentities\": {\n \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\": {\n }\n }\n },\n \"properties\": {\n \"encryption\": {\n \"keyVaultProperties\": [\n {\n \"keyName\": \"key1\",\n \"keyVaultUri\": \"https://keyvaultnameoqye7t.vault.azure.net\",\n \"keyVersion\": \"\"\n },\n {\n \"keyName\": \"key3\",\n \"keyVaultUri\": \"https://keyvaultnameoqye7t.vault.azure.net\",\n \"keyVersion\": \"\"\n }\n ],\n \"keySource\": \"Microsoft.KeyVault\",\n \"requireInfrastructureEncryption\": false\n },\n \"minimumTlsVersion\": \"1.2\",\n \"isAutoInflateEnabled\": false,\n \"publicNetworkAccess\": \"Enabled\",\n \"maximumThroughputUnits\": 0,\n \"kafkaEnabled\": true,\n \"zoneRedundant\": true,\n \"disableLocalAuth\": false\n }\n}", - "isContentBase64": false, - "Headers": { - }, - "ContentHeaders": { - "Content-Type": [ "application/json" ], - "Content-Length": [ "1075" ] - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "5c514c72-dcdd-45e9-ad88-ff0076a4a3a1_M6CH3_M6CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ "49" ], - "x-ms-correlation-request-id": [ "eaf59441-33e2-4efe-a1b3-1570477d84ff" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T090320Z:eaf59441-33e2-4efe-a1b3-1570477d84ff" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: DCB04F0079644F83AC36DE25CA47F122 Ref B: SEL221051503037 Ref C: 2023-09-18T09:03:05Z" ], - "Date": [ "Mon, 18 Sep 2023 09:03:20 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1438" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s\",\"name\":\"namespaceNamewze84s\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"07331995-dc52-4f9b-898b-98ac4f0f5c53\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned, UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key3\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamewze84s\",\"createdAt\":\"2023-09-18T07:32:31.713Z\",\"updatedAt\":\"2023-09-18T09:03:17.6Z\",\"serviceBusEndpoint\":\"https://namespaceNamewze84s.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s?api-version=2023-01-01-preview+21": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "388" ], - "x-ms-client-request-id": [ "13152ff3-206f-4a21-b656-56a65735c90c" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateViaIdentity" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateViaIdentity" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "9548290e-1a61-4108-85d2-9558d7ee22b8_M8SN1_M8SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], - "x-ms-correlation-request-id": [ "019f8b07-8431-4afb-831f-0e548c4ef7f4" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T090352Z:019f8b07-8431-4afb-831f-0e548c4ef7f4" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: D0ED75E13EB44C1A89E0ECC0D89010F0 Ref B: SEL221051503037 Ref C: 2023-09-18T09:03:50Z" ], - "Date": [ "Mon, 18 Sep 2023 09:03:51 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1436" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s\",\"name\":\"namespaceNamewze84s\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"07331995-dc52-4f9b-898b-98ac4f0f5c53\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned, UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key3\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamewze84s\",\"createdAt\":\"2023-09-18T07:32:31.713Z\",\"updatedAt\":\"2023-09-18T09:03:20.767Z\",\"serviceBusEndpoint\":\"https://namespaceNamewze84s.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s?api-version=2023-01-01-preview+22": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "389" ], - "x-ms-client-request-id": [ "13152ff3-206f-4a21-b656-56a65735c90c" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateViaIdentity" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateViaIdentity" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "ce37b623-7856-451c-bc42-63ba556b7bc0_M7CH3_M7CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-correlation-request-id": [ "71c6d345-6e17-491b-add9-5e7e757d782c" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T090423Z:71c6d345-6e17-491b-add9-5e7e757d782c" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 1720D8F43D2248C3BEBFB41D5D444FFA Ref B: SEL221051503037 Ref C: 2023-09-18T09:04:22Z" ], - "Date": [ "Mon, 18 Sep 2023 09:04:23 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1528" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s\",\"name\":\"namespaceNamewze84s\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"07331995-dc52-4f9b-898b-98ac4f0f5c53\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned, UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{\"clientId\":\"38a989a1-3fab-4015-b546-cbcf7a67aa89\",\"principalId\":\"624205aa-192c-4303-9606-990d06cbd997\"}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key3\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamewze84s\",\"createdAt\":\"2023-09-18T07:32:31.713Z\",\"updatedAt\":\"2023-09-18T09:04:21.18Z\",\"serviceBusEndpoint\":\"https://namespaceNamewze84s.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s?api-version=2023-01-01-preview+23": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "390" ], - "x-ms-client-request-id": [ "13152ff3-206f-4a21-b656-56a65735c90c" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateViaIdentity" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateViaIdentity" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "148fcea7-dcc6-4cde-9aed-09e9e35fcaf1_M9SN1_M9SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-correlation-request-id": [ "13ab9c8d-7ce9-49a4-8f5d-72914473896a" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T090425Z:13ab9c8d-7ce9-49a4-8f5d-72914473896a" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 78EEDEF66A2E4546A2747D05770D744C Ref B: SEL221051503037 Ref C: 2023-09-18T09:04:23Z" ], - "Date": [ "Mon, 18 Sep 2023 09:04:24 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1528" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s\",\"name\":\"namespaceNamewze84s\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"07331995-dc52-4f9b-898b-98ac4f0f5c53\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned, UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{\"clientId\":\"38a989a1-3fab-4015-b546-cbcf7a67aa89\",\"principalId\":\"624205aa-192c-4303-9606-990d06cbd997\"}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key3\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamewze84s\",\"createdAt\":\"2023-09-18T07:32:31.713Z\",\"updatedAt\":\"2023-09-18T09:04:21.18Z\",\"serviceBusEndpoint\":\"https://namespaceNamewze84s.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s?api-version=2023-01-01-preview+24": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "391" ], - "x-ms-client-request-id": [ "45f2f5bd-9806-49f6-a51b-1a9bf23d95fd" ], - "CommandName": [ "Get-AzEventHubNamespace" ], - "FullCommandName": [ "Get-AzEventHubNamespace_Get" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], - "Authorization": [ "[Filtered]" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "11309f4e-bcd5-45b6-a0f2-8dc38a6b2280_M0CH3_M0CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], - "x-ms-correlation-request-id": [ "7ac7b8c0-2ea1-4d15-89a0-bd9387aa7c9d" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T090425Z:7ac7b8c0-2ea1-4d15-89a0-bd9387aa7c9d" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 9E82F12565F34AE3A6CE3936314BA1A4 Ref B: SEL221051503037 Ref C: 2023-09-18T09:04:25Z" ], - "Date": [ "Mon, 18 Sep 2023 09:04:25 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1528" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s\",\"name\":\"namespaceNamewze84s\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"07331995-dc52-4f9b-898b-98ac4f0f5c53\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned, UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{\"clientId\":\"38a989a1-3fab-4015-b546-cbcf7a67aa89\",\"principalId\":\"624205aa-192c-4303-9606-990d06cbd997\"}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key3\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamewze84s\",\"createdAt\":\"2023-09-18T07:32:31.713Z\",\"updatedAt\":\"2023-09-18T09:04:21.18Z\",\"serviceBusEndpoint\":\"https://namespaceNamewze84s.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s?api-version=2023-01-01-preview+25": { - "Request": { - "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s?api-version=2023-01-01-preview", - "Content": "{\n \"location\": \"East US\",\n \"sku\": {\n \"name\": \"Premium\",\n \"tier\": \"Premium\",\n \"capacity\": 1\n },\n \"identity\": {\n \"type\": \"SystemAssigned, UserAssigned\",\n \"userAssignedIdentities\": {\n \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\": {\n },\n \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\": {\n }\n }\n },\n \"properties\": {\n \"encryption\": {\n \"keyVaultProperties\": [\n {\n \"keyName\": \"key1\",\n \"keyVaultUri\": \"https://keyvaultnameoqye7t.vault.azure.net\",\n \"keyVersion\": \"\"\n },\n {\n \"keyName\": \"key3\",\n \"keyVaultUri\": \"https://keyvaultnameoqye7t.vault.azure.net\",\n \"keyVersion\": \"\"\n }\n ],\n \"keySource\": \"Microsoft.KeyVault\",\n \"requireInfrastructureEncryption\": false\n },\n \"minimumTlsVersion\": \"1.2\",\n \"isAutoInflateEnabled\": false,\n \"publicNetworkAccess\": \"Enabled\",\n \"maximumThroughputUnits\": 0,\n \"kafkaEnabled\": true,\n \"zoneRedundant\": true,\n \"disableLocalAuth\": false\n }\n}", - "isContentBase64": false, - "Headers": { - }, - "ContentHeaders": { - "Content-Type": [ "application/json" ], - "Content-Length": [ "1248" ] - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "e0eedda1-11ce-4220-b748-29ee31ce6acc_M6SN1_M6SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ "49" ], - "x-ms-correlation-request-id": [ "6c0b4220-078b-41a6-ab62-45a6d5cbc28a" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T090438Z:6c0b4220-078b-41a6-ab62-45a6d5cbc28a" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 4C77F4757BB848A189E3D58FFD207B9F Ref B: SEL221051503037 Ref C: 2023-09-18T09:04:25Z" ], - "Date": [ "Mon, 18 Sep 2023 09:04:38 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1700" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s\",\"name\":\"namespaceNamewze84s\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"07331995-dc52-4f9b-898b-98ac4f0f5c53\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned, UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{\"clientId\":\"38a989a1-3fab-4015-b546-cbcf7a67aa89\",\"principalId\":\"624205aa-192c-4303-9606-990d06cbd997\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key3\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamewze84s\",\"createdAt\":\"2023-09-18T07:32:31.713Z\",\"updatedAt\":\"2023-09-18T09:04:35.827Z\",\"serviceBusEndpoint\":\"https://namespaceNamewze84s.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s?api-version=2023-01-01-preview+26": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "393" ], - "x-ms-client-request-id": [ "eab17ead-03cd-4e6b-8b0b-fed28ec7499b" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateViaIdentity" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateViaIdentity" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "a1349afb-389a-4766-bfc7-8037185abb7b_M7SN1_M7SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], - "x-ms-correlation-request-id": [ "444fd947-fc7a-410b-9c80-cad8d3dc7fea" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T090510Z:444fd947-fc7a-410b-9c80-cad8d3dc7fea" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 4EF10CC5A8E847EEABC85185680E7FB2 Ref B: SEL221051503037 Ref C: 2023-09-18T09:05:09Z" ], - "Date": [ "Mon, 18 Sep 2023 09:05:09 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1696" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s\",\"name\":\"namespaceNamewze84s\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"07331995-dc52-4f9b-898b-98ac4f0f5c53\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned, UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{\"clientId\":\"38a989a1-3fab-4015-b546-cbcf7a67aa89\",\"principalId\":\"624205aa-192c-4303-9606-990d06cbd997\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key3\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamewze84s\",\"createdAt\":\"2023-09-18T07:32:31.713Z\",\"updatedAt\":\"2023-09-18T09:04:40.173Z\",\"serviceBusEndpoint\":\"https://namespaceNamewze84s.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s?api-version=2023-01-01-preview+27": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "394" ], - "x-ms-client-request-id": [ "eab17ead-03cd-4e6b-8b0b-fed28ec7499b" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateViaIdentity" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateViaIdentity" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "ebef08fe-1197-460f-b8f0-85d126232b64_M10CH3_M10CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], - "x-ms-correlation-request-id": [ "c46eaf74-9aaa-41c4-941c-fb1f6d7bc587" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T090540Z:c46eaf74-9aaa-41c4-941c-fb1f6d7bc587" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 1AA74E5605AF44FA9333C9A53949AAD3 Ref B: SEL221051503037 Ref C: 2023-09-18T09:05:40Z" ], - "Date": [ "Mon, 18 Sep 2023 09:05:39 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1696" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s\",\"name\":\"namespaceNamewze84s\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"07331995-dc52-4f9b-898b-98ac4f0f5c53\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned, UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{\"clientId\":\"38a989a1-3fab-4015-b546-cbcf7a67aa89\",\"principalId\":\"624205aa-192c-4303-9606-990d06cbd997\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key3\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamewze84s\",\"createdAt\":\"2023-09-18T07:32:31.713Z\",\"updatedAt\":\"2023-09-18T09:04:40.173Z\",\"serviceBusEndpoint\":\"https://namespaceNamewze84s.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s?api-version=2023-01-01-preview+28": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "395" ], - "x-ms-client-request-id": [ "eab17ead-03cd-4e6b-8b0b-fed28ec7499b" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateViaIdentity" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateViaIdentity" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "3cea08ea-7e54-42f5-810e-9cfe251a4fb3_M10CH3_M10CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-correlation-request-id": [ "bf213e86-1066-4140-8d4f-27d2eddf7495" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T090610Z:bf213e86-1066-4140-8d4f-27d2eddf7495" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: CA8D21D99CB34C089ED6786DEB131A7F Ref B: SEL221051503037 Ref C: 2023-09-18T09:06:10Z" ], - "Date": [ "Mon, 18 Sep 2023 09:06:10 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1789" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s\",\"name\":\"namespaceNamewze84s\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"07331995-dc52-4f9b-898b-98ac4f0f5c53\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned, UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{\"clientId\":\"38a989a1-3fab-4015-b546-cbcf7a67aa89\",\"principalId\":\"624205aa-192c-4303-9606-990d06cbd997\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{\"clientId\":\"440d7336-c408-4327-ad13-10a4e71aad64\",\"principalId\":\"1bdb6af0-4284-47f4-b049-94aa2868d90b\"}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key3\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamewze84s\",\"createdAt\":\"2023-09-18T07:32:31.713Z\",\"updatedAt\":\"2023-09-18T09:05:46.627Z\",\"serviceBusEndpoint\":\"https://namespaceNamewze84s.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s?api-version=2023-01-01-preview+29": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "396" ], - "x-ms-client-request-id": [ "eab17ead-03cd-4e6b-8b0b-fed28ec7499b" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateViaIdentity" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateViaIdentity" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "c1b7ac06-99b3-4966-962a-ee839af657ab_M3SN1_M3SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-correlation-request-id": [ "8e6c8c63-0254-40f0-9b62-1d000007ad2e" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T090612Z:8e6c8c63-0254-40f0-9b62-1d000007ad2e" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: E2FACBFD3ADB493E93EADE564ED521BB Ref B: SEL221051503037 Ref C: 2023-09-18T09:06:10Z" ], - "Date": [ "Mon, 18 Sep 2023 09:06:11 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1789" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamewze84s\",\"name\":\"namespaceNamewze84s\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"East US\",\"tags\":{},\"identity\":{\"principalId\":\"07331995-dc52-4f9b-898b-98ac4f0f5c53\",\"tenantId\":\"72f988bf-86f1-41af-91ab-2d7cd011db47\",\"type\":\"SystemAssigned, UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{\"clientId\":\"38a989a1-3fab-4015-b546-cbcf7a67aa89\",\"principalId\":\"624205aa-192c-4303-9606-990d06cbd997\"},\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2\":{\"clientId\":\"440d7336-c408-4327-ad13-10a4e71aad64\",\"principalId\":\"1bdb6af0-4284-47f4-b049-94aa2868d90b\"}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"encryption\":{\"keySource\":\"Microsoft.KeyVault\",\"keyVaultProperties\":[{\"keyName\":\"key1\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\"},{\"keyName\":\"key3\",\"keyVaultUri\":\"https://keyvaultnameoqye7t.vault.azure.net\",\"keyVersion\":\"\"}],\"requireInfrastructureEncryption\":false},\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacenamewze84s\",\"createdAt\":\"2023-09-18T07:32:31.713Z\",\"updatedAt\":\"2023-09-18T09:05:46.627Z\",\"serviceBusEndpoint\":\"https://namespaceNamewze84s.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs?api-version=2023-01-01-preview+30": { - "Request": { - "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs?api-version=2023-01-01-preview", - "Content": "{\n \"location\": \"northeurope\",\n \"sku\": {\n \"name\": \"Premium\",\n \"tier\": \"Premium\"\n },\n \"identity\": {\n \"type\": \"UserAssigned\",\n \"userAssignedIdentities\": {\n \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\": {\n }\n }\n }\n}", - "isContentBase64": false, - "Headers": { - }, - "ContentHeaders": { - "Content-Type": [ "application/json" ], - "Content-Length": [ "351" ] - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "e1ac8bb9-db75-495e-a951-44638662a7fb_M2CH3_M2CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ "49" ], - "x-ms-correlation-request-id": [ "f74637ce-442e-42a6-a46e-978e36d80d98" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T090623Z:f74637ce-442e-42a6-a46e-978e36d80d98" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 806F54A786BD49E485B7FB3BBC346D79 Ref B: SEL221051503037 Ref C: 2023-09-18T09:06:12Z" ], - "Date": [ "Mon, 18 Sep 2023 09:06:23 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1017" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs\",\"name\":\"namespaceV6dmxtfs\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev6dmxtfs\",\"createdAt\":\"2023-09-18T09:06:21.52Z\",\"updatedAt\":\"2023-09-18T09:06:21.52Z\",\"serviceBusEndpoint\":\"https://namespaceV6dmxtfs.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs?api-version=2023-01-01-preview+31": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "398" ], - "x-ms-client-request-id": [ "60b75fe1-541f-44d5-b6a2-74338eba7794" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "0aa23010-e26d-4879-8993-ca01758751ad_M3CH3_M3CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], - "x-ms-correlation-request-id": [ "a7f1f595-e293-4734-9e31-9ccde5ed2be8" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T090655Z:a7f1f595-e293-4734-9e31-9ccde5ed2be8" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: FF0A798352464249AF4A9221E546037B Ref B: SEL221051503037 Ref C: 2023-09-18T09:06:53Z" ], - "Date": [ "Mon, 18 Sep 2023 09:06:55 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1017" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs\",\"name\":\"namespaceV6dmxtfs\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev6dmxtfs\",\"createdAt\":\"2023-09-18T09:06:21.52Z\",\"updatedAt\":\"2023-09-18T09:06:21.52Z\",\"serviceBusEndpoint\":\"https://namespaceV6dmxtfs.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs?api-version=2023-01-01-preview+32": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "399" ], - "x-ms-client-request-id": [ "60b75fe1-541f-44d5-b6a2-74338eba7794" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "81b9a647-df7c-422c-a82d-35096dc7997a_M3CH3_M3CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], - "x-ms-correlation-request-id": [ "a0f79868-9c7b-4e40-93b4-d4ba9b76ddaa" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T090726Z:a0f79868-9c7b-4e40-93b4-d4ba9b76ddaa" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 47B39BFBBE5844C1965051FC2FF7FC3B Ref B: SEL221051503037 Ref C: 2023-09-18T09:07:25Z" ], - "Date": [ "Mon, 18 Sep 2023 09:07:25 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1017" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs\",\"name\":\"namespaceV6dmxtfs\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev6dmxtfs\",\"createdAt\":\"2023-09-18T09:06:21.52Z\",\"updatedAt\":\"2023-09-18T09:06:21.52Z\",\"serviceBusEndpoint\":\"https://namespaceV6dmxtfs.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs?api-version=2023-01-01-preview+33": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "400" ], - "x-ms-client-request-id": [ "60b75fe1-541f-44d5-b6a2-74338eba7794" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "9883f812-d07c-484f-8b5b-1576f9b5e14a_M5SN1_M5SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-correlation-request-id": [ "e7d5e865-3516-44ca-bf98-4e85245bdd0d" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T090758Z:e7d5e865-3516-44ca-bf98-4e85245bdd0d" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 2672FD42C2CA4B71BDF9043E3D5884AB Ref B: SEL221051503037 Ref C: 2023-09-18T09:07:56Z" ], - "Date": [ "Mon, 18 Sep 2023 09:07:57 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1017" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs\",\"name\":\"namespaceV6dmxtfs\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev6dmxtfs\",\"createdAt\":\"2023-09-18T09:06:21.52Z\",\"updatedAt\":\"2023-09-18T09:06:21.52Z\",\"serviceBusEndpoint\":\"https://namespaceV6dmxtfs.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs?api-version=2023-01-01-preview+34": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "401" ], - "x-ms-client-request-id": [ "60b75fe1-541f-44d5-b6a2-74338eba7794" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "045f3bf1-ff43-4f63-94a2-8ab90fb9db25_M5SN1_M5SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], - "x-ms-correlation-request-id": [ "df5716da-59c5-4540-9969-7ddd0b57c55d" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T090830Z:df5716da-59c5-4540-9969-7ddd0b57c55d" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: AB2EBA0381FF47A98ABFC7BC87ADF2C3 Ref B: SEL221051503037 Ref C: 2023-09-18T09:08:28Z" ], - "Date": [ "Mon, 18 Sep 2023 09:08:29 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1017" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs\",\"name\":\"namespaceV6dmxtfs\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev6dmxtfs\",\"createdAt\":\"2023-09-18T09:06:21.52Z\",\"updatedAt\":\"2023-09-18T09:06:21.52Z\",\"serviceBusEndpoint\":\"https://namespaceV6dmxtfs.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs?api-version=2023-01-01-preview+35": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "402" ], - "x-ms-client-request-id": [ "60b75fe1-541f-44d5-b6a2-74338eba7794" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "072f3bc9-2206-4f48-9862-9f4cd36bf38c_M0CH3_M0CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-correlation-request-id": [ "68c06b3a-a06c-472d-b73b-a55778b86824" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T090901Z:68c06b3a-a06c-472d-b73b-a55778b86824" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 26FD9D212E9644129733D5A1C88D2598 Ref B: SEL221051503037 Ref C: 2023-09-18T09:09:00Z" ], - "Date": [ "Mon, 18 Sep 2023 09:09:00 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1017" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs\",\"name\":\"namespaceV6dmxtfs\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev6dmxtfs\",\"createdAt\":\"2023-09-18T09:06:21.52Z\",\"updatedAt\":\"2023-09-18T09:06:21.52Z\",\"serviceBusEndpoint\":\"https://namespaceV6dmxtfs.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs?api-version=2023-01-01-preview+36": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "403" ], - "x-ms-client-request-id": [ "60b75fe1-541f-44d5-b6a2-74338eba7794" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "ae42b749-8f19-41a0-b537-df22aec32705_M4CH3_M4CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-correlation-request-id": [ "c2c9d58e-7ee3-455a-b4a3-a5bf8a2e7b21" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T090931Z:c2c9d58e-7ee3-455a-b4a3-a5bf8a2e7b21" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: BB3D68565C134D81858B760CEEFB9422 Ref B: SEL221051503037 Ref C: 2023-09-18T09:09:31Z" ], - "Date": [ "Mon, 18 Sep 2023 09:09:31 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1017" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs\",\"name\":\"namespaceV6dmxtfs\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev6dmxtfs\",\"createdAt\":\"2023-09-18T09:06:21.52Z\",\"updatedAt\":\"2023-09-18T09:06:21.52Z\",\"serviceBusEndpoint\":\"https://namespaceV6dmxtfs.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs?api-version=2023-01-01-preview+37": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "404" ], - "x-ms-client-request-id": [ "60b75fe1-541f-44d5-b6a2-74338eba7794" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "d3a75f94-9c6d-47d4-91b3-b6301eb99255_M10SN1_M10SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], - "x-ms-correlation-request-id": [ "093f0ddf-db02-439d-9dce-2a5747d65e88" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T091006Z:093f0ddf-db02-439d-9dce-2a5747d65e88" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 1355BA7D32E84D719B47170E334DD847 Ref B: SEL221051503037 Ref C: 2023-09-18T09:10:01Z" ], - "Date": [ "Mon, 18 Sep 2023 09:10:06 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1017" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs\",\"name\":\"namespaceV6dmxtfs\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev6dmxtfs\",\"createdAt\":\"2023-09-18T09:06:21.52Z\",\"updatedAt\":\"2023-09-18T09:06:21.52Z\",\"serviceBusEndpoint\":\"https://namespaceV6dmxtfs.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs?api-version=2023-01-01-preview+38": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "405" ], - "x-ms-client-request-id": [ "60b75fe1-541f-44d5-b6a2-74338eba7794" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "bab26eb5-90d1-47da-be90-fb07b269c47f_M5SN1_M5SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], - "x-ms-correlation-request-id": [ "7909087b-0787-4b88-addb-8377d603c0b2" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T091038Z:7909087b-0787-4b88-addb-8377d603c0b2" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 84B6FAD3AC0C4B2991ABB39BCA2D78B9 Ref B: SEL221051503037 Ref C: 2023-09-18T09:10:36Z" ], - "Date": [ "Mon, 18 Sep 2023 09:10:38 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1013" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs\",\"name\":\"namespaceV6dmxtfs\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev6dmxtfs\",\"createdAt\":\"2023-09-18T09:06:21.52Z\",\"updatedAt\":\"2023-09-18T09:10:15.57Z\",\"serviceBusEndpoint\":\"https://namespaceV6dmxtfs.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs?api-version=2023-01-01-preview+39": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "406" ], - "x-ms-client-request-id": [ "60b75fe1-541f-44d5-b6a2-74338eba7794" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "b24d0958-e4b1-4722-a170-62a11968fb92_M10CH3_M10CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], - "x-ms-correlation-request-id": [ "56604143-dd3e-49ff-a04f-60db463bb09b" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T091108Z:56604143-dd3e-49ff-a04f-60db463bb09b" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: F46869E29EE948DF8AF076E513898014 Ref B: SEL221051503037 Ref C: 2023-09-18T09:11:08Z" ], - "Date": [ "Mon, 18 Sep 2023 09:11:08 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1013" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs\",\"name\":\"namespaceV6dmxtfs\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev6dmxtfs\",\"createdAt\":\"2023-09-18T09:06:21.52Z\",\"updatedAt\":\"2023-09-18T09:10:15.57Z\",\"serviceBusEndpoint\":\"https://namespaceV6dmxtfs.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs?api-version=2023-01-01-preview+40": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "407" ], - "x-ms-client-request-id": [ "60b75fe1-541f-44d5-b6a2-74338eba7794" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "3b22aac2-791b-4557-82e1-dbd5b7bc3dc3_M8CH3_M8CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], - "x-ms-correlation-request-id": [ "94a10f47-cafb-40e7-b948-e5f445626f90" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T091140Z:94a10f47-cafb-40e7-b948-e5f445626f90" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 037292DCD9124605973A0EBB499D8A9B Ref B: SEL221051503037 Ref C: 2023-09-18T09:11:38Z" ], - "Date": [ "Mon, 18 Sep 2023 09:11:39 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1013" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs\",\"name\":\"namespaceV6dmxtfs\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev6dmxtfs\",\"createdAt\":\"2023-09-18T09:06:21.52Z\",\"updatedAt\":\"2023-09-18T09:10:15.57Z\",\"serviceBusEndpoint\":\"https://namespaceV6dmxtfs.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs?api-version=2023-01-01-preview+41": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "408" ], - "x-ms-client-request-id": [ "60b75fe1-541f-44d5-b6a2-74338eba7794" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "45adad0e-f623-403b-871c-b0c92b1ce119_M8CH3_M8CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-correlation-request-id": [ "3b22fde5-5f14-4d51-8a1a-b46493fd0307" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T091211Z:3b22fde5-5f14-4d51-8a1a-b46493fd0307" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: FBAF0D8A0EFC410AA6BEB2167FBB6223 Ref B: SEL221051503037 Ref C: 2023-09-18T09:12:10Z" ], - "Date": [ "Mon, 18 Sep 2023 09:12:11 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1013" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs\",\"name\":\"namespaceV6dmxtfs\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev6dmxtfs\",\"createdAt\":\"2023-09-18T09:06:21.52Z\",\"updatedAt\":\"2023-09-18T09:10:15.57Z\",\"serviceBusEndpoint\":\"https://namespaceV6dmxtfs.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs?api-version=2023-01-01-preview+42": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "409" ], - "x-ms-client-request-id": [ "60b75fe1-541f-44d5-b6a2-74338eba7794" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "0e4bcf13-2620-4931-b6f3-9437e47cde6c_M4CH3_M4CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-correlation-request-id": [ "732f6e7d-91dc-48cd-aa6a-9f4d37dd0b7d" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T091242Z:732f6e7d-91dc-48cd-aa6a-9f4d37dd0b7d" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: DDBAB4EAA1A840EA862C1D2DD53A082A Ref B: SEL221051503037 Ref C: 2023-09-18T09:12:41Z" ], - "Date": [ "Mon, 18 Sep 2023 09:12:41 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1013" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs\",\"name\":\"namespaceV6dmxtfs\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev6dmxtfs\",\"createdAt\":\"2023-09-18T09:06:21.52Z\",\"updatedAt\":\"2023-09-18T09:10:15.57Z\",\"serviceBusEndpoint\":\"https://namespaceV6dmxtfs.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs?api-version=2023-01-01-preview+43": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "410" ], - "x-ms-client-request-id": [ "60b75fe1-541f-44d5-b6a2-74338eba7794" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "cecb77c1-296a-4beb-aec7-84ba36905438_M11CH3_M11CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-correlation-request-id": [ "8f403742-1cc2-47b6-8d7f-c316612cf1c0" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T091313Z:8f403742-1cc2-47b6-8d7f-c316612cf1c0" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 707D5829098246928CA0B2454EFF8F34 Ref B: SEL221051503037 Ref C: 2023-09-18T09:13:12Z" ], - "Date": [ "Mon, 18 Sep 2023 09:13:13 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1013" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs\",\"name\":\"namespaceV6dmxtfs\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"ActivatingIdentity\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev6dmxtfs\",\"createdAt\":\"2023-09-18T09:06:21.52Z\",\"updatedAt\":\"2023-09-18T09:10:15.57Z\",\"serviceBusEndpoint\":\"https://namespaceV6dmxtfs.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs?api-version=2023-01-01-preview+44": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "411" ], - "x-ms-client-request-id": [ "60b75fe1-541f-44d5-b6a2-74338eba7794" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "66f0a148-48f6-4505-8ec5-bab04b7c73d5_M7CH3_M7CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], - "x-ms-correlation-request-id": [ "5c639ba5-c212-4984-80c5-cda6036bdc78" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T091345Z:5c639ba5-c212-4984-80c5-cda6036bdc78" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 56D545F992FB44E595D8BCB4DC3824DD Ref B: SEL221051503037 Ref C: 2023-09-18T09:13:43Z" ], - "Date": [ "Mon, 18 Sep 2023 09:13:44 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "1107" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs\",\"name\":\"namespaceV6dmxtfs\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{\"clientId\":\"38a989a1-3fab-4015-b546-cbcf7a67aa89\",\"principalId\":\"624205aa-192c-4303-9606-990d06cbd997\"}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev6dmxtfs\",\"createdAt\":\"2023-09-18T09:06:21.52Z\",\"updatedAt\":\"2023-09-18T09:13:24.777Z\",\"serviceBusEndpoint\":\"https://namespaceV6dmxtfs.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs?api-version=2023-01-01-preview+45": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "412" ], - "x-ms-client-request-id": [ "60b75fe1-541f-44d5-b6a2-74338eba7794" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateExpanded" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "daef6210-9835-41f8-a808-75fd5b62d796_M7CH3_M7CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], - "x-ms-correlation-request-id": [ "baded23d-2b1b-452e-81fd-e647a3bb2161" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T091346Z:baded23d-2b1b-452e-81fd-e647a3bb2161" ], + "x-ms-correlation-request-id": [ "b7926720-872c-4197-8f9e-b3ead05450ce" ], + "x-ms-client-request-id": [ "d5b231c9-22b9-4571-bff3-78d8896d7cc8_RP" ], + "x-ms-messaging-activity-id": [ "4599b723-b7f2-4bca-98f4-29d5c5921b17" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G14|2024-04-29T13:32:48" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "b7926720-872c-4197-8f9e-b3ead05450ce" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T133248Z:b7926720-872c-4197-8f9e-b3ead05450ce" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 6D51BB8F0FB641A5942BDE7A5A4EB4DC Ref B: SEL221051503037 Ref C: 2023-09-18T09:13:45Z" ], - "Date": [ "Mon, 18 Sep 2023 09:13:46 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 2CFF77D1A939407AB33B6443C35D2547 Ref B: SEL221051504023 Ref C: 2024-04-29T13:32:46Z" ], + "Date": [ "Mon, 29 Apr 2024 13:32:48 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1107" ], + "Content-Length": [ "842" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs\",\"name\":\"namespaceV6dmxtfs\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{\"clientId\":\"38a989a1-3fab-4015-b546-cbcf7a67aa89\",\"principalId\":\"624205aa-192c-4303-9606-990d06cbd997\"}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev6dmxtfs\",\"createdAt\":\"2023-09-18T09:06:21.52Z\",\"updatedAt\":\"2023-09-18T09:13:24.777Z\",\"serviceBusEndpoint\":\"https://namespaceV6dmxtfs.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz\",\"name\":\"namespaceV35flrpz\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev35flrpz\",\"serviceBusEndpoint\":\"https://namespaceV35flrpz.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":18,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:56:46.3971474Z\",\"updatedAt\":\"2024-04-29T12:57:10.8990145Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":10}}", "isContentBase64": false } }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs?api-version=2023-01-01-preview+46": { + "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "413" ], - "x-ms-client-request-id": [ "d68f5587-8c7e-43ed-84ec-5b6919e1ce41" ], + "x-ms-unique-id": [ "313" ], + "x-ms-client-request-id": [ "95646500-7bd9-4979-9788-c9e12bcf8334" ], "CommandName": [ "Get-AzEventHubNamespace" ], - "FullCommandName": [ "Get-AzEventHubNamespace_Get" ], + "FullCommandName": [ "Get-AzEventHubNamespace_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1922,37 +68,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "17bd3cce-9f30-4938-b8fb-c340237b6a0a_M11CH3_M11CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], - "x-ms-correlation-request-id": [ "9fda1f56-ce5e-41da-b4bb-96e8a973950d" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T091349Z:9fda1f56-ce5e-41da-b4bb-96e8a973950d" ], + "x-ms-correlation-request-id": [ "07209bdc-d26d-4592-897f-7b4889129605" ], + "x-ms-client-request-id": [ "95646500-7bd9-4979-9788-c9e12bcf8334_RP" ], + "x-ms-messaging-activity-id": [ "c036c0f2-9422-45f4-be59-80ac286469d3" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G8|2024-04-29T13:32:51" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "07209bdc-d26d-4592-897f-7b4889129605" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T133252Z:07209bdc-d26d-4592-897f-7b4889129605" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: C6EF27CF63E84EB3943C6E22B971A1E0 Ref B: SEL221051503037 Ref C: 2023-09-18T09:13:47Z" ], - "Date": [ "Mon, 18 Sep 2023 09:13:49 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 524C23759839428991521A5FCFCD8CEF Ref B: SEL221051504023 Ref C: 2024-04-29T13:32:49Z" ], + "Date": [ "Mon, 29 Apr 2024 13:32:51 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1107" ], + "Content-Length": [ "842" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs\",\"name\":\"namespaceV6dmxtfs\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1\":{\"clientId\":\"38a989a1-3fab-4015-b546-cbcf7a67aa89\",\"principalId\":\"624205aa-192c-4303-9606-990d06cbd997\"}}},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev6dmxtfs\",\"createdAt\":\"2023-09-18T09:06:21.52Z\",\"updatedAt\":\"2023-09-18T09:13:24.777Z\",\"serviceBusEndpoint\":\"https://namespaceV6dmxtfs.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz\",\"name\":\"namespaceV35flrpz\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev35flrpz\",\"serviceBusEndpoint\":\"https://namespaceV35flrpz.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":18,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:56:46.3971474Z\",\"updatedAt\":\"2024-04-29T12:57:10.8990145Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":10}}", "isContentBase64": false } }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs?api-version=2023-01-01-preview+47": { + "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview+3": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs?api-version=2023-01-01-preview", - "Content": "{\n \"location\": \"North Europe\",\n \"sku\": {\n \"name\": \"Premium\",\n \"tier\": \"Premium\",\n \"capacity\": 1\n },\n \"identity\": {\n \"type\": \"None\"\n },\n \"properties\": {\n \"minimumTlsVersion\": \"1.2\",\n \"isAutoInflateEnabled\": false,\n \"publicNetworkAccess\": \"Enabled\",\n \"maximumThroughputUnits\": 0,\n \"kafkaEnabled\": true,\n \"zoneRedundant\": true,\n \"disableLocalAuth\": false\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview", + "Content": "{\n \"location\": \"eastus\",\n \"tags\": {\n \"k2\": \"v2\",\n \"k1\": \"v1\"\n },\n \"sku\": {\n \"name\": \"Standard\",\n \"tier\": \"Standard\",\n \"capacity\": 10\n },\n \"properties\": {\n \"minimumTlsVersion\": \"1.1\",\n \"isAutoInflateEnabled\": false,\n \"publicNetworkAccess\": \"Disabled\",\n \"maximumThroughputUnits\": 0,\n \"kafkaEnabled\": true,\n \"zoneRedundant\": true,\n \"privateEndpointConnections\": [ ],\n \"disableLocalAuth\": true\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "396" ] + "Content-Length": [ "440" ] } }, "Response": { @@ -1960,40 +109,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "44036a78-ec5a-4798-b8a8-afa70329ee80_M3CH3_M3CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ "49" ], - "x-ms-correlation-request-id": [ "d10fea5f-3292-49d8-a16d-64ddec45006c" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T091403Z:d10fea5f-3292-49d8-a16d-64ddec45006c" ], + "x-ms-correlation-request-id": [ "1a6126bb-c259-4823-8f84-4ff787bd295c" ], + "x-ms-client-request-id": [ "6ea26c6e-96e5-4eca-aa75-57863f58583e_RP" ], + "x-ms-messaging-activity-id": [ "58591f28-5dd8-4c99-b032-1f6ba5838301" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G8|2024-04-29T13:32:54" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "49" ], + "x-ms-request-id": [ "1a6126bb-c259-4823-8f84-4ff787bd295c" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T133254Z:1a6126bb-c259-4823-8f84-4ff787bd295c" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: EBD43F210135423E9031B71A1EB94105 Ref B: SEL221051503037 Ref C: 2023-09-18T09:13:49Z" ], - "Date": [ "Mon, 18 Sep 2023 09:14:02 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 23AD182FF3A44D82A40FF70F366636F5 Ref B: SEL221051504023 Ref C: 2024-04-29T13:32:52Z" ], + "Date": [ "Mon, 29 Apr 2024 13:32:54 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "788" ], + "Content-Length": [ "811" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs\",\"name\":\"namespaceV6dmxtfs\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Updating\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev6dmxtfs\",\"createdAt\":\"2023-09-18T09:06:21.52Z\",\"updatedAt\":\"2023-09-18T09:13:59.433Z\",\"serviceBusEndpoint\":\"https://namespaceV6dmxtfs.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz\",\"name\":\"namespaceV35flrpz\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev35flrpz\",\"serviceBusEndpoint\":\"https://namespaceV35flrpz.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Updating\",\"status\":\"Updating\",\"createdAt\":\"2024-04-29T12:56:46.3971474Z\",\"updatedAt\":\"2024-04-29T13:32:54.6608379Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":10}}", "isContentBase64": false } }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs?api-version=2023-01-01-preview+48": { + "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview+4": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "415" ], - "x-ms-client-request-id": [ "00da288f-f22e-4c6f-82d7-06679d495486" ], + "x-ms-unique-id": [ "315" ], + "x-ms-client-request-id": [ "6ea26c6e-96e5-4eca-aa75-57863f58583e" ], "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateViaIdentity" ], "FullCommandName": [ "New-AzEventHubNamespace_CreateViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ] }, "ContentHeaders": { } @@ -2003,83 +155,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "d810acdd-04da-4294-ad89-ef2f6871f8a5_M2CH3_M2CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], - "x-ms-correlation-request-id": [ "ca105ee1-2410-4997-8e4c-81fa27f9bc96" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T091433Z:ca105ee1-2410-4997-8e4c-81fa27f9bc96" ], + "x-ms-correlation-request-id": [ "be148696-1c2c-4a57-aae0-ae227b26913f" ], + "x-ms-client-request-id": [ "6ea26c6e-96e5-4eca-aa75-57863f58583e_RP" ], + "x-ms-messaging-activity-id": [ "62781e86-94e8-4ff1-9a2f-56a12f5ec3f1" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G7|2024-04-29T13:33:26" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "be148696-1c2c-4a57-aae0-ae227b26913f" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T133326Z:be148696-1c2c-4a57-aae0-ae227b26913f" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: E4222CF320784661877CFBFBBE31CAA0 Ref B: SEL221051503037 Ref C: 2023-09-18T09:14:33Z" ], - "Date": [ "Mon, 18 Sep 2023 09:14:33 GMT" ] + "X-MSEdge-Ref": [ "Ref A: D44100EDB56346A9B794FEA4B247CAB8 Ref B: SEL221051504023 Ref C: 2024-04-29T13:33:24Z" ], + "Date": [ "Mon, 29 Apr 2024 13:33:26 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "785" ], + "Content-Length": [ "842" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs\",\"name\":\"namespaceV6dmxtfs\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev6dmxtfs\",\"createdAt\":\"2023-09-18T09:06:21.52Z\",\"updatedAt\":\"2023-09-18T09:14:02.077Z\",\"serviceBusEndpoint\":\"https://namespaceV6dmxtfs.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz\",\"name\":\"namespaceV35flrpz\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev35flrpz\",\"serviceBusEndpoint\":\"https://namespaceV35flrpz.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:56:46.3971474Z\",\"updatedAt\":\"2024-04-29T13:33:09.7860588Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":10}}", "isContentBase64": false } }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs?api-version=2023-01-01-preview+49": { + "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview+5": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "416" ], - "x-ms-client-request-id": [ "00da288f-f22e-4c6f-82d7-06679d495486" ], + "x-ms-unique-id": [ "316" ], + "x-ms-client-request-id": [ "6ea26c6e-96e5-4eca-aa75-57863f58583e" ], "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateViaIdentity" ], "FullCommandName": [ "New-AzEventHubNamespace_CreateViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "bffadc11-4a4b-48f2-add4-72135653602c_M0SN1_M0SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], - "x-ms-correlation-request-id": [ "81948c7a-e8e2-47fb-9187-df26a7e801a5" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T091435Z:81948c7a-e8e2-47fb-9187-df26a7e801a5" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: A197BB0575694D2BB840B7A41081A46C Ref B: SEL221051503037 Ref C: 2023-09-18T09:14:33Z" ], - "Date": [ "Mon, 18 Sep 2023 09:14:34 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "785" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Premium\",\"tier\":\"Premium\",\"capacity\":1},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV6dmxtfs\",\"name\":\"namespaceV6dmxtfs\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"North Europe\",\"tags\":{},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Enabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev6dmxtfs\",\"createdAt\":\"2023-09-18T09:06:21.52Z\",\"updatedAt\":\"2023-09-18T09:14:02.077Z\",\"serviceBusEndpoint\":\"https://namespaceV6dmxtfs.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview+1": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "417" ], - "x-ms-client-request-id": [ "39d16bbe-4292-404f-8ee2-e05627f62fd5" ], - "CommandName": [ "Get-AzEventHubNamespaceV2" ], - "FullCommandName": [ "Get-AzEventHubNamespace_Get" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], - "Authorization": [ "[Filtered]" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ] }, "ContentHeaders": { } @@ -2089,39 +201,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "c0b81960-b4d6-44cc-9558-cd93171f7760_M7SN1_M7SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], - "x-ms-correlation-request-id": [ "994111a0-5b6e-4556-995e-dace653da69a" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T091435Z:994111a0-5b6e-4556-995e-dace653da69a" ], + "x-ms-correlation-request-id": [ "d75e511f-3871-4960-9421-bc0ea5652ec6" ], + "x-ms-client-request-id": [ "6ea26c6e-96e5-4eca-aa75-57863f58583e_RP" ], + "x-ms-messaging-activity-id": [ "3695ace0-86ff-4798-a1d8-9f0d1b538e5e" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G10|2024-04-29T13:33:28" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "d75e511f-3871-4960-9421-bc0ea5652ec6" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240429T133328Z:d75e511f-3871-4960-9421-bc0ea5652ec6" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 2BF14EA3882F404A8CE26613838C2C5E Ref B: SEL221051503037 Ref C: 2023-09-18T09:14:35Z" ], - "Date": [ "Mon, 18 Sep 2023 09:14:35 GMT" ] + "X-MSEdge-Ref": [ "Ref A: C6430A1BDB5345D2AB54F1700EE52B7E Ref B: SEL221051504023 Ref C: 2024-04-29T13:33:26Z" ], + "Date": [ "Mon, 29 Apr 2024 13:33:27 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "810" ], + "Content-Length": [ "842" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":10},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9\",\"name\":\"namespaceV3dp4io9\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":true,\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":18,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3dp4io9\",\"createdAt\":\"2023-09-18T08:02:35.31Z\",\"updatedAt\":\"2023-09-18T08:03:22.78Z\",\"serviceBusEndpoint\":\"https://namespaceV3dp4io9.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz\",\"name\":\"namespaceV35flrpz\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev35flrpz\",\"serviceBusEndpoint\":\"https://namespaceV35flrpz.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:56:46.3971474Z\",\"updatedAt\":\"2024-04-29T13:33:09.7860588Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":10}}", "isContentBase64": false } }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview+2": { + "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview+6": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "418" ], - "x-ms-client-request-id": [ "ce59f35d-be0b-4d76-9882-444edca490fa" ], + "x-ms-unique-id": [ "317" ], + "x-ms-client-request-id": [ "de08f275-60c5-4a9a-8bbd-240efffbf0e3" ], "CommandName": [ "Get-AzEventHubNamespace" ], "FullCommandName": [ "Get-AzEventHubNamespace_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -2132,37 +247,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "fede11ca-afe9-429f-9853-e056b044ee34_M1CH3_M1CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-correlation-request-id": [ "600ded1b-b10a-49fa-a02e-c2a6b3e840ff" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T091436Z:600ded1b-b10a-49fa-a02e-c2a6b3e840ff" ], + "x-ms-correlation-request-id": [ "3291184a-83ff-48aa-af0f-d2dd5cd1ab1a" ], + "x-ms-client-request-id": [ "de08f275-60c5-4a9a-8bbd-240efffbf0e3_RP" ], + "x-ms-messaging-activity-id": [ "1e6907ca-68df-43ee-9ef8-0c97a974ab18" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G11|2024-04-29T13:33:30" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "3291184a-83ff-48aa-af0f-d2dd5cd1ab1a" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240429T133330Z:3291184a-83ff-48aa-af0f-d2dd5cd1ab1a" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 504A90505D734A2A88AEF2ADA24272B3 Ref B: SEL221051503037 Ref C: 2023-09-18T09:14:36Z" ], - "Date": [ "Mon, 18 Sep 2023 09:14:36 GMT" ] + "X-MSEdge-Ref": [ "Ref A: D184DFF4228240529F18CCFAC7369489 Ref B: SEL221051504023 Ref C: 2024-04-29T13:33:28Z" ], + "Date": [ "Mon, 29 Apr 2024 13:33:29 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "810" ], + "Content-Length": [ "842" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":10},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9\",\"name\":\"namespaceV3dp4io9\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":true,\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":18,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3dp4io9\",\"createdAt\":\"2023-09-18T08:02:35.31Z\",\"updatedAt\":\"2023-09-18T08:03:22.78Z\",\"serviceBusEndpoint\":\"https://namespaceV3dp4io9.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz\",\"name\":\"namespaceV35flrpz\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev35flrpz\",\"serviceBusEndpoint\":\"https://namespaceV35flrpz.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:56:46.3971474Z\",\"updatedAt\":\"2024-04-29T13:33:09.7860588Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":10}}", "isContentBase64": false } }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview+3": { + "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview+7": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview", - "Content": "{\n \"location\": \"South Central US\",\n \"tags\": {\n \"k1\": \"v1\",\n \"k2\": \"v2\"\n },\n \"sku\": {\n \"name\": \"Standard\",\n \"tier\": \"Standard\",\n \"capacity\": 10\n },\n \"properties\": {\n \"minimumTlsVersion\": \"1.1\",\n \"isAutoInflateEnabled\": false,\n \"publicNetworkAccess\": \"Disabled\",\n \"maximumThroughputUnits\": 0,\n \"kafkaEnabled\": true,\n \"zoneRedundant\": true,\n \"disableLocalAuth\": true\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview", + "Content": "{\n \"location\": \"eastus\",\n \"tags\": {\n \"k2\": \"v2\",\n \"k1\": \"v1\"\n },\n \"sku\": {\n \"name\": \"Standard\",\n \"tier\": \"Standard\",\n \"capacity\": 10\n },\n \"properties\": {\n \"minimumTlsVersion\": \"1.1\",\n \"isAutoInflateEnabled\": true,\n \"publicNetworkAccess\": \"Disabled\",\n \"maximumThroughputUnits\": 18,\n \"kafkaEnabled\": true,\n \"zoneRedundant\": true,\n \"privateEndpointConnections\": [ ],\n \"disableLocalAuth\": true\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "411" ] + "Content-Length": [ "440" ] } }, "Response": { @@ -2170,83 +288,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "4b956047-4d19-4419-8ef0-c6ed24e4c7a1_M7SN1_M7SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ "49" ], - "x-ms-correlation-request-id": [ "5d43f4e1-9c79-4995-9e4d-2609fb478537" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T091445Z:5d43f4e1-9c79-4995-9e4d-2609fb478537" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 1B3854D5CC254B48B4139BC1B55CCA7E Ref B: SEL221051503037 Ref C: 2023-09-18T09:14:36Z" ], - "Date": [ "Mon, 18 Sep 2023 09:14:45 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "814" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":10},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9\",\"name\":\"namespaceV3dp4io9\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Updating\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3dp4io9\",\"createdAt\":\"2023-09-18T08:02:35.31Z\",\"updatedAt\":\"2023-09-18T09:14:44.797Z\",\"serviceBusEndpoint\":\"https://namespaceV3dp4io9.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview+4": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "420" ], - "x-ms-client-request-id": [ "feea95d7-1054-471b-bfd7-3c9090117b7a" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateViaIdentity" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateViaIdentity" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "9b5495c6-bfa4-4dec-a6b6-d4b415136f5f_M4SN1_M4SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], - "x-ms-correlation-request-id": [ "f432b29f-f286-4efd-b1c4-dd911f6392f4" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T091520Z:f432b29f-f286-4efd-b1c4-dd911f6392f4" ], + "x-ms-correlation-request-id": [ "daa8e7fb-e3bb-4f96-8b4c-72e0b26d672e" ], + "x-ms-client-request-id": [ "159f83e2-84ae-4af5-83b3-6d289f48d85f_RP" ], + "x-ms-messaging-activity-id": [ "128520c4-966b-44b2-8f95-386e5e0cd585" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-29T13:33:33" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "49" ], + "x-ms-request-id": [ "daa8e7fb-e3bb-4f96-8b4c-72e0b26d672e" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T133333Z:daa8e7fb-e3bb-4f96-8b4c-72e0b26d672e" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 46E6695FC1084756BFD2F9EE04DE5F3D Ref B: SEL221051503037 Ref C: 2023-09-18T09:15:15Z" ], - "Date": [ "Mon, 18 Sep 2023 09:15:19 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 26025676642A45AEAE0CB44CA329713B Ref B: SEL221051504023 Ref C: 2024-04-29T13:33:30Z" ], + "Date": [ "Mon, 29 Apr 2024 13:33:32 GMT" ] }, "ContentHeaders": { "Content-Length": [ "811" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":10},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9\",\"name\":\"namespaceV3dp4io9\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3dp4io9\",\"createdAt\":\"2023-09-18T08:02:35.31Z\",\"updatedAt\":\"2023-09-18T09:14:48.617Z\",\"serviceBusEndpoint\":\"https://namespaceV3dp4io9.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz\",\"name\":\"namespaceV35flrpz\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev35flrpz\",\"serviceBusEndpoint\":\"https://namespaceV35flrpz.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":18,\"kafkaEnabled\":true,\"provisioningState\":\"Updating\",\"status\":\"Updating\",\"createdAt\":\"2024-04-29T12:56:46.3971474Z\",\"updatedAt\":\"2024-04-29T13:33:33.0375028Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":10}}", "isContentBase64": false } }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview+5": { + "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview+8": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "421" ], - "x-ms-client-request-id": [ "feea95d7-1054-471b-bfd7-3c9090117b7a" ], + "x-ms-unique-id": [ "319" ], + "x-ms-client-request-id": [ "159f83e2-84ae-4af5-83b3-6d289f48d85f" ], "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateViaIdentity" ], "FullCommandName": [ "New-AzEventHubNamespace_CreateViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ] }, "ContentHeaders": { } @@ -2256,164 +334,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "0cb7fbb8-10ab-4b28-9c35-e364f09859f4_M1SN1_M1SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], - "x-ms-correlation-request-id": [ "e49c73a9-e61f-418a-baa5-e65d38059e6d" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T091520Z:e49c73a9-e61f-418a-baa5-e65d38059e6d" ], + "x-ms-correlation-request-id": [ "681355e1-1409-4d79-b769-e949c29bb4ae" ], + "x-ms-client-request-id": [ "159f83e2-84ae-4af5-83b3-6d289f48d85f_RP" ], + "x-ms-messaging-activity-id": [ "c38999a4-b783-476d-858d-6d2a69ac6984" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G9|2024-04-29T13:34:04" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 1BCB6AA6E0644EAC96279A328C2AE006 Ref B: SEL221051503037 Ref C: 2023-09-18T09:15:20Z" ], - "Date": [ "Mon, 18 Sep 2023 09:15:20 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "811" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":10},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9\",\"name\":\"namespaceV3dp4io9\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3dp4io9\",\"createdAt\":\"2023-09-18T08:02:35.31Z\",\"updatedAt\":\"2023-09-18T09:14:48.617Z\",\"serviceBusEndpoint\":\"https://namespaceV3dp4io9.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview+6": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "422" ], - "x-ms-client-request-id": [ "2a517e02-cf3f-42b3-9a0e-1af7bdf818a7" ], - "CommandName": [ "Get-AzEventHubNamespace" ], - "FullCommandName": [ "Get-AzEventHubNamespace_GetViaIdentity" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], - "Authorization": [ "[Filtered]" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "5b8798ed-dc5d-4d2a-89b6-f07bcbb02bc4_M4CH3_M4CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-correlation-request-id": [ "a4c5f689-0922-4209-addd-4cea4e1aeea5" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T091522Z:a4c5f689-0922-4209-addd-4cea4e1aeea5" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: C202A9A5C79542CFB50549710B8DDAA4 Ref B: SEL221051503037 Ref C: 2023-09-18T09:15:21Z" ], - "Date": [ "Mon, 18 Sep 2023 09:15:21 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "811" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":10},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9\",\"name\":\"namespaceV3dp4io9\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":true,\"isAutoInflateEnabled\":false,\"maximumThroughputUnits\":0,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3dp4io9\",\"createdAt\":\"2023-09-18T08:02:35.31Z\",\"updatedAt\":\"2023-09-18T09:14:48.617Z\",\"serviceBusEndpoint\":\"https://namespaceV3dp4io9.servicebus.windows.net:443/\",\"status\":\"Active\"}}", - "isContentBase64": false - } - }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview+7": { - "Request": { - "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview", - "Content": "{\n \"location\": \"South Central US\",\n \"tags\": {\n \"k1\": \"v1\",\n \"k2\": \"v2\"\n },\n \"sku\": {\n \"name\": \"Standard\",\n \"tier\": \"Standard\",\n \"capacity\": 10\n },\n \"properties\": {\n \"minimumTlsVersion\": \"1.1\",\n \"isAutoInflateEnabled\": true,\n \"publicNetworkAccess\": \"Disabled\",\n \"maximumThroughputUnits\": 18,\n \"kafkaEnabled\": true,\n \"zoneRedundant\": true,\n \"disableLocalAuth\": true\n }\n}", - "isContentBase64": false, - "Headers": { - }, - "ContentHeaders": { - "Content-Type": [ "application/json" ], - "Content-Length": [ "411" ] - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "a13603ae-57e1-4588-ab2e-625249fc3efe_M8SN1_M8SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ "49" ], - "x-ms-correlation-request-id": [ "876336e7-79f5-49cb-9b0a-5166f09545e7" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T091529Z:876336e7-79f5-49cb-9b0a-5166f09545e7" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 23BC342C529E4CF3AAE3BF5203AA72EE Ref B: SEL221051503037 Ref C: 2023-09-18T09:15:22Z" ], - "Date": [ "Mon, 18 Sep 2023 09:15:28 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "814" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":10},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9\",\"name\":\"namespaceV3dp4io9\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":true,\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":18,\"kafkaEnabled\":true,\"provisioningState\":\"Updating\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3dp4io9\",\"createdAt\":\"2023-09-18T08:02:35.31Z\",\"updatedAt\":\"2023-09-18T09:15:29.067Z\",\"serviceBusEndpoint\":\"https://namespaceV3dp4io9.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", - "isContentBase64": false - } - }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview+8": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "424" ], - "x-ms-client-request-id": [ "cac0121a-d94e-405a-a87a-9b5890db2fc9" ], - "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateViaIdentity" ], - "FullCommandName": [ "New-AzEventHubNamespace_CreateViaIdentity" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "37ae3cdc-0010-4624-aa1d-8cd74b445fed_M5SN1_M5SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], - "x-ms-correlation-request-id": [ "61f9d0d4-1b35-4df6-a28d-3cbf666ebdb8" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T091600Z:61f9d0d4-1b35-4df6-a28d-3cbf666ebdb8" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-request-id": [ "681355e1-1409-4d79-b769-e949c29bb4ae" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240429T133404Z:681355e1-1409-4d79-b769-e949c29bb4ae" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 1B8E91945C674DE38E420141A14BECE2 Ref B: SEL221051503037 Ref C: 2023-09-18T09:15:59Z" ], - "Date": [ "Mon, 18 Sep 2023 09:15:59 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 3A9BF2BEF2844C8CA244CB6E011BD18D Ref B: SEL221051504023 Ref C: 2024-04-29T13:34:03Z" ], + "Date": [ "Mon, 29 Apr 2024 13:34:04 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "810" ], + "Content-Length": [ "842" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":10},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9\",\"name\":\"namespaceV3dp4io9\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":true,\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":18,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3dp4io9\",\"createdAt\":\"2023-09-18T08:02:35.31Z\",\"updatedAt\":\"2023-09-18T09:15:32.53Z\",\"serviceBusEndpoint\":\"https://namespaceV3dp4io9.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz\",\"name\":\"namespaceV35flrpz\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev35flrpz\",\"serviceBusEndpoint\":\"https://namespaceV35flrpz.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":18,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:56:46.3971474Z\",\"updatedAt\":\"2024-04-29T13:33:52.1318252Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":10}}", "isContentBase64": false } }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview+9": { + "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview+9": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "425" ], - "x-ms-client-request-id": [ "cac0121a-d94e-405a-a87a-9b5890db2fc9" ], + "x-ms-unique-id": [ "320" ], + "x-ms-client-request-id": [ "159f83e2-84ae-4af5-83b3-6d289f48d85f" ], "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateViaIdentity" ], "FullCommandName": [ "New-AzEventHubNamespace_CreateViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ] }, "ContentHeaders": { } @@ -2423,39 +380,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "a8144cb8-6f7d-4a54-9cbc-78431f851497_M1CH3_M1CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-correlation-request-id": [ "61e0d219-d1ef-4b2b-bd5b-a13697886396" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T091600Z:61e0d219-d1ef-4b2b-bd5b-a13697886396" ], + "x-ms-correlation-request-id": [ "4719cafb-59d8-4166-a3e5-7d2f81872076" ], + "x-ms-client-request-id": [ "159f83e2-84ae-4af5-83b3-6d289f48d85f_RP" ], + "x-ms-messaging-activity-id": [ "e05db0d4-4132-4e96-8023-c5769bbd7c5b" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G7|2024-04-29T13:34:05" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "4719cafb-59d8-4166-a3e5-7d2f81872076" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T133405Z:4719cafb-59d8-4166-a3e5-7d2f81872076" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: BD0754F05D5642BD918EB371ABB0AFB7 Ref B: SEL221051503037 Ref C: 2023-09-18T09:16:00Z" ], - "Date": [ "Mon, 18 Sep 2023 09:16:00 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 021D6F0E26784C2F88EB9A473612A3A6 Ref B: SEL221051504023 Ref C: 2024-04-29T13:34:04Z" ], + "Date": [ "Mon, 29 Apr 2024 13:34:04 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "810" ], + "Content-Length": [ "842" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":10},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9\",\"name\":\"namespaceV3dp4io9\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":true,\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":18,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3dp4io9\",\"createdAt\":\"2023-09-18T08:02:35.31Z\",\"updatedAt\":\"2023-09-18T09:15:32.53Z\",\"serviceBusEndpoint\":\"https://namespaceV3dp4io9.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz\",\"name\":\"namespaceV35flrpz\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev35flrpz\",\"serviceBusEndpoint\":\"https://namespaceV35flrpz.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":18,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:56:46.3971474Z\",\"updatedAt\":\"2024-04-29T13:33:52.1318252Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":10}}", "isContentBase64": false } }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview+10": { + "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview+10": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "426" ], - "x-ms-client-request-id": [ "d2d1386a-384f-4ae3-9c39-7c871d077fe5" ], + "x-ms-unique-id": [ "321" ], + "x-ms-client-request-id": [ "3844ef73-d249-484f-91de-9da2f346c074" ], "CommandName": [ "Get-AzEventHubNamespace" ], "FullCommandName": [ "Get-AzEventHubNamespace_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -2466,37 +426,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "279a243f-af0c-42b5-8c4b-1f9f671f5583_M3CH3_M3CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-correlation-request-id": [ "72b1de7d-94f3-4140-85d3-4816af6fdd9a" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T091601Z:72b1de7d-94f3-4140-85d3-4816af6fdd9a" ], + "x-ms-correlation-request-id": [ "97c2864f-403a-4ab3-8b58-aaf931937dc2" ], + "x-ms-client-request-id": [ "3844ef73-d249-484f-91de-9da2f346c074_RP" ], + "x-ms-messaging-activity-id": [ "409bfc6b-7fd1-44f2-a875-23dacfae41ee" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G4|2024-04-29T13:34:07" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "97c2864f-403a-4ab3-8b58-aaf931937dc2" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T133407Z:97c2864f-403a-4ab3-8b58-aaf931937dc2" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: C8E005D587F54A42B2904933CD1686A5 Ref B: SEL221051503037 Ref C: 2023-09-18T09:16:01Z" ], - "Date": [ "Mon, 18 Sep 2023 09:16:01 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 498659A78BFF44D6917AE6BF9370C24F Ref B: SEL221051504023 Ref C: 2024-04-29T13:34:05Z" ], + "Date": [ "Mon, 29 Apr 2024 13:34:06 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "810" ], + "Content-Length": [ "842" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":10},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9\",\"name\":\"namespaceV3dp4io9\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":true,\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":18,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3dp4io9\",\"createdAt\":\"2023-09-18T08:02:35.31Z\",\"updatedAt\":\"2023-09-18T09:15:32.53Z\",\"serviceBusEndpoint\":\"https://namespaceV3dp4io9.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz\",\"name\":\"namespaceV35flrpz\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev35flrpz\",\"serviceBusEndpoint\":\"https://namespaceV35flrpz.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":18,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:56:46.3971474Z\",\"updatedAt\":\"2024-04-29T13:33:52.1318252Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":10}}", "isContentBase64": false } }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview+11": { + "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview+11": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview", - "Content": "{\n \"location\": \"South Central US\",\n \"tags\": {\n \"k1\": \"v1\",\n \"k2\": \"v2\"\n },\n \"sku\": {\n \"name\": \"Standard\",\n \"tier\": \"Standard\",\n \"capacity\": 12\n },\n \"properties\": {\n \"minimumTlsVersion\": \"1.1\",\n \"isAutoInflateEnabled\": true,\n \"publicNetworkAccess\": \"Disabled\",\n \"maximumThroughputUnits\": 18,\n \"kafkaEnabled\": true,\n \"zoneRedundant\": true,\n \"disableLocalAuth\": true\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview", + "Content": "{\n \"location\": \"eastus\",\n \"tags\": {\n \"k2\": \"v2\",\n \"k1\": \"v1\"\n },\n \"sku\": {\n \"name\": \"Standard\",\n \"tier\": \"Standard\",\n \"capacity\": 12\n },\n \"properties\": {\n \"minimumTlsVersion\": \"1.1\",\n \"isAutoInflateEnabled\": true,\n \"publicNetworkAccess\": \"Disabled\",\n \"maximumThroughputUnits\": 18,\n \"kafkaEnabled\": true,\n \"zoneRedundant\": true,\n \"privateEndpointConnections\": [ ],\n \"disableLocalAuth\": true\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "411" ] + "Content-Length": [ "440" ] } }, "Response": { @@ -2504,40 +467,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "138d4e79-53d9-4d6e-8251-0e5890f4c89b_M3SN1_M3SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ "49" ], - "x-ms-correlation-request-id": [ "6dcadea3-4a6d-44d6-b2f9-6aefd135e86c" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T091613Z:6dcadea3-4a6d-44d6-b2f9-6aefd135e86c" ], + "x-ms-correlation-request-id": [ "13ca2599-5759-4051-a041-0a8bbdc5200b" ], + "x-ms-client-request-id": [ "e748c531-c62c-4ca7-bfea-083396b53474_RP" ], + "x-ms-messaging-activity-id": [ "95e9d30a-8985-419a-a26e-d1776098ff3d" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G10|2024-04-29T13:34:08" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "49" ], + "x-ms-request-id": [ "13ca2599-5759-4051-a041-0a8bbdc5200b" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240429T133409Z:13ca2599-5759-4051-a041-0a8bbdc5200b" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: AF749AC926D3455D8BF927A489D5A042 Ref B: SEL221051503037 Ref C: 2023-09-18T09:16:01Z" ], - "Date": [ "Mon, 18 Sep 2023 09:16:12 GMT" ] + "X-MSEdge-Ref": [ "Ref A: EE9115FAE6E644F187FE109062ECA436 Ref B: SEL221051504023 Ref C: 2024-04-29T13:34:07Z" ], + "Date": [ "Mon, 29 Apr 2024 13:34:08 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "813" ], + "Content-Length": [ "811" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9\",\"name\":\"namespaceV3dp4io9\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":true,\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":18,\"kafkaEnabled\":true,\"provisioningState\":\"Updating\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3dp4io9\",\"createdAt\":\"2023-09-18T08:02:35.31Z\",\"updatedAt\":\"2023-09-18T09:16:10.32Z\",\"serviceBusEndpoint\":\"https://namespaceV3dp4io9.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz\",\"name\":\"namespaceV35flrpz\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev35flrpz\",\"serviceBusEndpoint\":\"https://namespaceV35flrpz.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":18,\"kafkaEnabled\":true,\"provisioningState\":\"Updating\",\"status\":\"Updating\",\"createdAt\":\"2024-04-29T12:56:46.3971474Z\",\"updatedAt\":\"2024-04-29T13:34:08.7781695Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12}}", "isContentBase64": false } }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview+12": { + "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview+12": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "428" ], - "x-ms-client-request-id": [ "76006edc-c52e-4615-860c-71496f4c74a3" ], + "x-ms-unique-id": [ "323" ], + "x-ms-client-request-id": [ "e748c531-c62c-4ca7-bfea-083396b53474" ], "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateViaIdentity" ], "FullCommandName": [ "New-AzEventHubNamespace_CreateViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ] }, "ContentHeaders": { } @@ -2547,40 +513,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "a08eb75f-f7c8-4077-afb6-d1fbb9e06770_M6CH3_M6CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], - "x-ms-correlation-request-id": [ "970c33df-a18a-43e1-b9b1-4a26f4293c73" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T091644Z:970c33df-a18a-43e1-b9b1-4a26f4293c73" ], + "x-ms-correlation-request-id": [ "1992d67a-c22b-4243-8b36-68cb2bba048f" ], + "x-ms-client-request-id": [ "e748c531-c62c-4ca7-bfea-083396b53474_RP" ], + "x-ms-messaging-activity-id": [ "8b477557-34fa-46da-ab46-ebf6967796ac" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G7|2024-04-29T13:34:40" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "1992d67a-c22b-4243-8b36-68cb2bba048f" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T133440Z:1992d67a-c22b-4243-8b36-68cb2bba048f" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 04AE9881B84C40D097F5AE65ECBB145B Ref B: SEL221051503037 Ref C: 2023-09-18T09:16:43Z" ], - "Date": [ "Mon, 18 Sep 2023 09:16:43 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 2171FFBF8B2D4F528F80FFCE7A4C5CD5 Ref B: SEL221051504023 Ref C: 2024-04-29T13:34:39Z" ], + "Date": [ "Mon, 29 Apr 2024 13:34:40 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "811" ], + "Content-Length": [ "842" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9\",\"name\":\"namespaceV3dp4io9\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":true,\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":18,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3dp4io9\",\"createdAt\":\"2023-09-18T08:02:35.31Z\",\"updatedAt\":\"2023-09-18T09:16:11.153Z\",\"serviceBusEndpoint\":\"https://namespaceV3dp4io9.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz\",\"name\":\"namespaceV35flrpz\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev35flrpz\",\"serviceBusEndpoint\":\"https://namespaceV35flrpz.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":18,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:56:46.3971474Z\",\"updatedAt\":\"2024-04-29T13:34:24.1297259Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12}}", "isContentBase64": false } }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview+13": { + "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview+13": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "429" ], - "x-ms-client-request-id": [ "76006edc-c52e-4615-860c-71496f4c74a3" ], + "x-ms-unique-id": [ "324" ], + "x-ms-client-request-id": [ "e748c531-c62c-4ca7-bfea-083396b53474" ], "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateViaIdentity" ], "FullCommandName": [ "New-AzEventHubNamespace_CreateViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ] }, "ContentHeaders": { } @@ -2590,39 +559,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "7f6ed055-bf00-4ec2-bc9e-5bf193054110_M5SN1_M5SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11990" ], - "x-ms-correlation-request-id": [ "46225745-c012-4795-998b-cce80967771d" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T091644Z:46225745-c012-4795-998b-cce80967771d" ], + "x-ms-correlation-request-id": [ "2469fe18-57b1-4be9-8363-99fce6e9cd55" ], + "x-ms-client-request-id": [ "e748c531-c62c-4ca7-bfea-083396b53474_RP" ], + "x-ms-messaging-activity-id": [ "2a7abc60-5331-4de0-a620-5fd527a07492" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G11|2024-04-29T13:34:42" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "2469fe18-57b1-4be9-8363-99fce6e9cd55" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T133442Z:2469fe18-57b1-4be9-8363-99fce6e9cd55" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 95B048CAC5D549FD9B38A5CB32EA6AA5 Ref B: SEL221051503037 Ref C: 2023-09-18T09:16:44Z" ], - "Date": [ "Mon, 18 Sep 2023 09:16:44 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 5772ED2BC0244E71B84B6327339D9FF9 Ref B: SEL221051504023 Ref C: 2024-04-29T13:34:41Z" ], + "Date": [ "Mon, 29 Apr 2024 13:34:41 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "811" ], + "Content-Length": [ "842" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9\",\"name\":\"namespaceV3dp4io9\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":true,\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":18,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3dp4io9\",\"createdAt\":\"2023-09-18T08:02:35.31Z\",\"updatedAt\":\"2023-09-18T09:16:11.153Z\",\"serviceBusEndpoint\":\"https://namespaceV3dp4io9.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz\",\"name\":\"namespaceV35flrpz\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev35flrpz\",\"serviceBusEndpoint\":\"https://namespaceV35flrpz.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":18,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:56:46.3971474Z\",\"updatedAt\":\"2024-04-29T13:34:24.1297259Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12}}", "isContentBase64": false } }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview+14": { + "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview+14": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "430" ], - "x-ms-client-request-id": [ "1952e0fc-635a-438b-87ca-746898e56472" ], + "x-ms-unique-id": [ "325" ], + "x-ms-client-request-id": [ "59749ed1-da1d-428c-b043-ee98a303ec8e" ], "CommandName": [ "Get-AzEventHubNamespace" ], "FullCommandName": [ "Get-AzEventHubNamespace_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -2633,37 +605,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "2293252e-43bf-41b5-970d-c75411f1d64c_M9CH3_M9CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], - "x-ms-correlation-request-id": [ "4849e6ac-4055-4ae7-a42f-15138035d714" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T091646Z:4849e6ac-4055-4ae7-a42f-15138035d714" ], + "x-ms-correlation-request-id": [ "2709c64e-6065-43b2-9f82-00da1f3598ae" ], + "x-ms-client-request-id": [ "59749ed1-da1d-428c-b043-ee98a303ec8e_RP" ], + "x-ms-messaging-activity-id": [ "bc224cf5-32a8-457c-9cfc-9be2243c001f" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-29T13:34:44" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "2709c64e-6065-43b2-9f82-00da1f3598ae" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T133444Z:2709c64e-6065-43b2-9f82-00da1f3598ae" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: C77D24D2CA1D4576904EA2F50845602E Ref B: SEL221051503037 Ref C: 2023-09-18T09:16:45Z" ], - "Date": [ "Mon, 18 Sep 2023 09:16:45 GMT" ] + "X-MSEdge-Ref": [ "Ref A: A09C28712C894D8F93C1FD70514173ED Ref B: SEL221051504023 Ref C: 2024-04-29T13:34:42Z" ], + "Date": [ "Mon, 29 Apr 2024 13:34:43 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "811" ], + "Content-Length": [ "842" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9\",\"name\":\"namespaceV3dp4io9\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":true,\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":18,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3dp4io9\",\"createdAt\":\"2023-09-18T08:02:35.31Z\",\"updatedAt\":\"2023-09-18T09:16:11.153Z\",\"serviceBusEndpoint\":\"https://namespaceV3dp4io9.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz\",\"name\":\"namespaceV35flrpz\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev35flrpz\",\"serviceBusEndpoint\":\"https://namespaceV35flrpz.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":18,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:56:46.3971474Z\",\"updatedAt\":\"2024-04-29T13:34:24.1297259Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12}}", "isContentBase64": false } }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview+15": { + "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview+15": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview", - "Content": "{\n \"location\": \"South Central US\",\n \"tags\": {\n \"k1\": \"v1\",\n \"k2\": \"v2\"\n },\n \"sku\": {\n \"name\": \"Standard\",\n \"tier\": \"Standard\",\n \"capacity\": 12\n },\n \"properties\": {\n \"minimumTlsVersion\": \"1.1\",\n \"isAutoInflateEnabled\": true,\n \"publicNetworkAccess\": \"Disabled\",\n \"maximumThroughputUnits\": 25,\n \"kafkaEnabled\": true,\n \"zoneRedundant\": true,\n \"disableLocalAuth\": true\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview", + "Content": "{\n \"location\": \"eastus\",\n \"tags\": {\n \"k2\": \"v2\",\n \"k1\": \"v1\"\n },\n \"sku\": {\n \"name\": \"Standard\",\n \"tier\": \"Standard\",\n \"capacity\": 12\n },\n \"properties\": {\n \"minimumTlsVersion\": \"1.1\",\n \"isAutoInflateEnabled\": true,\n \"publicNetworkAccess\": \"Disabled\",\n \"maximumThroughputUnits\": 25,\n \"kafkaEnabled\": true,\n \"zoneRedundant\": true,\n \"privateEndpointConnections\": [ ],\n \"disableLocalAuth\": true\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "411" ] + "Content-Length": [ "440" ] } }, "Response": { @@ -2671,40 +646,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "eb4b6248-ec6f-4e17-a7b5-4ea16a1925b9_M7CH3_M7CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ "49" ], - "x-ms-correlation-request-id": [ "029540e1-0f57-4697-b37b-9deb94f99ad2" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T091654Z:029540e1-0f57-4697-b37b-9deb94f99ad2" ], + "x-ms-correlation-request-id": [ "2390e4b0-9055-4406-822f-dc81d83463b8" ], + "x-ms-client-request-id": [ "15338ee9-fa55-46d2-9648-cdbba33a28b5_RP" ], + "x-ms-messaging-activity-id": [ "80c2e616-79c2-458a-b9d1-ca5af8b55d65" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G7|2024-04-29T13:34:47" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "49" ], + "x-ms-request-id": [ "2390e4b0-9055-4406-822f-dc81d83463b8" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T133447Z:2390e4b0-9055-4406-822f-dc81d83463b8" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 11ECC1FFAAD74939A24B6909EB7BEDD0 Ref B: SEL221051503037 Ref C: 2023-09-18T09:16:46Z" ], - "Date": [ "Mon, 18 Sep 2023 09:16:53 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 20B44CB104454DCF93ABB5C591033535 Ref B: SEL221051504023 Ref C: 2024-04-29T13:34:44Z" ], + "Date": [ "Mon, 29 Apr 2024 13:34:46 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "814" ], + "Content-Length": [ "811" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9\",\"name\":\"namespaceV3dp4io9\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":true,\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":25,\"kafkaEnabled\":true,\"provisioningState\":\"Updating\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3dp4io9\",\"createdAt\":\"2023-09-18T08:02:35.31Z\",\"updatedAt\":\"2023-09-18T09:16:53.233Z\",\"serviceBusEndpoint\":\"https://namespaceV3dp4io9.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz\",\"name\":\"namespaceV35flrpz\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev35flrpz\",\"serviceBusEndpoint\":\"https://namespaceV35flrpz.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":25,\"kafkaEnabled\":true,\"provisioningState\":\"Updating\",\"status\":\"Updating\",\"createdAt\":\"2024-04-29T12:56:46.3971474Z\",\"updatedAt\":\"2024-04-29T13:34:47.1530727Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12}}", "isContentBase64": false } }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview+16": { + "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview+16": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "432" ], - "x-ms-client-request-id": [ "aedf8b76-5a54-48ca-897c-036a48f8377c" ], + "x-ms-unique-id": [ "327" ], + "x-ms-client-request-id": [ "15338ee9-fa55-46d2-9648-cdbba33a28b5" ], "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateViaIdentity" ], "FullCommandName": [ "New-AzEventHubNamespace_CreateViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ] }, "ContentHeaders": { } @@ -2714,40 +692,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "ae194f45-37be-4bc8-9c59-7ac7605a8715_M5CH3_M5CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-correlation-request-id": [ "7f9db8ab-6639-4a7f-842d-cf13d66bcdeb" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T091724Z:7f9db8ab-6639-4a7f-842d-cf13d66bcdeb" ], + "x-ms-correlation-request-id": [ "6f8395bb-f9c8-407c-8630-3a0d1227fa58" ], + "x-ms-client-request-id": [ "15338ee9-fa55-46d2-9648-cdbba33a28b5_RP" ], + "x-ms-messaging-activity-id": [ "448d03c3-29cb-4f39-af94-aa21568d9a33" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G4|2024-04-29T13:35:19" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "6f8395bb-f9c8-407c-8630-3a0d1227fa58" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T133519Z:6f8395bb-f9c8-407c-8630-3a0d1227fa58" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 721839280B1F4540960ECC54C03E893A Ref B: SEL221051503037 Ref C: 2023-09-18T09:17:24Z" ], - "Date": [ "Mon, 18 Sep 2023 09:17:23 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 953E1E2AFD594EBB8A015775E8037612 Ref B: SEL221051504023 Ref C: 2024-04-29T13:35:17Z" ], + "Date": [ "Mon, 29 Apr 2024 13:35:18 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "810" ], + "Content-Length": [ "842" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9\",\"name\":\"namespaceV3dp4io9\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":true,\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":25,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3dp4io9\",\"createdAt\":\"2023-09-18T08:02:35.31Z\",\"updatedAt\":\"2023-09-18T09:16:56.67Z\",\"serviceBusEndpoint\":\"https://namespaceV3dp4io9.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz\",\"name\":\"namespaceV35flrpz\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev35flrpz\",\"serviceBusEndpoint\":\"https://namespaceV35flrpz.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":25,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:56:46.3971474Z\",\"updatedAt\":\"2024-04-29T13:35:05.6690332Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12}}", "isContentBase64": false } }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview+17": { + "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview+17": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "433" ], - "x-ms-client-request-id": [ "aedf8b76-5a54-48ca-897c-036a48f8377c" ], + "x-ms-unique-id": [ "328" ], + "x-ms-client-request-id": [ "15338ee9-fa55-46d2-9648-cdbba33a28b5" ], "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateViaIdentity" ], "FullCommandName": [ "New-AzEventHubNamespace_CreateViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ] }, "ContentHeaders": { } @@ -2757,39 +738,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "fc621c38-8e92-4717-825e-2b30cf082f86_M5CH3_M5CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], - "x-ms-correlation-request-id": [ "32772f9f-7732-4f6a-9d6f-cbad1f63e737" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T091725Z:32772f9f-7732-4f6a-9d6f-cbad1f63e737" ], + "x-ms-correlation-request-id": [ "415e59b0-3ae7-4c5d-bc52-0c321b9d8889" ], + "x-ms-client-request-id": [ "15338ee9-fa55-46d2-9648-cdbba33a28b5_RP" ], + "x-ms-messaging-activity-id": [ "0eab0923-3201-455d-a0fa-9b1d4a830e64" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G10|2024-04-29T13:35:20" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "415e59b0-3ae7-4c5d-bc52-0c321b9d8889" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T133520Z:415e59b0-3ae7-4c5d-bc52-0c321b9d8889" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: BF96FD9A079E48E6B80935478A47B461 Ref B: SEL221051503037 Ref C: 2023-09-18T09:17:24Z" ], - "Date": [ "Mon, 18 Sep 2023 09:17:24 GMT" ] + "X-MSEdge-Ref": [ "Ref A: D56A98F211234BEC9F4B1FE4C1D24D5E Ref B: SEL221051504023 Ref C: 2024-04-29T13:35:19Z" ], + "Date": [ "Mon, 29 Apr 2024 13:35:20 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "810" ], + "Content-Length": [ "842" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9\",\"name\":\"namespaceV3dp4io9\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":true,\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":25,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3dp4io9\",\"createdAt\":\"2023-09-18T08:02:35.31Z\",\"updatedAt\":\"2023-09-18T09:16:56.67Z\",\"serviceBusEndpoint\":\"https://namespaceV3dp4io9.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz\",\"name\":\"namespaceV35flrpz\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev35flrpz\",\"serviceBusEndpoint\":\"https://namespaceV35flrpz.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":25,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:56:46.3971474Z\",\"updatedAt\":\"2024-04-29T13:35:05.6690332Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12}}", "isContentBase64": false } }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview+18": { + "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview+18": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "434" ], - "x-ms-client-request-id": [ "f1e6f589-60c5-4052-8d00-f3a72670205f" ], + "x-ms-unique-id": [ "329" ], + "x-ms-client-request-id": [ "645905a1-0099-4363-bcb0-b17e877092a9" ], "CommandName": [ "Get-AzEventHubNamespace" ], "FullCommandName": [ "Get-AzEventHubNamespace_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -2800,37 +784,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "eec9e0a8-f356-4694-b01b-c7f449dde7d5_M2CH3_M2CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], - "x-ms-correlation-request-id": [ "d14042a7-3674-4b19-a5a1-14868eb620ea" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T091725Z:d14042a7-3674-4b19-a5a1-14868eb620ea" ], + "x-ms-correlation-request-id": [ "2b1f0263-94d3-4ae3-9bcf-d8092db9a5eb" ], + "x-ms-client-request-id": [ "645905a1-0099-4363-bcb0-b17e877092a9_RP" ], + "x-ms-messaging-activity-id": [ "d6114e42-c898-43fc-a680-f59621aec1a5" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G14|2024-04-29T13:35:22" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "2b1f0263-94d3-4ae3-9bcf-d8092db9a5eb" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T133522Z:2b1f0263-94d3-4ae3-9bcf-d8092db9a5eb" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: CC5D1CE9894B4F50AD3D7B376DBA28F6 Ref B: SEL221051503037 Ref C: 2023-09-18T09:17:25Z" ], - "Date": [ "Mon, 18 Sep 2023 09:17:25 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 5DBF45958A2849FCBC2986D859B684B8 Ref B: SEL221051504023 Ref C: 2024-04-29T13:35:20Z" ], + "Date": [ "Mon, 29 Apr 2024 13:35:21 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "810" ], + "Content-Length": [ "842" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9\",\"name\":\"namespaceV3dp4io9\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":true,\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":25,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3dp4io9\",\"createdAt\":\"2023-09-18T08:02:35.31Z\",\"updatedAt\":\"2023-09-18T09:16:56.67Z\",\"serviceBusEndpoint\":\"https://namespaceV3dp4io9.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz\",\"name\":\"namespaceV35flrpz\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"minimumTlsVersion\":\"1.1\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev35flrpz\",\"serviceBusEndpoint\":\"https://namespaceV35flrpz.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":25,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:56:46.3971474Z\",\"updatedAt\":\"2024-04-29T13:35:05.6690332Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12}}", "isContentBase64": false } }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview+19": { + "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview+19": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview", - "Content": "{\n \"location\": \"South Central US\",\n \"tags\": {\n \"k1\": \"v1\",\n \"k2\": \"v2\"\n },\n \"sku\": {\n \"name\": \"Standard\",\n \"tier\": \"Standard\",\n \"capacity\": 12\n },\n \"properties\": {\n \"minimumTlsVersion\": \"1.0\",\n \"isAutoInflateEnabled\": true,\n \"publicNetworkAccess\": \"Disabled\",\n \"maximumThroughputUnits\": 25,\n \"kafkaEnabled\": true,\n \"zoneRedundant\": true,\n \"disableLocalAuth\": true\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview", + "Content": "{\n \"location\": \"eastus\",\n \"tags\": {\n \"k2\": \"v2\",\n \"k1\": \"v1\"\n },\n \"sku\": {\n \"name\": \"Standard\",\n \"tier\": \"Standard\",\n \"capacity\": 12\n },\n \"properties\": {\n \"minimumTlsVersion\": \"1.0\",\n \"isAutoInflateEnabled\": true,\n \"publicNetworkAccess\": \"Disabled\",\n \"maximumThroughputUnits\": 25,\n \"kafkaEnabled\": true,\n \"zoneRedundant\": true,\n \"privateEndpointConnections\": [ ],\n \"disableLocalAuth\": true\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "411" ] + "Content-Length": [ "440" ] } }, "Response": { @@ -2838,40 +825,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "f4b12571-af7c-4ce0-8bcb-f3bca68c7816_M7SN1_M7SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ "49" ], - "x-ms-correlation-request-id": [ "06c3f7d0-ae8e-4f40-b729-dce7e8f7117e" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T091734Z:06c3f7d0-ae8e-4f40-b729-dce7e8f7117e" ], + "x-ms-correlation-request-id": [ "8b55fe38-ec07-473a-9f24-ea139c707c86" ], + "x-ms-client-request-id": [ "6ea9999c-e9de-4074-8d1e-ff7bfe3bec5a_RP" ], + "x-ms-messaging-activity-id": [ "2b25960e-f971-4911-ac0e-ac403acccb3c" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G4|2024-04-29T13:35:24" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "49" ], + "x-ms-request-id": [ "8b55fe38-ec07-473a-9f24-ea139c707c86" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T133525Z:8b55fe38-ec07-473a-9f24-ea139c707c86" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 7EAD91FE462B463F9ED66E66A1E558BA Ref B: SEL221051503037 Ref C: 2023-09-18T09:17:26Z" ], - "Date": [ "Mon, 18 Sep 2023 09:17:33 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 6FC328389B374C1E8DC177DECFF47691 Ref B: SEL221051504023 Ref C: 2024-04-29T13:35:22Z" ], + "Date": [ "Mon, 29 Apr 2024 13:35:24 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "813" ], + "Content-Length": [ "810" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9\",\"name\":\"namespaceV3dp4io9\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":true,\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":25,\"kafkaEnabled\":true,\"provisioningState\":\"Updating\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3dp4io9\",\"createdAt\":\"2023-09-18T08:02:35.31Z\",\"updatedAt\":\"2023-09-18T09:17:33.63Z\",\"serviceBusEndpoint\":\"https://namespaceV3dp4io9.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz\",\"name\":\"namespaceV35flrpz\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev35flrpz\",\"serviceBusEndpoint\":\"https://namespaceV35flrpz.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":25,\"kafkaEnabled\":true,\"provisioningState\":\"Updating\",\"status\":\"Updating\",\"createdAt\":\"2024-04-29T12:56:46.3971474Z\",\"updatedAt\":\"2024-04-29T13:35:24.937936Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12}}", "isContentBase64": false } }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview+20": { + "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview+20": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "436" ], - "x-ms-client-request-id": [ "e0074c09-790f-4f84-a847-cf321a46f731" ], + "x-ms-unique-id": [ "331" ], + "x-ms-client-request-id": [ "6ea9999c-e9de-4074-8d1e-ff7bfe3bec5a" ], "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateViaIdentity" ], "FullCommandName": [ "New-AzEventHubNamespace_CreateViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ] }, "ContentHeaders": { } @@ -2881,40 +871,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "09cbbfa6-2cce-45fe-aa16-d8da62035746_M11CH3_M11CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], - "x-ms-correlation-request-id": [ "69483949-b387-4a5a-8ade-5abfef4778f0" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T091806Z:69483949-b387-4a5a-8ade-5abfef4778f0" ], + "x-ms-correlation-request-id": [ "8681a881-e767-4a6b-a7c5-155a3f864d8e" ], + "x-ms-client-request-id": [ "6ea9999c-e9de-4074-8d1e-ff7bfe3bec5a_RP" ], + "x-ms-messaging-activity-id": [ "740f18d3-bb44-4336-b0a9-89981de6b0c7" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G9|2024-04-29T13:35:56" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "8681a881-e767-4a6b-a7c5-155a3f864d8e" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T133556Z:8681a881-e767-4a6b-a7c5-155a3f864d8e" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: BCA9D2FED0B946A5BBB864633F7F575E Ref B: SEL221051503037 Ref C: 2023-09-18T09:18:04Z" ], - "Date": [ "Mon, 18 Sep 2023 09:18:05 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 559383068AE14341B231B9B25CCCEF8C Ref B: SEL221051504023 Ref C: 2024-04-29T13:35:55Z" ], + "Date": [ "Mon, 29 Apr 2024 13:35:56 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "811" ], + "Content-Length": [ "842" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9\",\"name\":\"namespaceV3dp4io9\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":true,\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":25,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3dp4io9\",\"createdAt\":\"2023-09-18T08:02:35.31Z\",\"updatedAt\":\"2023-09-18T09:17:35.983Z\",\"serviceBusEndpoint\":\"https://namespaceV3dp4io9.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz\",\"name\":\"namespaceV35flrpz\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev35flrpz\",\"serviceBusEndpoint\":\"https://namespaceV35flrpz.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":25,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:56:46.3971474Z\",\"updatedAt\":\"2024-04-29T13:35:44.2400853Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12}}", "isContentBase64": false } }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview+21": { + "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview+21": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "437" ], - "x-ms-client-request-id": [ "e0074c09-790f-4f84-a847-cf321a46f731" ], + "x-ms-unique-id": [ "332" ], + "x-ms-client-request-id": [ "6ea9999c-e9de-4074-8d1e-ff7bfe3bec5a" ], "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateViaIdentity" ], "FullCommandName": [ "New-AzEventHubNamespace_CreateViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ] }, "ContentHeaders": { } @@ -2924,39 +917,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "70c3aa84-6d34-4bf3-8894-82bcdc4dc9b5_M6CH3_M6CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], - "x-ms-correlation-request-id": [ "52241372-67e4-462c-a6d2-83b343f8201e" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T091808Z:52241372-67e4-462c-a6d2-83b343f8201e" ], + "x-ms-correlation-request-id": [ "e34c3125-7617-4de2-aa13-c838b95c28a2" ], + "x-ms-client-request-id": [ "6ea9999c-e9de-4074-8d1e-ff7bfe3bec5a_RP" ], + "x-ms-messaging-activity-id": [ "0c674e70-87eb-4e31-a304-8e5eea2df0eb" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G8|2024-04-29T13:35:58" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "e34c3125-7617-4de2-aa13-c838b95c28a2" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T133558Z:e34c3125-7617-4de2-aa13-c838b95c28a2" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: E7C16CDF12984E9CA210577FEF05D10F Ref B: SEL221051503037 Ref C: 2023-09-18T09:18:06Z" ], - "Date": [ "Mon, 18 Sep 2023 09:18:07 GMT" ] + "X-MSEdge-Ref": [ "Ref A: A3D5DF8838F140D0AD6224300A788C73 Ref B: SEL221051504023 Ref C: 2024-04-29T13:35:56Z" ], + "Date": [ "Mon, 29 Apr 2024 13:35:57 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "811" ], + "Content-Length": [ "842" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9\",\"name\":\"namespaceV3dp4io9\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":true,\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":25,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3dp4io9\",\"createdAt\":\"2023-09-18T08:02:35.31Z\",\"updatedAt\":\"2023-09-18T09:17:35.983Z\",\"serviceBusEndpoint\":\"https://namespaceV3dp4io9.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz\",\"name\":\"namespaceV35flrpz\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev35flrpz\",\"serviceBusEndpoint\":\"https://namespaceV35flrpz.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":25,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:56:46.3971474Z\",\"updatedAt\":\"2024-04-29T13:35:44.2400853Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12}}", "isContentBase64": false } }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview+22": { + "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview+22": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "438" ], - "x-ms-client-request-id": [ "f89e7381-6882-4f94-97a4-eaf4fee3edf2" ], + "x-ms-unique-id": [ "333" ], + "x-ms-client-request-id": [ "990861e7-ea5c-4004-a46a-8cd1e8729290" ], "CommandName": [ "Get-AzEventHubNamespace" ], "FullCommandName": [ "Get-AzEventHubNamespace_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -2967,37 +963,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "2e8a0de2-8508-4b42-954f-37e16546c11d_M6CH3_M6CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], - "x-ms-correlation-request-id": [ "ad0f9e4d-934c-4836-96e3-08da253e369e" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T091808Z:ad0f9e4d-934c-4836-96e3-08da253e369e" ], + "x-ms-correlation-request-id": [ "35c68d98-b32a-4d82-84c6-7749272dcbbf" ], + "x-ms-client-request-id": [ "990861e7-ea5c-4004-a46a-8cd1e8729290_RP" ], + "x-ms-messaging-activity-id": [ "bcc32b5c-8869-41fe-9564-34b0efbf0e1d" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G2|2024-04-29T13:36:00" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "35c68d98-b32a-4d82-84c6-7749272dcbbf" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240429T133600Z:35c68d98-b32a-4d82-84c6-7749272dcbbf" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 654829AED66A4B4AAA0B141B99588E20 Ref B: SEL221051503037 Ref C: 2023-09-18T09:18:08Z" ], - "Date": [ "Mon, 18 Sep 2023 09:18:07 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 73483EC6CA764824932A881DE16808E4 Ref B: SEL221051504023 Ref C: 2024-04-29T13:35:58Z" ], + "Date": [ "Mon, 29 Apr 2024 13:35:59 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "811" ], + "Content-Length": [ "842" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9\",\"name\":\"namespaceV3dp4io9\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":true,\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":25,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3dp4io9\",\"createdAt\":\"2023-09-18T08:02:35.31Z\",\"updatedAt\":\"2023-09-18T09:17:35.983Z\",\"serviceBusEndpoint\":\"https://namespaceV3dp4io9.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz\",\"name\":\"namespaceV35flrpz\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"minimumTlsVersion\":\"1.0\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev35flrpz\",\"serviceBusEndpoint\":\"https://namespaceV35flrpz.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":25,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:56:46.3971474Z\",\"updatedAt\":\"2024-04-29T13:35:44.2400853Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12}}", "isContentBase64": false } }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview+23": { + "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview+23": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview", - "Content": "{\n \"location\": \"South Central US\",\n \"tags\": {\n \"k1\": \"v1\",\n \"k2\": \"v2\"\n },\n \"sku\": {\n \"name\": \"Standard\",\n \"tier\": \"Standard\",\n \"capacity\": 12\n },\n \"properties\": {\n \"minimumTlsVersion\": \"1.2\",\n \"isAutoInflateEnabled\": true,\n \"publicNetworkAccess\": \"Disabled\",\n \"maximumThroughputUnits\": 25,\n \"kafkaEnabled\": true,\n \"zoneRedundant\": true,\n \"disableLocalAuth\": true\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview", + "Content": "{\n \"location\": \"eastus\",\n \"tags\": {\n \"k2\": \"v2\",\n \"k1\": \"v1\"\n },\n \"sku\": {\n \"name\": \"Standard\",\n \"tier\": \"Standard\",\n \"capacity\": 12\n },\n \"properties\": {\n \"minimumTlsVersion\": \"1.2\",\n \"isAutoInflateEnabled\": true,\n \"publicNetworkAccess\": \"Disabled\",\n \"maximumThroughputUnits\": 25,\n \"kafkaEnabled\": true,\n \"zoneRedundant\": true,\n \"privateEndpointConnections\": [ ],\n \"disableLocalAuth\": true\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "411" ] + "Content-Length": [ "440" ] } }, "Response": { @@ -3005,40 +1004,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "96c53c1d-b0e7-4468-9687-2d82fef5cb39_M2DM2_M2DM2" ], - "Server-SB": [ "Service-Bus-Resource-Provider/DM2" ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ "48" ], - "x-ms-correlation-request-id": [ "610b045b-a0c6-4f6c-98a1-d51fc74cb98e" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T091816Z:610b045b-a0c6-4f6c-98a1-d51fc74cb98e" ], + "x-ms-correlation-request-id": [ "7b043f84-a342-454f-adf9-cbd45f7c12d7" ], + "x-ms-client-request-id": [ "0feb6b6a-12b2-41fd-877b-2b99364bb8e2_RP" ], + "x-ms-messaging-activity-id": [ "8e16789e-790b-4218-a8a1-2d55e6201a30" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G9|2024-04-29T13:36:02" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "49" ], + "x-ms-request-id": [ "7b043f84-a342-454f-adf9-cbd45f7c12d7" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T133603Z:7b043f84-a342-454f-adf9-cbd45f7c12d7" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: CDB591795CCE486AA945E7965BFB0E87 Ref B: SEL221051503037 Ref C: 2023-09-18T09:18:09Z" ], - "Date": [ "Mon, 18 Sep 2023 09:18:15 GMT" ] + "X-MSEdge-Ref": [ "Ref A: A5B7D0CED3EF40C3846EFC76410E0553 Ref B: SEL221051504023 Ref C: 2024-04-29T13:36:00Z" ], + "Date": [ "Mon, 29 Apr 2024 13:36:02 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "814" ], + "Content-Length": [ "810" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9\",\"name\":\"namespaceV3dp4io9\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":true,\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":25,\"kafkaEnabled\":true,\"provisioningState\":\"Updating\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3dp4io9\",\"createdAt\":\"2023-09-18T08:02:35.31Z\",\"updatedAt\":\"2023-09-18T09:18:16.103Z\",\"serviceBusEndpoint\":\"https://namespaceV3dp4io9.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz\",\"name\":\"namespaceV35flrpz\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev35flrpz\",\"serviceBusEndpoint\":\"https://namespaceV35flrpz.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":25,\"kafkaEnabled\":true,\"provisioningState\":\"Updating\",\"status\":\"Updating\",\"createdAt\":\"2024-04-29T12:56:46.3971474Z\",\"updatedAt\":\"2024-04-29T13:36:02.854236Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12}}", "isContentBase64": false } }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview+24": { + "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview+24": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "440" ], - "x-ms-client-request-id": [ "05c31369-99b1-4d84-bf3e-f0b6446f0072" ], + "x-ms-unique-id": [ "335" ], + "x-ms-client-request-id": [ "0feb6b6a-12b2-41fd-877b-2b99364bb8e2" ], "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateViaIdentity" ], "FullCommandName": [ "New-AzEventHubNamespace_CreateViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ] }, "ContentHeaders": { } @@ -3048,40 +1050,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "01e43b4a-f9ff-4cc1-885e-cd58ba48102b_M5CH3_M5CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11991" ], - "x-ms-correlation-request-id": [ "eb1353da-95fa-4269-b61c-303e627427c6" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T091848Z:eb1353da-95fa-4269-b61c-303e627427c6" ], + "x-ms-correlation-request-id": [ "27ce1a2c-b64a-4ad1-a14e-35d47581ad1d" ], + "x-ms-client-request-id": [ "0feb6b6a-12b2-41fd-877b-2b99364bb8e2_RP" ], + "x-ms-messaging-activity-id": [ "fbaedb14-8cd8-4077-8150-855928ffaeb2" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G7|2024-04-29T13:36:34" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "27ce1a2c-b64a-4ad1-a14e-35d47581ad1d" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T133634Z:27ce1a2c-b64a-4ad1-a14e-35d47581ad1d" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 91727EEE2B434FAEB4431E084DEE540F Ref B: SEL221051503037 Ref C: 2023-09-18T09:18:46Z" ], - "Date": [ "Mon, 18 Sep 2023 09:18:48 GMT" ] + "X-MSEdge-Ref": [ "Ref A: C02869D125C34677ABDB60019743ECD3 Ref B: SEL221051504023 Ref C: 2024-04-29T13:36:33Z" ], + "Date": [ "Mon, 29 Apr 2024 13:36:33 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "811" ], + "Content-Length": [ "842" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9\",\"name\":\"namespaceV3dp4io9\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":true,\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":25,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3dp4io9\",\"createdAt\":\"2023-09-18T08:02:35.31Z\",\"updatedAt\":\"2023-09-18T09:18:18.063Z\",\"serviceBusEndpoint\":\"https://namespaceV3dp4io9.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz\",\"name\":\"namespaceV35flrpz\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev35flrpz\",\"serviceBusEndpoint\":\"https://namespaceV35flrpz.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":25,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:56:46.3971474Z\",\"updatedAt\":\"2024-04-29T13:36:18.2469737Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12}}", "isContentBase64": false } }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview+25": { + "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview+25": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "441" ], - "x-ms-client-request-id": [ "05c31369-99b1-4d84-bf3e-f0b6446f0072" ], + "x-ms-unique-id": [ "336" ], + "x-ms-client-request-id": [ "0feb6b6a-12b2-41fd-877b-2b99364bb8e2" ], "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateViaIdentity" ], "FullCommandName": [ "New-AzEventHubNamespace_CreateViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ] }, "ContentHeaders": { } @@ -3091,39 +1096,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "9fb9594a-0b61-417a-a112-2466fe444bc0_M4SN1_M4SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-correlation-request-id": [ "ed92edd7-4a48-4e02-bc14-6558ef1a0f6c" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T091850Z:ed92edd7-4a48-4e02-bc14-6558ef1a0f6c" ], + "x-ms-correlation-request-id": [ "438c8cab-4bcc-4c88-841d-2ce04eb89a70" ], + "x-ms-client-request-id": [ "0feb6b6a-12b2-41fd-877b-2b99364bb8e2_RP" ], + "x-ms-messaging-activity-id": [ "b4fb9caa-db49-400c-9e74-d342342f81ff" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G7|2024-04-29T13:36:36" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "438c8cab-4bcc-4c88-841d-2ce04eb89a70" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T133636Z:438c8cab-4bcc-4c88-841d-2ce04eb89a70" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 33E447A23A8643C799F65AEFA87DF5E0 Ref B: SEL221051503037 Ref C: 2023-09-18T09:18:48Z" ], - "Date": [ "Mon, 18 Sep 2023 09:18:50 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 5F8E0E697BB249D9AAF6359928E70D99 Ref B: SEL221051504023 Ref C: 2024-04-29T13:36:34Z" ], + "Date": [ "Mon, 29 Apr 2024 13:36:35 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "811" ], + "Content-Length": [ "842" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9\",\"name\":\"namespaceV3dp4io9\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":true,\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":25,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3dp4io9\",\"createdAt\":\"2023-09-18T08:02:35.31Z\",\"updatedAt\":\"2023-09-18T09:18:18.063Z\",\"serviceBusEndpoint\":\"https://namespaceV3dp4io9.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz\",\"name\":\"namespaceV35flrpz\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev35flrpz\",\"serviceBusEndpoint\":\"https://namespaceV35flrpz.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":25,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:56:46.3971474Z\",\"updatedAt\":\"2024-04-29T13:36:18.2469737Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12}}", "isContentBase64": false } }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview+26": { + "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview+26": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "442" ], - "x-ms-client-request-id": [ "9bd17fa4-c6a3-4dd2-8d27-a9169a37c428" ], + "x-ms-unique-id": [ "337" ], + "x-ms-client-request-id": [ "84f5e03a-2d74-4e90-a2cb-c35f9b234e94" ], "CommandName": [ "Get-AzEventHubNamespace" ], "FullCommandName": [ "Get-AzEventHubNamespace_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -3134,37 +1142,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "560d4be3-1118-41b5-a4dc-fe11698017e1_M3CH3_M3CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], - "x-ms-correlation-request-id": [ "ee7c6233-f451-417a-85ea-135317eeacfe" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T091851Z:ee7c6233-f451-417a-85ea-135317eeacfe" ], + "x-ms-correlation-request-id": [ "bdb4c9d0-857f-42f8-a0bd-c485bb0f1554" ], + "x-ms-client-request-id": [ "84f5e03a-2d74-4e90-a2cb-c35f9b234e94_RP" ], + "x-ms-messaging-activity-id": [ "1bc95749-d6c6-41d0-8a40-f5f11a9f242c" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G7|2024-04-29T13:36:36" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "bdb4c9d0-857f-42f8-a0bd-c485bb0f1554" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T133636Z:bdb4c9d0-857f-42f8-a0bd-c485bb0f1554" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: BF86E4188D6A4B3DA87EFAE3F6D965F9 Ref B: SEL221051503037 Ref C: 2023-09-18T09:18:50Z" ], - "Date": [ "Mon, 18 Sep 2023 09:18:51 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 763D0D6A69614C799839336938CDD55A Ref B: SEL221051504023 Ref C: 2024-04-29T13:36:36Z" ], + "Date": [ "Mon, 29 Apr 2024 13:36:36 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "811" ], + "Content-Length": [ "842" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9\",\"name\":\"namespaceV3dp4io9\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":true,\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":25,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3dp4io9\",\"createdAt\":\"2023-09-18T08:02:35.31Z\",\"updatedAt\":\"2023-09-18T09:18:18.063Z\",\"serviceBusEndpoint\":\"https://namespaceV3dp4io9.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz\",\"name\":\"namespaceV35flrpz\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev35flrpz\",\"serviceBusEndpoint\":\"https://namespaceV35flrpz.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":25,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:56:46.3971474Z\",\"updatedAt\":\"2024-04-29T13:36:18.2469737Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12}}", "isContentBase64": false } }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview+27": { + "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview+27": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview", - "Content": "{\n \"location\": \"South Central US\",\n \"tags\": {\n \"k1\": \"v1\",\n \"k2\": \"v2\"\n },\n \"sku\": {\n \"name\": \"Standard\",\n \"tier\": \"Standard\",\n \"capacity\": 12\n },\n \"properties\": {\n \"minimumTlsVersion\": \"1.2\",\n \"isAutoInflateEnabled\": true,\n \"publicNetworkAccess\": \"Disabled\",\n \"maximumThroughputUnits\": 25,\n \"kafkaEnabled\": true,\n \"zoneRedundant\": true,\n \"disableLocalAuth\": false\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview", + "Content": "{\n \"location\": \"eastus\",\n \"tags\": {\n \"k2\": \"v2\",\n \"k1\": \"v1\"\n },\n \"sku\": {\n \"name\": \"Standard\",\n \"tier\": \"Standard\",\n \"capacity\": 12\n },\n \"properties\": {\n \"minimumTlsVersion\": \"1.2\",\n \"isAutoInflateEnabled\": true,\n \"publicNetworkAccess\": \"Disabled\",\n \"maximumThroughputUnits\": 25,\n \"kafkaEnabled\": true,\n \"zoneRedundant\": true,\n \"privateEndpointConnections\": [ ],\n \"disableLocalAuth\": false\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "412" ] + "Content-Length": [ "441" ] } }, "Response": { @@ -3172,40 +1183,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "14be05bb-9fa0-438e-b293-5ec21a01214b_M4SN1_M4SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ "49" ], - "x-ms-correlation-request-id": [ "a6c53f35-56cc-4836-aab4-3172d897d3ca" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T091900Z:a6c53f35-56cc-4836-aab4-3172d897d3ca" ], + "x-ms-correlation-request-id": [ "aca2fd5b-ab26-4270-bf67-26a8b242d80b" ], + "x-ms-client-request-id": [ "9f685d6c-5775-4ff6-b4e0-dc9547a82b92_RP" ], + "x-ms-messaging-activity-id": [ "3cd5fd93-e6a8-4088-841b-873c74d87e94" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G3|2024-04-29T13:36:39" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "48" ], + "x-ms-request-id": [ "aca2fd5b-ab26-4270-bf67-26a8b242d80b" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T133639Z:aca2fd5b-ab26-4270-bf67-26a8b242d80b" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 5E31A26CBDB34C2A9BA90BE05F6221AC Ref B: SEL221051503037 Ref C: 2023-09-18T09:18:51Z" ], - "Date": [ "Mon, 18 Sep 2023 09:19:00 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 1E3746F147EB4FE9BB8D995C2B9CDEC5 Ref B: SEL221051504023 Ref C: 2024-04-29T13:36:36Z" ], + "Date": [ "Mon, 29 Apr 2024 13:36:38 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "815" ], + "Content-Length": [ "812" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9\",\"name\":\"namespaceV3dp4io9\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":25,\"kafkaEnabled\":true,\"provisioningState\":\"Updating\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3dp4io9\",\"createdAt\":\"2023-09-18T08:02:35.31Z\",\"updatedAt\":\"2023-09-18T09:18:59.433Z\",\"serviceBusEndpoint\":\"https://namespaceV3dp4io9.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz\",\"name\":\"namespaceV35flrpz\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev35flrpz\",\"serviceBusEndpoint\":\"https://namespaceV35flrpz.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":25,\"kafkaEnabled\":true,\"provisioningState\":\"Updating\",\"status\":\"Updating\",\"createdAt\":\"2024-04-29T12:56:46.3971474Z\",\"updatedAt\":\"2024-04-29T13:36:39.2500954Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12}}", "isContentBase64": false } }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview+28": { + "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview+28": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "444" ], - "x-ms-client-request-id": [ "97fc9115-3b13-4408-adbe-28100221518c" ], + "x-ms-unique-id": [ "339" ], + "x-ms-client-request-id": [ "9f685d6c-5775-4ff6-b4e0-dc9547a82b92" ], "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateViaIdentity" ], "FullCommandName": [ "New-AzEventHubNamespace_CreateViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ] }, "ContentHeaders": { } @@ -3215,40 +1229,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "b34844a6-dc6c-4605-aa14-2fc4222bc603_M7SN1_M7SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-correlation-request-id": [ "26fdf900-60b3-46cb-bf52-52314220f6be" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T091931Z:26fdf900-60b3-46cb-bf52-52314220f6be" ], + "x-ms-correlation-request-id": [ "b7408cee-d2e4-483a-849b-514cc30efdbd" ], + "x-ms-client-request-id": [ "9f685d6c-5775-4ff6-b4e0-dc9547a82b92_RP" ], + "x-ms-messaging-activity-id": [ "1ced46a8-944b-4f28-84ec-b83d3eda66e0" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G3|2024-04-29T13:37:11" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "b7408cee-d2e4-483a-849b-514cc30efdbd" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T133711Z:b7408cee-d2e4-483a-849b-514cc30efdbd" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: ED686FFCC3E74E3AA62D3E0C9D4355B2 Ref B: SEL221051503037 Ref C: 2023-09-18T09:19:30Z" ], - "Date": [ "Mon, 18 Sep 2023 09:19:31 GMT" ] + "X-MSEdge-Ref": [ "Ref A: D6AE73D2621142D2BC1BB84ABA80279E Ref B: SEL221051504023 Ref C: 2024-04-29T13:37:09Z" ], + "Date": [ "Mon, 29 Apr 2024 13:37:10 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "812" ], + "Content-Length": [ "843" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9\",\"name\":\"namespaceV3dp4io9\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":25,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3dp4io9\",\"createdAt\":\"2023-09-18T08:02:35.31Z\",\"updatedAt\":\"2023-09-18T09:19:04.007Z\",\"serviceBusEndpoint\":\"https://namespaceV3dp4io9.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz\",\"name\":\"namespaceV35flrpz\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":false,\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev35flrpz\",\"serviceBusEndpoint\":\"https://namespaceV35flrpz.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":25,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:56:46.3971474Z\",\"updatedAt\":\"2024-04-29T13:36:57.5793506Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12}}", "isContentBase64": false } }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview+29": { + "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview+29": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "445" ], - "x-ms-client-request-id": [ "97fc9115-3b13-4408-adbe-28100221518c" ], + "x-ms-unique-id": [ "340" ], + "x-ms-client-request-id": [ "9f685d6c-5775-4ff6-b4e0-dc9547a82b92" ], "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateViaIdentity" ], "FullCommandName": [ "New-AzEventHubNamespace_CreateViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ] }, "ContentHeaders": { } @@ -3258,39 +1275,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "28bd921d-fb23-4aa2-ae29-3f7821d12989_M5CH3_M5CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-correlation-request-id": [ "9b00c466-1b8d-49d8-aa7e-e97a7ed93735" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T091932Z:9b00c466-1b8d-49d8-aa7e-e97a7ed93735" ], + "x-ms-correlation-request-id": [ "1c6aed1e-744a-4e54-b888-812f2a80e901" ], + "x-ms-client-request-id": [ "9f685d6c-5775-4ff6-b4e0-dc9547a82b92_RP" ], + "x-ms-messaging-activity-id": [ "ff11afbd-34f1-444e-a876-f61e41fccbcb" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G12|2024-04-29T13:37:12" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "1c6aed1e-744a-4e54-b888-812f2a80e901" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T133712Z:1c6aed1e-744a-4e54-b888-812f2a80e901" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 9C4D16EE977D4D51BA655EDED1C2C3D9 Ref B: SEL221051503037 Ref C: 2023-09-18T09:19:31Z" ], - "Date": [ "Mon, 18 Sep 2023 09:19:32 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 814C500E7F9541659F1100B1276E930A Ref B: SEL221051504023 Ref C: 2024-04-29T13:37:11Z" ], + "Date": [ "Mon, 29 Apr 2024 13:37:11 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "812" ], + "Content-Length": [ "843" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9\",\"name\":\"namespaceV3dp4io9\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":25,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3dp4io9\",\"createdAt\":\"2023-09-18T08:02:35.31Z\",\"updatedAt\":\"2023-09-18T09:19:04.007Z\",\"serviceBusEndpoint\":\"https://namespaceV3dp4io9.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz\",\"name\":\"namespaceV35flrpz\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":false,\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev35flrpz\",\"serviceBusEndpoint\":\"https://namespaceV35flrpz.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":25,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:56:46.3971474Z\",\"updatedAt\":\"2024-04-29T13:36:57.5793506Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12}}", "isContentBase64": false } }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview+30": { + "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview+30": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "446" ], - "x-ms-client-request-id": [ "15b1cdae-5464-400c-b16f-c6f44256112c" ], + "x-ms-unique-id": [ "341" ], + "x-ms-client-request-id": [ "d22d8f59-90c8-4e2b-9370-09275ce4dc7b" ], "CommandName": [ "Get-AzEventHubNamespace" ], "FullCommandName": [ "Get-AzEventHubNamespace_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -3301,37 +1321,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "3eb7300f-8945-4fe6-8048-ca9b313cb833_M8SN1_M8SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], - "x-ms-correlation-request-id": [ "1f6ae13b-7755-403c-9123-97cd6ad92d3f" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T091935Z:1f6ae13b-7755-403c-9123-97cd6ad92d3f" ], + "x-ms-correlation-request-id": [ "1a3b01fa-1831-455c-8de9-3c91b8954f54" ], + "x-ms-client-request-id": [ "d22d8f59-90c8-4e2b-9370-09275ce4dc7b_RP" ], + "x-ms-messaging-activity-id": [ "d7284a9f-9ac3-4f16-8138-4006e74f772e" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-29T13:37:14" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "1a3b01fa-1831-455c-8de9-3c91b8954f54" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T133714Z:1a3b01fa-1831-455c-8de9-3c91b8954f54" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 79FBB96B5EC84EFCB4A59F6D0475C57C Ref B: SEL221051503037 Ref C: 2023-09-18T09:19:33Z" ], - "Date": [ "Mon, 18 Sep 2023 09:19:35 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 6DE85ED578BF4573B14D2E43E3931C9C Ref B: SEL221051504023 Ref C: 2024-04-29T13:37:12Z" ], + "Date": [ "Mon, 29 Apr 2024 13:37:14 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "812" ], + "Content-Length": [ "843" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9\",\"name\":\"namespaceV3dp4io9\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":false,\"zoneRedundant\":true,\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":25,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3dp4io9\",\"createdAt\":\"2023-09-18T08:02:35.31Z\",\"updatedAt\":\"2023-09-18T09:19:04.007Z\",\"serviceBusEndpoint\":\"https://namespaceV3dp4io9.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz\",\"name\":\"namespaceV35flrpz\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":false,\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev35flrpz\",\"serviceBusEndpoint\":\"https://namespaceV35flrpz.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":25,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:56:46.3971474Z\",\"updatedAt\":\"2024-04-29T13:36:57.5793506Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12}}", "isContentBase64": false } }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview+31": { + "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview+31": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview", - "Content": "{\n \"location\": \"South Central US\",\n \"tags\": {\n \"k1\": \"v1\",\n \"k2\": \"v2\"\n },\n \"sku\": {\n \"name\": \"Standard\",\n \"tier\": \"Standard\",\n \"capacity\": 12\n },\n \"properties\": {\n \"minimumTlsVersion\": \"1.2\",\n \"isAutoInflateEnabled\": true,\n \"publicNetworkAccess\": \"Disabled\",\n \"maximumThroughputUnits\": 25,\n \"kafkaEnabled\": true,\n \"zoneRedundant\": true,\n \"disableLocalAuth\": true\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview", + "Content": "{\n \"location\": \"eastus\",\n \"tags\": {\n \"k2\": \"v2\",\n \"k1\": \"v1\"\n },\n \"sku\": {\n \"name\": \"Standard\",\n \"tier\": \"Standard\",\n \"capacity\": 12\n },\n \"properties\": {\n \"minimumTlsVersion\": \"1.2\",\n \"isAutoInflateEnabled\": true,\n \"publicNetworkAccess\": \"Disabled\",\n \"maximumThroughputUnits\": 25,\n \"kafkaEnabled\": true,\n \"zoneRedundant\": true,\n \"privateEndpointConnections\": [ ],\n \"disableLocalAuth\": true\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "411" ] + "Content-Length": [ "440" ] } }, "Response": { @@ -3339,40 +1362,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "eabaf298-7bd4-415d-9812-608247459366_M2CH3_M2CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ "49" ], - "x-ms-correlation-request-id": [ "930a3540-8a81-4908-acf0-59b3967b1a63" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T091946Z:930a3540-8a81-4908-acf0-59b3967b1a63" ], + "x-ms-correlation-request-id": [ "2809fddc-4b81-4ae9-b232-484345d4850d" ], + "x-ms-client-request-id": [ "fb830ff4-b319-4079-893f-0f2b93be2d1a_RP" ], + "x-ms-messaging-activity-id": [ "143128c5-7f56-42d9-8f23-29a144917bae" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G12|2024-04-29T13:37:17" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "49" ], + "x-ms-request-id": [ "2809fddc-4b81-4ae9-b232-484345d4850d" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T133717Z:2809fddc-4b81-4ae9-b232-484345d4850d" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 37F5E1C3E2D64479853654A540851DE9 Ref B: SEL221051503037 Ref C: 2023-09-18T09:19:35Z" ], - "Date": [ "Mon, 18 Sep 2023 09:19:46 GMT" ] + "X-MSEdge-Ref": [ "Ref A: A7E1CF07C55642AEB26BB433EB1AED04 Ref B: SEL221051504023 Ref C: 2024-04-29T13:37:14Z" ], + "Date": [ "Mon, 29 Apr 2024 13:37:17 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "813" ], + "Content-Length": [ "811" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9\",\"name\":\"namespaceV3dp4io9\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":true,\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":25,\"kafkaEnabled\":true,\"provisioningState\":\"Updating\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3dp4io9\",\"createdAt\":\"2023-09-18T08:02:35.31Z\",\"updatedAt\":\"2023-09-18T09:19:43.32Z\",\"serviceBusEndpoint\":\"https://namespaceV3dp4io9.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz\",\"name\":\"namespaceV35flrpz\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev35flrpz\",\"serviceBusEndpoint\":\"https://namespaceV35flrpz.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":25,\"kafkaEnabled\":true,\"provisioningState\":\"Updating\",\"status\":\"Updating\",\"createdAt\":\"2024-04-29T12:56:46.3971474Z\",\"updatedAt\":\"2024-04-29T13:37:17.2405745Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12}}", "isContentBase64": false } }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview+32": { + "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview+32": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "448" ], - "x-ms-client-request-id": [ "03ff74e0-7c61-442f-a1bc-1b66d51fa972" ], + "x-ms-unique-id": [ "343" ], + "x-ms-client-request-id": [ "fb830ff4-b319-4079-893f-0f2b93be2d1a" ], "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateViaIdentity" ], "FullCommandName": [ "New-AzEventHubNamespace_CreateViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ] }, "ContentHeaders": { } @@ -3382,40 +1408,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "25677df3-200b-4c53-bbbd-99563d38cee5_M0CH3_M0CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], - "x-ms-correlation-request-id": [ "279c5e86-f0a7-45ae-a0de-3962eb0ea770" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T092018Z:279c5e86-f0a7-45ae-a0de-3962eb0ea770" ], + "x-ms-correlation-request-id": [ "97cea1eb-321f-478a-abd9-ff955c973743" ], + "x-ms-client-request-id": [ "fb830ff4-b319-4079-893f-0f2b93be2d1a_RP" ], + "x-ms-messaging-activity-id": [ "ffcaee0a-5d24-494f-a42f-cbbb4ffa7e35" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G6|2024-04-29T13:37:49" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "97cea1eb-321f-478a-abd9-ff955c973743" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T133749Z:97cea1eb-321f-478a-abd9-ff955c973743" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 15CDF068F54848859B22990B0B08AAC0 Ref B: SEL221051503037 Ref C: 2023-09-18T09:20:16Z" ], - "Date": [ "Mon, 18 Sep 2023 09:20:17 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 9F51BBB1D6F940FCB0109A3593464189 Ref B: SEL221051504023 Ref C: 2024-04-29T13:37:47Z" ], + "Date": [ "Mon, 29 Apr 2024 13:37:49 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "811" ], + "Content-Length": [ "842" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9\",\"name\":\"namespaceV3dp4io9\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":true,\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":25,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3dp4io9\",\"createdAt\":\"2023-09-18T08:02:35.31Z\",\"updatedAt\":\"2023-09-18T09:19:47.737Z\",\"serviceBusEndpoint\":\"https://namespaceV3dp4io9.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz\",\"name\":\"namespaceV35flrpz\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev35flrpz\",\"serviceBusEndpoint\":\"https://namespaceV35flrpz.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":25,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:56:46.3971474Z\",\"updatedAt\":\"2024-04-29T13:37:38.4910772Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12}}", "isContentBase64": false } }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview+33": { + "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview+33": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "449" ], - "x-ms-client-request-id": [ "03ff74e0-7c61-442f-a1bc-1b66d51fa972" ], + "x-ms-unique-id": [ "344" ], + "x-ms-client-request-id": [ "fb830ff4-b319-4079-893f-0f2b93be2d1a" ], "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateViaIdentity" ], "FullCommandName": [ "New-AzEventHubNamespace_CreateViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ] }, "ContentHeaders": { } @@ -3425,39 +1454,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "b5ed3963-f8a6-4bc1-b562-8ff2ecff8f85_M7CH3_M7CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11991" ], - "x-ms-correlation-request-id": [ "c9ae96f6-8bda-4b58-bdd3-301ae93b38dd" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T092019Z:c9ae96f6-8bda-4b58-bdd3-301ae93b38dd" ], + "x-ms-correlation-request-id": [ "b4776d0e-81eb-43fc-841a-46e7f3449339" ], + "x-ms-client-request-id": [ "fb830ff4-b319-4079-893f-0f2b93be2d1a_RP" ], + "x-ms-messaging-activity-id": [ "cac86ead-af72-49ae-8266-4628ec5634ea" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G2|2024-04-29T13:37:50" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "b4776d0e-81eb-43fc-841a-46e7f3449339" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T133750Z:b4776d0e-81eb-43fc-841a-46e7f3449339" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: F33EEE403F3044CC9B6BE2693D92CBE5 Ref B: SEL221051503037 Ref C: 2023-09-18T09:20:18Z" ], - "Date": [ "Mon, 18 Sep 2023 09:20:18 GMT" ] + "X-MSEdge-Ref": [ "Ref A: DE0848D6F7844F55AC17C4F184746BF0 Ref B: SEL221051504023 Ref C: 2024-04-29T13:37:49Z" ], + "Date": [ "Mon, 29 Apr 2024 13:37:50 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "811" ], + "Content-Length": [ "842" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9\",\"name\":\"namespaceV3dp4io9\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":true,\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":25,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3dp4io9\",\"createdAt\":\"2023-09-18T08:02:35.31Z\",\"updatedAt\":\"2023-09-18T09:19:47.737Z\",\"serviceBusEndpoint\":\"https://namespaceV3dp4io9.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz\",\"name\":\"namespaceV35flrpz\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev35flrpz\",\"serviceBusEndpoint\":\"https://namespaceV35flrpz.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":25,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:56:46.3971474Z\",\"updatedAt\":\"2024-04-29T13:37:38.4910772Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12}}", "isContentBase64": false } }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview+34": { + "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview+34": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "450" ], - "x-ms-client-request-id": [ "4df34e22-b27e-4056-8abc-4c9da7bc60c9" ], + "x-ms-unique-id": [ "345" ], + "x-ms-client-request-id": [ "2dc8a597-3d7d-44a4-83b3-b0fb66857ea1" ], "CommandName": [ "Get-AzEventHubNamespace" ], "FullCommandName": [ "Get-AzEventHubNamespace_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -3468,37 +1500,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "864a69bc-0f28-4a77-8480-7f002c937093_M9CH3_M9CH3" ], - "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], - "x-ms-correlation-request-id": [ "d26cfe28-84f3-4cf6-9bef-7d1da4c1222f" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T092020Z:d26cfe28-84f3-4cf6-9bef-7d1da4c1222f" ], + "x-ms-correlation-request-id": [ "c29f1d82-1285-410d-9651-2aecb5ee1d20" ], + "x-ms-client-request-id": [ "2dc8a597-3d7d-44a4-83b3-b0fb66857ea1_RP" ], + "x-ms-messaging-activity-id": [ "7ca39931-88f9-42a6-9a02-d90f9775a484" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-29T13:37:52" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "c29f1d82-1285-410d-9651-2aecb5ee1d20" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T133752Z:c29f1d82-1285-410d-9651-2aecb5ee1d20" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: D614180F2E6C4C30AF0CE102C6048EAD Ref B: SEL221051503037 Ref C: 2023-09-18T09:20:19Z" ], - "Date": [ "Mon, 18 Sep 2023 09:20:20 GMT" ] + "X-MSEdge-Ref": [ "Ref A: B4B87600012A4F22A3336D491E7D619B Ref B: SEL221051504023 Ref C: 2024-04-29T13:37:51Z" ], + "Date": [ "Mon, 29 Apr 2024 13:37:52 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "811" ], + "Content-Length": [ "842" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9\",\"name\":\"namespaceV3dp4io9\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":true,\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":25,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3dp4io9\",\"createdAt\":\"2023-09-18T08:02:35.31Z\",\"updatedAt\":\"2023-09-18T09:19:47.737Z\",\"serviceBusEndpoint\":\"https://namespaceV3dp4io9.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz\",\"name\":\"namespaceV35flrpz\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev35flrpz\",\"serviceBusEndpoint\":\"https://namespaceV35flrpz.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":25,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:56:46.3971474Z\",\"updatedAt\":\"2024-04-29T13:37:38.4910772Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12}}", "isContentBase64": false } }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview+35": { + "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview+35": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview", - "Content": "{\n \"location\": \"South Central US\",\n \"tags\": {\n \"k1\": \"v1\",\n \"k2\": \"v2\"\n },\n \"sku\": {\n \"name\": \"Standard\",\n \"tier\": \"Standard\",\n \"capacity\": 12\n },\n \"properties\": {\n \"minimumTlsVersion\": \"1.2\",\n \"isAutoInflateEnabled\": true,\n \"publicNetworkAccess\": \"Disabled\",\n \"maximumThroughputUnits\": 25,\n \"kafkaEnabled\": true,\n \"zoneRedundant\": true,\n \"disableLocalAuth\": true\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview", + "Content": "{\n \"location\": \"eastus\",\n \"tags\": {\n \"k2\": \"v2\",\n \"k1\": \"v1\"\n },\n \"sku\": {\n \"name\": \"Standard\",\n \"tier\": \"Standard\",\n \"capacity\": 12\n },\n \"properties\": {\n \"minimumTlsVersion\": \"1.2\",\n \"isAutoInflateEnabled\": true,\n \"publicNetworkAccess\": \"Disabled\",\n \"maximumThroughputUnits\": 25,\n \"kafkaEnabled\": true,\n \"zoneRedundant\": true,\n \"privateEndpointConnections\": [ ],\n \"disableLocalAuth\": true\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "411" ] + "Content-Length": [ "440" ] } }, "Response": { @@ -3506,40 +1541,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "ed0232a2-be99-4a9d-ba79-d081db6cb1c6_M7SN1_M7SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ "49" ], - "x-ms-correlation-request-id": [ "e31cc1b8-8860-4e4f-bc26-ea21c6514de0" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T092029Z:e31cc1b8-8860-4e4f-bc26-ea21c6514de0" ], + "x-ms-correlation-request-id": [ "4a589835-8112-44d0-9bef-e3b0dd823203" ], + "x-ms-client-request-id": [ "fba2971d-b7ca-4e60-b602-dc8bc422a6a4_RP" ], + "x-ms-messaging-activity-id": [ "3ed22980-26af-4c1f-9a9b-ce497594b3cf" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G9|2024-04-29T13:37:54" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "49" ], + "x-ms-request-id": [ "4a589835-8112-44d0-9bef-e3b0dd823203" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T133754Z:4a589835-8112-44d0-9bef-e3b0dd823203" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 033D9B7A2D1A4699942FF822DC4F04B9 Ref B: SEL221051503037 Ref C: 2023-09-18T09:20:20Z" ], - "Date": [ "Mon, 18 Sep 2023 09:20:29 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 9E1A841E38FF49B9A0430FFA48143DA5 Ref B: SEL221051504023 Ref C: 2024-04-29T13:37:52Z" ], + "Date": [ "Mon, 29 Apr 2024 13:37:54 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "812" ], + "Content-Length": [ "810" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9\",\"name\":\"namespaceV3dp4io9\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":true,\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":25,\"kafkaEnabled\":true,\"provisioningState\":\"Updating\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3dp4io9\",\"createdAt\":\"2023-09-18T08:02:35.31Z\",\"updatedAt\":\"2023-09-18T09:20:29.2Z\",\"serviceBusEndpoint\":\"https://namespaceV3dp4io9.servicebus.windows.net:443/\",\"status\":\"Activating\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz\",\"name\":\"namespaceV35flrpz\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev35flrpz\",\"serviceBusEndpoint\":\"https://namespaceV35flrpz.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":25,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:56:46.3971474Z\",\"updatedAt\":\"2024-04-29T13:37:38.4910772Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12}}", "isContentBase64": false } }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview+36": { + "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview+36": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "452" ], - "x-ms-client-request-id": [ "2badf0f8-8d5a-4218-8ab6-addaca491b5c" ], + "x-ms-unique-id": [ "347" ], + "x-ms-client-request-id": [ "fba2971d-b7ca-4e60-b602-dc8bc422a6a4" ], "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateViaIdentity" ], "FullCommandName": [ "New-AzEventHubNamespace_CreateViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ] }, "ContentHeaders": { } @@ -3549,40 +1587,43 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "2e80d0b0-bbdd-457a-9a99-4554401032bd_M8SN1_M8SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-correlation-request-id": [ "73e16e19-c9ae-408c-8f6e-5373f18a4407" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T092100Z:73e16e19-c9ae-408c-8f6e-5373f18a4407" ], + "x-ms-correlation-request-id": [ "6dc9e374-f7b6-4f17-8926-3f29a7a3f0ca" ], + "x-ms-client-request-id": [ "fba2971d-b7ca-4e60-b602-dc8bc422a6a4_RP" ], + "x-ms-messaging-activity-id": [ "a04b0f40-2f46-4346-b42a-1f84c96e09a1" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G12|2024-04-29T13:38:26" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-request-id": [ "6dc9e374-f7b6-4f17-8926-3f29a7a3f0ca" ], + "x-ms-routing-request-id": [ "KOREASOUTH:20240429T133826Z:6dc9e374-f7b6-4f17-8926-3f29a7a3f0ca" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 3548017B2B19451E9EDC73DE84D1A45D Ref B: SEL221051503037 Ref C: 2023-09-18T09:20:59Z" ], - "Date": [ "Mon, 18 Sep 2023 09:20:59 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 0D3B68E33B2D4173B4029EE8A9C46787 Ref B: SEL221051504023 Ref C: 2024-04-29T13:38:24Z" ], + "Date": [ "Mon, 29 Apr 2024 13:38:26 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "809" ], + "Content-Length": [ "842" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9\",\"name\":\"namespaceV3dp4io9\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":true,\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":25,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3dp4io9\",\"createdAt\":\"2023-09-18T08:02:35.31Z\",\"updatedAt\":\"2023-09-18T09:20:30.6Z\",\"serviceBusEndpoint\":\"https://namespaceV3dp4io9.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz\",\"name\":\"namespaceV35flrpz\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev35flrpz\",\"serviceBusEndpoint\":\"https://namespaceV35flrpz.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":25,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:56:46.3971474Z\",\"updatedAt\":\"2024-04-29T13:37:38.4910772Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12}}", "isContentBase64": false } }, - "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview+37": { + "Set-AzEventHubNamespaceV2+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview+37": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "453" ], - "x-ms-client-request-id": [ "2badf0f8-8d5a-4218-8ab6-addaca491b5c" ], + "x-ms-unique-id": [ "348" ], + "x-ms-client-request-id": [ "fba2971d-b7ca-4e60-b602-dc8bc422a6a4" ], "CommandName": [ "Az.EventHub.private\\New-AzEventHubNamespace_CreateViaIdentity" ], "FullCommandName": [ "New-AzEventHubNamespace_CreateViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ] }, "ContentHeaders": { } @@ -3592,23 +1633,26 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "fce804f9-3b6d-423c-98e1-95964a6c1e96_M4SN1_M4SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], - "x-ms-correlation-request-id": [ "9f108f24-3e25-4cb8-a821-e35f3390ed5d" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T092100Z:9f108f24-3e25-4cb8-a821-e35f3390ed5d" ], + "x-ms-correlation-request-id": [ "3ac83bf0-0a04-441d-9768-1bf56bd28bfb" ], + "x-ms-client-request-id": [ "fba2971d-b7ca-4e60-b602-dc8bc422a6a4_RP" ], + "x-ms-messaging-activity-id": [ "2778750c-430c-4102-8aba-adb75cafc41d" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G9|2024-04-29T13:38:27" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "3ac83bf0-0a04-441d-9768-1bf56bd28bfb" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T133827Z:3ac83bf0-0a04-441d-9768-1bf56bd28bfb" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 1BB2B22051744500A9892F6E97579123 Ref B: SEL221051503037 Ref C: 2023-09-18T09:21:00Z" ], - "Date": [ "Mon, 18 Sep 2023 09:21:00 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 02E5485368C644BDA2ABDD5245F29717 Ref B: SEL221051504023 Ref C: 2024-04-29T13:38:26Z" ], + "Date": [ "Mon, 29 Apr 2024 13:38:27 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "809" ], + "Content-Length": [ "842" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12},\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceV3dp4io9\",\"name\":\"namespaceV3dp4io9\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"South Central US\",\"tags\":{\"k1\":\"v1\",\"k2\":\"v2\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"zoneRedundant\":true,\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":25,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev3dp4io9\",\"createdAt\":\"2023-09-18T08:02:35.31Z\",\"updatedAt\":\"2023-09-18T09:20:30.6Z\",\"serviceBusEndpoint\":\"https://namespaceV3dp4io9.servicebus.windows.net:443/\",\"status\":\"Active\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceV35flrpz\",\"name\":\"namespaceV35flrpz\",\"type\":\"Microsoft.EventHub/Namespaces\",\"location\":\"eastus\",\"tags\":{\"k2\":\"v2\",\"k1\":\"v1\"},\"properties\":{\"minimumTlsVersion\":\"1.2\",\"publicNetworkAccess\":\"Disabled\",\"disableLocalAuth\":true,\"privateEndpointConnections\":[],\"zoneRedundant\":true,\"metricId\":\"326100e2-f69d-4268-8503-075374f62b6e:namespacev35flrpz\",\"serviceBusEndpoint\":\"https://namespaceV35flrpz.servicebus.windows.net:443/\",\"isAutoInflateEnabled\":true,\"maximumThroughputUnits\":25,\"kafkaEnabled\":true,\"provisioningState\":\"Succeeded\",\"status\":\"Active\",\"createdAt\":\"2024-04-29T12:56:46.3971474Z\",\"updatedAt\":\"2024-04-29T13:37:38.4910772Z\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Standard\",\"capacity\":12}}", "isContentBase64": false } } diff --git a/src/EventHub/EventHub.Autorest/test/Set-AzEventHubNamespaceV2.Tests.ps1 b/src/EventHub/EventHub.Autorest/test/Set-AzEventHubNamespaceV2.Tests.ps1 index 2a5eda992b40..d358b603d0f5 100644 --- a/src/EventHub/EventHub.Autorest/test/Set-AzEventHubNamespaceV2.Tests.ps1 +++ b/src/EventHub/EventHub.Autorest/test/Set-AzEventHubNamespaceV2.Tests.ps1 @@ -15,7 +15,7 @@ if(($null -eq $TestName) -or ($TestName -contains 'Set-AzEventHubNamespaceV2')) } function assertNamespaceUpdates{ - param([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace]$expectedNamespace,[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace]$namespace) + param([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace]$expectedNamespace,[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace]$namespace) $expectedNamespace.SkuName | Should -Be $namespace.SkuName $expectedNamespace.SkuCapacity | Should -Be $namespace.SkuCapacity @@ -55,7 +55,8 @@ function assertNamespaceUpdates{ } Describe 'Set-AzEventHubNamespaceV2' { - It 'SetExpanded' { + # TODO REVERT SKIP BEFORE MERGING TO MAIN + It 'SetExpanded' -Skip { # Add Encryption Config to NamespaceV5 which was created in New-AzEventHubNamespaceV2 $ec1 = New-AzEventHubKeyVaultPropertiesObject -KeyName key3 -KeyVaulturi $env.keyVaulturi -UserAssignedIdentity $env.msi1 $eventhubNamespace = Get-AzEventHubNamespaceV2 -ResourceGroupName $env.resourceGroup -Name $env.namespaceV5 @@ -101,7 +102,7 @@ Describe 'Set-AzEventHubNamespaceV2' { assertNamespaceUpdates $eventHubNamespace $namespace # Create a namespace with UserAssignedIdentity and use Set-Az cmdlet to set IdentityType to None - $eventhubNamespace = New-AzEventHubNamespaceV2 -ResourceGroupName $env.resourceGroup -Name $env.namespaceV6 -SkuName Premium -Location northeurope -IdentityType UserAssigned -UserAssignedIdentityId $env.msi1 + $eventhubNamespace = New-AzEventHubNamespaceV2 -ResourceGroupName $env.resourceGroup -Name $env.namespaceV6 -SkuName Premium -Location $env.location -IdentityType UserAssigned -UserAssignedIdentityId $env.msi1 $eventHubNamespace.UserAssignedIdentity.Count | Should -Be 1 $eventhubNamespace = Set-AzEventHubNamespaceV2 -ResourceGroupName $env.resourceGroup -Name $env.namespaceV6 -IdentityType None -UserAssignedIdentity:$null diff --git a/src/EventHub/EventHub.Autorest/test/Set-AzEventHubNetworkRuleSet.Recording.json b/src/EventHub/EventHub.Autorest/test/Set-AzEventHubNetworkRuleSet.Recording.json index 879014e11c4b..a2a6f2274e6b 100644 --- a/src/EventHub/EventHub.Autorest/test/Set-AzEventHubNetworkRuleSet.Recording.json +++ b/src/EventHub/EventHub.Autorest/test/Set-AzEventHubNetworkRuleSet.Recording.json @@ -1,17 +1,17 @@ { - "Set-AzEventHubNetworkRuleSet+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/networkRuleSets/default?api-version=2023-01-01-preview+1": { + "Set-AzEventHubNetworkRuleSet+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/networkRuleSets/default?api-version=2023-01-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/networkRuleSets/default?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/networkRuleSets/default?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "454" ], - "x-ms-client-request-id": [ "cd3d791a-73c8-4636-b091-8d698fad666a" ], + "x-ms-unique-id": [ "349" ], + "x-ms-client-request-id": [ "135f35be-db05-4ee6-87ff-99027b39ad5e" ], "CommandName": [ "Get-AzEventHubNetworkRuleSet" ], "FullCommandName": [ "Get-AzEventHubNetworkRuleSet_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,36 +22,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], - "x-ms-request-id": [ "c17b8a69-66b7-4bd8-b807-02cb072f1c6b" ], - "x-ms-correlation-request-id": [ "c17b8a69-66b7-4bd8-b807-02cb072f1c6b" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T092113Z:c17b8a69-66b7-4bd8-b807-02cb072f1c6b" ], + "x-ms-correlation-request-id": [ "6baac044-f238-417e-bf1f-ac36ce13790b" ], + "x-ms-client-request-id": [ "135f35be-db05-4ee6-87ff-99027b39ad5e_RP" ], + "x-ms-messaging-activity-id": [ "7a398be8-9300-4e67-978c-992e07c6a7ba" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G14|2024-04-29T13:38:47" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-request-id": [ "6baac044-f238-417e-bf1f-ac36ce13790b" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T133847Z:6baac044-f238-417e-bf1f-ac36ce13790b" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 377811A3C0FD4985AAB7936B872F3E34 Ref B: SEL221051503037 Ref C: 2023-09-18T09:21:11Z" ], - "Date": [ "Mon, 18 Sep 2023 09:21:13 GMT" ] + "X-MSEdge-Ref": [ "Ref A: C2F0EADDB8EE4F8CABDFC7B6189856C2 Ref B: SEL221051504023 Ref C: 2024-04-29T13:38:45Z" ], + "Date": [ "Mon, 29 Apr 2024 13:38:47 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "456" ], + "Content-Length": [ "424" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/networkrulesets/default\",\"name\":\"default\",\"type\":\"Microsoft.EventHub/Namespaces/NetworkRuleSets\",\"location\":\"eastus\",\"properties\":{\"publicNetworkAccess\":\"Enabled\",\"defaultAction\":\"Allow\",\"virtualNetworkRules\":[],\"ipRules\":[],\"trustedServiceAccessEnabled\":false,\"provisioningState\":\"Succeeded\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/networkrulesets/default\",\"name\":\"default\",\"type\":\"Microsoft.EventHub/Namespaces/NetworkRuleSets\",\"location\":\"eastus\",\"properties\":{\"publicNetworkAccess\":\"Enabled\",\"defaultAction\":\"Allow\",\"virtualNetworkRules\":[],\"ipRules\":[],\"trustedServiceAccessEnabled\":false}}", "isContentBase64": false } }, - "Set-AzEventHubNetworkRuleSet+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/networkRuleSets/default?api-version=2023-01-01-preview+2": { + "Set-AzEventHubNetworkRuleSet+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/networkRuleSets/default?api-version=2023-01-01-preview+2": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/networkRuleSets/default?api-version=2023-01-01-preview", - "Content": "{\n \"properties\": {\n \"trustedServiceAccessEnabled\": false,\n \"defaultAction\": \"Allow\",\n \"virtualNetworkRules\": [\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default\"\n }\n },\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default2\"\n }\n },\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default3\"\n }\n }\n ],\n \"ipRules\": [\n {\n \"ipMask\": \"1.1.1.1\",\n \"action\": \"Allow\"\n },\n {\n \"ipMask\": \"2.2.2.2\",\n \"action\": \"Allow\"\n }\n ],\n \"publicNetworkAccess\": \"Enabled\"\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/networkRuleSets/default?api-version=2023-01-01-preview", + "Content": "{\n \"properties\": {\n \"trustedServiceAccessEnabled\": false,\n \"defaultAction\": \"Allow\",\n \"virtualNetworkRules\": [\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Network/virtualNetworks/eh-ps-vgt87w-vnet/subnets/default\"\n }\n },\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Network/virtualNetworks/eh-ps-vgt87w-vnet/subnets/default2\"\n }\n },\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Network/virtualNetworks/eh-ps-vgt87w-vnet/subnets/default3\"\n }\n }\n ],\n \"ipRules\": [\n {\n \"ipMask\": \"1.1.1.1\",\n \"action\": \"Allow\"\n },\n {\n \"ipMask\": \"2.2.2.2\",\n \"action\": \"Allow\"\n }\n ],\n \"publicNetworkAccess\": \"Enabled\"\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "1022" ] + "Content-Length": [ "1052" ] } }, "Response": { @@ -59,38 +63,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-request-id": [ "b6388860-3f01-4b8a-8a5b-1401d9abcd6c" ], - "x-ms-correlation-request-id": [ "b6388860-3f01-4b8a-8a5b-1401d9abcd6c" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T092127Z:b6388860-3f01-4b8a-8a5b-1401d9abcd6c" ], + "x-ms-correlation-request-id": [ "baf6d0f2-6405-4014-9b17-9413397116d5" ], + "x-ms-client-request-id": [ "99dde02b-1df3-4c92-a47c-151cf54b15e1_RP" ], + "x-ms-messaging-activity-id": [ "8e8a2cc2-f721-4ad8-85e5-b4345f4b484a" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G13|2024-04-29T13:39:02" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "baf6d0f2-6405-4014-9b17-9413397116d5" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T133903Z:baf6d0f2-6405-4014-9b17-9413397116d5" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 241B87B7428C41D0B78B8D7DB5F8E7EC Ref B: SEL221051503037 Ref C: 2023-09-18T09:21:13Z" ], - "Date": [ "Mon, 18 Sep 2023 09:21:26 GMT" ] + "X-MSEdge-Ref": [ "Ref A: ED5143679CB04F93A5F0297AC9A0068A Ref B: SEL221051504023 Ref C: 2024-04-29T13:38:47Z" ], + "Date": [ "Mon, 29 Apr 2024 13:39:02 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1204" ], + "Content-Length": [ "1202" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/networkRuleSets/default\",\"name\":\"default\",\"type\":\"Microsoft.EventHub/Namespaces/NetworkRuleSets\",\"location\":\"eastus\",\"properties\":{\"publicNetworkAccess\":\"Enabled\",\"defaultAction\":\"Allow\",\"virtualNetworkRules\":[{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default2\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default3\"},\"ignoreMissingVnetServiceEndpoint\":false}],\"ipRules\":[{\"ipMask\":\"1.1.1.1\",\"action\":\"Allow\"},{\"ipMask\":\"2.2.2.2\",\"action\":\"Allow\"}],\"trustedServiceAccessEnabled\":false,\"provisioningState\":\"Succeeded\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/networkRuleSets/default\",\"name\":\"default\",\"type\":\"Microsoft.EventHub/Namespaces/NetworkRuleSets\",\"location\":\"eastus\",\"properties\":{\"publicNetworkAccess\":\"Enabled\",\"defaultAction\":\"Allow\",\"virtualNetworkRules\":[{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Network/virtualNetworks/eh-ps-vgt87w-vnet/subnets/default\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Network/virtualNetworks/eh-ps-vgt87w-vnet/subnets/default2\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Network/virtualNetworks/eh-ps-vgt87w-vnet/subnets/default3\"},\"ignoreMissingVnetServiceEndpoint\":false}],\"ipRules\":[{\"ipMask\":\"1.1.1.1\",\"action\":\"Allow\"},{\"ipMask\":\"2.2.2.2\",\"action\":\"Allow\"}],\"trustedServiceAccessEnabled\":false}}", "isContentBase64": false } }, - "Set-AzEventHubNetworkRuleSet+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/networkRuleSets/default?api-version=2023-01-01-preview+3": { + "Set-AzEventHubNetworkRuleSet+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/networkRuleSets/default?api-version=2023-01-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/networkRuleSets/default?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/networkRuleSets/default?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "456" ], - "x-ms-client-request-id": [ "8e492169-8526-4fb0-8695-1bc8cb9db4d2" ], + "x-ms-unique-id": [ "351" ], + "x-ms-client-request-id": [ "6bbf8983-3888-4ff8-a0fe-b485dc86197e" ], "CommandName": [ "Get-AzEventHubNetworkRuleSet" ], "FullCommandName": [ "Get-AzEventHubNetworkRuleSet_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -101,36 +109,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], - "x-ms-request-id": [ "60e6f448-eca1-494c-8a93-65cd7fb1e0da" ], - "x-ms-correlation-request-id": [ "60e6f448-eca1-494c-8a93-65cd7fb1e0da" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T092129Z:60e6f448-eca1-494c-8a93-65cd7fb1e0da" ], + "x-ms-correlation-request-id": [ "e186b0c9-0207-446c-9750-a1f2c12fe0a7" ], + "x-ms-client-request-id": [ "6bbf8983-3888-4ff8-a0fe-b485dc86197e_RP" ], + "x-ms-messaging-activity-id": [ "976fe840-1792-425a-b0fd-2708e1ec6d09" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G8|2024-04-29T13:39:05" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "e186b0c9-0207-446c-9750-a1f2c12fe0a7" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T133905Z:e186b0c9-0207-446c-9750-a1f2c12fe0a7" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: F8C2A951F5D744569F9633B57EB65F08 Ref B: SEL221051503037 Ref C: 2023-09-18T09:21:27Z" ], - "Date": [ "Mon, 18 Sep 2023 09:21:28 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 28A1EE218FD54AC999AE0C8F13D68566 Ref B: SEL221051504023 Ref C: 2024-04-29T13:39:03Z" ], + "Date": [ "Mon, 29 Apr 2024 13:39:04 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1204" ], + "Content-Length": [ "1202" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/networkrulesets/default\",\"name\":\"default\",\"type\":\"Microsoft.EventHub/Namespaces/NetworkRuleSets\",\"location\":\"eastus\",\"properties\":{\"publicNetworkAccess\":\"Enabled\",\"defaultAction\":\"Allow\",\"virtualNetworkRules\":[{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default2\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default3\"},\"ignoreMissingVnetServiceEndpoint\":false}],\"ipRules\":[{\"ipMask\":\"1.1.1.1\",\"action\":\"Allow\"},{\"ipMask\":\"2.2.2.2\",\"action\":\"Allow\"}],\"trustedServiceAccessEnabled\":false,\"provisioningState\":\"Succeeded\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/networkrulesets/default\",\"name\":\"default\",\"type\":\"Microsoft.EventHub/Namespaces/NetworkRuleSets\",\"location\":\"eastus\",\"properties\":{\"publicNetworkAccess\":\"Enabled\",\"defaultAction\":\"Allow\",\"virtualNetworkRules\":[{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-eventhub-kchdmf/providers/Microsoft.Network/virtualNetworks/eh-ps-vgt87w-vnet/subnets/default\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-eventhub-kchdmf/providers/Microsoft.Network/virtualNetworks/eh-ps-vgt87w-vnet/subnets/default2\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-eventhub-kchdmf/providers/Microsoft.Network/virtualNetworks/eh-ps-vgt87w-vnet/subnets/default3\"},\"ignoreMissingVnetServiceEndpoint\":false}],\"ipRules\":[{\"ipMask\":\"1.1.1.1\",\"action\":\"Allow\"},{\"ipMask\":\"2.2.2.2\",\"action\":\"Allow\"}],\"trustedServiceAccessEnabled\":false}}", "isContentBase64": false } }, - "Set-AzEventHubNetworkRuleSet+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/networkRuleSets/default?api-version=2023-01-01-preview+4": { + "Set-AzEventHubNetworkRuleSet+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/networkRuleSets/default?api-version=2023-01-01-preview+4": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/networkRuleSets/default?api-version=2023-01-01-preview", - "Content": "{\n \"properties\": {\n \"trustedServiceAccessEnabled\": false,\n \"defaultAction\": \"Deny\",\n \"virtualNetworkRules\": [\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default\"\n },\n \"ignoreMissingVnetServiceEndpoint\": false\n },\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default2\"\n },\n \"ignoreMissingVnetServiceEndpoint\": false\n },\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default3\"\n },\n \"ignoreMissingVnetServiceEndpoint\": false\n }\n ],\n \"ipRules\": [\n {\n \"ipMask\": \"1.1.1.1\",\n \"action\": \"Allow\"\n },\n {\n \"ipMask\": \"2.2.2.2\",\n \"action\": \"Allow\"\n }\n ],\n \"publicNetworkAccess\": \"Enabled\"\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/networkRuleSets/default?api-version=2023-01-01-preview", + "Content": "{\n \"properties\": {\n \"trustedServiceAccessEnabled\": false,\n \"defaultAction\": \"Deny\",\n \"virtualNetworkRules\": [\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-eventhub-kchdmf/providers/Microsoft.Network/virtualNetworks/eh-ps-vgt87w-vnet/subnets/default\"\n },\n \"ignoreMissingVnetServiceEndpoint\": false\n },\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-eventhub-kchdmf/providers/Microsoft.Network/virtualNetworks/eh-ps-vgt87w-vnet/subnets/default2\"\n },\n \"ignoreMissingVnetServiceEndpoint\": false\n },\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-eventhub-kchdmf/providers/Microsoft.Network/virtualNetworks/eh-ps-vgt87w-vnet/subnets/default3\"\n },\n \"ignoreMissingVnetServiceEndpoint\": false\n }\n ],\n \"ipRules\": [\n {\n \"ipMask\": \"1.1.1.1\",\n \"action\": \"Allow\"\n },\n {\n \"ipMask\": \"2.2.2.2\",\n \"action\": \"Allow\"\n }\n ],\n \"publicNetworkAccess\": \"Enabled\"\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "1174" ] + "Content-Length": [ "1204" ] } }, "Response": { @@ -138,38 +150,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-request-id": [ "2d8492d9-7693-40ec-9a6b-311bbda6c2c4" ], - "x-ms-correlation-request-id": [ "2d8492d9-7693-40ec-9a6b-311bbda6c2c4" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T092142Z:2d8492d9-7693-40ec-9a6b-311bbda6c2c4" ], + "x-ms-correlation-request-id": [ "ec9dc713-bf68-4ed3-8fe1-48366f71072a" ], + "x-ms-client-request-id": [ "909b55b1-466c-463e-9465-4636ec84ae5b_RP" ], + "x-ms-messaging-activity-id": [ "66f52cc2-6a78-4686-800e-46b144d9abcd" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G14|2024-04-29T13:39:19" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "ec9dc713-bf68-4ed3-8fe1-48366f71072a" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T133919Z:ec9dc713-bf68-4ed3-8fe1-48366f71072a" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: F2390E4E6E704E9896760D0F9A5DB9EF Ref B: SEL221051503037 Ref C: 2023-09-18T09:21:29Z" ], - "Date": [ "Mon, 18 Sep 2023 09:21:42 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 759F40E20D6645B9B6C0EE0409ABC93E Ref B: SEL221051504023 Ref C: 2024-04-29T13:39:05Z" ], + "Date": [ "Mon, 29 Apr 2024 13:39:19 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1203" ], + "Content-Length": [ "1201" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/networkRuleSets/default\",\"name\":\"default\",\"type\":\"Microsoft.EventHub/Namespaces/NetworkRuleSets\",\"location\":\"eastus\",\"properties\":{\"publicNetworkAccess\":\"Enabled\",\"defaultAction\":\"Deny\",\"virtualNetworkRules\":[{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default2\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default3\"},\"ignoreMissingVnetServiceEndpoint\":false}],\"ipRules\":[{\"ipMask\":\"1.1.1.1\",\"action\":\"Allow\"},{\"ipMask\":\"2.2.2.2\",\"action\":\"Allow\"}],\"trustedServiceAccessEnabled\":false,\"provisioningState\":\"Succeeded\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/networkRuleSets/default\",\"name\":\"default\",\"type\":\"Microsoft.EventHub/Namespaces/NetworkRuleSets\",\"location\":\"eastus\",\"properties\":{\"publicNetworkAccess\":\"Enabled\",\"defaultAction\":\"Deny\",\"virtualNetworkRules\":[{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-eventhub-kchdmf/providers/Microsoft.Network/virtualNetworks/eh-ps-vgt87w-vnet/subnets/default\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-eventhub-kchdmf/providers/Microsoft.Network/virtualNetworks/eh-ps-vgt87w-vnet/subnets/default2\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-eventhub-kchdmf/providers/Microsoft.Network/virtualNetworks/eh-ps-vgt87w-vnet/subnets/default3\"},\"ignoreMissingVnetServiceEndpoint\":false}],\"ipRules\":[{\"ipMask\":\"1.1.1.1\",\"action\":\"Allow\"},{\"ipMask\":\"2.2.2.2\",\"action\":\"Allow\"}],\"trustedServiceAccessEnabled\":false}}", "isContentBase64": false } }, - "Set-AzEventHubNetworkRuleSet+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/networkRuleSets/default?api-version=2023-01-01-preview+5": { + "Set-AzEventHubNetworkRuleSet+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/networkRuleSets/default?api-version=2023-01-01-preview+5": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/networkRuleSets/default?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/networkRuleSets/default?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "458" ], - "x-ms-client-request-id": [ "f408fb7d-c79b-490f-aa76-951e4e541859" ], + "x-ms-unique-id": [ "353" ], + "x-ms-client-request-id": [ "a6cdafe5-bd25-4d50-a72d-0e44b6f811e3" ], "CommandName": [ "Get-AzEventHubNetworkRuleSet" ], "FullCommandName": [ "Get-AzEventHubNetworkRuleSet_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -180,36 +196,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11991" ], - "x-ms-request-id": [ "98951e49-3932-456f-911a-1cf1050183b5" ], - "x-ms-correlation-request-id": [ "98951e49-3932-456f-911a-1cf1050183b5" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T092144Z:98951e49-3932-456f-911a-1cf1050183b5" ], + "x-ms-correlation-request-id": [ "85befec8-8331-4bed-a80f-def8e08d3219" ], + "x-ms-client-request-id": [ "a6cdafe5-bd25-4d50-a72d-0e44b6f811e3_RP" ], + "x-ms-messaging-activity-id": [ "b5ed8d02-4974-4a02-99e4-69c692abc697" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G6|2024-04-29T13:39:21" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "85befec8-8331-4bed-a80f-def8e08d3219" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T133922Z:85befec8-8331-4bed-a80f-def8e08d3219" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: F511672BD7DE49B49D332203328F4D0C Ref B: SEL221051503037 Ref C: 2023-09-18T09:21:42Z" ], - "Date": [ "Mon, 18 Sep 2023 09:21:44 GMT" ] + "X-MSEdge-Ref": [ "Ref A: FB6AC36B5CF64621B88B6241AD67F198 Ref B: SEL221051504023 Ref C: 2024-04-29T13:39:19Z" ], + "Date": [ "Mon, 29 Apr 2024 13:39:21 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1203" ], + "Content-Length": [ "1201" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/networkrulesets/default\",\"name\":\"default\",\"type\":\"Microsoft.EventHub/Namespaces/NetworkRuleSets\",\"location\":\"eastus\",\"properties\":{\"publicNetworkAccess\":\"Enabled\",\"defaultAction\":\"Deny\",\"virtualNetworkRules\":[{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default2\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default3\"},\"ignoreMissingVnetServiceEndpoint\":false}],\"ipRules\":[{\"ipMask\":\"1.1.1.1\",\"action\":\"Allow\"},{\"ipMask\":\"2.2.2.2\",\"action\":\"Allow\"}],\"trustedServiceAccessEnabled\":false,\"provisioningState\":\"Succeeded\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/networkrulesets/default\",\"name\":\"default\",\"type\":\"Microsoft.EventHub/Namespaces/NetworkRuleSets\",\"location\":\"eastus\",\"properties\":{\"publicNetworkAccess\":\"Enabled\",\"defaultAction\":\"Deny\",\"virtualNetworkRules\":[{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-eventhub-kchdmf/providers/Microsoft.Network/virtualNetworks/eh-ps-vgt87w-vnet/subnets/default\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-eventhub-kchdmf/providers/Microsoft.Network/virtualNetworks/eh-ps-vgt87w-vnet/subnets/default2\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-eventhub-kchdmf/providers/Microsoft.Network/virtualNetworks/eh-ps-vgt87w-vnet/subnets/default3\"},\"ignoreMissingVnetServiceEndpoint\":false}],\"ipRules\":[{\"ipMask\":\"1.1.1.1\",\"action\":\"Allow\"},{\"ipMask\":\"2.2.2.2\",\"action\":\"Allow\"}],\"trustedServiceAccessEnabled\":false}}", "isContentBase64": false } }, - "Set-AzEventHubNetworkRuleSet+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/networkRuleSets/default?api-version=2023-01-01-preview+6": { + "Set-AzEventHubNetworkRuleSet+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/networkRuleSets/default?api-version=2023-01-01-preview+6": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/networkRuleSets/default?api-version=2023-01-01-preview", - "Content": "{\n \"properties\": {\n \"trustedServiceAccessEnabled\": false,\n \"defaultAction\": \"Deny\",\n \"virtualNetworkRules\": [\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default\"\n },\n \"ignoreMissingVnetServiceEndpoint\": false\n },\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default2\"\n },\n \"ignoreMissingVnetServiceEndpoint\": false\n },\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default3\"\n },\n \"ignoreMissingVnetServiceEndpoint\": false\n }\n ],\n \"ipRules\": [\n {\n \"ipMask\": \"1.1.1.1\",\n \"action\": \"Allow\"\n },\n {\n \"ipMask\": \"2.2.2.2\",\n \"action\": \"Allow\"\n }\n ],\n \"publicNetworkAccess\": \"Disabled\"\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/networkRuleSets/default?api-version=2023-01-01-preview", + "Content": "{\n \"properties\": {\n \"trustedServiceAccessEnabled\": false,\n \"defaultAction\": \"Deny\",\n \"virtualNetworkRules\": [\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-eventhub-kchdmf/providers/Microsoft.Network/virtualNetworks/eh-ps-vgt87w-vnet/subnets/default\"\n },\n \"ignoreMissingVnetServiceEndpoint\": false\n },\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-eventhub-kchdmf/providers/Microsoft.Network/virtualNetworks/eh-ps-vgt87w-vnet/subnets/default2\"\n },\n \"ignoreMissingVnetServiceEndpoint\": false\n },\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-eventhub-kchdmf/providers/Microsoft.Network/virtualNetworks/eh-ps-vgt87w-vnet/subnets/default3\"\n },\n \"ignoreMissingVnetServiceEndpoint\": false\n }\n ],\n \"ipRules\": [\n {\n \"ipMask\": \"1.1.1.1\",\n \"action\": \"Allow\"\n },\n {\n \"ipMask\": \"2.2.2.2\",\n \"action\": \"Allow\"\n }\n ],\n \"publicNetworkAccess\": \"Disabled\"\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "1175" ] + "Content-Length": [ "1205" ] } }, "Response": { @@ -217,38 +237,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-request-id": [ "f71809fa-82fe-45e3-a470-b405760d4362" ], - "x-ms-correlation-request-id": [ "f71809fa-82fe-45e3-a470-b405760d4362" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T092157Z:f71809fa-82fe-45e3-a470-b405760d4362" ], + "x-ms-correlation-request-id": [ "3a5957cc-6e31-4f14-99e6-1ec905cdf808" ], + "x-ms-client-request-id": [ "5596d3c7-41eb-427b-ad98-128e285a3926_RP" ], + "x-ms-messaging-activity-id": [ "c5f15f0e-b4f2-4bd6-b824-8424f046175c" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G1|2024-04-29T13:39:36" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "3a5957cc-6e31-4f14-99e6-1ec905cdf808" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T133936Z:3a5957cc-6e31-4f14-99e6-1ec905cdf808" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 074E59BEEC1646519D66803A93374BB7 Ref B: SEL221051503037 Ref C: 2023-09-18T09:21:44Z" ], - "Date": [ "Mon, 18 Sep 2023 09:21:57 GMT" ] + "X-MSEdge-Ref": [ "Ref A: FBE6A4F119874438A8CA15EFC14E14DC Ref B: SEL221051504023 Ref C: 2024-04-29T13:39:22Z" ], + "Date": [ "Mon, 29 Apr 2024 13:39:36 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1204" ], + "Content-Length": [ "1202" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/networkRuleSets/default\",\"name\":\"default\",\"type\":\"Microsoft.EventHub/Namespaces/NetworkRuleSets\",\"location\":\"eastus\",\"properties\":{\"publicNetworkAccess\":\"Disabled\",\"defaultAction\":\"Deny\",\"virtualNetworkRules\":[{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default2\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default3\"},\"ignoreMissingVnetServiceEndpoint\":false}],\"ipRules\":[{\"ipMask\":\"1.1.1.1\",\"action\":\"Allow\"},{\"ipMask\":\"2.2.2.2\",\"action\":\"Allow\"}],\"trustedServiceAccessEnabled\":false,\"provisioningState\":\"Succeeded\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/networkRuleSets/default\",\"name\":\"default\",\"type\":\"Microsoft.EventHub/Namespaces/NetworkRuleSets\",\"location\":\"eastus\",\"properties\":{\"publicNetworkAccess\":\"Disabled\",\"defaultAction\":\"Deny\",\"virtualNetworkRules\":[{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-eventhub-kchdmf/providers/Microsoft.Network/virtualNetworks/eh-ps-vgt87w-vnet/subnets/default\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-eventhub-kchdmf/providers/Microsoft.Network/virtualNetworks/eh-ps-vgt87w-vnet/subnets/default2\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-eventhub-kchdmf/providers/Microsoft.Network/virtualNetworks/eh-ps-vgt87w-vnet/subnets/default3\"},\"ignoreMissingVnetServiceEndpoint\":false}],\"ipRules\":[{\"ipMask\":\"1.1.1.1\",\"action\":\"Allow\"},{\"ipMask\":\"2.2.2.2\",\"action\":\"Allow\"}],\"trustedServiceAccessEnabled\":false}}", "isContentBase64": false } }, - "Set-AzEventHubNetworkRuleSet+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/networkRuleSets/default?api-version=2023-01-01-preview+7": { + "Set-AzEventHubNetworkRuleSet+[NoContext]+SetExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/networkRuleSets/default?api-version=2023-01-01-preview+7": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/networkRuleSets/default?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/networkRuleSets/default?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "460" ], - "x-ms-client-request-id": [ "f74d0a33-8818-4214-800c-6f1e41cbeea1" ], + "x-ms-unique-id": [ "355" ], + "x-ms-client-request-id": [ "a5977686-1f3a-47d8-9895-650a0d389946" ], "CommandName": [ "Get-AzEventHubNetworkRuleSet" ], "FullCommandName": [ "Get-AzEventHubNetworkRuleSet_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -259,36 +283,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], - "x-ms-request-id": [ "d2e1c8d1-b798-470a-8f17-2f603cf8a093" ], - "x-ms-correlation-request-id": [ "d2e1c8d1-b798-470a-8f17-2f603cf8a093" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T092200Z:d2e1c8d1-b798-470a-8f17-2f603cf8a093" ], + "x-ms-correlation-request-id": [ "04fef063-9d83-4282-b932-3020c505c958" ], + "x-ms-client-request-id": [ "a5977686-1f3a-47d8-9895-650a0d389946_RP" ], + "x-ms-messaging-activity-id": [ "56f9e07f-2113-40c4-b2b7-cebff8047550" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G13|2024-04-29T13:39:38" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "04fef063-9d83-4282-b932-3020c505c958" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T133938Z:04fef063-9d83-4282-b932-3020c505c958" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 70DB473E3B7B477AACAE6FFD4AD2D529 Ref B: SEL221051503037 Ref C: 2023-09-18T09:21:58Z" ], - "Date": [ "Mon, 18 Sep 2023 09:21:59 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 5336D8E7D4EF442E898967A4BDC62B3C Ref B: SEL221051504023 Ref C: 2024-04-29T13:39:36Z" ], + "Date": [ "Mon, 29 Apr 2024 13:39:38 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1204" ], + "Content-Length": [ "1202" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/networkrulesets/default\",\"name\":\"default\",\"type\":\"Microsoft.EventHub/Namespaces/NetworkRuleSets\",\"location\":\"eastus\",\"properties\":{\"publicNetworkAccess\":\"Disabled\",\"defaultAction\":\"Deny\",\"virtualNetworkRules\":[{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default2\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default3\"},\"ignoreMissingVnetServiceEndpoint\":false}],\"ipRules\":[{\"ipMask\":\"1.1.1.1\",\"action\":\"Allow\"},{\"ipMask\":\"2.2.2.2\",\"action\":\"Allow\"}],\"trustedServiceAccessEnabled\":false,\"provisioningState\":\"Succeeded\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/networkrulesets/default\",\"name\":\"default\",\"type\":\"Microsoft.EventHub/Namespaces/NetworkRuleSets\",\"location\":\"eastus\",\"properties\":{\"publicNetworkAccess\":\"Disabled\",\"defaultAction\":\"Deny\",\"virtualNetworkRules\":[{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-eventhub-kchdmf/providers/Microsoft.Network/virtualNetworks/eh-ps-vgt87w-vnet/subnets/default\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-eventhub-kchdmf/providers/Microsoft.Network/virtualNetworks/eh-ps-vgt87w-vnet/subnets/default2\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-eventhub-kchdmf/providers/Microsoft.Network/virtualNetworks/eh-ps-vgt87w-vnet/subnets/default3\"},\"ignoreMissingVnetServiceEndpoint\":false}],\"ipRules\":[{\"ipMask\":\"1.1.1.1\",\"action\":\"Allow\"},{\"ipMask\":\"2.2.2.2\",\"action\":\"Allow\"}],\"trustedServiceAccessEnabled\":false}}", "isContentBase64": false } }, - "Set-AzEventHubNetworkRuleSet+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/networkRuleSets/default?api-version=2023-01-01-preview+8": { + "Set-AzEventHubNetworkRuleSet+[NoContext]+SetExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/networkRuleSets/default?api-version=2023-01-01-preview+8": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/networkRuleSets/default?api-version=2023-01-01-preview", - "Content": "{\n \"properties\": {\n \"trustedServiceAccessEnabled\": true,\n \"defaultAction\": \"Deny\",\n \"virtualNetworkRules\": [\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default\"\n },\n \"ignoreMissingVnetServiceEndpoint\": false\n },\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default2\"\n },\n \"ignoreMissingVnetServiceEndpoint\": false\n },\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default3\"\n },\n \"ignoreMissingVnetServiceEndpoint\": false\n }\n ],\n \"ipRules\": [\n {\n \"ipMask\": \"1.1.1.1\",\n \"action\": \"Allow\"\n },\n {\n \"ipMask\": \"2.2.2.2\",\n \"action\": \"Allow\"\n }\n ],\n \"publicNetworkAccess\": \"Disabled\"\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/networkRuleSets/default?api-version=2023-01-01-preview", + "Content": "{\n \"properties\": {\n \"trustedServiceAccessEnabled\": true,\n \"defaultAction\": \"Deny\",\n \"virtualNetworkRules\": [\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-eventhub-kchdmf/providers/Microsoft.Network/virtualNetworks/eh-ps-vgt87w-vnet/subnets/default\"\n },\n \"ignoreMissingVnetServiceEndpoint\": false\n },\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-eventhub-kchdmf/providers/Microsoft.Network/virtualNetworks/eh-ps-vgt87w-vnet/subnets/default2\"\n },\n \"ignoreMissingVnetServiceEndpoint\": false\n },\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-eventhub-kchdmf/providers/Microsoft.Network/virtualNetworks/eh-ps-vgt87w-vnet/subnets/default3\"\n },\n \"ignoreMissingVnetServiceEndpoint\": false\n }\n ],\n \"ipRules\": [\n {\n \"ipMask\": \"1.1.1.1\",\n \"action\": \"Allow\"\n },\n {\n \"ipMask\": \"2.2.2.2\",\n \"action\": \"Allow\"\n }\n ],\n \"publicNetworkAccess\": \"Disabled\"\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "1174" ] + "Content-Length": [ "1204" ] } }, "Response": { @@ -296,38 +324,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1197" ], - "x-ms-request-id": [ "999900f5-9f65-4401-97e4-5ee503c1011f" ], - "x-ms-correlation-request-id": [ "999900f5-9f65-4401-97e4-5ee503c1011f" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T092213Z:999900f5-9f65-4401-97e4-5ee503c1011f" ], + "x-ms-correlation-request-id": [ "e1567093-837d-49cb-990b-08773832b344" ], + "x-ms-client-request-id": [ "5178ed1d-127e-49b0-a5ba-93e01dd62fc1_RP" ], + "x-ms-messaging-activity-id": [ "037a39e1-eb8f-47ea-8d65-165b983ee64e" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G11|2024-04-29T13:39:53" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "e1567093-837d-49cb-990b-08773832b344" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T133953Z:e1567093-837d-49cb-990b-08773832b344" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: FC33381A4787469C8C25E86ADE96D915 Ref B: SEL221051503037 Ref C: 2023-09-18T09:22:00Z" ], - "Date": [ "Mon, 18 Sep 2023 09:22:13 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 61B701BADA894E0FA9D15C667172D702 Ref B: SEL221051504023 Ref C: 2024-04-29T13:39:38Z" ], + "Date": [ "Mon, 29 Apr 2024 13:39:53 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1203" ], + "Content-Length": [ "1201" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/networkRuleSets/default\",\"name\":\"default\",\"type\":\"Microsoft.EventHub/Namespaces/NetworkRuleSets\",\"location\":\"eastus\",\"properties\":{\"publicNetworkAccess\":\"Disabled\",\"defaultAction\":\"Deny\",\"virtualNetworkRules\":[{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default2\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default3\"},\"ignoreMissingVnetServiceEndpoint\":false}],\"ipRules\":[{\"ipMask\":\"1.1.1.1\",\"action\":\"Allow\"},{\"ipMask\":\"2.2.2.2\",\"action\":\"Allow\"}],\"trustedServiceAccessEnabled\":true,\"provisioningState\":\"Succeeded\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/networkRuleSets/default\",\"name\":\"default\",\"type\":\"Microsoft.EventHub/Namespaces/NetworkRuleSets\",\"location\":\"eastus\",\"properties\":{\"publicNetworkAccess\":\"Disabled\",\"defaultAction\":\"Deny\",\"virtualNetworkRules\":[{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-eventhub-kchdmf/providers/Microsoft.Network/virtualNetworks/eh-ps-vgt87w-vnet/subnets/default\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-eventhub-kchdmf/providers/Microsoft.Network/virtualNetworks/eh-ps-vgt87w-vnet/subnets/default2\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-eventhub-kchdmf/providers/Microsoft.Network/virtualNetworks/eh-ps-vgt87w-vnet/subnets/default3\"},\"ignoreMissingVnetServiceEndpoint\":false}],\"ipRules\":[{\"ipMask\":\"1.1.1.1\",\"action\":\"Allow\"},{\"ipMask\":\"2.2.2.2\",\"action\":\"Allow\"}],\"trustedServiceAccessEnabled\":true}}", "isContentBase64": false } }, - "Set-AzEventHubNetworkRuleSet+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/networkRuleSets/default?api-version=2023-01-01-preview+1": { + "Set-AzEventHubNetworkRuleSet+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/networkRuleSets/default?api-version=2023-01-01-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/networkRuleSets/default?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/networkRuleSets/default?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "462" ], - "x-ms-client-request-id": [ "252a31b7-8f6e-47aa-8cfc-dcb98a918810" ], + "x-ms-unique-id": [ "357" ], + "x-ms-client-request-id": [ "5fc22a4b-dfa6-4ae3-938d-fe4d5f7f7c76" ], "CommandName": [ "Get-AzEventHubNetworkRuleSet" ], "FullCommandName": [ "Get-AzEventHubNetworkRuleSet_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -338,38 +370,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], - "x-ms-request-id": [ "d8b7dcd1-460a-4713-b6d1-e5a1003b616a" ], - "x-ms-correlation-request-id": [ "d8b7dcd1-460a-4713-b6d1-e5a1003b616a" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T092216Z:d8b7dcd1-460a-4713-b6d1-e5a1003b616a" ], + "x-ms-correlation-request-id": [ "a3b441f2-20b4-40a0-91f8-9fdc2c5b4a98" ], + "x-ms-client-request-id": [ "5fc22a4b-dfa6-4ae3-938d-fe4d5f7f7c76_RP" ], + "x-ms-messaging-activity-id": [ "2fe0a71e-0355-4d12-8212-557855b2fbfa" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G13|2024-04-29T13:39:55" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-request-id": [ "a3b441f2-20b4-40a0-91f8-9fdc2c5b4a98" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T133955Z:a3b441f2-20b4-40a0-91f8-9fdc2c5b4a98" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 3C75000967DB4219B22C164857C71C68 Ref B: SEL221051503037 Ref C: 2023-09-18T09:22:14Z" ], - "Date": [ "Mon, 18 Sep 2023 09:22:15 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 36393286B5A048F09E09BA6D286DF438 Ref B: SEL221051504023 Ref C: 2024-04-29T13:39:53Z" ], + "Date": [ "Mon, 29 Apr 2024 13:39:55 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1203" ], + "Content-Length": [ "1201" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/networkrulesets/default\",\"name\":\"default\",\"type\":\"Microsoft.EventHub/Namespaces/NetworkRuleSets\",\"location\":\"eastus\",\"properties\":{\"publicNetworkAccess\":\"Disabled\",\"defaultAction\":\"Deny\",\"virtualNetworkRules\":[{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default2\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default3\"},\"ignoreMissingVnetServiceEndpoint\":false}],\"ipRules\":[{\"ipMask\":\"1.1.1.1\",\"action\":\"Allow\"},{\"ipMask\":\"2.2.2.2\",\"action\":\"Allow\"}],\"trustedServiceAccessEnabled\":true,\"provisioningState\":\"Succeeded\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/networkrulesets/default\",\"name\":\"default\",\"type\":\"Microsoft.EventHub/Namespaces/NetworkRuleSets\",\"location\":\"eastus\",\"properties\":{\"publicNetworkAccess\":\"Disabled\",\"defaultAction\":\"Deny\",\"virtualNetworkRules\":[{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-eventhub-kchdmf/providers/Microsoft.Network/virtualNetworks/eh-ps-vgt87w-vnet/subnets/default\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-eventhub-kchdmf/providers/Microsoft.Network/virtualNetworks/eh-ps-vgt87w-vnet/subnets/default2\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-eventhub-kchdmf/providers/Microsoft.Network/virtualNetworks/eh-ps-vgt87w-vnet/subnets/default3\"},\"ignoreMissingVnetServiceEndpoint\":false}],\"ipRules\":[{\"ipMask\":\"1.1.1.1\",\"action\":\"Allow\"},{\"ipMask\":\"2.2.2.2\",\"action\":\"Allow\"}],\"trustedServiceAccessEnabled\":true}}", "isContentBase64": false } }, - "Set-AzEventHubNetworkRuleSet+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/networkRuleSets/default?api-version=2023-01-01-preview+2": { + "Set-AzEventHubNetworkRuleSet+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/networkRuleSets/default?api-version=2023-01-01-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/networkRuleSets/default?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/networkRuleSets/default?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "463" ], - "x-ms-client-request-id": [ "172d2cd2-e692-4e76-82da-056b5fc410ed" ], + "x-ms-unique-id": [ "358" ], + "x-ms-client-request-id": [ "d9a0cf83-106e-4d43-9e67-75d652fc9fbe" ], "CommandName": [ "Get-AzEventHubNetworkRuleSet" ], "FullCommandName": [ "Get-AzEventHubNetworkRuleSet_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -380,38 +416,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-request-id": [ "b10680c7-51e4-4bd4-923e-406e0cc27b5f" ], - "x-ms-correlation-request-id": [ "b10680c7-51e4-4bd4-923e-406e0cc27b5f" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T092219Z:b10680c7-51e4-4bd4-923e-406e0cc27b5f" ], + "x-ms-correlation-request-id": [ "16ca9c7a-a89c-4653-a9ab-04bcbf464567" ], + "x-ms-client-request-id": [ "d9a0cf83-106e-4d43-9e67-75d652fc9fbe_RP" ], + "x-ms-messaging-activity-id": [ "3802d517-2d19-4149-88e8-96cc710fe31f" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G1|2024-04-29T13:39:56" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-request-id": [ "16ca9c7a-a89c-4653-a9ab-04bcbf464567" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T133956Z:16ca9c7a-a89c-4653-a9ab-04bcbf464567" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: B76E04E350B04710AE085A76D5DF433A Ref B: SEL221051503037 Ref C: 2023-09-18T09:22:16Z" ], - "Date": [ "Mon, 18 Sep 2023 09:22:18 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 3D8D61AFC13945159EA44107DF92B2A2 Ref B: SEL221051504023 Ref C: 2024-04-29T13:39:55Z" ], + "Date": [ "Mon, 29 Apr 2024 13:39:56 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1203" ], + "Content-Length": [ "1201" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/networkrulesets/default\",\"name\":\"default\",\"type\":\"Microsoft.EventHub/Namespaces/NetworkRuleSets\",\"location\":\"eastus\",\"properties\":{\"publicNetworkAccess\":\"Disabled\",\"defaultAction\":\"Deny\",\"virtualNetworkRules\":[{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default2\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default3\"},\"ignoreMissingVnetServiceEndpoint\":false}],\"ipRules\":[{\"ipMask\":\"1.1.1.1\",\"action\":\"Allow\"},{\"ipMask\":\"2.2.2.2\",\"action\":\"Allow\"}],\"trustedServiceAccessEnabled\":true,\"provisioningState\":\"Succeeded\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/networkrulesets/default\",\"name\":\"default\",\"type\":\"Microsoft.EventHub/Namespaces/NetworkRuleSets\",\"location\":\"eastus\",\"properties\":{\"publicNetworkAccess\":\"Disabled\",\"defaultAction\":\"Deny\",\"virtualNetworkRules\":[{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-eventhub-kchdmf/providers/Microsoft.Network/virtualNetworks/eh-ps-vgt87w-vnet/subnets/default\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-eventhub-kchdmf/providers/Microsoft.Network/virtualNetworks/eh-ps-vgt87w-vnet/subnets/default2\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-eventhub-kchdmf/providers/Microsoft.Network/virtualNetworks/eh-ps-vgt87w-vnet/subnets/default3\"},\"ignoreMissingVnetServiceEndpoint\":false}],\"ipRules\":[{\"ipMask\":\"1.1.1.1\",\"action\":\"Allow\"},{\"ipMask\":\"2.2.2.2\",\"action\":\"Allow\"}],\"trustedServiceAccessEnabled\":true}}", "isContentBase64": false } }, - "Set-AzEventHubNetworkRuleSet+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/networkRuleSets/default?api-version=2023-01-01-preview+3": { + "Set-AzEventHubNetworkRuleSet+[NoContext]+SetViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/networkRuleSets/default?api-version=2023-01-01-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/networkRuleSets/default?api-version=2023-01-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/networkRuleSets/default?api-version=2023-01-01-preview", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "464" ], - "x-ms-client-request-id": [ "c550c09c-11a3-4b6e-b602-044876b09948" ], + "x-ms-unique-id": [ "359" ], + "x-ms-client-request-id": [ "24489827-d1ae-4b18-81b0-c57d50efb245" ], "CommandName": [ "Get-AzEventHubNetworkRuleSet" ], "FullCommandName": [ "Get-AzEventHubNetworkRuleSet_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.EventHub/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.EventHub/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -422,36 +462,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-request-id": [ "82f83379-01e9-4b7d-8dd3-349b7cb0dcdf" ], - "x-ms-correlation-request-id": [ "82f83379-01e9-4b7d-8dd3-349b7cb0dcdf" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T092221Z:82f83379-01e9-4b7d-8dd3-349b7cb0dcdf" ], + "x-ms-correlation-request-id": [ "9c3967d3-8291-414d-8686-7ea4b5a4873b" ], + "x-ms-client-request-id": [ "24489827-d1ae-4b18-81b0-c57d50efb245_RP" ], + "x-ms-messaging-activity-id": [ "6dd4b5b6-b9f0-498d-ae8e-5dd693edc8c9" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G14|2024-04-29T13:39:58" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-request-id": [ "9c3967d3-8291-414d-8686-7ea4b5a4873b" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T133958Z:9c3967d3-8291-414d-8686-7ea4b5a4873b" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 65681F224EEC4EBF94EC1F183944C838 Ref B: SEL221051503037 Ref C: 2023-09-18T09:22:19Z" ], - "Date": [ "Mon, 18 Sep 2023 09:22:20 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 2773ED3A72C247D193743DB9E6D74EEA Ref B: SEL221051504023 Ref C: 2024-04-29T13:39:56Z" ], + "Date": [ "Mon, 29 Apr 2024 13:39:58 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1203" ], + "Content-Length": [ "1201" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/networkrulesets/default\",\"name\":\"default\",\"type\":\"Microsoft.EventHub/Namespaces/NetworkRuleSets\",\"location\":\"eastus\",\"properties\":{\"publicNetworkAccess\":\"Disabled\",\"defaultAction\":\"Deny\",\"virtualNetworkRules\":[{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default2\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default3\"},\"ignoreMissingVnetServiceEndpoint\":false}],\"ipRules\":[{\"ipMask\":\"1.1.1.1\",\"action\":\"Allow\"},{\"ipMask\":\"2.2.2.2\",\"action\":\"Allow\"}],\"trustedServiceAccessEnabled\":true,\"provisioningState\":\"Succeeded\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/networkrulesets/default\",\"name\":\"default\",\"type\":\"Microsoft.EventHub/Namespaces/NetworkRuleSets\",\"location\":\"eastus\",\"properties\":{\"publicNetworkAccess\":\"Disabled\",\"defaultAction\":\"Deny\",\"virtualNetworkRules\":[{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-eventhub-kchdmf/providers/Microsoft.Network/virtualNetworks/eh-ps-vgt87w-vnet/subnets/default\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-eventhub-kchdmf/providers/Microsoft.Network/virtualNetworks/eh-ps-vgt87w-vnet/subnets/default2\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-eventhub-kchdmf/providers/Microsoft.Network/virtualNetworks/eh-ps-vgt87w-vnet/subnets/default3\"},\"ignoreMissingVnetServiceEndpoint\":false}],\"ipRules\":[{\"ipMask\":\"1.1.1.1\",\"action\":\"Allow\"},{\"ipMask\":\"2.2.2.2\",\"action\":\"Allow\"}],\"trustedServiceAccessEnabled\":true}}", "isContentBase64": false } }, - "Set-AzEventHubNetworkRuleSet+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/networkRuleSets/default?api-version=2023-01-01-preview+4": { + "Set-AzEventHubNetworkRuleSet+[NoContext]+SetViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/networkRuleSets/default?api-version=2023-01-01-preview+4": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/networkRuleSets/default?api-version=2023-01-01-preview", - "Content": "{\n \"properties\": {\n \"trustedServiceAccessEnabled\": false,\n \"defaultAction\": \"Deny\",\n \"virtualNetworkRules\": [\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default\"\n },\n \"ignoreMissingVnetServiceEndpoint\": false\n },\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default2\"\n },\n \"ignoreMissingVnetServiceEndpoint\": false\n },\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default3\"\n },\n \"ignoreMissingVnetServiceEndpoint\": false\n }\n ],\n \"ipRules\": [\n {\n \"ipMask\": \"1.1.1.1\",\n \"action\": \"Allow\"\n },\n {\n \"ipMask\": \"2.2.2.2\",\n \"action\": \"Allow\"\n }\n ],\n \"publicNetworkAccess\": \"Disabled\"\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/networkRuleSets/default?api-version=2023-01-01-preview", + "Content": "{\n \"properties\": {\n \"trustedServiceAccessEnabled\": false,\n \"defaultAction\": \"Deny\",\n \"virtualNetworkRules\": [\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-eventhub-kchdmf/providers/Microsoft.Network/virtualNetworks/eh-ps-vgt87w-vnet/subnets/default\"\n },\n \"ignoreMissingVnetServiceEndpoint\": false\n },\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-eventhub-kchdmf/providers/Microsoft.Network/virtualNetworks/eh-ps-vgt87w-vnet/subnets/default2\"\n },\n \"ignoreMissingVnetServiceEndpoint\": false\n },\n {\n \"subnet\": {\n \"id\": \"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-eventhub-kchdmf/providers/Microsoft.Network/virtualNetworks/eh-ps-vgt87w-vnet/subnets/default3\"\n },\n \"ignoreMissingVnetServiceEndpoint\": false\n }\n ],\n \"ipRules\": [\n {\n \"ipMask\": \"1.1.1.1\",\n \"action\": \"Allow\"\n },\n {\n \"ipMask\": \"2.2.2.2\",\n \"action\": \"Allow\"\n }\n ],\n \"publicNetworkAccess\": \"Disabled\"\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "1175" ] + "Content-Length": [ "1205" ] } }, "Response": { @@ -459,22 +503,26 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-request-id": [ "27427a5c-8a4c-4193-af56-60fbbd18558d" ], - "x-ms-correlation-request-id": [ "27427a5c-8a4c-4193-af56-60fbbd18558d" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T092234Z:27427a5c-8a4c-4193-af56-60fbbd18558d" ], + "x-ms-correlation-request-id": [ "abcd62d2-8e8c-42be-abfa-268e38cd7b9c" ], + "x-ms-client-request-id": [ "fc033266-29bb-4c8f-a68b-e9f361860128_RP" ], + "x-ms-messaging-activity-id": [ "ce68451f-ee03-4f67-959a-84e1f9d019cb" ], + "x-ms-messaging-routing-id": [ "EASTUS|EASTUS|G5|2024-04-29T13:40:13" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-throttling-version": [ "v1" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-request-id": [ "abcd62d2-8e8c-42be-abfa-268e38cd7b9c" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T134013Z:abcd62d2-8e8c-42be-abfa-268e38cd7b9c" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: A9B7277CC6594AFB924181FA4BAD349E Ref B: SEL221051503037 Ref C: 2023-09-18T09:22:21Z" ], - "Date": [ "Mon, 18 Sep 2023 09:22:33 GMT" ] + "X-MSEdge-Ref": [ "Ref A: D3CF7B25588D416E8B8576C552ED9F0C Ref B: SEL221051504023 Ref C: 2024-04-29T13:39:58Z" ], + "Date": [ "Mon, 29 Apr 2024 13:40:13 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1204" ], + "Content-Length": [ "1202" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/networkRuleSets/default\",\"name\":\"default\",\"type\":\"Microsoft.EventHub/Namespaces/NetworkRuleSets\",\"location\":\"eastus\",\"properties\":{\"publicNetworkAccess\":\"Disabled\",\"defaultAction\":\"Deny\",\"virtualNetworkRules\":[{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default2\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/automatedpowershelltesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default3\"},\"ignoreMissingVnetServiceEndpoint\":false}],\"ipRules\":[{\"ipMask\":\"1.1.1.1\",\"action\":\"Allow\"},{\"ipMask\":\"2.2.2.2\",\"action\":\"Allow\"}],\"trustedServiceAccessEnabled\":false,\"provisioningState\":\"Succeeded\"}}", + "Content": "{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/networkRuleSets/default\",\"name\":\"default\",\"type\":\"Microsoft.EventHub/Namespaces/NetworkRuleSets\",\"location\":\"eastus\",\"properties\":{\"publicNetworkAccess\":\"Disabled\",\"defaultAction\":\"Deny\",\"virtualNetworkRules\":[{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-eventhub-kchdmf/providers/Microsoft.Network/virtualNetworks/eh-ps-vgt87w-vnet/subnets/default\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-eventhub-kchdmf/providers/Microsoft.Network/virtualNetworks/eh-ps-vgt87w-vnet/subnets/default2\"},\"ignoreMissingVnetServiceEndpoint\":false},{\"subnet\":{\"id\":\"/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/autorest-ps-eventhub-kchdmf/providers/Microsoft.Network/virtualNetworks/eh-ps-vgt87w-vnet/subnets/default3\"},\"ignoreMissingVnetServiceEndpoint\":false}],\"ipRules\":[{\"ipMask\":\"1.1.1.1\",\"action\":\"Allow\"},{\"ipMask\":\"2.2.2.2\",\"action\":\"Allow\"}],\"trustedServiceAccessEnabled\":false}}", "isContentBase64": false } } diff --git a/src/EventHub/EventHub.Autorest/test/Set-AzEventHubNetworkRuleSet.Tests.ps1 b/src/EventHub/EventHub.Autorest/test/Set-AzEventHubNetworkRuleSet.Tests.ps1 index 2a658bfe59c7..ec1cbca11e6f 100644 --- a/src/EventHub/EventHub.Autorest/test/Set-AzEventHubNetworkRuleSet.Tests.ps1 +++ b/src/EventHub/EventHub.Autorest/test/Set-AzEventHubNetworkRuleSet.Tests.ps1 @@ -56,7 +56,7 @@ Describe 'Set-AzEventHubNetworkRuleSet' { It 'SetViaIdentityExpanded' { $networkRuleSet = Get-AzEventHubNetworkRuleSet -ResourceGroupName $env.resourceGroup -NamespaceName $env.namespace - { Set-AzEventHubNetworkRuleSet -InputObject $networkRuleSet } | Should -Throw 'Please specify the property you want to update on the -InputObject' + { Set-AzEventHubNetworkRuleSet -InputObject $networkRuleSet -ErrorAction Stop } | Should -Throw 'Please specify the property you want to update on the -InputObject' $networkRuleSet = Set-AzEventHubNetworkRuleSet -InputObject $networkRuleSet -TrustedServiceAccessEnabled:$false $networkRuleSet.DefaultAction | Should -Be "Deny" diff --git a/src/EventHub/EventHub.Autorest/test/Test-AzEventHubName.Recording.json b/src/EventHub/EventHub.Autorest/test/Test-AzEventHubName.Recording.json index aa90fc9fe569..52d2f39571c3 100644 --- a/src/EventHub/EventHub.Autorest/test/Test-AzEventHubName.Recording.json +++ b/src/EventHub/EventHub.Autorest/test/Test-AzEventHubName.Recording.json @@ -3,7 +3,7 @@ "Request": { "Method": "POST", "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/providers/Microsoft.EventHub/checkNameAvailability?api-version=2023-01-01-preview", - "Content": "{\n \"name\": \"namespaceV19d35wo\"\n}", + "Content": "{\n \"name\": \"namespaceV14e6stf\"\n}", "isContentBase64": false, "Headers": { }, @@ -17,16 +17,17 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "87731316-0bd7-4df5-8f1e-26405644156f_M6CH3_M6CH3" ], + "x-ms-request-id": [ "38643da1-2007-4d2e-9a7e-6dc4d26afee1_M8CH3_M8CH3" ], "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-correlation-request-id": [ "6ff2baf5-ee9d-4cc6-926c-42323405c1d2" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T092254Z:6ff2baf5-ee9d-4cc6-926c-42323405c1d2" ], + "x-ms-correlation-request-id": [ "8ac78117-791d-483d-8c58-7d91da726a14" ], + "x-ms-routing-request-id": [ "KOREACENTRAL:20240429T134041Z:8ac78117-791d-483d-8c58-7d91da726a14" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 5055D7CC62564DF09ED0BA308DFBC3AA Ref B: SEL221051503037 Ref C: 2023-09-18T09:22:53Z" ], - "Date": [ "Mon, 18 Sep 2023 09:22:54 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 2112324E223845A8857529FD5D8E5D3B Ref B: SEL221051504023 Ref C: 2024-04-29T13:40:41Z" ], + "Date": [ "Mon, 29 Apr 2024 13:40:41 GMT" ] }, "ContentHeaders": { "Content-Length": [ "159" ], @@ -37,11 +38,11 @@ "isContentBase64": false } }, - "Test-AzEventHubName+[NoContext]+AliasAvailability+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/disasterRecoveryConfigs/checkNameAvailability?api-version=2023-01-01-preview+1": { + "Test-AzEventHubName+[NoContext]+AliasAvailability+$POST+https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/disasterRecoveryConfigs/checkNameAvailability?api-version=2023-01-01-preview+1": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8/disasterRecoveryConfigs/checkNameAvailability?api-version=2023-01-01-preview", - "Content": "{\n \"name\": \"aliasyfh2so\"\n}", + "RequestUri": "https://management.azure.com/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w/disasterRecoveryConfigs/checkNameAvailability?api-version=2023-01-01-preview", + "Content": "{\n \"name\": \"aliasp8gxof\"\n}", "isContentBase64": false, "Headers": { }, @@ -55,16 +56,17 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "550c9f6a-862a-4b5e-8cc1-c529ca6eced1_M0SN1_M0SN1" ], - "Server-SB": [ "Service-Bus-Resource-Provider/SN1" ], + "x-ms-request-id": [ "ac06dae0-7a82-402b-b3dc-dac7c7cf63df_M5CH3_M5CH3" ], + "Server-SB": [ "Service-Bus-Resource-Provider/CH3" ], + "x-ms-throttling-version": [ "v1" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-correlation-request-id": [ "4559981b-b5ba-4d3d-8fd9-51a049186907" ], - "x-ms-routing-request-id": [ "KOREACENTRAL:20230918T092256Z:4559981b-b5ba-4d3d-8fd9-51a049186907" ], + "x-ms-correlation-request-id": [ "59f531d9-924f-4aa5-97e2-11224cc7eacb" ], + "x-ms-routing-request-id": [ "EASTASIA:20240429T134043Z:59f531d9-924f-4aa5-97e2-11224cc7eacb" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 1838126C3A5B4A0F857CF542206D773A Ref B: SEL221051503037 Ref C: 2023-09-18T09:22:54Z" ], - "Date": [ "Mon, 18 Sep 2023 09:22:55 GMT" ] + "X-MSEdge-Ref": [ "Ref A: F5936A8093AB499482AE019E78FBA18B Ref B: SEL221051504023 Ref C: 2024-04-29T13:40:41Z" ], + "Date": [ "Mon, 29 Apr 2024 13:40:42 GMT" ] }, "ContentHeaders": { "Content-Length": [ "38" ], diff --git a/src/EventHub/EventHub.Autorest/test/deployment-template/DependentResourcesParameters.json b/src/EventHub/EventHub.Autorest/test/deployment-template/DependentResourcesParameters.json new file mode 100644 index 000000000000..de71dce535b5 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/test/deployment-template/DependentResourcesParameters.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "resource_name_prefix": { + "value": "eh-ps-vgt87w" + }, + "useZoneRedundancy": { + "value": true + } + } +} diff --git a/src/EventHub/EventHub.Autorest/test/deployment-template/DependentResourcesTemplate.json b/src/EventHub/EventHub.Autorest/test/deployment-template/DependentResourcesTemplate.json new file mode 100644 index 000000000000..7d29eee00f69 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/test/deployment-template/DependentResourcesTemplate.json @@ -0,0 +1,187 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "defaultValue": "[resourceGroup().location]", + "type": "string" + }, + "resource_name_prefix": { + "defaultValue": "ps-testing", + "type": "string" + }, + "useZoneRedundancy": { + "defaultValue": true, + "type": "bool" + } + }, + "variables": { + "storageAccount1Name": "[tolower(replace(concat(parameters('resource_name_prefix'), '-sa1'), '-', ''))]", + "msi1Name": "[concat(parameters('resource_name_prefix'), '-msi1')]", + "msi2Name": "[concat(parameters('resource_name_prefix'), '-msi2')]", + "nsgName": "[concat(parameters('resource_name_prefix'), '-nsg')]", + "vnetName": "[concat(parameters('resource_name_prefix'), '-vnet')]" + }, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "apiVersion": "2023-01-01", + "name": "[variables('storageAccount1Name')]", + "location": "[parameters('location')]", + "sku": { + "name": "Standard_LRS" + }, + "kind": "StorageV2", + "properties": { + "minimumTlsVersion": "TLS1_2" + } + }, + { + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "apiVersion": "2023-01-01", + "name": "[concat(variables('storageAccount1Name'), '/default/container')]", + "dependsOn": [ + "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccount1Name'))]" + ] + }, + { + "type": "Microsoft.ManagedIdentity/userAssignedIdentities", + "apiVersion": "2023-01-31", + "name": "[variables('msi1Name')]", + "location": "[parameters('location')]" + }, + { + "type": "Microsoft.ManagedIdentity/userAssignedIdentities", + "apiVersion": "2023-01-31", + "name": "[variables('msi2Name')]", + "location": "[parameters('location')]" + }, + { + "type": "Microsoft.Network/networkSecurityGroups", + "apiVersion": "2023-02-01", + "name": "[variables('nsgName')]", + "location": "[parameters('location')]", + "properties": { + "securityRules": [] + } + }, + { + "type": "Microsoft.Network/virtualNetworks", + "apiVersion": "2023-02-01", + "name": "[variables('vnetName')]", + "location": "[parameters('location')]", + "properties": { + "addressSpace": { + "addressPrefixes": [ + "10.0.0.0/16" + ] + }, + "subnets": [ + { + "name": "default1", + "properties": { + "addressPrefix": "10.0.1.0/24", + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('nsgName'))]" + }, + "serviceEndpoints": [ + { + "service": "Microsoft.EventHub", + "locations": [ + "*" + ] + }, + { + "service": "Microsoft.ServiceBus", + "locations": [ + "*" + ] + } + ], + "privateEndpointNetworkPolicies": "Disabled", + "privateLinkServiceNetworkPolicies": "Enabled" + } + }, + { + "name": "default2", + "properties": { + "addressPrefix": "10.0.2.0/24", + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('nsgName'))]" + }, + "serviceEndpoints": [ + { + "service": "Microsoft.EventHub", + "locations": [ + "*" + ] + }, + { + "service": "Microsoft.ServiceBus", + "locations": [ + "*" + ] + } + ], + "privateEndpointNetworkPolicies": "Disabled", + "privateLinkServiceNetworkPolicies": "Enabled" + } + }, + { + "name": "default3", + "properties": { + "addressPrefix": "10.0.3.0/24", + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('nsgName'))]" + }, + "serviceEndpoints": [ + { + "service": "Microsoft.EventHub", + "locations": [ + "*" + ] + }, + { + "service": "Microsoft.ServiceBus", + "locations": [ + "*" + ] + } + ], + "privateEndpointNetworkPolicies": "Disabled", + "privateLinkServiceNetworkPolicies": "Enabled" + } + }, + { + "name": "default", + "properties": { + "addressPrefix": "10.0.0.0/24", + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('nsgName'))]" + }, + "serviceEndpoints": [ + { + "service": "Microsoft.EventHub", + "locations": [ + "*" + ] + }, + { + "service": "Microsoft.ServiceBus", + "locations": [ + "*" + ] + } + ], + "privateEndpointNetworkPolicies": "Disabled", + "privateLinkServiceNetworkPolicies": "Enabled" + } + } + ] + }, + "dependsOn": [ + "[concat('Microsoft.Network/networkSecurityGroups/', variables('nsgName'))]" + ] + } + ] +} \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/test/deployment-template/disasterRecoveryParameter.json b/src/EventHub/EventHub.Autorest/test/deployment-template/disasterRecoveryParameter.json index f8d7b6341759..3226fafcf64e 100644 --- a/src/EventHub/EventHub.Autorest/test/deployment-template/disasterRecoveryParameter.json +++ b/src/EventHub/EventHub.Autorest/test/deployment-template/disasterRecoveryParameter.json @@ -2,7 +2,7 @@ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", "contentVersion": "1.0.0.0", "parameters": { - "namespace_name": { + "primary_namespace_name": { "value": "namespaceNamejwm6p8" }, "secondarynamespace_name": { diff --git a/src/EventHub/EventHub.Autorest/test/deployment-template/disasterRecoveryTemplate.json b/src/EventHub/EventHub.Autorest/test/deployment-template/disasterRecoveryTemplate.json index 7aa4c9cd2792..eeea9b4f9075 100644 --- a/src/EventHub/EventHub.Autorest/test/deployment-template/disasterRecoveryTemplate.json +++ b/src/EventHub/EventHub.Autorest/test/deployment-template/disasterRecoveryTemplate.json @@ -2,7 +2,7 @@ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": { - "namespace_name": { + "primary_namespace_name": { "defaultValue": "AutomatedPSTesting", "type": "String" }, @@ -12,15 +12,15 @@ } }, "variables": { - "authRuleResourceName": "[concat(parameters('namespace_name'), '/', 'authRule1')]", - "rootAuthRuleResourceName": "[concat(parameters('namespace_name'), '/RootManageSharedAccessKey')]" + "authRuleResourceName": "[concat(parameters('primary_namespace_name'), '/', 'authRule1')]", + "rootAuthRuleResourceName": "[concat(parameters('primary_namespace_name'), '/RootManageSharedAccessKey')]" }, "resources": [ { "type": "Microsoft.EventHub/namespaces", "apiVersion": "2022-01-01-preview", - "name": "[parameters('namespace_name')]", - "location": "eastus", + "name": "[parameters('primary_namespace_name')]", + "location": "[parameters('location')]", "sku": { "name": "Standard", "tier": "Standard", @@ -40,10 +40,10 @@ "type": "Microsoft.EventHub/namespaces/AuthorizationRules", "apiVersion": "2022-01-01-preview", "name": "[variables('authRuleResourceName')]", - "location": "eastus", + "location": "[parameters('location')]", "dependsOn": [ - "[resourceId('Microsoft.EventHub/namespaces', parameters('namespace_name'))]", - "[resourceId('Microsoft.EventHub/namespaces/AuthorizationRules', parameters('namespace_name'), 'RootManageSharedAccessKey')]" + "[resourceId('Microsoft.EventHub/namespaces', parameters('primary_namespace_name'))]", + "[resourceId('Microsoft.EventHub/namespaces/AuthorizationRules', parameters('primary_namespace_name'), 'RootManageSharedAccessKey')]" ], "properties": { "rights": [ @@ -57,9 +57,9 @@ "type": "Microsoft.EventHub/namespaces/AuthorizationRules", "apiVersion": "2022-01-01-preview", "name": "[variables('rootAuthRuleResourceName')]", - "location": "eastus", + "location": "[parameters('location')]", "dependsOn": [ - "[resourceId('Microsoft.EventHub/namespaces', parameters('namespace_name'))]" + "[resourceId('Microsoft.EventHub/namespaces', parameters('primary_namespace_name'))]" ], "properties": { "rights": [ diff --git a/src/EventHub/EventHub.Autorest/test/deployment-template/keyVaultParameter.json b/src/EventHub/EventHub.Autorest/test/deployment-template/keyVaultParameter.json deleted file mode 100644 index f26102cab5d2..000000000000 --- a/src/EventHub/EventHub.Autorest/test/deployment-template/keyVaultParameter.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "key_Vault_Name": { - "value": "keyVaultNameoqye7t" - }, - "tenant_id": { - "value": "72f988bf-86f1-41af-91ab-2d7cd011db47" - }, - "object_id": { - "value": "07331995-dc52-4f9b-898b-98ac4f0f5c53" - }, - "object_id_msi1": { - "value": "624205aa-192c-4303-9606-990d06cbd997" - }, - "object_id_msi2": { - "value": "1bdb6af0-4284-47f4-b049-94aa2868d90b" - } - } -} diff --git a/src/EventHub/EventHub.Autorest/test/deployment-template/keyVaultParameters.json b/src/EventHub/EventHub.Autorest/test/deployment-template/keyVaultParameters.json new file mode 100644 index 000000000000..594f87497fe0 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/test/deployment-template/keyVaultParameters.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "resource_name_prefix": { + "value": "eh-ps-vgt87w" + }, + "system_assigned_namespace_name": { + "value": "namespaceName8avljz" + } + } +} diff --git a/src/EventHub/EventHub.Autorest/test/deployment-template/keyVaultTemplate.json b/src/EventHub/EventHub.Autorest/test/deployment-template/keyVaultTemplate.json index bae681119b9b..552f9859b992 100644 --- a/src/EventHub/EventHub.Autorest/test/deployment-template/keyVaultTemplate.json +++ b/src/EventHub/EventHub.Autorest/test/deployment-template/keyVaultTemplate.json @@ -2,44 +2,40 @@ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": { - "key_Vault_Name": { - "defaultValue": "PS-Test-kv1", - "type": "String" - }, - "tenant_id": { - "defaultValue": "00000-0000", - "type": "string" - }, - "object_id_msi1": { - "defaultValue": "00000-0000", + "location": { + "defaultValue": "[resourceGroup().location]", "type": "string" }, - "object_id_msi2": { - "defaultValue": "00000-0000", + "resource_name_prefix": { + "defaultValue": "ps-testing", "type": "string" }, - "object_id": { - "defaultValue": "00000-0000", + "system_assigned_namespace_name": { + "defaultValue": "AutomatedPSTesting", "type": "string" } }, - "variables": {}, + "variables": { + "keyVaultName": "[concat(parameters('resource_name_prefix'), '-kv1')]", + "msi1Name": "[concat(parameters('resource_name_prefix'), '-msi1')]", + "msi2Name": "[concat(parameters('resource_name_prefix'), '-msi2')]" + }, "resources": [ { "type": "Microsoft.KeyVault/vaults", "apiVersion": "2022-07-01", - "name": "[parameters('key_Vault_Name')]", - "location": "eastus", + "name": "[variables('keyVaultName')]", + "location": "[parameters('location')]", "properties": { "sku": { "family": "A", "name": "standard" }, - "tenantId": "[parameters('tenant_id')]", + "tenantId": "[reference(resourceId('Microsoft.ManagedIdentity/userAssignedIdentities', variables('msi1Name')), '2023-01-31').tenantId]", "accessPolicies": [ { - "tenantId": "[parameters('tenant_id')]", - "objectId": "[parameters('object_id')]", + "tenantId": "[reference(resourceId('Microsoft.EventHub/namespaces', parameters('system_assigned_namespace_name')), '2022-01-01-preview', 'Full').identity.tenantId]", + "objectId": "[reference(resourceId('Microsoft.EventHub/namespaces', parameters('system_assigned_namespace_name')), '2022-01-01-preview', 'Full').identity.principalId]", "permissions": { "keys": [ "WrapKey", @@ -52,8 +48,8 @@ } }, { - "tenantId": "[parameters('tenant_id')]", - "objectId": "[parameters('object_id_msi1')]", + "tenantId": "[reference(resourceId('Microsoft.ManagedIdentity/userAssignedIdentities', variables('msi1Name')), '2023-01-31').tenantId]", + "objectId": "[reference(resourceId('Microsoft.ManagedIdentity/userAssignedIdentities', variables('msi1Name')), '2023-01-31').principalId]", "permissions": { "keys": [ "WrapKey", @@ -66,8 +62,8 @@ } }, { - "tenantId": "[parameters('tenant_id')]", - "objectId": "[parameters('object_id_msi1')]", + "tenantId": "[reference(resourceId('Microsoft.ManagedIdentity/userAssignedIdentities', variables('msi2Name')), '2023-01-31').tenantId]", + "objectId": "[reference(resourceId('Microsoft.ManagedIdentity/userAssignedIdentities', variables('msi2Name')), '2023-01-31').principalId]", "permissions": { "keys": [ "WrapKey", @@ -87,10 +83,10 @@ { "type": "Microsoft.KeyVault/vaults/keys", "apiVersion": "2022-07-01", - "name": "[concat(parameters('key_Vault_Name'), '/key1')]", - "location": "eastus", + "name": "[concat(variables('keyVaultName'), '/key1')]", + "location": "[parameters('location')]", "dependsOn": [ - "[resourceId('Microsoft.KeyVault/vaults', parameters('key_Vault_Name'))]" + "[resourceId('Microsoft.KeyVault/vaults', variables('keyVaultName'))]" ], "properties": { "attributes": { @@ -102,10 +98,10 @@ { "type": "Microsoft.KeyVault/vaults/keys", "apiVersion": "2022-07-01", - "name": "[concat(parameters('key_Vault_Name'), '/key2')]", - "location": "eastus", + "name": "[concat(variables('keyVaultName'), '/key2')]", + "location": "[parameters('location')]", "dependsOn": [ - "[resourceId('Microsoft.KeyVault/vaults', parameters('key_Vault_Name'))]" + "[resourceId('Microsoft.KeyVault/vaults', variables('keyVaultName'))]" ], "properties": { "attributes": { @@ -117,10 +113,10 @@ { "type": "Microsoft.KeyVault/vaults/keys", "apiVersion": "2022-07-01", - "name": "[concat(parameters('key_Vault_Name'), '/key3')]", - "location": "eastus", + "name": "[concat(variables('keyVaultName'), '/key3')]", + "location": "[parameters('location')]", "dependsOn": [ - "[resourceId('Microsoft.KeyVault/vaults', parameters('key_Vault_Name'))]" + "[resourceId('Microsoft.KeyVault/vaults', variables('keyVaultName'))]" ], "properties": { "attributes": { @@ -132,25 +128,25 @@ { "type": "Microsoft.KeyVault/vaults/keys", "apiVersion": "2022-07-01", - "name": "[concat(parameters('key_Vault_Name'), '/key4')]", - "location": "eastus", + "name": "[concat(variables('keyVaultName'), '/key4')]", + "location": "[parameters('location')]", "dependsOn": [ - "[resourceId('Microsoft.KeyVault/vaults', parameters('key_Vault_Name'))]" + "[resourceId('Microsoft.KeyVault/vaults', variables('keyVaultName'))]" ], "properties": { "attributes": { "enabled": true }, - "kty": "RSA" + "kty": "RSA" } }, { "type": "Microsoft.KeyVault/vaults/keys", "apiVersion": "2022-07-01", - "name": "[concat(parameters('key_Vault_Name'), '/key5')]", - "location": "eastus", + "name": "[concat(variables('keyVaultName'), '/key5')]", + "location": "[parameters('location')]", "dependsOn": [ - "[resourceId('Microsoft.KeyVault/vaults', parameters('key_Vault_Name'))]" + "[resourceId('Microsoft.KeyVault/vaults', variables('keyVaultName'))]" ], "properties": { "attributes": { @@ -162,10 +158,10 @@ { "type": "Microsoft.KeyVault/vaults/keys", "apiVersion": "2022-07-01", - "name": "[concat(parameters('key_Vault_Name'), '/key6')]", - "location": "eastus", + "name": "[concat(variables('keyVaultName'), '/key6')]", + "location": "[parameters('location')]", "dependsOn": [ - "[resourceId('Microsoft.KeyVault/vaults', parameters('key_Vault_Name'))]" + "[resourceId('Microsoft.KeyVault/vaults', variables('keyVaultName'))]" ], "properties": { "attributes": { diff --git a/src/EventHub/EventHub.Autorest/test/deployment-template/parameter.json b/src/EventHub/EventHub.Autorest/test/deployment-template/parameter.json index a6953e261cae..cf342de2376b 100644 --- a/src/EventHub/EventHub.Autorest/test/deployment-template/parameter.json +++ b/src/EventHub/EventHub.Autorest/test/deployment-template/parameter.json @@ -2,35 +2,50 @@ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", "contentVersion": "1.0.0.0", "parameters": { + "secondaryLocation": { + "value": "southcentralus" + }, "namespace_name": { - "value": "namespaceNamed5orf8" + "value": "namespaceNameeqpx5w" }, "system_assigned_namespace_name": { - "value": "namespaceNamewze84s" + "value": "namespaceName8avljz" + }, + "primary_namespace_name": { + "value": "namespaceNameil6w7t" + }, + "secondary_namespace_name": { + "value": "namespaceName7pzlta" }, "namespace_auth_rule_name": { - "value": "auth-ruleju0nd3" + "value": "auth-ruleudhoej" }, "eventhub_auth_rule_name": { - "value": "auth-rulepjiaoe" + "value": "auth-rulevanqub" }, "eventhub_name": { - "value": "eventHub504uah" + "value": "eventHub789hmt" }, "schema_group_name": { - "value": "schemaGroup7ezg61" + "value": "schemaGroup3yt1fv" }, "appgroup_name": { - "value": "appGroupdchk16" + "value": "appGroup3iw8s2" + }, + "subnet1Id": { + "value": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Network/virtualNetworks/eh-ps-vgt87w-vnet/subnets/default" }, "peName1": { - "value": "privateEndpoint-qyfutj" + "value": "privateEndpoint-i4bc1n" }, "peName2": { - "value": "privateEndpoint-352l4o" + "value": "privateEndpoint-2upkxh" }, "namespaceResourceId": { - "value": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamed5orf8" + "value": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameeqpx5w" + }, + "useZoneRedundancy": { + "value": true } } } diff --git a/src/EventHub/EventHub.Autorest/test/deployment-template/template.json b/src/EventHub/EventHub.Autorest/test/deployment-template/template.json index 3a77d8fa323b..72c71c8b79db 100644 --- a/src/EventHub/EventHub.Autorest/test/deployment-template/template.json +++ b/src/EventHub/EventHub.Autorest/test/deployment-template/template.json @@ -2,6 +2,14 @@ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": { + "location": { + "defaultValue": "[resourceGroup().location]", + "type": "string" + }, + "secondaryLocation": { + "defaultValue": "southcentralus", + "type": "string" + }, "namespace_name": { "defaultValue": "AutomatedPSTesting", "type": "String" @@ -10,6 +18,14 @@ "defaultValue": "AutomatedPSTesting", "type": "String" }, + "primary_namespace_name": { + "defaultValue": "AutomatedPSTesting", + "type": "String" + }, + "secondary_namespace_name": { + "defaultValue": "testnamespace", + "type": "String" + }, "namespace_auth_rule_name": { "defaultValue": "namespaceAuthRule", "type": "String" @@ -34,6 +50,10 @@ "defaultValue": "id", "type": "String" }, + "subnet1Id": { + "defaultValue": "/", + "type": "string" + }, "peName1": { "defaultValue": "pe1", "type": "String" @@ -41,23 +61,21 @@ "peName2": { "defaultValue": "pe2", "type": "String" + }, + "useZoneRedundancy": { + "defaultValue": true, + "type": "bool" } }, "variables": { - "appGroupResourceName": "[concat(parameters('namespace_name'), '/', parameters('appgroup_name'))]", - "eventHubResourceName": "[concat(parameters('namespace_name'), '/', parameters('eventhub_name'))]", - "authRuleResourceName": "[concat(parameters('namespace_name'), '/', parameters('namespace_auth_rule_name'))]", - "eventHubAuthRuleResourceName": "[concat(parameters('namespace_name'), '/', parameters('eventhub_name'), '/', parameters('eventhub_auth_rule_name'))]", - "schemaGroupResourceName": "[concat(parameters('namespace_name'), '/', parameters('schema_group_name'))]", - "rootAuthRuleResourceName": "[concat(parameters('namespace_name'), '/RootManageSharedAccessKey')]", - "consumerGroupResourceName": "[concat(parameters('namespace_name'), '/', parameters('eventhub_name'),'/$Default')]" + "deploySecondaryNamespace": "[not(empty(parameters('secondaryLocation')))]" }, "resources": [ { "type": "Microsoft.EventHub/namespaces", "apiVersion": "2022-01-01-preview", "name": "[parameters('namespace_name')]", - "location": "eastus", + "location": "[parameters('location')]", "sku": { "name": "Premium", "tier": "Premium", @@ -67,7 +85,7 @@ "minimumTlsVersion": "1.2", "publicNetworkAccess": "Enabled", "disableLocalAuth": false, - "zoneRedundant": true, + "zoneRedundant": "[parameters('useZoneRedundancy')]", "isAutoInflateEnabled": false, "maximumThroughputUnits": 0, "kafkaEnabled": true @@ -77,7 +95,7 @@ "type": "Microsoft.EventHub/namespaces", "apiVersion": "2022-01-01-preview", "name": "[parameters('system_assigned_namespace_name')]", - "location": "eastus", + "location": "[parameters('location')]", "sku": { "name": "Premium", "tier": "Premium", @@ -90,7 +108,7 @@ "minimumTlsVersion": "1.2", "publicNetworkAccess": "Enabled", "disableLocalAuth": false, - "zoneRedundant": true, + "zoneRedundant": "[parameters('useZoneRedundancy')]", "isAutoInflateEnabled": false, "maximumThroughputUnits": 0, "kafkaEnabled": true @@ -99,8 +117,8 @@ { "type": "Microsoft.EventHub/namespaces/applicationGroups", "apiVersion": "2022-01-01-preview", - "name": "[variables('appGroupResourceName')]", - "location": "eastus", + "name": "[concat(parameters('namespace_name'), '/', parameters('appgroup_name'))]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.EventHub/namespaces', parameters('namespace_name'))]" ], @@ -120,8 +138,8 @@ { "type": "Microsoft.EventHub/namespaces/AuthorizationRules", "apiVersion": "2022-01-01-preview", - "name": "[variables('authRuleResourceName')]", - "location": "eastus", + "name": "[concat(parameters('namespace_name'), '/', parameters('namespace_auth_rule_name'))]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.EventHub/namespaces', parameters('namespace_name'))]", "[resourceId('Microsoft.EventHub/namespaces/AuthorizationRules', parameters('namespace_name'), 'RootManageSharedAccessKey')]" @@ -137,8 +155,8 @@ { "type": "Microsoft.EventHub/namespaces/AuthorizationRules", "apiVersion": "2022-01-01-preview", - "name": "[variables('rootAuthRuleResourceName')]", - "location": "eastus", + "name": "[concat(parameters('namespace_name'), '/RootManageSharedAccessKey')]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.EventHub/namespaces', parameters('namespace_name'))]" ], @@ -153,15 +171,15 @@ { "type": "Microsoft.EventHub/namespaces/eventhubs", "apiVersion": "2022-10-01-preview", - "name": "[variables('eventHubResourceName')]", - "location": "eastus", + "name": "[concat(parameters('namespace_name'), '/', parameters('eventhub_name'))]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.EventHub/namespaces', parameters('namespace_name'))]" ], "properties": { "retentionDescription": { "cleanupPolicy": "Delete", - "retentionTimeInHours": 24 + "retentionTimeInHours": 24 }, "partitionCount": 1, "status": "Active" @@ -170,8 +188,8 @@ { "type": "Microsoft.EventHub/namespaces/schemagroups", "apiVersion": "2022-01-01-preview", - "name": "[variables('schemaGroupResourceName')]", - "location": "eastus", + "name": "[concat(parameters('namespace_name'), '/', parameters('schema_group_name'))]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.EventHub/namespaces', parameters('namespace_name'))]" ], @@ -184,8 +202,8 @@ { "type": "Microsoft.EventHub/namespaces/eventhubs/authorizationrules", "apiVersion": "2022-01-01-preview", - "name": "[variables('eventHubAuthRuleResourceName')]", - "location": "eastus", + "name": "[concat(parameters('namespace_name'), '/', parameters('eventhub_name'), '/', parameters('eventhub_auth_rule_name'))]", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.EventHub/namespaces/eventhubs', parameters('namespace_name'), parameters('eventhub_name'))]", "[resourceId('Microsoft.EventHub/namespaces', parameters('namespace_name'))]" @@ -202,7 +220,7 @@ "type": "Microsoft.Network/privateEndpoints", "apiVersion": "2020-11-01", "name": "[parameters('peName1')]", - "location": "eastus", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.EventHub/namespaces', parameters('namespace_name'))]" ], @@ -224,7 +242,7 @@ } ], "subnet": { - "id": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default" + "id": "[parameters('subnet1Id')]" } } }, @@ -232,7 +250,7 @@ "type": "Microsoft.Network/privateEndpoints", "apiVersion": "2020-11-01", "name": "[parameters('peName2')]", - "location": "eastus", + "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.EventHub/namespaces', parameters('namespace_name'))]" ], @@ -254,9 +272,83 @@ } ], "subnet": { - "id": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default" + "id": "[parameters('subnet1Id')]" } } + }, + { + "type": "Microsoft.EventHub/namespaces", + "apiVersion": "2022-01-01-preview", + "name": "[parameters('primary_namespace_name')]", + "location": "[parameters('location')]", + "sku": { + "name": "Standard", + "tier": "Standard", + "capacity": 1 + }, + "properties": { + "minimumTlsVersion": "1.2", + "publicNetworkAccess": "Enabled", + "disableLocalAuth": false, + "zoneRedundant": "[parameters('useZoneRedundancy')]", + "isAutoInflateEnabled": false, + "maximumThroughputUnits": 0, + "kafkaEnabled": true + } + }, + { + "type": "Microsoft.EventHub/namespaces/AuthorizationRules", + "apiVersion": "2022-01-01-preview", + "name": "[concat(parameters('primary_namespace_name'), '/authRUle1')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.EventHub/namespaces', parameters('primary_namespace_name'))]", + "[resourceId('Microsoft.EventHub/namespaces/AuthorizationRules', parameters('primary_namespace_name'), 'RootManageSharedAccessKey')]" + ], + "properties": { + "rights": [ + "Manage", + "Listen", + "Send" + ] + } + }, + { + "type": "Microsoft.EventHub/namespaces/AuthorizationRules", + "apiVersion": "2022-01-01-preview", + "name": "[concat(parameters('primary_namespace_name'), '/RootManageSharedAccessKey')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.EventHub/namespaces', parameters('primary_namespace_name'))]" + ], + "properties": { + "rights": [ + "Listen", + "Manage", + "Send" + ] + } + }, + { + "condition": "[variables('deploySecondaryNamespace')]", + "type": "Microsoft.EventHub/namespaces", + "apiVersion": "2022-01-01-preview", + "name": "[parameters('secondary_namespace_name')]", + "location": "[parameters('secondaryLocation')]", + "sku": { + "name": "Standard", + "tier": "Standard", + "capacity": 1 + }, + "properties": { + "minimumTlsVersion": "1.2", + "publicNetworkAccess": "Enabled", + "disableLocalAuth": false, + "zoneRedundant": "[parameters('useZoneRedundancy')]", + "isAutoInflateEnabled": false, + "maximumThroughputUnits": 0, + "kafkaEnabled": true + } } ] } \ No newline at end of file diff --git a/src/EventHub/EventHub.Autorest/test/env.json b/src/EventHub/EventHub.Autorest/test/env.json index 7f585bf54152..14f025de4a76 100644 --- a/src/EventHub/EventHub.Autorest/test/env.json +++ b/src/EventHub/EventHub.Autorest/test/env.json @@ -1,58 +1,64 @@ { - "msi2": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2", - "namespaceV6": "namespaceV6dmxtfs", + "appGroup3": "appGroup4hsq2n", + "location": "eastus", + "namespaceV7": "namespaceV75reoyd", + "eventHub9": "eventHub9ubhv4s", + "eventHubSecondaryKey": "5uD6fJh/Rpvx00S+ndDgAHbB9fN/5SZ/ujDEoCNqOGg=", + "storageAccountId": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Storage/storageAccounts/ehpsvgt87wsa1", + "pe1": null, + "cluster2": "clusterw1xa48", "createdCluster": "TestClusterAutomatic", - "eventHubAuthRule2": "auth-ruleirhsyq", - "clusterResourceGroup": "AutomatedPowershellTesting", + "subnetId2": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Network/virtualNetworks/eh-ps-vgt87w-vnet/subnets/default2", + "namespacePrimaryKey": "5uD6fJh/Rpvx00S+ndDgAHbB9fN/5SZ/ujDEoCNqOGg=", + "resourceGroup": "Autorest-PS-EventHub-kchdmf", + "eventHub": "eventHub789hmt", + "namespaceV6": "namespaceV6cts2hw", + "keyVaultUri": "https://eh-ps-vgt87w-kv1.vault.azure.net/", + "consumerGroup3": "consumerGroupfvwbyr", "Tenant": "72f988bf-86f1-41af-91ab-2d7cd011db47", - "subnetId1": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default", - "authRule2": "auth-rule9ld078", - "blobContainer": "container", - "namespaceV8": "namespaceV8xz6p4d", - "appGroup2": "appGrouphloeqm", - "appGroup3": "appGroup6vt5fm", - "authRule": "auth-ruleju0nd3", - "namespaceV1": "namespaceV19d35wo", - "alias": "aliasyfh2so", - "primaryNamespace": "namespaceNamejwm6p8", - "systemAssignedNamespaceName": "namespaceNamewze84s", - "schemaGroup2": "schemaGroupl6t5kq", - "cluster": "cluster18mkid", - "subnetId3": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default3", - "eventHub5": "eventHubl1cbzj", - "consumerGroup3": "consumerGroup8x6rob", - "schemaGroup": "schemaGroup7ezg61", - "eventHubPrimaryKey": "SanitizedPrimary3", - "namespaceV2": "namespaceV2b4cdh6", - "appGroup": "appGroupdchk16", - "resourceGroup": "resourceGroupAutoresta2s9gd", - "subnetId2": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default2", - "namespace": "namespaceNamed5orf8", - "storageAccountId": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.Storage/storageAccounts/testpsstoragaccount", + "consumerGroup2": "consumerGroupybm5ad", + "clusterSubscriptionId": "326100e2-f69d-4268-8503-075374f62b6e", + "namespaceV3": "namespaceV35flrpz", + "authRule3": "auth-rule0hkw38", + "secondaryNamespaceResourceId": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceName7pzlta", + "eventHub5": "eventHubk6tygo", "consumerGroup": "$Default", - "namespacePrimaryKey": "SanitizedPrimary3", + "eventHub2": "eventHubex7bys", + "pe2": null, + "eventHubAuthRule2": "auth-rulef5iq9n", + "schemaGroup": "schemaGroup3yt1fv", + "eventHubAuthRule": "auth-rulevanqub", + "eventHub4": "eventHub9djq12", "SubscriptionId": "326100e2-f69d-4268-8503-075374f62b6e", - "namespaceV7": "namespaceV7efod9x", - "eventHubAuthRule3": "auth-rulej3en9f", - "eventHub4": "eventHub8zop1w", - "eventHub9": "eventHub9vim3cf", - "eventHubAuthRule": "auth-rulepjiaoe", - "namespaceV4": "namespaceV4wfj1rk", - "consumerGroup2": "consumerGroupy25nvx", - "namespaceV5": "namespaceV5nrf8kt", - "authRule3": "auth-ruleywum8f", - "secondaryNamespace": "namespaceNameyr61dz", - "secondaryNamespaceResourceId": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNameyr61dz", - "cluster2": "clusteryj5uha", - "primaryNamespaceResourceId": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutoresta2s9gd/providers/Microsoft.EventHub/namespaces/namespaceNamejwm6p8", - "namespaceSecondaryKey": "SanitizedSecondary3", - "msi1": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1", - "eventHub": "eventHub504uah", - "eventHub2": "eventHublnw123", - "namespaceV9": "namespaceV92x0wzd", - "eventHub3": "eventHubhwo7mf", - "schemaGroup3": "schemaGroupzws62u", - "keyVaultUri": "https://keyVaultNameoqye7t.vault.azure.net/", - "namespaceV3": "namespaceV3dp4io9", - "eventHubSecondaryKey": "SanitizedSecondary3" + "namespaceV5": "namespaceV5dmbu7w", + "namespaceV4": "namespaceV4i450gk", + "subnetId3": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Network/virtualNetworks/eh-ps-vgt87w-vnet/subnets/default3", + "primaryNamespaceResourceId": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.EventHub/namespaces/namespaceNameil6w7t", + "namespaceV8": "namespaceV8rx42o3", + "cluster": "clusterh35psm", + "schemaGroup2": "schemaGroup0owimy", + "appGroup2": "appGroup21njbo", + "secondaryNamespace": "namespaceName7pzlta", + "blobContainer": "container", + "namespaceV9": "namespaceV9t8q4ed", + "namespaceSecondaryKey": "5uD6fJh/Rpvx00S+ndDgAHbB9fN/5SZ/ujDEoCNqOGg=", + "primaryNamespace": "namespaceNameil6w7t", + "appGroup": "appGroup3iw8s2", + "secondaryLocation": "southcentralus", + "subnetId1": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.Network/virtualNetworks/eh-ps-vgt87w-vnet/subnets/default", + "namespace": "namespaceNameeqpx5w", + "eventHubPrimaryKey": "5uD6fJh/Rpvx00S+ndDgAHbB9fN/5SZ/ujDEoCNqOGg=", + "systemAssignedNamespaceName": "namespaceName8avljz", + "authRule": "auth-ruleudhoej", + "msi2": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi2", + "namespaceV2": "namespaceV2dmnw8c", + "clusterResourceGroup": "AutomatedPowershellTesting", + "alias": "aliasp8gxof", + "msi1": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-kchdmf/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-vgt87w-msi1", + "eventHubAuthRule3": "auth-ruletwo5di", + "schemaGroup3": "schemaGroupgbf8s5", + "namespaceV1": "namespaceV14e6stf", + "eventHub3": "eventHubgaq2iy", + "useZoneRedundancy": true, + "authRule2": "auth-rule85shx1" } diff --git a/src/EventHub/EventHub.Autorest/test/localEnv.json b/src/EventHub/EventHub.Autorest/test/localEnv.json index bd886fcb7f6d..e27cd3813c61 100644 --- a/src/EventHub/EventHub.Autorest/test/localEnv.json +++ b/src/EventHub/EventHub.Autorest/test/localEnv.json @@ -1,58 +1,64 @@ { - "authRule": "auth-rulepsuiaw", - "eventHub5": "eventHubghbcry", - "createdCluster": "TestClusterAutomatic", - "eventHub3": "eventHub59ci2m", - "primaryNamespace": "namespaceNametzyrlg", - "namespaceV2": "namespaceV2zda042", - "alias": "alias9kolfc", - "msi1": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI1", - "namespaceV6": "namespaceV670f639", - "consumerGroup": "$Default", - "primaryNamespaceResourceId": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestkp5zs4/providers/Microsoft.EventHub/namespaces/namespaceNametzyrlg", + "schemaGroup2": "schemaGroupad1gbq", "clusterResourceGroup": "AutomatedPowershellTesting", - "schemaGroup2": "schemaGroup43o9ez", - "secondaryNamespace": "namespaceName0g92hk", - "appGroup2": "appGroupd1rnkb", - "namespacePrimaryKey": "Ylzwh5/D1p8d/INCuy66741RB2iMXyD4IAd8ky4TQEI=", - "appGroup": "appGroupvm7cl4", - "storageAccountId": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.Storage/storageAccounts/testpsstoragaccount", - "cluster2": "clusterqvkmjn", - "eventHub4": "eventHubjuxq15", - "msi2": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/ps-testing/providers/Microsoft.ManagedIdentity/userAssignedIdentities/PS-Testing-MSI2", - "namespace": "namespaceName2rug3t", - "eventHubSecondaryKey": "Ylzwh5/D1p8d/INCuy66741RB2iMXyD4IAd8ky4TQEI=", - "Tenant": "72f988bf-86f1-41af-91ab-2d7cd011db47", - "eventHubAuthRule3": "auth-rulegwfq7b", - "namespaceV7": "namespaceV7i3fham", - "namespaceV3": "namespaceV3h86cdl", - "eventHubPrimaryKey": "Ylzwh5/D1p8d/INCuy66741RB2iMXyD4IAd8ky4TQEI=", - "appGroup3": "appGroupr3ifeb", - "authRule2": "auth-rule76okzy", - "consumerGroup2": "consumerGroup0dxb32", - "subnetId2": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default2", + "namespaceV3": "namespaceV3s0dixk", + "useZoneRedundancy": true, + "namespaceV4": "namespaceV47k19af", + "systemAssignedNamespaceName": "namespaceNamexgiwzt", + "clusterSubscriptionId": "326100e2-f69d-4268-8503-075374f62b6e", + "namespaceV7": "namespaceV7vb4mpt", + "appGroup2": "appGroupi1t0k3", + "pe2": null, + "primaryNamespace": "namespaceName8keubc", + "msi1": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-6aqx82/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-wxs3p0-msi1", + "subnetId2": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-6aqx82/providers/Microsoft.Network/virtualNetworks/eh-ps-wxs3p0-vnet/subnets/default2", + "alias": "aliasq6rp4a", + "consumerGroup": "$Default", + "appGroup": "appGroupstzhb1", + "consumerGroup2": "consumerGroupe30u68", + "storageAccountId": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-6aqx82/providers/Microsoft.Storage/storageAccounts/ehpswxs3p0sa1", "blobContainer": "container", - "systemAssignedNamespaceName": "namespaceNamedubs9t", - "consumerGroup3": "consumerGroupbl5q74", - "eventHub": "eventHub1znxv3", - "eventHub2": "eventHub3wgqx7", - "cluster": "cluster03kjdh", - "subnetId1": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default", - "secondaryNamespaceResourceId": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/resourceGroupAutorestkp5zs4/providers/Microsoft.EventHub/namespaces/namespaceName0g92hk", - "subnetId3": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/AutomatedPowershellTesting/providers/Microsoft.Network/virtualNetworks/testpsvn/subnets/default3", - "schemaGroup3": "schemaGroupthkqs8", - "namespaceSecondaryKey": "Ylzwh5/D1p8d/INCuy66741RB2iMXyD4IAd8ky4TQEI=", - "namespaceV5": "namespaceV53bntjz", - "authRule3": "auth-rule1ob38m", - "namespaceV8": "namespaceV88zi3du", - "schemaGroup": "schemaGroup7sk1jc", + "authRule2": "auth-ruleiqfle1", + "secondaryNamespace": "namespaceNamexmb15u", + "consumerGroup3": "consumerGroupp8e3kq", + "eventHubAuthRule2": "auth-ruleeq38yw", + "schemaGroup3": "schemaGrouplkjyz3", + "subnetId3": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-6aqx82/providers/Microsoft.Network/virtualNetworks/eh-ps-wxs3p0-vnet/subnets/default3", "SubscriptionId": "326100e2-f69d-4268-8503-075374f62b6e", - "resourceGroup": "resourceGroupAutorestkp5zs4", - "eventHubAuthRule": "auth-rule2g4bys", - "keyVaultUri": "https://keyVaultNameltkvn1.vault.azure.net/", - "namespaceV1": "namespaceV1b6p7xo", - "eventHub9": "eventHub934rs9x", - "namespaceV4": "namespaceV4as1inl", - "namespaceV9": "namespaceV9627uc4", - "eventHubAuthRule2": "auth-rule8ln9ra" + "eventHub9": "eventHub9h81ky4", + "primaryNamespaceResourceId": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-6aqx82/providers/Microsoft.EventHub/namespaces/namespaceName8keubc", + "authRule3": "auth-rulehgpkz9", + "appGroup3": "appGroupfpq1ew", + "eventHubAuthRule": "auth-rulev5kyb0", + "secondaryNamespaceResourceId": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-6aqx82/providers/Microsoft.EventHub/namespaces/namespaceNamexmb15u", + "Tenant": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "pe1": null, + "eventHub3": "eventHub0s1q7g", + "namespaceV9": "namespaceV9u8kme0", + "eventHubAuthRule3": "auth-ruleilov0a", + "eventHub": "eventHubiqe35z", + "namespaceV1": "namespaceV1zp2bux", + "cluster2": "clusterlfxiyn", + "eventHub5": "eventHubgepi53", + "eventHubSecondaryKey": "DWZd3tltfI1gN090ObXuQyWTjtMpOR/jPMYLsd3cj3c=", + "namespaceV8": "namespaceV8r6bz72", + "msi2": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-6aqx82/providers/Microsoft.ManagedIdentity/userAssignedIdentities/eh-ps-wxs3p0-msi2", + "keyVaultUri": "https://eh-ps-wxs3p0-kv1.vault.azure.net/", + "eventHub4": "eventHubnjt9x1", + "eventHub2": "eventHubame875", + "schemaGroup": "schemaGroup5vyxsi", + "cluster": "clusterjnes93", + "resourceGroup": "Autorest-PS-EventHub-6aqx82", + "authRule": "auth-ruletax9iq", + "namespaceV2": "namespaceV2mnz1xv", + "namespacePrimaryKey": "DWZd3tltfI1gN090ObXuQyWTjtMpOR/jPMYLsd3cj3c=", + "subnetId1": "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourceGroups/Autorest-PS-EventHub-6aqx82/providers/Microsoft.Network/virtualNetworks/eh-ps-wxs3p0-vnet/subnets/default", + "namespace": "namespaceNameecy9af", + "createdCluster": "TestClusterAutomatic", + "namespaceV5": "namespaceV5yol8ph", + "eventHubPrimaryKey": "DWZd3tltfI1gN090ObXuQyWTjtMpOR/jPMYLsd3cj3c=", + "namespaceV6": "namespaceV6alicqd", + "location": "eastus", + "secondaryLocation": "southcentralus", + "namespaceSecondaryKey": "DWZd3tltfI1gN090ObXuQyWTjtMpOR/jPMYLsd3cj3c=" } diff --git a/src/EventHub/EventHub.Autorest/test/utils.ps1 b/src/EventHub/EventHub.Autorest/test/utils.ps1 index 2d098c629b83..e94303f4be31 100644 --- a/src/EventHub/EventHub.Autorest/test/utils.ps1 +++ b/src/EventHub/EventHub.Autorest/test/utils.ps1 @@ -5,31 +5,6 @@ function RandomString([bool]$allChars, [int32]$len) { return -join ((48..57) + (97..122) | Get-Random -Count $len | % {[char]$_}) } } -function Start-TestSleep { - [CmdletBinding(DefaultParameterSetName = 'SleepBySeconds')] - param( - [parameter(Mandatory = $true, Position = 0, ParameterSetName = 'SleepBySeconds')] - [ValidateRange(0.0, 2147483.0)] - [double] $Seconds, - - [parameter(Mandatory = $true, ParameterSetName = 'SleepByMilliseconds')] - [ValidateRange('NonNegative')] - [Alias('ms')] - [int] $Milliseconds - ) - - if ($TestMode -ne 'playback') { - switch ($PSCmdlet.ParameterSetName) { - 'SleepBySeconds' { - Start-Sleep -Seconds $Seconds - } - 'SleepByMilliseconds' { - Start-Sleep -Milliseconds $Milliseconds - } - } - } -} - $env = @{} if ($UsePreviousConfigForRecord) { $previousEnv = Get-Content (Join-Path $PSScriptRoot 'env.json') | ConvertFrom-Json @@ -38,16 +13,21 @@ if ($UsePreviousConfigForRecord) { # Add script method called AddWithCache to $env, when useCache is set true, it will try to get the value from the $env first. # example: $val = $env.AddWithCache('key', $val, $true) $env | Add-Member -Type ScriptMethod -Value { param( [string]$key, [object]$val, [bool]$useCache) if ($this.Contains($key) -and $useCache) { return $this[$key] } else { $this[$key] = $val; return $val } } -Name 'AddWithCache' -function setupEnv() { +function setupEnv( + $location = 'eastus', + $secondaryLocation = 'southcentralus', + $useZoneRedundancy = $true, + $verbose = $false) { # Preload subscriptionId and tenant from context, which will be used in test # as default. You could change them if needed. $env.SubscriptionId = (Get-AzContext).Subscription.Id $env.Tenant = (Get-AzContext).Tenant.Id - $resourceGroup = "resourceGroupAutorest" + (RandomString -allChars $false -len 6) + $resourceGroup = "Autorest-PS-EventHub-" + (RandomString -allChars $false -len 6) $namespaceName = "namespaceName" + (RandomString -allChars $false -len 6) $systemAssignedNamespaceName = "namespaceName" + (RandomString -allChars $false -len 6) - $keyVaultName = "keyVaultName" + (RandomString -allChars $false -len 6) + $dependentResourcesPrefix = "eh-ps-" + (RandomString -allChars $false -len 6) + $keyVaultName = $dependentResourcesPrefix + "-kv1" $keyVaultUri = "https://" + $keyVaultName + ".vault.azure.net/" $namespaceV1 = "namespaceV1" + (RandomString -allChars $false -len 6) $namespaceV2 = "namespaceV2" + (RandomString -allChars $false -len 6) @@ -58,11 +38,12 @@ function setupEnv() { $namespaceV7 = "namespaceV7" + (RandomString -allChars $false -len 6) $namespaceV8 = "namespaceV8" + (RandomString -allChars $false -len 6) $namespaceV9 = "namespaceV9" + (RandomString -allChars $false -len 6) - $namespaceResourceId = "/subscriptions/" + $env.SubscriptionId + "/resourceGroups/" + $resourceGroup + "/providers/Microsoft.EventHub/namespaces/" + $namespaceName + $resourceGroupArmId = "/subscriptions/$($env.SubscriptionId)/resourceGroups/" + $resourceGroup + $namespaceResourceId = "$resourceGroupArmId/providers/Microsoft.EventHub/namespaces/$namespaceName" $primaryNamespaceName = "namespaceName" + (RandomString -allChars $false -len 6) - $primaryNamespaceResourceId = "/subscriptions/" + $env.SubscriptionId + "/resourceGroups/" + $resourceGroup + "/providers/Microsoft.EventHub/namespaces/" + $primaryNamespaceName - $secondaryNamespace = "namespaceName" + (RandomString -allChars $false -len 6) - $secondaryNamespaceResourceId = "/subscriptions/" + $env.SubscriptionId + "/resourceGroups/" + $resourceGroup + "/providers/Microsoft.EventHub/namespaces/" + $secondaryNamespace + $primaryNamespaceResourceId = "$resourceGroupArmId/providers/Microsoft.EventHub/namespaces/$primaryNamespaceName" + $secondaryNamespaceName = "namespaceName" + (RandomString -allChars $false -len 6) + $secondaryNamespaceResourceId = "$resourceGroupArmId/providers/Microsoft.EventHub/namespaces/$secondaryNamespaceName" $authRule = "auth-rule" + (RandomString -allChars $false -len 6) $authRule2 = "auth-rule" + (RandomString -allChars $false -len 6) $authRule3 = "auth-rule" + (RandomString -allChars $false -len 6) @@ -88,17 +69,26 @@ function setupEnv() { $alias = "alias" + (RandomString -allChars $false -len 6) $pe1 = "privateEndpoint-" + (RandomString -allChars $false -len 6) $pe2 = "privateEndpoint-" + (RandomString -allChars $false -len 6) + $storageAccountName1 = "$dependentResourcesPrefix-sa1".Replace('-', '').ToLower() + $storageAccountId1 = "$resourceGroupArmId/providers/Microsoft.Storage/storageAccounts/$storageAccountName1" + $vnetResourceId = "$resourceGroupArmId/providers/Microsoft.Network/virtualNetworks/$dependentResourcesPrefix-vnet" + $subnet1ResourceId = "$vnetResourceId/subnets/default" + $subnet2ResourceId = "$vnetResourceId/subnets/default2" + $subnet3ResourceId = "$vnetResourceId/subnets/default3" + $msi1Name = "$dependentResourcesPrefix-msi1" + $msi2Name = "$dependentResourcesPrefix-msi2" + $msi1ResourceId = "$resourceGroupArmId/providers/Microsoft.ManagedIdentity/userAssignedIdentities/$msi1Name" + $msi2ResourceId = "$resourceGroupArmId/providers/Microsoft.ManagedIdentity/userAssignedIdentities/$msi2Name" $namespacePrimaryKey = GenerateSASKey $namespaceSecondaryKey = GenerateSASKey $eventHubPrimaryKey = GenerateSASKey $eventHubSecondaryKey = GenerateSASKey - New-AzResourceGroup -Name $resourceGroup -Location eastus - + $env.Add("location", $location) + $env.Add("secondaryLocation", $secondaryLocation) + $env.Add("useZoneRedundancy", $useZoneRedundancy) $env.Add("resourceGroup", $resourceGroup) - $env.Add("systemAssignedNamespaceName", $systemAssignedNamespaceName) - $env.Add("keyVaultUri", $keyVaultUri) $env.Add("namespace", $namespaceName) $env.Add("namespaceV1", $namespaceV1) $env.Add("namespaceV2", $namespaceV2) @@ -109,8 +99,10 @@ function setupEnv() { $env.Add("namespaceV7", $namespaceV7) $env.Add("namespaceV8", $namespaceV8) $env.Add("namespaceV9", $namespaceV9) + $env.Add("systemAssignedNamespaceName", $systemAssignedNamespaceName) + $env.Add("keyVaultUri", $keyVaultUri) $env.Add("primaryNamespace", $primaryNamespaceName) - $env.Add("secondaryNamespace", $secondaryNamespace) + $env.Add("secondaryNamespace", $secondaryNamespaceName) $env.Add("primaryNamespaceResourceId", $primaryNamespaceResourceId) $env.Add("secondaryNamespaceResourceId", $secondaryNamespaceResourceId) $env.Add("authRule", $authRule) @@ -135,61 +127,91 @@ function setupEnv() { $env.Add("cluster", $cluster) $env.Add("cluster2", $cluster2) $env.Add("clusterResourceGroup", "AutomatedPowershellTesting") + $env.Add("clusterSubscriptionId", "326100e2-f69d-4268-8503-075374f62b6e") $env.Add("consumerGroup", '$Default') $env.Add("consumerGroup2", $consumerGroup2) $env.Add("consumerGroup3", $consumerGroup3) - $env.Add("alias", $alias) + $env.Add('pe1', $peName1) + $env.Add('pe2', $peName2) + $env.Add('alias', $alias) + $env.Add("subnetId1", $subnet1ResourceId) + $env.Add("subnetId2", $subnet2ResourceId) + $env.Add("subnetId3", $subnet3ResourceId) + $env.Add("msi1", $msi1ResourceId) + $env.Add("msi2", $msi2ResourceId) + $env.Add("storageAccountId", $storageAccountId1) + $env.Add("blobContainer", 'container') $env.Add("namespacePrimaryKey", $namespacePrimaryKey) $env.Add("namespaceSecondaryKey", $namespaceSecondaryKey) $env.Add("eventHubPrimaryKey", $eventHubPrimaryKey) $env.Add("eventHubSecondaryKey", $eventHubSecondaryKey) + Write-Host -ForegroundColor Magenta "Creating resource group $resourceGroup in $location" + + New-AzResourceGroup -Name $resourceGroup -Location $location -Verbose:$verbose + + Write-Host -ForegroundColor Magenta "Deploying dependencies ARM template" + + $dependentResourcesTemplate = Get-Content .\test\deployment-template\DependentResourcesParameters.json | ConvertFrom-Json + $dependentResourcesTemplate.parameters.resource_name_prefix.value = $dependentResourcesPrefix + $dependentResourcesTemplate.parameters.useZoneRedundancy.value = $useZoneRedundancy + Set-Content -Path .\test\deployment-template\DependentResourcesParameters.json -Value (ConvertTo-Json $dependentResourcesTemplate) + $rg = New-AzResourceGroupDeployment -TemplateFile .\test\deployment-template\DependentResourcesTemplate.json -TemplateParameterFile .\test\deployment-template\DependentResourcesParameters.json -Name dependenciesTemplate -ResourceGroupName $resourceGroup -Verbose:$verbose + + Write-Host -ForegroundColor Magenta "Deployed dependencies ARM template" + + # RBAC is best setup via PowerShell as ARM template experience is extremely lacking + Write-Host -ForegroundColor Magenta "Setting up RBAC permissions" + $token = Get-AzAccessToken + $appIdGuid = [Guid]::Empty + if ([Guid]::TryParse($token.UserId, [ref]$appIdGuid)) { + # If the user id is a Guid, the login identity is an AAD App. + New-AzRoleAssignment -ApplicationId $token.UserId -RoleDefinitionName "Storage Blob Data Contributor" -Scope $env.storageAccountId -Verbose:$verbose + } + else { + New-AzRoleAssignment -SignInName $token.UserId -RoleDefinitionName "Storage Blob Data Contributor" -Scope $env.storageAccountId -Verbose:$verbose + } + + $msi1 = Get-AzUserAssignedIdentity -Name $msi1Name -ResourceGroupName $resourceGroup + $msi2 = Get-AzUserAssignedIdentity -Name $msi2Name -ResourceGroupName $resourceGroup + New-AzRoleAssignment -ObjectId $msi1.PrincipalId -RoleDefinitionName "Storage Blob Data Contributor" -Scope $env.storageAccountId -Verbose:$verbose + New-AzRoleAssignment -ObjectId $msi2.PrincipalId -RoleDefinitionName "Storage Blob Data Contributor" -Scope $env.storageAccountId -Verbose:$verbose + + Write-Host -ForegroundColor Magenta "Successfully set up RBAC permissions" + + Write-Host -ForegroundColor Magenta "Deploying Event Hubs namespace template" + $eventHubTemplate = Get-Content .\test\deployment-template\parameter.json | ConvertFrom-Json + $eventHubTemplate.parameters.secondaryLocation.value = $secondaryLocation $eventHubTemplate.parameters.namespace_name.value = $namespaceName $eventHubTemplate.parameters.system_assigned_namespace_name.value = $systemAssignedNamespaceName + $eventHubTemplate.parameters.primary_namespace_name.value = $primaryNamespaceName + $eventHubTemplate.parameters.secondary_namespace_name.value = $secondaryNamespaceName $eventHubTemplate.parameters.namespace_auth_rule_name.value = $authRule $eventHubTemplate.parameters.eventhub_auth_rule_name.value = $eventHubAuthRule $eventHubTemplate.parameters.eventhub_name.value = $eventHub $eventHubTemplate.parameters.schema_group_name.value = $schemaGroup $eventHubTemplate.parameters.appgroup_name.value = $appGroup - $eventHubTemplate.parameters.namespaceResourceId.value = $namespaceResourceId + $eventHubTemplate.parameters.subnet1Id.value = $subnet1ResourceId $eventHubTemplate.parameters.peName1.value = $pe1 $eventHubTemplate.parameters.peName2.value = $pe2 + $eventHubTemplate.parameters.namespaceResourceId.value = $namespaceResourceId + $eventHubTemplate.parameters.useZoneRedundancy.value = $useZoneRedundancy Set-Content -Path .\test\deployment-template\parameter.json -Value (ConvertTo-Json $eventHubTemplate) - $rg = New-AzResourceGroupDeployment -TemplateFile .\test\deployment-template\template.json -TemplateParameterFile .\test\deployment-template\parameter.json -Name eventHubTemplate -ResourceGroupName $resourceGroup + $rg = New-AzResourceGroupDeployment -TemplateFile .\test\deployment-template\template.json -TemplateParameterFile .\test\deployment-template\parameter.json -Name eventHubTemplate -ResourceGroupName $resourceGroup -Verbose:$verbose - Write-Host -ForegroundColor Magenta "Deployed EventHubs namespace template" - - $eventHubTemplate = Get-Content .\test\deployment-template\disasterRecoveryParameter.json | ConvertFrom-Json - $eventHubTemplate.parameters.secondarynamespace_name.value = $secondaryNamespace - $eventHubTemplate.parameters.namespace_name.value = $primaryNamespaceName - Set-Content -Path .\test\deployment-template\disasterRecoveryParameter.json -Value (ConvertTo-Json $eventHubTemplate) - $rg = New-AzResourceGroupDeployment -TemplateFile .\test\deployment-template\disasterRecoveryTemplate.json -TemplateParameterFile .\test\deployment-template\disasterRecoveryParameter.json -Name DRConfigTemplate -ResourceGroupName $resourceGroup + Write-Host -ForegroundColor Magenta "Deployed Event Hubs namespace template" Write-Host -ForegroundColor Magenta "Deploying KeyVault ARM template" - $namespace = Get-AzEventHubNamespaceV2 -ResourceGroupName $env.resourceGroup -NamespaceName $env.systemAssignedNamespaceName - $keyVaultTemplate = Get-Content .\test\deployment-template\keyVaultParameter.json | ConvertFrom-Json - $keyVaultTemplate.parameters.key_Vault_Name.value = $keyVaultName - $keyVaultTemplate.parameters.tenant_id.value = $env.Tenant - $keyVaultTemplate.parameters.object_id.value = $namespace.PrincipalId - Set-Content -Path .\test\deployment-template\keyVaultParameter.json -Value (ConvertTo-Json $keyVaultTemplate) - $rg = New-AzResourceGroupDeployment -TemplateFile .\test\deployment-template\keyVaultTemplate.json -TemplateParameterFile .\test\deployment-template\keyVaultParameter.json -Name keyVaultTemplate -ResourceGroupName $resourceGroup + $keyVaultTemplate = Get-Content .\test\deployment-template\KeyVaultParameters.json | ConvertFrom-Json + $keyVaultTemplate.parameters.resource_name_prefix.value = $dependentResourcesPrefix + $keyVaultTemplate.parameters.system_assigned_namespace_name.value = $systemAssignedNamespaceName + Set-Content -Path .\test\deployment-template\KeyVaultParameters.json -Value (ConvertTo-Json $keyVaultTemplate) + $rg = New-AzResourceGroupDeployment -TemplateFile .\test\deployment-template\KeyVaultTemplate.json -TemplateParameterFile .\test\deployment-template\KeyVaultParameters.json -Name keyVaultTemplate -ResourceGroupName $resourceGroup -Verbose:$verbose Write-Host -ForegroundColor Magenta "Deployed KeyVault ARM template" - $resourceNames = Get-Content .\test\deployment-template\pre-created-resources\parameter.json | ConvertFrom-Json - $env.Add("storageAccountId", $resourceNames.parameters.storageAccountId.Value) - $env.Add("blobContainer", $resourceNames.parameters.blobContainer.Value) - $env.Add("subnetId1", $resourceNames.parameters.virtualNetworkId.Value) - $env.Add("subnetId2", $resourceNames.parameters.virtualNetworkId2.Value) - $env.Add("subnetId3", $resourceNames.parameters.virtualNetworkId3.Value) - #msi 1 and msi 2 are Resource ID's of already existing managed identities - $env.Add("msi1", $resourceNames.parameters.msi1.Value) - $env.Add("msi2", $resourceNames.parameters.msi2.Value) - - Write-Host -ForegroundColor Magenta "Deployed Disaster Recovery template" - # For any resources you created for test, you should add it to $env here. $envFile = 'env.json' if ($TestMode -eq 'live') { @@ -213,8 +235,9 @@ function GenerateSASKey { $Signature } -function cleanupEnv() { +function cleanupEnv( + $verbose = $false) { # Clean resources you create for testing - Remove-AzResourceGroup -Name $env.resourceGroup + Remove-AzResourceGroup -Name $env.resourceGroup -Confirm:$false -Verbose:$verbose } diff --git a/src/EventHub/EventHub/Az.EventHub.psd1 b/src/EventHub/EventHub/Az.EventHub.psd1 index 73a346d9c121..3797b2cc7c42 100644 --- a/src/EventHub/EventHub/Az.EventHub.psd1 +++ b/src/EventHub/EventHub/Az.EventHub.psd1 @@ -3,7 +3,7 @@ # # Generated by: Microsoft Corporation # -# Generated on: 23/04/2024 +# Generated on: 5/6/2024 # @{ @@ -60,13 +60,13 @@ RequiredAssemblies = 'EventHub.Autorest/bin/Az.EventHub.private.dll', 'Microsoft.Azure.Management.EventHub.dll' # Script files (.ps1) that are run in the caller's environment prior to importing this module. -# ScriptsToProcess = @() +ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module -# TypesToProcess = @() +TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module -FormatsToProcess = 'EventHub.Autorest\Az.EventHub.format.ps1xml', +FormatsToProcess = 'EventHub.Autorest/Az.EventHub.format.ps1xml', 'EventHub.format.ps1xml' # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess @@ -129,7 +129,7 @@ PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. - Tags = 'Azure','ResourceManager','ARM','EventHub' + Tags = 'Azure', 'ResourceManager', 'ARM', 'EventHub' # A URL to the license for this module. LicenseUri = 'https://aka.ms/azps-license' @@ -154,7 +154,7 @@ PrivateData = @{ } # End of PSData hashtable - } # End of PrivateData hashtable +} # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' diff --git a/src/EventHub/EventHub/ChangeLog.md b/src/EventHub/EventHub/ChangeLog.md index e20a43b1f3f5..19b2d24ffd04 100644 --- a/src/EventHub/EventHub/ChangeLog.md +++ b/src/EventHub/EventHub/ChangeLog.md @@ -18,6 +18,7 @@ - Additional information about change #1 --> ## Upcoming Release +* Moved cmdlets to V4 ## Version 4.2.2 * Introduced secrets detection feature to safeguard sensitive data. diff --git a/src/EventHub/EventHub/help/Approve-AzEventHubPrivateEndpointConnection.md b/src/EventHub/EventHub/help/Approve-AzEventHubPrivateEndpointConnection.md index d05cd4ae8400..4cbac19e5e09 100644 --- a/src/EventHub/EventHub/help/Approve-AzEventHubPrivateEndpointConnection.md +++ b/src/EventHub/EventHub/help/Approve-AzEventHubPrivateEndpointConnection.md @@ -16,13 +16,13 @@ Approves an EventHub PrivateEndpointConnection ``` Approve-AzEventHubPrivateEndpointConnection -NamespaceName -ResourceGroupName [-Name ] [-SubscriptionId ] [-Description ] [-DefaultProfile ] [-AsJob] - [-NoWait] [] + [-NoWait] [-ProgressAction ] [] ``` ### SetViaIdentityExpanded ``` Approve-AzEventHubPrivateEndpointConnection -InputObject [-Description ] - [-DefaultProfile ] [-AsJob] [-NoWait] [] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -175,6 +175,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. @@ -215,7 +230,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection ## NOTES diff --git a/src/EventHub/EventHub/help/Az.EventHub.md b/src/EventHub/EventHub/help/Az.EventHub.md index 08a70b8b2fec..fa122555ab6a 100644 --- a/src/EventHub/EventHub/help/Az.EventHub.md +++ b/src/EventHub/EventHub/help/Az.EventHub.md @@ -60,10 +60,10 @@ Gets lists of resources that supports Privatelinks. Gets the details of an EventHub schema group. ### [New-AzEventHub](New-AzEventHub.md) -Creates or updates a new Event Hub as a nested resource within a Namespace. +Create a new Event Hub as a nested resource within a Namespace. ### [New-AzEventHubApplicationGroup](New-AzEventHubApplicationGroup.md) -Creates or updates an ApplicationGroup for a Namespace. +Create an ApplicationGroup for a Namespace. ### [New-AzEventHubAuthorizationRule](New-AzEventHubAuthorizationRule.md) Creates an EventHub Authorization Rule @@ -72,13 +72,13 @@ Creates an EventHub Authorization Rule Generates a SAS token for Azure eventhub authorization rule of namespace/eventhub. ### [New-AzEventHubCluster](New-AzEventHubCluster.md) -Creates or updates an instance of an Event Hubs Cluster. +Create an instance of an Event Hubs Cluster. ### [New-AzEventHubConsumerGroup](New-AzEventHubConsumerGroup.md) -Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. +Create an Event Hubs consumer group as a nested resource within a Namespace. ### [New-AzEventHubGeoDRConfiguration](New-AzEventHubGeoDRConfiguration.md) -Creates or updates a new Alias(Disaster Recovery configuration) +Create a new Alias(Disaster Recovery configuration) ### [New-AzEventHubIPRuleConfig](New-AzEventHubIPRuleConfig.md) Constructs an INwRuleSetIPRules object that can be fed as input to Set-AzEventHubNetworkRuleSet @@ -93,7 +93,7 @@ Create an in-memory object for KeyVaultProperties. Creates an EventHub Namespace ### [New-AzEventHubSchemaGroup](New-AzEventHubSchemaGroup.md) -Creates or Updates an EventHub schema group. +Create an EventHub schema group. ### [New-AzEventHubThrottlingPolicyConfig](New-AzEventHubThrottlingPolicyConfig.md) Constructs an IThrottlingPolicy object that can be fed as input to New-AzEventHubApplicationGroup or Set-AzEventHubApplicationGroup diff --git a/src/EventHub/EventHub/help/Deny-AzEventHubPrivateEndpointConnection.md b/src/EventHub/EventHub/help/Deny-AzEventHubPrivateEndpointConnection.md index c7fa0b6b41cd..462a8f67bf98 100644 --- a/src/EventHub/EventHub/help/Deny-AzEventHubPrivateEndpointConnection.md +++ b/src/EventHub/EventHub/help/Deny-AzEventHubPrivateEndpointConnection.md @@ -16,13 +16,13 @@ Denies an EventHub PrivateEndpointConnection ``` Deny-AzEventHubPrivateEndpointConnection -NamespaceName -ResourceGroupName [-Name ] [-SubscriptionId ] [-Description ] [-DefaultProfile ] [-AsJob] [-NoWait] - [] + [-ProgressAction ] [] ``` ### SetViaIdentityExpanded ``` Deny-AzEventHubPrivateEndpointConnection -InputObject [-Description ] - [-DefaultProfile ] [-AsJob] [-NoWait] [] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -177,6 +177,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. @@ -217,7 +232,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection ## NOTES diff --git a/src/EventHub/EventHub/help/Get-AzEventHub.md b/src/EventHub/EventHub/help/Get-AzEventHub.md index a7f0f91b8cf9..c9187b51cbc7 100644 --- a/src/EventHub/EventHub/help/Get-AzEventHub.md +++ b/src/EventHub/EventHub/help/Get-AzEventHub.md @@ -15,19 +15,25 @@ Gets an Event Hubs description for the specified Event Hub. ### List (Default) ``` Get-AzEventHub -NamespaceName -ResourceGroupName [-SubscriptionId ] [-Skip ] - [-Top ] [-DefaultProfile ] [] + [-Top ] [-DefaultProfile ] [-ProgressAction ] [] +``` + +### GetViaIdentityNamespace +``` +Get-AzEventHub -Name -NamespaceInputObject [-DefaultProfile ] + [-ProgressAction ] [] ``` ### Get ``` Get-AzEventHub -Name -NamespaceName -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### GetViaIdentity ``` Get-AzEventHub -InputObject [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -104,7 +110,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity @@ -123,7 +128,7 @@ The Event Hub name ```yaml Type: System.String -Parameter Sets: Get +Parameter Sets: GetViaIdentityNamespace, Get Aliases: EventHubName Required: True @@ -133,6 +138,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity +Parameter Sets: GetViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The Namespace name @@ -148,6 +168,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Name of the resource group within the azure subscription. @@ -219,7 +254,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub ## NOTES diff --git a/src/EventHub/EventHub/help/Get-AzEventHubApplicationGroup.md b/src/EventHub/EventHub/help/Get-AzEventHubApplicationGroup.md index 7c7aa7f3aeaf..6b4e0877b45d 100644 --- a/src/EventHub/EventHub/help/Get-AzEventHubApplicationGroup.md +++ b/src/EventHub/EventHub/help/Get-AzEventHubApplicationGroup.md @@ -15,20 +15,26 @@ Gets an ApplicationGroup for a Namespace. ### List (Default) ``` Get-AzEventHubApplicationGroup -NamespaceName -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] +``` + +### GetViaIdentityNamespace +``` +Get-AzEventHubApplicationGroup -Name -NamespaceInputObject + [-DefaultProfile ] [-ProgressAction ] [] ``` ### Get ``` Get-AzEventHubApplicationGroup -Name -NamespaceName -ResourceGroupName - [-SubscriptionId ] [-DefaultProfile ] + [-SubscriptionId ] [-DefaultProfile ] [-ProgressAction ] [] ``` ### GetViaIdentity ``` Get-AzEventHubApplicationGroup -InputObject [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -91,7 +97,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity @@ -110,7 +115,7 @@ The Application Group name ```yaml Type: System.String -Parameter Sets: Get +Parameter Sets: GetViaIdentityNamespace, Get Aliases: ApplicationGroupName Required: True @@ -120,6 +125,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity +Parameter Sets: GetViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The Namespace name @@ -135,6 +155,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Name of the resource group within the azure subscription. @@ -175,7 +210,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup ## NOTES diff --git a/src/EventHub/EventHub/help/Get-AzEventHubAuthorizationRule.md b/src/EventHub/EventHub/help/Get-AzEventHubAuthorizationRule.md index 61e66bad6388..3d23c3bee96a 100644 --- a/src/EventHub/EventHub/help/Get-AzEventHubAuthorizationRule.md +++ b/src/EventHub/EventHub/help/Get-AzEventHubAuthorizationRule.md @@ -15,7 +15,7 @@ Gets an EventHub Authorization Rule ### GetExpandedNamespace (Default) ``` Get-AzEventHubAuthorizationRule -NamespaceName -ResourceGroupName [-Name ] - [-SubscriptionId ] [-DefaultProfile ] + [-SubscriptionId ] [-DefaultProfile ] [-ProgressAction ] [] ``` @@ -23,20 +23,20 @@ Get-AzEventHubAuthorizationRule -NamespaceName -ResourceGroupName -ResourceGroupName [-Name ] [-SubscriptionId ] -EventHubName [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### GetExpandedAlias ``` Get-AzEventHubAuthorizationRule -NamespaceName -ResourceGroupName [-Name ] [-SubscriptionId ] -AliasName [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### GetViaIdentityExpanded ``` Get-AzEventHubAuthorizationRule -InputObject [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -169,6 +169,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. @@ -209,7 +224,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule ## NOTES diff --git a/src/EventHub/EventHub/help/Get-AzEventHubCluster.md b/src/EventHub/EventHub/help/Get-AzEventHubCluster.md index 5d4f2278cba9..6cddceef12e8 100644 --- a/src/EventHub/EventHub/help/Get-AzEventHubCluster.md +++ b/src/EventHub/EventHub/help/Get-AzEventHubCluster.md @@ -15,25 +15,25 @@ Gets the resource description of the specified Event Hubs Cluster. ### List (Default) ``` Get-AzEventHubCluster [-SubscriptionId ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### Get ``` Get-AzEventHubCluster -Name -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### List1 ``` Get-AzEventHubCluster -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### GetViaIdentity ``` Get-AzEventHubCluster -InputObject [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -82,7 +82,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity @@ -111,6 +110,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Name of the resource group within the azure subscription. @@ -151,7 +165,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster ## NOTES diff --git a/src/EventHub/EventHub/help/Get-AzEventHubClusterNamespace.md b/src/EventHub/EventHub/help/Get-AzEventHubClusterNamespace.md index d0d3bd2e0188..1101efb5e779 100644 --- a/src/EventHub/EventHub/help/Get-AzEventHubClusterNamespace.md +++ b/src/EventHub/EventHub/help/Get-AzEventHubClusterNamespace.md @@ -14,7 +14,7 @@ List all Event Hubs Namespace IDs in an Event Hubs Dedicated Cluster. ``` Get-AzEventHubClusterNamespace -ClusterName -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -69,6 +69,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Name of the resource group within the azure subscription. @@ -107,7 +122,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceIdContainer +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespaceIdListResult ## NOTES diff --git a/src/EventHub/EventHub/help/Get-AzEventHubClustersAvailableRegion.md b/src/EventHub/EventHub/help/Get-AzEventHubClustersAvailableRegion.md index 7dc9b9f8e54f..705deee5ca6d 100644 --- a/src/EventHub/EventHub/help/Get-AzEventHubClustersAvailableRegion.md +++ b/src/EventHub/EventHub/help/Get-AzEventHubClustersAvailableRegion.md @@ -14,7 +14,7 @@ List the quantity of available pre-provisioned Event Hubs Clusters, indexed by A ``` Get-AzEventHubClustersAvailableRegion [-SubscriptionId ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -47,6 +47,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -SubscriptionId Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. @@ -70,7 +85,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAvailableCluster +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAvailableClustersList ## NOTES diff --git a/src/EventHub/EventHub/help/Get-AzEventHubConsumerGroup.md b/src/EventHub/EventHub/help/Get-AzEventHubConsumerGroup.md index 3c05c726ea85..90a7be34840f 100644 --- a/src/EventHub/EventHub/help/Get-AzEventHubConsumerGroup.md +++ b/src/EventHub/EventHub/help/Get-AzEventHubConsumerGroup.md @@ -16,20 +16,32 @@ Gets a description for the specified consumer group. ``` Get-AzEventHubConsumerGroup -EventHubName -NamespaceName -ResourceGroupName [-SubscriptionId ] [-Skip ] [-Top ] [-DefaultProfile ] - [] + [-ProgressAction ] [] +``` + +### GetViaIdentityNamespace +``` +Get-AzEventHubConsumerGroup -EventHubName -Name -NamespaceInputObject + [-DefaultProfile ] [-ProgressAction ] [] ``` ### Get ``` Get-AzEventHubConsumerGroup -EventHubName -Name -NamespaceName -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] - [] + [-ProgressAction ] [] +``` + +### GetViaIdentityEventhub +``` +Get-AzEventHubConsumerGroup -Name -EventhubInputObject + [-DefaultProfile ] [-ProgressAction ] [] ``` ### GetViaIdentity ``` Get-AzEventHubConsumerGroup -InputObject [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -80,12 +92,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -EventhubInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity +Parameter Sets: GetViaIdentityEventhub +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -EventHubName The Event Hub name ```yaml Type: System.String -Parameter Sets: List, Get +Parameter Sets: List, GetViaIdentityNamespace, Get Aliases: Required: True @@ -97,7 +124,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity @@ -116,7 +142,7 @@ The consumer group name ```yaml Type: System.String -Parameter Sets: Get +Parameter Sets: GetViaIdentityNamespace, Get, GetViaIdentityEventhub Aliases: ConsumerGroupName Required: True @@ -126,6 +152,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity +Parameter Sets: GetViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The Namespace name @@ -141,6 +182,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Name of the resource group within the azure subscription. @@ -212,7 +268,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup ## NOTES diff --git a/src/EventHub/EventHub/help/Get-AzEventHubGeoDRConfiguration.md b/src/EventHub/EventHub/help/Get-AzEventHubGeoDRConfiguration.md index 7fb874311286..f6f9b81cca93 100644 --- a/src/EventHub/EventHub/help/Get-AzEventHubGeoDRConfiguration.md +++ b/src/EventHub/EventHub/help/Get-AzEventHubGeoDRConfiguration.md @@ -15,21 +15,27 @@ Retrieves Alias(Disaster Recovery configuration) for primary or secondary namesp ### List (Default) ``` Get-AzEventHubGeoDRConfiguration -NamespaceName -ResourceGroupName - [-SubscriptionId ] [-DefaultProfile ] + [-SubscriptionId ] [-DefaultProfile ] [-ProgressAction ] [] ``` +### GetViaIdentityNamespace +``` +Get-AzEventHubGeoDRConfiguration -Name -NamespaceInputObject + [-DefaultProfile ] [-ProgressAction ] [] +``` + ### Get ``` Get-AzEventHubGeoDRConfiguration -Name -NamespaceName -ResourceGroupName - [-SubscriptionId ] [-DefaultProfile ] + [-SubscriptionId ] [-DefaultProfile ] [-ProgressAction ] [] ``` ### GetViaIdentity ``` Get-AzEventHubGeoDRConfiguration -InputObject [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -76,7 +82,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity @@ -95,7 +100,7 @@ The Disaster Recovery configuration name ```yaml Type: System.String -Parameter Sets: Get +Parameter Sets: GetViaIdentityNamespace, Get Aliases: Required: True @@ -105,6 +110,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity +Parameter Sets: GetViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The Namespace name @@ -120,6 +140,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Name of the resource group within the azure subscription. @@ -160,7 +195,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery ## NOTES diff --git a/src/EventHub/EventHub/help/Get-AzEventHubKey.md b/src/EventHub/EventHub/help/Get-AzEventHubKey.md index b5819223f28c..1f1321e4060b 100644 --- a/src/EventHub/EventHub/help/Get-AzEventHubKey.md +++ b/src/EventHub/EventHub/help/Get-AzEventHubKey.md @@ -16,21 +16,21 @@ Gets an EventHub SAS key ``` Get-AzEventHubKey -Name -NamespaceName -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] - [] + [-ProgressAction ] [] ``` ### GetExpandedAlias ``` Get-AzEventHubKey -Name -NamespaceName -ResourceGroupName [-SubscriptionId ] -AliasName [-DefaultProfile ] [-AsJob] [-NoWait] - [] + [-ProgressAction ] [] ``` ### GetExpandedEntity ``` Get-AzEventHubKey -Name -NamespaceName -ResourceGroupName [-SubscriptionId ] -EventHubName [-DefaultProfile ] [-AsJob] [-NoWait] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -179,6 +179,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. @@ -217,7 +232,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys ## NOTES diff --git a/src/EventHub/EventHub/help/Get-AzEventHubNamespace.md b/src/EventHub/EventHub/help/Get-AzEventHubNamespace.md index 09107d72daa2..98eb5348ed1e 100644 --- a/src/EventHub/EventHub/help/Get-AzEventHubNamespace.md +++ b/src/EventHub/EventHub/help/Get-AzEventHubNamespace.md @@ -15,25 +15,25 @@ Gets the description of the specified namespace. ### List (Default) ``` Get-AzEventHubNamespace [-SubscriptionId ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### Get ``` Get-AzEventHubNamespace -Name -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### List1 ``` Get-AzEventHubNamespace -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### GetViaIdentity ``` Get-AzEventHubNamespace -InputObject [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -119,7 +119,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity @@ -148,6 +147,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Name of the resource group within the azure subscription. @@ -188,7 +202,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace ## NOTES diff --git a/src/EventHub/EventHub/help/Get-AzEventHubNetworkRuleSet.md b/src/EventHub/EventHub/help/Get-AzEventHubNetworkRuleSet.md index 06ae11fd2368..2c5ca4e57a46 100644 --- a/src/EventHub/EventHub/help/Get-AzEventHubNetworkRuleSet.md +++ b/src/EventHub/EventHub/help/Get-AzEventHubNetworkRuleSet.md @@ -15,19 +15,19 @@ Gets NetworkRuleSet for a Namespace. ### Get (Default) ``` Get-AzEventHubNetworkRuleSet -NamespaceName -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### List ``` Get-AzEventHubNetworkRuleSet -NamespaceName -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### GetViaIdentity ``` Get-AzEventHubNetworkRuleSet -InputObject [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -73,7 +73,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity @@ -102,6 +101,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Name of the resource group within the azure subscription. @@ -142,9 +156,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetListResult +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSetListResult ## NOTES diff --git a/src/EventHub/EventHub/help/Get-AzEventHubPrivateEndpointConnection.md b/src/EventHub/EventHub/help/Get-AzEventHubPrivateEndpointConnection.md index 1b59232feb05..3118361bcb71 100644 --- a/src/EventHub/EventHub/help/Get-AzEventHubPrivateEndpointConnection.md +++ b/src/EventHub/EventHub/help/Get-AzEventHubPrivateEndpointConnection.md @@ -15,21 +15,27 @@ Gets a description for the specified Private Endpoint Connection name. ### List (Default) ``` Get-AzEventHubPrivateEndpointConnection -NamespaceName -ResourceGroupName - [-SubscriptionId ] [-DefaultProfile ] + [-SubscriptionId ] [-DefaultProfile ] [-ProgressAction ] [] ``` +### GetViaIdentityNamespace +``` +Get-AzEventHubPrivateEndpointConnection -Name -NamespaceInputObject + [-DefaultProfile ] [-ProgressAction ] [] +``` + ### Get ``` Get-AzEventHubPrivateEndpointConnection -Name -NamespaceName -ResourceGroupName - [-SubscriptionId ] [-DefaultProfile ] + [-SubscriptionId ] [-DefaultProfile ] [-ProgressAction ] [] ``` ### GetViaIdentity ``` Get-AzEventHubPrivateEndpointConnection -InputObject [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -83,7 +89,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity @@ -102,7 +107,7 @@ The PrivateEndpointConnection name ```yaml Type: System.String -Parameter Sets: Get +Parameter Sets: GetViaIdentityNamespace, Get Aliases: PrivateEndpointConnectionName Required: True @@ -112,6 +117,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity +Parameter Sets: GetViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The Namespace name @@ -127,6 +147,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Name of the resource group within the azure subscription. @@ -167,8 +202,13 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection ## NOTES ## RELATED LINKS + +[https://msdn.microsoft.com/en-us/library/azure/mt639379.aspx](https://msdn.microsoft.com/en-us/library/azure/mt639379.aspx) + +[https://msdn.microsoft.com/en-us/library/azure/mt639412.aspx](https://msdn.microsoft.com/en-us/library/azure/mt639412.aspx) + diff --git a/src/EventHub/EventHub/help/Get-AzEventHubPrivateLink.md b/src/EventHub/EventHub/help/Get-AzEventHubPrivateLink.md index 11af80f09afb..7bfa48b8611d 100644 --- a/src/EventHub/EventHub/help/Get-AzEventHubPrivateLink.md +++ b/src/EventHub/EventHub/help/Get-AzEventHubPrivateLink.md @@ -14,7 +14,7 @@ Gets lists of resources that supports Privatelinks. ``` Get-AzEventHubPrivateLink -NamespaceName -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -71,6 +71,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Name of the resource group within the azure subscription. @@ -109,8 +124,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourcesListResult +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResourcesListResult ## NOTES ## RELATED LINKS + +[https://msdn.microsoft.com/en-us/library/azure/mt639379.aspx](https://msdn.microsoft.com/en-us/library/azure/mt639379.aspx) + diff --git a/src/EventHub/EventHub/help/Get-AzEventHubSchemaGroup.md b/src/EventHub/EventHub/help/Get-AzEventHubSchemaGroup.md index 7464bace3b80..5f3ec530ece8 100644 --- a/src/EventHub/EventHub/help/Get-AzEventHubSchemaGroup.md +++ b/src/EventHub/EventHub/help/Get-AzEventHubSchemaGroup.md @@ -15,21 +15,27 @@ Gets the details of an EventHub schema group. ### List (Default) ``` Get-AzEventHubSchemaGroup -NamespaceName -ResourceGroupName [-SubscriptionId ] - [-Skip ] [-Top ] [-DefaultProfile ] + [-Skip ] [-Top ] [-DefaultProfile ] [-ProgressAction ] [] ``` +### GetViaIdentityNamespace +``` +Get-AzEventHubSchemaGroup -Name -NamespaceInputObject [-DefaultProfile ] + [-ProgressAction ] [] +``` + ### Get ``` Get-AzEventHubSchemaGroup -Name -NamespaceName -ResourceGroupName - [-SubscriptionId ] [-DefaultProfile ] + [-SubscriptionId ] [-DefaultProfile ] [-ProgressAction ] [] ``` ### GetViaIdentity ``` Get-AzEventHubSchemaGroup -InputObject [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -84,7 +90,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity @@ -103,7 +108,7 @@ The Schema Group name ```yaml Type: System.String -Parameter Sets: Get +Parameter Sets: GetViaIdentityNamespace, Get Aliases: SchemaGroupName Required: True @@ -113,6 +118,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity +Parameter Sets: GetViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The Namespace name @@ -128,6 +148,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Name of the resource group within the azure subscription. @@ -199,7 +234,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup ## NOTES diff --git a/src/EventHub/EventHub/help/New-AzEventHub.md b/src/EventHub/EventHub/help/New-AzEventHub.md index 0523d9b3a767..54c31bbf8ecc 100644 --- a/src/EventHub/EventHub/help/New-AzEventHub.md +++ b/src/EventHub/EventHub/help/New-AzEventHub.md @@ -8,23 +8,40 @@ schema: 2.0.0 # New-AzEventHub ## SYNOPSIS -Creates or updates a new Event Hub as a nested resource within a Namespace. +Create a new Event Hub as a nested resource within a Namespace. ## SYNTAX +### CreateExpanded (Default) ``` New-AzEventHub -Name -NamespaceName -ResourceGroupName [-SubscriptionId ] - [-ArchiveNameFormat ] [-BlobContainer ] [-CaptureEnabled] - [-CleanupPolicy ] [-DestinationName ] - [-Encoding ] [-IdentityType ] [-IntervalInSeconds ] + [-ArchiveNameFormat ] [-BlobContainer ] [-CaptureEnabled] [-CleanupPolicy ] + [-DestinationName ] [-Encoding ] [-IdentityType ] [-IntervalInSeconds ] [-PartitionCount ] [-RetentionTimeInHour ] [-SizeLimitInBytes ] [-SkipEmptyArchive] - [-Status ] [-StorageAccountResourceId ] [-TombstoneRetentionTimeInHour ] - [-UserAssignedIdentityId ] [-DefaultProfile ] [-WhatIf] + [-Status ] [-StorageAccountResourceId ] [-TombstoneRetentionTimeInHour ] + [-UserAssignedIdentityId ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` +### CreateViaIdentityNamespaceExpanded +``` +New-AzEventHub -Name -NamespaceInputObject [-ArchiveNameFormat ] + [-BlobContainer ] [-CaptureEnabled] [-CleanupPolicy ] [-DestinationName ] + [-Encoding ] [-IdentityType ] [-IntervalInSeconds ] [-PartitionCount ] + [-RetentionTimeInHour ] [-SizeLimitInBytes ] [-SkipEmptyArchive] [-Status ] + [-StorageAccountResourceId ] [-TombstoneRetentionTimeInHour ] + [-UserAssignedIdentityId ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] + [-Confirm] [] +``` + +### CreateViaIdentityNamespace +``` +New-AzEventHub -Name -NamespaceInputObject -Parameter + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + ## DESCRIPTION -Creates or updates a new Event Hub as a nested resource within a Namespace. +Create a new Event Hub as a nested resource within a Namespace. ## EXAMPLES @@ -153,7 +170,7 @@ etc) are mandatory irrespective of order ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -168,7 +185,7 @@ Blob container Name ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -183,7 +200,7 @@ A value that indicates whether capture description is enabled. ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -197,8 +214,8 @@ Accept wildcard characters: False Enumerates the possible values for cleanup policy ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CleanupPolicyRetentionDescription -Parameter Sets: (All) +Type: System.String +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -229,7 +246,7 @@ Name for capture destination ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -244,8 +261,8 @@ Enumerates the possible values for the encoding format of capture description. Note: 'AvroDeflate' will be deprecated in New API Version ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription -Parameter Sets: (All) +Type: System.String +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -259,8 +276,8 @@ Accept wildcard characters: False Type of Azure Active Directory Managed Identity. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType -Parameter Sets: (All) +Type: System.String +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -275,7 +292,7 @@ The time window allows you to set the frequency with which the capture to Azure ```yaml Type: System.Int32 -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -300,12 +317,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity +Parameter Sets: CreateViaIdentityNamespaceExpanded, CreateViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The Namespace name ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: True @@ -315,12 +347,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Parameter +Single item in List or Get Event Hub operation + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub +Parameter Sets: CreateViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -PartitionCount Number of partitions created for the Event Hub, allowed values are from 1 to 32 partitions. ```yaml Type: System.Int64 -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -330,12 +377,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Name of the resource group within the azure subscription. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: True @@ -352,7 +414,7 @@ If cleanupPolicy is Compact the returned value of this property is Long.MaxValue ```yaml Type: System.Int64 -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -367,7 +429,7 @@ The size window defines the amount of data built up in your Event Hub before an ```yaml Type: System.Int32 -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -382,7 +444,7 @@ A value that indicates whether to Skip Empty Archives ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -396,8 +458,8 @@ Accept wildcard characters: False Enumerates the possible values for the status of the Event Hub. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus -Parameter Sets: (All) +Type: System.String +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -412,7 +474,7 @@ Resource id of the storage account to be used to create the blobs ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -428,7 +490,7 @@ The subscription ID forms part of the URI for every service call. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -445,7 +507,7 @@ Consumer must complete reading the tombstone marker within this specified amount ```yaml Type: System.Int32 -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -462,7 +524,7 @@ If type is SystemAssigned, then the System Assigned Identity Associated with the ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -508,9 +570,13 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub + +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity + ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub ## NOTES diff --git a/src/EventHub/EventHub/help/New-AzEventHubApplicationGroup.md b/src/EventHub/EventHub/help/New-AzEventHubApplicationGroup.md index 051ac2e3a047..74ecc7d192a3 100644 --- a/src/EventHub/EventHub/help/New-AzEventHubApplicationGroup.md +++ b/src/EventHub/EventHub/help/New-AzEventHubApplicationGroup.md @@ -8,19 +8,34 @@ schema: 2.0.0 # New-AzEventHubApplicationGroup ## SYNOPSIS -Creates or updates an ApplicationGroup for a Namespace. +Create an ApplicationGroup for a Namespace. ## SYNTAX +### CreateExpanded (Default) ``` New-AzEventHubApplicationGroup -Name -NamespaceName -ResourceGroupName [-SubscriptionId ] [-ClientAppGroupIdentifier ] [-IsEnabled] - [-Policy ] [-DefaultProfile ] + [-Policy ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` +### CreateViaIdentityNamespaceExpanded +``` +New-AzEventHubApplicationGroup -Name -NamespaceInputObject + [-ClientAppGroupIdentifier ] [-IsEnabled] [-Policy ] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### CreateViaIdentityNamespace +``` +New-AzEventHubApplicationGroup -Name -NamespaceInputObject + -Parameter [-DefaultProfile ] [-ProgressAction ] [-WhatIf] + [-Confirm] [] +``` + ## DESCRIPTION -Creates or updates an ApplicationGroup for a Namespace. +Create an ApplicationGroup for a Namespace. ## EXAMPLES @@ -61,7 +76,7 @@ The Unique identifier for application group.Supports SAS(SASKeyName=KeyName) or ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -93,7 +108,7 @@ Once the isEnabled is set to false, all the existing connections of application ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -118,12 +133,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity +Parameter Sets: CreateViaIdentityNamespaceExpanded, CreateViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The Namespace name ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: True @@ -133,14 +163,28 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Parameter +The Application Group object + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup +Parameter Sets: CreateViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -Policy List of group policies that define the behavior of application group. The policies can support resource governance scenarios such as limiting ingress or egress traffic. -To construct, see NOTES section for POLICY properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicy[] -Parameter Sets: (All) +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicy[] +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -150,12 +194,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Name of the resource group within the azure subscription. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: True @@ -171,7 +230,7 @@ The subscription ID forms part of the URI for every service call. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -217,9 +276,13 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup + +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity + ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup ## NOTES diff --git a/src/EventHub/EventHub/help/New-AzEventHubAuthorizationRule.md b/src/EventHub/EventHub/help/New-AzEventHubAuthorizationRule.md index 97d39830c11f..8e653d972827 100644 --- a/src/EventHub/EventHub/help/New-AzEventHubAuthorizationRule.md +++ b/src/EventHub/EventHub/help/New-AzEventHubAuthorizationRule.md @@ -15,15 +15,15 @@ Creates an EventHub Authorization Rule ### NewExpandedNamespace (Default) ``` New-AzEventHubAuthorizationRule -Name -NamespaceName -ResourceGroupName - [-SubscriptionId ] [-Rights ] [-DefaultProfile ] [-AsJob] [-NoWait] - [-WhatIf] [-Confirm] [] + [-SubscriptionId ] [-Rights ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### NewExpandedEntity ``` New-AzEventHubAuthorizationRule -Name -NamespaceName -ResourceGroupName - [-SubscriptionId ] -EventHubName [-Rights ] [-DefaultProfile ] - [-AsJob] [-NoWait] [-WhatIf] [-Confirm] [] + [-SubscriptionId ] -EventHubName [-Rights ] [-DefaultProfile ] [-AsJob] + [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -153,6 +153,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. @@ -173,7 +188,7 @@ Accept wildcard characters: False The rights associated with the rule. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights[] +Type: System.String[] Parameter Sets: (All) Aliases: @@ -237,7 +252,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule ## NOTES diff --git a/src/EventHub/EventHub/help/New-AzEventHubAuthorizationRuleSASToken.md b/src/EventHub/EventHub/help/New-AzEventHubAuthorizationRuleSASToken.md index b658d9297c80..e5b1b6cd3c12 100644 --- a/src/EventHub/EventHub/help/New-AzEventHubAuthorizationRuleSASToken.md +++ b/src/EventHub/EventHub/help/New-AzEventHubAuthorizationRuleSASToken.md @@ -15,7 +15,7 @@ Generates a SAS token for Azure eventhub authorization rule of namespace/eventhu ``` New-AzEventHubAuthorizationRuleSASToken [-AuthorizationRuleId] [-KeyType] [-ExpiryTime] [-StartTime ] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -103,6 +103,21 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -StartTime Start Time diff --git a/src/EventHub/EventHub/help/New-AzEventHubCluster.md b/src/EventHub/EventHub/help/New-AzEventHubCluster.md index d6d9b289393d..96f1969b94b3 100644 --- a/src/EventHub/EventHub/help/New-AzEventHubCluster.md +++ b/src/EventHub/EventHub/help/New-AzEventHubCluster.md @@ -8,18 +8,18 @@ schema: 2.0.0 # New-AzEventHubCluster ## SYNOPSIS -Creates or updates an instance of an Event Hubs Cluster. +Create an instance of an Event Hubs Cluster. ## SYNTAX ``` New-AzEventHubCluster -Name -ResourceGroupName [-SubscriptionId ] [-Capacity ] [-Location ] [-SupportsScaling] [-Tag ] [-DefaultProfile ] [-AsJob] [-NoWait] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION -Creates or updates an instance of an Event Hubs Cluster. +Create an instance of an Event Hubs Cluster. ## EXAMPLES @@ -158,6 +158,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Name of the resource group within the azure subscription. @@ -257,7 +272,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster ## NOTES diff --git a/src/EventHub/EventHub/help/New-AzEventHubConsumerGroup.md b/src/EventHub/EventHub/help/New-AzEventHubConsumerGroup.md index 3db7663ea46c..39c6897fe00b 100644 --- a/src/EventHub/EventHub/help/New-AzEventHubConsumerGroup.md +++ b/src/EventHub/EventHub/help/New-AzEventHubConsumerGroup.md @@ -8,18 +8,45 @@ schema: 2.0.0 # New-AzEventHubConsumerGroup ## SYNOPSIS -Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. +Create an Event Hubs consumer group as a nested resource within a Namespace. ## SYNTAX +### CreateExpanded (Default) ``` -New-AzEventHubConsumerGroup -EventHubName -Name -NamespaceName +New-AzEventHubConsumerGroup -Name -EventHubName -NamespaceName -ResourceGroupName [-SubscriptionId ] [-UserMetadata ] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### CreateViaIdentityNamespaceExpanded +``` +New-AzEventHubConsumerGroup -Name -EventHubName -NamespaceInputObject + [-UserMetadata ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] + [-Confirm] [] +``` + +### CreateViaIdentityNamespace +``` +New-AzEventHubConsumerGroup -Name -EventHubName -NamespaceInputObject + -Parameter [-DefaultProfile ] [-ProgressAction ] [-WhatIf] + [-Confirm] [] +``` + +### CreateViaIdentityEventhubExpanded +``` +New-AzEventHubConsumerGroup -Name -EventhubInputObject [-UserMetadata ] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### CreateViaIdentityEventhub +``` +New-AzEventHubConsumerGroup -Name -EventhubInputObject -Parameter + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION -Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. +Create an Event Hubs consumer group as a nested resource within a Namespace. ## EXAMPLES @@ -59,12 +86,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -EventhubInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity +Parameter Sets: CreateViaIdentityEventhubExpanded, CreateViaIdentityEventhub +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -EventHubName The Event Hub name ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentityNamespace Aliases: Required: True @@ -89,17 +131,62 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity +Parameter Sets: CreateViaIdentityNamespaceExpanded, CreateViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The Namespace name ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Parameter +Single item in List or Get Consumer group operation + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup +Parameter Sets: CreateViaIdentityNamespace, CreateViaIdentityEventhub Aliases: Required: True Position: Named Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` @@ -109,7 +196,7 @@ Name of the resource group within the azure subscription. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: True @@ -125,7 +212,7 @@ The subscription ID forms part of the URI for every service call. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -142,7 +229,7 @@ it can be used to store descriptive data, such as list of teams and their contac ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded, CreateViaIdentityEventhubExpanded Aliases: Required: False @@ -188,9 +275,13 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup + +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity + ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup ## NOTES diff --git a/src/EventHub/EventHub/help/New-AzEventHubGeoDRConfiguration.md b/src/EventHub/EventHub/help/New-AzEventHubGeoDRConfiguration.md index 15de7806cc60..77d6c6e92a76 100644 --- a/src/EventHub/EventHub/help/New-AzEventHubGeoDRConfiguration.md +++ b/src/EventHub/EventHub/help/New-AzEventHubGeoDRConfiguration.md @@ -8,18 +8,33 @@ schema: 2.0.0 # New-AzEventHubGeoDRConfiguration ## SYNOPSIS -Creates or updates a new Alias(Disaster Recovery configuration) +Create a new Alias(Disaster Recovery configuration) ## SYNTAX +### CreateExpanded (Default) ``` New-AzEventHubGeoDRConfiguration -Name -NamespaceName -ResourceGroupName [-SubscriptionId ] [-AlternateName ] [-PartnerNamespace ] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### CreateViaIdentityNamespaceExpanded +``` +New-AzEventHubGeoDRConfiguration -Name -NamespaceInputObject + [-AlternateName ] [-PartnerNamespace ] [-DefaultProfile ] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### CreateViaIdentityNamespace +``` +New-AzEventHubGeoDRConfiguration -Name -NamespaceInputObject + -Parameter [-DefaultProfile ] [-ProgressAction ] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION -Creates or updates a new Alias(Disaster Recovery configuration) +Create a new Alias(Disaster Recovery configuration) ## EXAMPLES @@ -50,7 +65,7 @@ Alternate name specified when alias and namespace names are same. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -91,12 +106,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity +Parameter Sets: CreateViaIdentityNamespaceExpanded, CreateViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The Namespace name ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: True @@ -106,12 +136,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Parameter +Single item in List or Get Alias(Disaster Recovery configuration) operation + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery +Parameter Sets: CreateViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -PartnerNamespace ARM Id of the Primary/Secondary eventhub namespace name, which is part of GEO DR pairing ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -121,12 +166,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Name of the resource group within the azure subscription. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: True @@ -142,7 +202,7 @@ The subscription ID forms part of the URI for every service call. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -188,9 +248,13 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery + +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity + ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IArmDisasterRecovery ## NOTES diff --git a/src/EventHub/EventHub/help/New-AzEventHubIPRuleConfig.md b/src/EventHub/EventHub/help/New-AzEventHubIPRuleConfig.md index 5f7e4647275f..a9c50412bed5 100644 --- a/src/EventHub/EventHub/help/New-AzEventHubIPRuleConfig.md +++ b/src/EventHub/EventHub/help/New-AzEventHubIPRuleConfig.md @@ -13,7 +13,7 @@ Constructs an INwRuleSetIPRules object that can be fed as input to Set-AzEventHu ## SYNTAX ``` -New-AzEventHubIPRuleConfig -IPMask [-Action ] +New-AzEventHubIPRuleConfig -IPMask [-Action ] [-ProgressAction ] [] ``` @@ -41,7 +41,7 @@ Please refer examples for Set-AzEventHubNetworkRuleSet to know more. The IP Filter Action ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkRuleIPAction +Type: System.String Parameter Sets: (All) Aliases: @@ -67,6 +67,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). @@ -74,7 +89,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetIPRules +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetIPRules ## NOTES diff --git a/src/EventHub/EventHub/help/New-AzEventHubKey.md b/src/EventHub/EventHub/help/New-AzEventHubKey.md index 4db969a0f4ff..96b7fc17943b 100644 --- a/src/EventHub/EventHub/help/New-AzEventHubKey.md +++ b/src/EventHub/EventHub/help/New-AzEventHubKey.md @@ -15,15 +15,15 @@ Regenerates an EventHub SAS key ### NewExpandedNamespace (Default) ``` New-AzEventHubKey -Name -NamespaceName -ResourceGroupName [-SubscriptionId ] - [-KeyType ] [-KeyValue ] [-DefaultProfile ] [-AsJob] [-NoWait] - [-WhatIf] [-Confirm] [] + [-KeyType ] [-KeyValue ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### NewExpandedEntity ``` New-AzEventHubKey -Name -NamespaceName -ResourceGroupName [-SubscriptionId ] - -EventHubName [-KeyType ] [-KeyValue ] [-DefaultProfile ] [-AsJob] - [-NoWait] [-WhatIf] [-Confirm] [] + -EventHubName [-KeyType ] [-KeyValue ] [-DefaultProfile ] [-AsJob] + [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -112,7 +112,7 @@ Accept wildcard characters: False The access key to regenerate. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeyType +Type: System.String Parameter Sets: (All) Aliases: RegenerateKey @@ -183,6 +183,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. @@ -252,7 +267,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAccessKeys +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAccessKeys ## NOTES diff --git a/src/EventHub/EventHub/help/New-AzEventHubKeyVaultPropertiesObject.md b/src/EventHub/EventHub/help/New-AzEventHubKeyVaultPropertiesObject.md index ddb654b5d257..f820c6640292 100644 --- a/src/EventHub/EventHub/help/New-AzEventHubKeyVaultPropertiesObject.md +++ b/src/EventHub/EventHub/help/New-AzEventHubKeyVaultPropertiesObject.md @@ -1,7 +1,7 @@ --- external help file: Az.EventHub-help.xml Module Name: Az.EventHub -online version: https://learn.microsoft.com/powershell/module/Az.EventHub/new-AzEventHubKeyVaultPropertiesObject +online version: https://learn.microsoft.com/powershell/module/Az.EventHub/new-azeventhubkeyvaultpropertiesobject schema: 2.0.0 --- @@ -14,7 +14,7 @@ Create an in-memory object for KeyVaultProperties. ``` New-AzEventHubKeyVaultPropertiesObject [-KeyName ] [-KeyVaultUri ] [-KeyVersion ] - [-UserAssignedIdentity ] [] + [-UserAssignedIdentity ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -78,6 +78,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -UserAssignedIdentity ARM ID of user Identity selected for encryption. @@ -100,7 +115,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.KeyVaultProperties +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.KeyVaultProperties ## NOTES diff --git a/src/EventHub/EventHub/help/New-AzEventHubNamespace.md b/src/EventHub/EventHub/help/New-AzEventHubNamespace.md index 2866ebc432c0..d3094e418eb4 100644 --- a/src/EventHub/EventHub/help/New-AzEventHubNamespace.md +++ b/src/EventHub/EventHub/help/New-AzEventHubNamespace.md @@ -16,11 +16,10 @@ Creates an EventHub Namespace New-AzEventHubNamespace -Name -ResourceGroupName [-SubscriptionId ] -Location [-AlternateName ] [-ClusterArmId ] [-DisableLocalAuth] [-RequireInfrastructureEncryption] [-ZoneRedundant] [-KeyVaultProperty ] - [-IdentityType ] [-UserAssignedIdentityId ] [-EnableAutoInflate] - [-MaximumThroughputUnit ] [-MinimumTlsVersion ] [-SkuName ] - [-PublicNetworkAccess ] [-SkuCapacity ] [-Tag ] - [-DefaultProfile ] [-AsJob] [-WhatIf] [-Confirm] - [] + [-IdentityType ] [-UserAssignedIdentityId ] [-EnableAutoInflate] + [-MaximumThroughputUnit ] [-MinimumTlsVersion ] [-SkuName ] + [-PublicNetworkAccess ] [-SkuCapacity ] [-Tag ] [-DefaultProfile ] + [-AsJob] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -277,7 +276,7 @@ Accept wildcard characters: False Type of managed service identity. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType +Type: System.String Parameter Sets: (All) Aliases: @@ -290,10 +289,9 @@ Accept wildcard characters: False ### -KeyVaultProperty Properties to configure Encryption -To construct, see NOTES section for KEYVAULTPROPERTY properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultProperties[] +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultProperties[] Parameter Sets: (All) Aliases: @@ -366,12 +364,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -PublicNetworkAccess This determines if traffic is allowed over public network. By default it is enabled. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess +Type: System.String Parameter Sets: (All) Aliases: @@ -434,7 +447,7 @@ The minimum TLS version for the cluster to support, e.g. '1.2' ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuName +Type: System.String Parameter Sets: (All) Aliases: @@ -543,7 +556,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace ## NOTES diff --git a/src/EventHub/EventHub/help/New-AzEventHubSchemaGroup.md b/src/EventHub/EventHub/help/New-AzEventHubSchemaGroup.md index 76f9d67e763b..94014abd963e 100644 --- a/src/EventHub/EventHub/help/New-AzEventHubSchemaGroup.md +++ b/src/EventHub/EventHub/help/New-AzEventHubSchemaGroup.md @@ -8,19 +8,32 @@ schema: 2.0.0 # New-AzEventHubSchemaGroup ## SYNOPSIS -Creates or Updates an EventHub schema group. +Create an EventHub schema group. ## SYNTAX +### CreateExpanded (Default) ``` New-AzEventHubSchemaGroup -Name -NamespaceName -ResourceGroupName - [-SubscriptionId ] [-GroupProperty ] [-SchemaCompatibility ] - [-SchemaType ] [-DefaultProfile ] [-WhatIf] - [-Confirm] [] + [-SubscriptionId ] [-GroupProperty ] [-SchemaCompatibility ] [-SchemaType ] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### CreateViaIdentityNamespaceExpanded +``` +New-AzEventHubSchemaGroup -Name -NamespaceInputObject [-GroupProperty ] + [-SchemaCompatibility ] [-SchemaType ] [-DefaultProfile ] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### CreateViaIdentityNamespace +``` +New-AzEventHubSchemaGroup -Name -NamespaceInputObject -Parameter + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION -Creates or Updates an EventHub schema group. +Create an EventHub schema group. ## EXAMPLES @@ -67,7 +80,7 @@ dictionary object for SchemaGroup group properties ```yaml Type: System.Collections.Hashtable -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -92,12 +105,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity +Parameter Sets: CreateViaIdentityNamespaceExpanded, CreateViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The Namespace name ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: True @@ -107,12 +135,42 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Parameter +Single item in List or Get Schema Group operation + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup +Parameter Sets: CreateViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Name of the resource group within the azure subscription. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: True @@ -126,8 +184,8 @@ Accept wildcard characters: False . ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaCompatibility -Parameter Sets: (All) +Type: System.String +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -141,8 +199,8 @@ Accept wildcard characters: False . ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaType -Parameter Sets: (All) +Type: System.String +Parameter Sets: CreateExpanded, CreateViaIdentityNamespaceExpanded Aliases: Required: False @@ -158,7 +216,7 @@ The subscription ID forms part of the URI for every service call. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded Aliases: Required: False @@ -204,9 +262,13 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity + +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup + ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ISchemaGroup ## NOTES diff --git a/src/EventHub/EventHub/help/New-AzEventHubThrottlingPolicyConfig.md b/src/EventHub/EventHub/help/New-AzEventHubThrottlingPolicyConfig.md index 377e6972dc73..428d59987555 100644 --- a/src/EventHub/EventHub/help/New-AzEventHubThrottlingPolicyConfig.md +++ b/src/EventHub/EventHub/help/New-AzEventHubThrottlingPolicyConfig.md @@ -13,8 +13,8 @@ Constructs an IThrottlingPolicy object that can be fed as input to New-AzEventHu ## SYNTAX ``` -New-AzEventHubThrottlingPolicyConfig -Name -RateLimitThreshold -MetricId - [] +New-AzEventHubThrottlingPolicyConfig -Name -RateLimitThreshold -MetricId + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -41,7 +41,7 @@ Please refer examples for Set-AzEventHubApplicationGroup to know more. Metric Id on which the throttle limit should be set, MetricId can be discovered by hovering over Metric in the Metrics section of Event Hub Namespace inside Azure Portal ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.MetricId +Type: System.String Parameter Sets: (All) Aliases: @@ -67,6 +67,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -RateLimitThreshold The Threshold limit above which the application group will be throttled.Rate limit is always per second. @@ -89,7 +104,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IThrottlingPolicy +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IThrottlingPolicy ## NOTES diff --git a/src/EventHub/EventHub/help/New-AzEventHubVirtualNetworkRuleConfig.md b/src/EventHub/EventHub/help/New-AzEventHubVirtualNetworkRuleConfig.md index 5c488e1de91d..eda9bbdbd1f8 100644 --- a/src/EventHub/EventHub/help/New-AzEventHubVirtualNetworkRuleConfig.md +++ b/src/EventHub/EventHub/help/New-AzEventHubVirtualNetworkRuleConfig.md @@ -14,7 +14,7 @@ Constructs an INwRuleSetVirtualNetworkRules object that can be fed as input to S ``` New-AzEventHubVirtualNetworkRuleConfig -SubnetId [-IgnoreMissingVnetServiceEndpoint] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -52,6 +52,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -SubnetId Resource ID of Virtual Network Subnet @@ -74,7 +89,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetVirtualNetworkRules +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetVirtualNetworkRules ## NOTES diff --git a/src/EventHub/EventHub/help/Remove-AzEventHub.md b/src/EventHub/EventHub/help/Remove-AzEventHub.md index d8d462ef6742..7f9d94e01d0a 100644 --- a/src/EventHub/EventHub/help/Remove-AzEventHub.md +++ b/src/EventHub/EventHub/help/Remove-AzEventHub.md @@ -15,14 +15,20 @@ Deletes an Event Hub from the specified Namespace and resource group. ### Delete (Default) ``` Remove-AzEventHub -Name -NamespaceName -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [-PassThru] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` +### DeleteViaIdentityNamespace +``` +Remove-AzEventHub -Name -NamespaceInputObject [-DefaultProfile ] + [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + ### DeleteViaIdentity ``` Remove-AzEventHub -InputObject [-DefaultProfile ] [-PassThru] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -57,7 +63,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity @@ -76,7 +81,7 @@ The Event Hub name ```yaml Type: System.String -Parameter Sets: Delete +Parameter Sets: Delete, DeleteViaIdentityNamespace Aliases: EventHubName Required: True @@ -86,6 +91,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity +Parameter Sets: DeleteViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The Namespace name @@ -116,6 +136,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Name of the resource group within the azure subscription. diff --git a/src/EventHub/EventHub/help/Remove-AzEventHubApplicationGroup.md b/src/EventHub/EventHub/help/Remove-AzEventHubApplicationGroup.md index 9b9301ef85f2..c92dfa447b1e 100644 --- a/src/EventHub/EventHub/help/Remove-AzEventHubApplicationGroup.md +++ b/src/EventHub/EventHub/help/Remove-AzEventHubApplicationGroup.md @@ -15,14 +15,21 @@ Deletes an ApplicationGroup for a Namespace. ### Delete (Default) ``` Remove-AzEventHubApplicationGroup -Name -NamespaceName -ResourceGroupName - [-SubscriptionId ] [-DefaultProfile ] [-PassThru] + [-SubscriptionId ] [-DefaultProfile ] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` +### DeleteViaIdentityNamespace +``` +Remove-AzEventHubApplicationGroup -Name -NamespaceInputObject + [-DefaultProfile ] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] + [] +``` + ### DeleteViaIdentity ``` Remove-AzEventHubApplicationGroup -InputObject [-DefaultProfile ] [-PassThru] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -57,7 +64,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity @@ -76,7 +82,7 @@ The Application Group name ```yaml Type: System.String -Parameter Sets: Delete +Parameter Sets: Delete, DeleteViaIdentityNamespace Aliases: ApplicationGroupName Required: True @@ -86,6 +92,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity +Parameter Sets: DeleteViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The Namespace name @@ -116,6 +137,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Name of the resource group within the azure subscription. diff --git a/src/EventHub/EventHub/help/Remove-AzEventHubAuthorizationRule.md b/src/EventHub/EventHub/help/Remove-AzEventHubAuthorizationRule.md index c771f9d55af3..629d43da52d5 100644 --- a/src/EventHub/EventHub/help/Remove-AzEventHubAuthorizationRule.md +++ b/src/EventHub/EventHub/help/Remove-AzEventHubAuthorizationRule.md @@ -16,20 +16,20 @@ Removes an EventHub Authorization Rule ``` Remove-AzEventHubAuthorizationRule -NamespaceName -ResourceGroupName [-Name ] [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### RemoveExpandedEntity ``` Remove-AzEventHubAuthorizationRule -NamespaceName -ResourceGroupName [-Name ] [-SubscriptionId ] -EventHubName [-DefaultProfile ] [-AsJob] [-NoWait] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### RemoveViaIdentityExpanded ``` Remove-AzEventHubAuthorizationRule -InputObject [-DefaultProfile ] [-AsJob] - [-NoWait] [-WhatIf] [-Confirm] [] + [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -159,6 +159,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. @@ -230,7 +245,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule ## NOTES diff --git a/src/EventHub/EventHub/help/Remove-AzEventHubCluster.md b/src/EventHub/EventHub/help/Remove-AzEventHubCluster.md index d3b282c82ca9..e048fb0a0988 100644 --- a/src/EventHub/EventHub/help/Remove-AzEventHubCluster.md +++ b/src/EventHub/EventHub/help/Remove-AzEventHubCluster.md @@ -16,14 +16,14 @@ This operation is idempotent. ### Delete (Default) ``` Remove-AzEventHubCluster -Name -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-WhatIf] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### DeleteViaIdentity ``` Remove-AzEventHubCluster -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] - [-PassThru] [-WhatIf] [-Confirm] [] + [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -74,7 +74,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity @@ -133,6 +132,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Name of the resource group within the azure subscription. diff --git a/src/EventHub/EventHub/help/Remove-AzEventHubConsumerGroup.md b/src/EventHub/EventHub/help/Remove-AzEventHubConsumerGroup.md index a7867d7bd7c9..540f07d50e40 100644 --- a/src/EventHub/EventHub/help/Remove-AzEventHubConsumerGroup.md +++ b/src/EventHub/EventHub/help/Remove-AzEventHubConsumerGroup.md @@ -16,13 +16,27 @@ Deletes a consumer group from the specified Event Hub and resource group. ``` Remove-AzEventHubConsumerGroup -EventHubName -Name -NamespaceName -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [-PassThru] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### DeleteViaIdentityNamespace +``` +Remove-AzEventHubConsumerGroup -EventHubName -Name -NamespaceInputObject + [-DefaultProfile ] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] + [] +``` + +### DeleteViaIdentityEventhub +``` +Remove-AzEventHubConsumerGroup -Name -EventhubInputObject + [-DefaultProfile ] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] + [] ``` ### DeleteViaIdentity ``` Remove-AzEventHubConsumerGroup -InputObject [-DefaultProfile ] [-PassThru] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -55,12 +69,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -EventhubInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity +Parameter Sets: DeleteViaIdentityEventhub +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -EventHubName The Event Hub name ```yaml Type: System.String -Parameter Sets: Delete +Parameter Sets: Delete, DeleteViaIdentityNamespace Aliases: Required: True @@ -72,7 +101,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity @@ -91,7 +119,7 @@ The consumer group name ```yaml Type: System.String -Parameter Sets: Delete +Parameter Sets: Delete, DeleteViaIdentityNamespace, DeleteViaIdentityEventhub Aliases: ConsumerGroupName Required: True @@ -101,6 +129,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity +Parameter Sets: DeleteViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The Namespace name @@ -131,6 +174,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Name of the resource group within the azure subscription. diff --git a/src/EventHub/EventHub/help/Remove-AzEventHubGeoDRConfiguration.md b/src/EventHub/EventHub/help/Remove-AzEventHubGeoDRConfiguration.md index d362c039b766..ebda5c1e67aa 100644 --- a/src/EventHub/EventHub/help/Remove-AzEventHubGeoDRConfiguration.md +++ b/src/EventHub/EventHub/help/Remove-AzEventHubGeoDRConfiguration.md @@ -15,14 +15,21 @@ Deletes an Alias(Disaster Recovery configuration) ### Delete (Default) ``` Remove-AzEventHubGeoDRConfiguration -Name -NamespaceName -ResourceGroupName - [-SubscriptionId ] [-DefaultProfile ] [-PassThru] + [-SubscriptionId ] [-DefaultProfile ] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` +### DeleteViaIdentityNamespace +``` +Remove-AzEventHubGeoDRConfiguration -Name -NamespaceInputObject + [-DefaultProfile ] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] + [] +``` + ### DeleteViaIdentity ``` Remove-AzEventHubGeoDRConfiguration -InputObject [-DefaultProfile ] [-PassThru] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -57,7 +64,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity @@ -76,7 +82,7 @@ The Disaster Recovery configuration name ```yaml Type: System.String -Parameter Sets: Delete +Parameter Sets: Delete, DeleteViaIdentityNamespace Aliases: Required: True @@ -86,6 +92,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity +Parameter Sets: DeleteViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The Namespace name @@ -116,6 +137,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Name of the resource group within the azure subscription. diff --git a/src/EventHub/EventHub/help/Remove-AzEventHubNamespace.md b/src/EventHub/EventHub/help/Remove-AzEventHubNamespace.md index 15465fba11bc..b70e66b8f88e 100644 --- a/src/EventHub/EventHub/help/Remove-AzEventHubNamespace.md +++ b/src/EventHub/EventHub/help/Remove-AzEventHubNamespace.md @@ -16,14 +16,14 @@ This operation also removes all associated resources under the namespace. ### Delete (Default) ``` Remove-AzEventHubNamespace -Name -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-WhatIf] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### DeleteViaIdentity ``` Remove-AzEventHubNamespace -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] - [-PassThru] [-WhatIf] [-Confirm] [] + [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -82,7 +82,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity @@ -141,6 +140,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Name of the resource group within the azure subscription. diff --git a/src/EventHub/EventHub/help/Remove-AzEventHubPrivateEndpointConnection.md b/src/EventHub/EventHub/help/Remove-AzEventHubPrivateEndpointConnection.md index a56606a51ab0..685f61c14dc2 100644 --- a/src/EventHub/EventHub/help/Remove-AzEventHubPrivateEndpointConnection.md +++ b/src/EventHub/EventHub/help/Remove-AzEventHubPrivateEndpointConnection.md @@ -17,13 +17,20 @@ This operation also removes all associated resources under the namespace. ``` Remove-AzEventHubPrivateEndpointConnection -Name -NamespaceName -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### DeleteViaIdentityNamespace +``` +Remove-AzEventHubPrivateEndpointConnection -Name -NamespaceInputObject + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] + [-Confirm] [] ``` ### DeleteViaIdentity ``` Remove-AzEventHubPrivateEndpointConnection -InputObject [-DefaultProfile ] - [-AsJob] [-NoWait] [-PassThru] [-WhatIf] [-Confirm] [] + [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -74,7 +81,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity @@ -93,7 +99,7 @@ The PrivateEndpointConnection name ```yaml Type: System.String -Parameter Sets: Delete +Parameter Sets: Delete, DeleteViaIdentityNamespace Aliases: PrivateEndpointConnectionName Required: True @@ -103,6 +109,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity +Parameter Sets: DeleteViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The Namespace name @@ -148,6 +169,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Name of the resource group within the azure subscription. @@ -224,3 +260,6 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES ## RELATED LINKS + +[https://msdn.microsoft.com/en-us/library/azure/mt639389.aspx](https://msdn.microsoft.com/en-us/library/azure/mt639389.aspx) + diff --git a/src/EventHub/EventHub/help/Remove-AzEventHubSchemaGroup.md b/src/EventHub/EventHub/help/Remove-AzEventHubSchemaGroup.md index 475ee513cdaa..24d5a57e50fa 100644 --- a/src/EventHub/EventHub/help/Remove-AzEventHubSchemaGroup.md +++ b/src/EventHub/EventHub/help/Remove-AzEventHubSchemaGroup.md @@ -15,14 +15,21 @@ Deletes an EventHub schema group. ### Delete (Default) ``` Remove-AzEventHubSchemaGroup -Name -NamespaceName -ResourceGroupName - [-SubscriptionId ] [-DefaultProfile ] [-PassThru] + [-SubscriptionId ] [-DefaultProfile ] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` +### DeleteViaIdentityNamespace +``` +Remove-AzEventHubSchemaGroup -Name -NamespaceInputObject + [-DefaultProfile ] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] + [] +``` + ### DeleteViaIdentity ``` Remove-AzEventHubSchemaGroup -InputObject [-DefaultProfile ] [-PassThru] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -57,7 +64,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity @@ -76,7 +82,7 @@ The Schema Group name ```yaml Type: System.String -Parameter Sets: Delete +Parameter Sets: Delete, DeleteViaIdentityNamespace Aliases: SchemaGroupName Required: True @@ -86,6 +92,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NamespaceInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity +Parameter Sets: DeleteViaIdentityNamespace +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -NamespaceName The Namespace name @@ -116,6 +137,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Name of the resource group within the azure subscription. diff --git a/src/EventHub/EventHub/help/Set-AzEventHub.md b/src/EventHub/EventHub/help/Set-AzEventHub.md index b4c840ca61ce..bc2617d9806f 100644 --- a/src/EventHub/EventHub/help/Set-AzEventHub.md +++ b/src/EventHub/EventHub/help/Set-AzEventHub.md @@ -15,23 +15,22 @@ Updates an EventHub Entity ### SetExpanded (Default) ``` Set-AzEventHub -Name -NamespaceName -ResourceGroupName [-SubscriptionId ] - [-CaptureEnabled] [-Encoding ] [-IntervalInSeconds ] - [-SizeLimitInBytes ] [-SkipEmptyArchive] [-RetentionTimeInHour ] - [-TombstoneRetentionTimeInHour ] [-Status ] [-DestinationName ] - [-IdentityType ] [-UserAssignedIdentityId ] [-PartitionCount ] - [-StorageAccountResourceId ] [-ArchiveNameFormat ] [-BlobContainer ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] - [] + [-CaptureEnabled] [-Encoding ] [-IntervalInSeconds ] [-SizeLimitInBytes ] + [-SkipEmptyArchive] [-RetentionTimeInHour ] [-TombstoneRetentionTimeInHour ] [-Status ] + [-DestinationName ] [-IdentityType ] [-UserAssignedIdentityId ] + [-PartitionCount ] [-StorageAccountResourceId ] [-ArchiveNameFormat ] + [-BlobContainer ] [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] + [-WhatIf] [-Confirm] [] ``` ### SetViaIdentityExpanded ``` -Set-AzEventHub -InputObject [-CaptureEnabled] [-Encoding ] +Set-AzEventHub -InputObject [-CaptureEnabled] [-Encoding ] [-IntervalInSeconds ] [-SizeLimitInBytes ] [-SkipEmptyArchive] [-RetentionTimeInHour ] - [-TombstoneRetentionTimeInHour ] [-Status ] [-DestinationName ] - [-IdentityType ] [-UserAssignedIdentityId ] [-PartitionCount ] + [-TombstoneRetentionTimeInHour ] [-Status ] [-DestinationName ] + [-IdentityType ] [-UserAssignedIdentityId ] [-PartitionCount ] [-StorageAccountResourceId ] [-ArchiveNameFormat ] [-BlobContainer ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -226,7 +225,7 @@ Enumerates the possible values for the encoding format of capture description. Note: 'AvroDeflate' will be deprecated in New API Version ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription +Type: System.String Parameter Sets: (All) Aliases: @@ -241,7 +240,7 @@ Accept wildcard characters: False Type of managed service identity. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType +Type: System.String Parameter Sets: (All) Aliases: @@ -344,6 +343,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. @@ -411,7 +425,7 @@ Accept wildcard characters: False Enumerates the possible values for the status of the Event Hub. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus +Type: System.String Parameter Sets: (All) Aliases: @@ -524,7 +538,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventhub ## NOTES diff --git a/src/EventHub/EventHub/help/Set-AzEventHubApplicationGroup.md b/src/EventHub/EventHub/help/Set-AzEventHubApplicationGroup.md index b632f8022cfa..96ad6a02a3f9 100644 --- a/src/EventHub/EventHub/help/Set-AzEventHubApplicationGroup.md +++ b/src/EventHub/EventHub/help/Set-AzEventHubApplicationGroup.md @@ -17,14 +17,14 @@ Sets an EventHub Application Group Set-AzEventHubApplicationGroup -Name -NamespaceName -ResourceGroupName [-SubscriptionId ] [-ClientAppGroupIdentifier ] [-IsEnabled] [-Policy ] [-DefaultProfile ] [-AsJob] [-NoWait] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### SetViaIdentityExpanded ``` Set-AzEventHubApplicationGroup -InputObject [-ClientAppGroupIdentifier ] [-IsEnabled] [-Policy ] [-DefaultProfile ] [-AsJob] [-NoWait] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -231,10 +231,9 @@ Accept wildcard characters: False ### -Policy List of group policies that define the behavior of application group. The policies can support resource governance scenarios such as limiting ingress or egress traffic. -To construct, see NOTES section for POLICY properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicy[] +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicy[] Parameter Sets: (All) Aliases: @@ -245,6 +244,21 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. @@ -312,7 +326,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroupPolicy[] +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicy[] ### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity @@ -322,7 +336,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroup ## NOTES diff --git a/src/EventHub/EventHub/help/Set-AzEventHubAuthorizationRule.md b/src/EventHub/EventHub/help/Set-AzEventHubAuthorizationRule.md index 47b36496befc..8aa412dac13f 100644 --- a/src/EventHub/EventHub/help/Set-AzEventHubAuthorizationRule.md +++ b/src/EventHub/EventHub/help/Set-AzEventHubAuthorizationRule.md @@ -15,21 +15,21 @@ Sets an EventHub Authorization Rule ### SetExpandedNamespace (Default) ``` Set-AzEventHubAuthorizationRule -NamespaceName -ResourceGroupName [-Name ] - [-SubscriptionId ] -Rights [-DefaultProfile ] [-AsJob] [-NoWait] - [-WhatIf] [-Confirm] [] + [-SubscriptionId ] -Rights [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### SetExpandedEntity ``` Set-AzEventHubAuthorizationRule -NamespaceName -ResourceGroupName [-Name ] - [-SubscriptionId ] -EventHubName -Rights [-DefaultProfile ] - [-AsJob] [-NoWait] [-WhatIf] [-Confirm] [] + [-SubscriptionId ] -EventHubName -Rights [-DefaultProfile ] [-AsJob] + [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### SetViaIdentityExpanded ``` -Set-AzEventHubAuthorizationRule -InputObject -Rights - [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] +Set-AzEventHubAuthorizationRule -InputObject -Rights + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -176,6 +176,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. @@ -196,7 +211,7 @@ Accept wildcard characters: False The rights associated with the rule. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights[] +Type: System.String[] Parameter Sets: (All) Aliases: @@ -262,7 +277,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IAuthorizationRule ## NOTES diff --git a/src/EventHub/EventHub/help/Set-AzEventHubCluster.md b/src/EventHub/EventHub/help/Set-AzEventHubCluster.md index 8372bf8426b3..94c1b31221bc 100644 --- a/src/EventHub/EventHub/help/Set-AzEventHubCluster.md +++ b/src/EventHub/EventHub/help/Set-AzEventHubCluster.md @@ -16,13 +16,13 @@ Sets an EventHub Cluster ``` Set-AzEventHubCluster -Name -ResourceGroupName [-SubscriptionId ] [-Capacity ] [-Tag ] [-DefaultProfile ] [-AsJob] [-NoWait] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### SetViaIdentityExpanded ``` Set-AzEventHubCluster -InputObject [-Capacity ] [-Tag ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -167,6 +167,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. @@ -200,10 +215,9 @@ Accept wildcard characters: False ### -Tag Resource tags. -To construct, see NOTES section for TAG properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api10.ITrackedResourceTags +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ITrackedResourceTags Parameter Sets: (All) Aliases: @@ -254,7 +268,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICluster ## NOTES diff --git a/src/EventHub/EventHub/help/Set-AzEventHubConsumerGroup.md b/src/EventHub/EventHub/help/Set-AzEventHubConsumerGroup.md index a8caa3b36d17..9b81f6cfdef1 100644 --- a/src/EventHub/EventHub/help/Set-AzEventHubConsumerGroup.md +++ b/src/EventHub/EventHub/help/Set-AzEventHubConsumerGroup.md @@ -16,13 +16,13 @@ Sets an EventHub Consumer Group ``` Set-AzEventHubConsumerGroup -Name -NamespaceName -EventHubName -ResourceGroupName [-SubscriptionId ] -UserMetadata [-DefaultProfile ] - [-AsJob] [-NoWait] [-WhatIf] [-Confirm] [] + [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### SetViaIdentityExpanded ``` Set-AzEventHubConsumerGroup -InputObject -UserMetadata - [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -176,6 +176,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. @@ -264,7 +279,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IConsumerGroup ## NOTES diff --git a/src/EventHub/EventHub/help/Set-AzEventHubGeoDRConfigurationBreakPair.md b/src/EventHub/EventHub/help/Set-AzEventHubGeoDRConfigurationBreakPair.md index 41c6d3ee0145..599c208f98ad 100644 --- a/src/EventHub/EventHub/help/Set-AzEventHubGeoDRConfigurationBreakPair.md +++ b/src/EventHub/EventHub/help/Set-AzEventHubGeoDRConfigurationBreakPair.md @@ -16,13 +16,13 @@ This operation disables the Disaster Recovery and stops replicating changes from ``` Set-AzEventHubGeoDRConfigurationBreakPair -Name -NamespaceName -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### BreakViaIdentity ``` Set-AzEventHubGeoDRConfigurationBreakPair -InputObject [-DefaultProfile ] - [-AsJob] [-NoWait] [-WhatIf] [-Confirm] [] + [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -130,6 +130,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. diff --git a/src/EventHub/EventHub/help/Set-AzEventHubGeoDRConfigurationFailOver.md b/src/EventHub/EventHub/help/Set-AzEventHubGeoDRConfigurationFailOver.md index 6b135d18e898..8ca1539789f7 100644 --- a/src/EventHub/EventHub/help/Set-AzEventHubGeoDRConfigurationFailOver.md +++ b/src/EventHub/EventHub/help/Set-AzEventHubGeoDRConfigurationFailOver.md @@ -16,13 +16,13 @@ Invokes GEO DR failover and reconfigure the alias to point to the secondary name ``` Set-AzEventHubGeoDRConfigurationFailOver -Name -NamespaceName -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### FailViaIdentity ``` Set-AzEventHubGeoDRConfigurationFailOver -InputObject [-DefaultProfile ] [-AsJob] - [-NoWait] [-WhatIf] [-Confirm] [] + [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -130,6 +130,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. diff --git a/src/EventHub/EventHub/help/Set-AzEventHubNamespace.md b/src/EventHub/EventHub/help/Set-AzEventHubNamespace.md index 1a31d77fa6c0..cb48c066bca1 100644 --- a/src/EventHub/EventHub/help/Set-AzEventHubNamespace.md +++ b/src/EventHub/EventHub/help/Set-AzEventHubNamespace.md @@ -16,21 +16,20 @@ Updates an EventHub Namespace ``` Set-AzEventHubNamespace -Name -ResourceGroupName [-SubscriptionId ] [-AlternateName ] [-DisableLocalAuth] [-KeyVaultProperty ] - [-RequireInfrastructureEncryption] [-IdentityType ] - [-UserAssignedIdentityId ] [-EnableAutoInflate] [-MaximumThroughputUnit ] - [-MinimumTlsVersion ] [-PublicNetworkAccess ] [-SkuCapacity ] - [-Tag ] [-DefaultProfile ] [-AsJob] [-WhatIf] - [-Confirm] [] + [-RequireInfrastructureEncryption] [-IdentityType ] [-UserAssignedIdentityId ] + [-EnableAutoInflate] [-MaximumThroughputUnit ] [-MinimumTlsVersion ] + [-PublicNetworkAccess ] [-SkuCapacity ] [-Tag ] [-DefaultProfile ] + [-AsJob] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### SetViaIdentityExpanded ``` Set-AzEventHubNamespace -InputObject [-AlternateName ] [-DisableLocalAuth] - [-KeyVaultProperty ] [-RequireInfrastructureEncryption] - [-IdentityType ] [-UserAssignedIdentityId ] [-EnableAutoInflate] - [-MaximumThroughputUnit ] [-MinimumTlsVersion ] [-PublicNetworkAccess ] - [-SkuCapacity ] [-Tag ] [-DefaultProfile ] [-AsJob] - [-WhatIf] [-Confirm] [] + [-KeyVaultProperty ] [-RequireInfrastructureEncryption] [-IdentityType ] + [-UserAssignedIdentityId ] [-EnableAutoInflate] [-MaximumThroughputUnit ] + [-MinimumTlsVersion ] [-PublicNetworkAccess ] [-SkuCapacity ] [-Tag ] + [-DefaultProfile ] [-AsJob] [-ProgressAction ] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION @@ -454,7 +453,7 @@ Accept wildcard characters: False Type of managed service identity. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType +Type: System.String Parameter Sets: (All) Aliases: @@ -483,10 +482,9 @@ Accept wildcard characters: False ### -KeyVaultProperty Properties to configure Encryption -To construct, see NOTES section for KEYVAULTPROPERTY properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IKeyVaultProperties[] +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultProperties[] Parameter Sets: (All) Aliases: @@ -544,12 +542,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -PublicNetworkAccess This determines if traffic is allowed over public network. By default it is enabled. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess +Type: System.String Parameter Sets: (All) Aliases: @@ -692,7 +705,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace ## NOTES diff --git a/src/EventHub/EventHub/help/Set-AzEventHubNetworkRuleSet.md b/src/EventHub/EventHub/help/Set-AzEventHubNetworkRuleSet.md index 3344593e58f2..c3ec4ef0dc64 100644 --- a/src/EventHub/EventHub/help/Set-AzEventHubNetworkRuleSet.md +++ b/src/EventHub/EventHub/help/Set-AzEventHubNetworkRuleSet.md @@ -15,18 +15,18 @@ Sets an EventHub Namespace Network Rule Set ### SetExpanded (Default) ``` Set-AzEventHubNetworkRuleSet -NamespaceName -ResourceGroupName [-SubscriptionId ] - [-PublicNetworkAccess ] [-TrustedServiceAccessEnabled] [-DefaultAction ] + [-PublicNetworkAccess ] [-TrustedServiceAccessEnabled] [-DefaultAction ] [-IPRule ] [-VirtualNetworkRule ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### SetViaIdentityExpanded ``` -Set-AzEventHubNetworkRuleSet -InputObject [-PublicNetworkAccess ] - [-TrustedServiceAccessEnabled] [-DefaultAction ] [-IPRule ] +Set-AzEventHubNetworkRuleSet -InputObject [-PublicNetworkAccess ] + [-TrustedServiceAccessEnabled] [-DefaultAction ] [-IPRule ] [-VirtualNetworkRule ] [-DefaultProfile ] [-AsJob] [-NoWait] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -142,7 +142,7 @@ Accept wildcard characters: False Default Action for Network Rule Set ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.DefaultAction +Type: System.String Parameter Sets: (All) Aliases: @@ -186,10 +186,9 @@ Accept wildcard characters: False ### -IPRule List of IpRules -To construct, see NOTES section for IPRULE properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetIPRules[] +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetIPRules[] Parameter Sets: (All) Aliases: @@ -230,13 +229,28 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -PublicNetworkAccess This determines if traffic is allowed over public network. By default it is enabled. If value is SecuredByPerimeter then Inbound and Outbound communication is controlled by the network security perimeter and profile's access rules. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess +Type: System.String Parameter Sets: (All) Aliases: @@ -295,10 +309,9 @@ Accept wildcard characters: False ### -VirtualNetworkRule List of VirtualNetwork Rules -To construct, see NOTES section for VIRTUALNETWORKRULE properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetVirtualNetworkRules[] +Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetVirtualNetworkRules[] Parameter Sets: (All) Aliases: @@ -349,7 +362,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet ## NOTES diff --git a/src/EventHub/EventHub/help/Test-AzEventHubName.md b/src/EventHub/EventHub/help/Test-AzEventHubName.md index 0d547464e23c..166520cdf5ef 100644 --- a/src/EventHub/EventHub/help/Test-AzEventHubName.md +++ b/src/EventHub/EventHub/help/Test-AzEventHubName.md @@ -15,14 +15,14 @@ Checks availability of a namespace name or disaster recovery alias. ### NamespaceAvailability (Default) ``` Test-AzEventHubName -NamespaceName [-SubscriptionId ] [-DefaultProfile ] [-AsJob] - [-NoWait] [] + [-NoWait] [-ProgressAction ] [] ``` ### AliasAvailability ``` Test-AzEventHubName -NamespaceName [-SubscriptionId ] -AliasName -ResourceGroupName [-DefaultProfile ] [-AsJob] [-NoWait] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -133,6 +133,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The name of the resource @@ -170,7 +185,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult +### Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.ICheckNameAvailabilityResult ## NOTES diff --git a/tools/StaticAnalysis/Exceptions/Az.EventHub/BreakingChangeIssues.csv b/tools/StaticAnalysis/Exceptions/Az.EventHub/BreakingChangeIssues.csv new file mode 100644 index 000000000000..89473e857b04 --- /dev/null +++ b/tools/StaticAnalysis/Exceptions/Az.EventHub/BreakingChangeIssues.csv @@ -0,0 +1,160 @@ +"Module","ClassName","Target","Severity","ProblemId","Description","Remediation" +"Az.EventHub","Approve-AzEventHubPrivateEndpointConnection","Approve-AzEventHubPrivateEndpointConnection","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","Approve-AzEventHubPrivateEndpointConnection","Approve-AzEventHubPrivateEndpointConnection","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","Approve-AzEventHubPrivateEndpointConnection","Approve-AzEventHubPrivateEndpointConnection","0","3000","The type of property 'ProvisioningState' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EndPointProvisioningState]' to 'System.String'.","Change the type of property 'ProvisioningState' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EndPointProvisioningState]'." +"Az.EventHub","Approve-AzEventHubPrivateEndpointConnection","Approve-AzEventHubPrivateEndpointConnection","0","3000","The type of property 'ConnectionState' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PrivateLinkConnectionStatus]' to 'System.String'.","Change the type of property 'ConnectionState' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PrivateLinkConnectionStatus]'." +"Az.EventHub","Deny-AzEventHubPrivateEndpointConnection","Deny-AzEventHubPrivateEndpointConnection","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","Deny-AzEventHubPrivateEndpointConnection","Deny-AzEventHubPrivateEndpointConnection","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","Deny-AzEventHubPrivateEndpointConnection","Deny-AzEventHubPrivateEndpointConnection","0","3000","The type of property 'ProvisioningState' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EndPointProvisioningState]' to 'System.String'.","Change the type of property 'ProvisioningState' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EndPointProvisioningState]'." +"Az.EventHub","Deny-AzEventHubPrivateEndpointConnection","Deny-AzEventHubPrivateEndpointConnection","0","3000","The type of property 'ConnectionState' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PrivateLinkConnectionStatus]' to 'System.String'.","Change the type of property 'ConnectionState' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PrivateLinkConnectionStatus]'." +"Az.EventHub","Get-AzEventHub","Get-AzEventHub","0","3000","The type of property 'IdentityType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType]' to 'System.String'.","Change the type of property 'IdentityType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType]'." +"Az.EventHub","Get-AzEventHub","Get-AzEventHub","0","3000","The type of property 'CleanupPolicy' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CleanupPolicyRetentionDescription]' to 'System.String'.","Change the type of property 'CleanupPolicy' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CleanupPolicyRetentionDescription]'." +"Az.EventHub","Get-AzEventHub","Get-AzEventHub","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","Get-AzEventHub","Get-AzEventHub","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","Get-AzEventHub","Get-AzEventHub","0","3000","The type of property 'Encoding' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription]' to 'System.String'.","Change the type of property 'Encoding' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription]'." +"Az.EventHub","Get-AzEventHub","Get-AzEventHub","0","3000","The type of property 'Status' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus]' to 'System.String'.","Change the type of property 'Status' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus]'." +"Az.EventHub","Get-AzEventHub","Get-AzEventHub","0","3000","The type of property 'PartitionId' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub' has changed from 'System.String[]' to 'System.Collections.Generic.List`1[System.String]'.","Change the type of property 'PartitionId' back to 'System.String[]'." +"Az.EventHub","Get-AzEventHubApplicationGroup","Get-AzEventHubApplicationGroup","0","3000","The type of property 'Policy' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup' has changed from 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicy' to 'System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicy]'.","Change the type of property 'Policy' back to 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicy'." +"Az.EventHub","Get-AzEventHubApplicationGroup","Get-AzEventHubApplicationGroup","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","Get-AzEventHubApplicationGroup","Get-AzEventHubApplicationGroup","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","Get-AzEventHubAuthorizationRule","Get-AzEventHubAuthorizationRule","0","3000","The type of property 'Rights' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule' has changed from 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights[]' to 'System.Collections.Generic.List`1[System.String]'.","Change the type of property 'Rights' back to 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights[]'." +"Az.EventHub","Get-AzEventHubAuthorizationRule","Get-AzEventHubAuthorizationRule","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","Get-AzEventHubAuthorizationRule","Get-AzEventHubAuthorizationRule","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","Get-AzEventHubCluster","Get-AzEventHubCluster","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","Get-AzEventHubCluster","Get-AzEventHubCluster","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","Get-AzEventHubCluster","Get-AzEventHubCluster","0","3000","The type of property 'ProvisioningState' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningState]' to 'System.String'.","Change the type of property 'ProvisioningState' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningState]'." +"Az.EventHub","Get-AzEventHubClusterNamespace","Get-AzEventHubClusterNamespace","0","1020","The cmdlet 'Get-AzEventHubClusterNamespace' no longer has output type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceIdContainer'.","Make cmdlet 'Get-AzEventHubClusterNamespace' return type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespaceIdContainer'." +"Az.EventHub","Get-AzEventHubClustersAvailableRegion","Get-AzEventHubClustersAvailableRegion","0","1020","The cmdlet 'Get-AzEventHubClustersAvailableRegion' no longer has output type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAvailableCluster'.","Make cmdlet 'Get-AzEventHubClustersAvailableRegion' return type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAvailableCluster'." +"Az.EventHub","Get-AzEventHubConsumerGroup","Get-AzEventHubConsumerGroup","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","Get-AzEventHubConsumerGroup","Get-AzEventHubConsumerGroup","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","Get-AzEventHubGeoDRConfiguration","Get-AzEventHubGeoDRConfiguration","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","Get-AzEventHubGeoDRConfiguration","Get-AzEventHubGeoDRConfiguration","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","Get-AzEventHubGeoDRConfiguration","Get-AzEventHubGeoDRConfiguration","0","3000","The type of property 'ProvisioningState' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningStateDr]' to 'System.String'.","Change the type of property 'ProvisioningState' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningStateDr]'." +"Az.EventHub","Get-AzEventHubGeoDRConfiguration","Get-AzEventHubGeoDRConfiguration","0","3000","The type of property 'Role' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.RoleDisasterRecovery]' to 'System.String'.","Change the type of property 'Role' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.RoleDisasterRecovery]'." +"Az.EventHub","Get-AzEventHubNamespace","Get-AzEventHubNamespace","0","3000","The type of property 'KeyVaultProperty' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace' has changed from 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultProperties' to 'System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultProperties]'.","Change the type of property 'KeyVaultProperty' back to 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultProperties'." +"Az.EventHub","Get-AzEventHubNamespace","Get-AzEventHubNamespace","0","3000","The type of property 'GeoDataReplicationLocation' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace' has changed from 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INamespaceReplicaLocation' to 'System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INamespaceReplicaLocation]'.","Change the type of property 'GeoDataReplicationLocation' back to 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INamespaceReplicaLocation'." +"Az.EventHub","Get-AzEventHubNamespace","Get-AzEventHubNamespace","0","3000","The type of property 'PrivateEndpointConnection' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace' has changed from 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection' to 'System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection]'.","Change the type of property 'PrivateEndpointConnection' back to 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection'." +"Az.EventHub","Get-AzEventHubNamespace","Get-AzEventHubNamespace","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","Get-AzEventHubNamespace","Get-AzEventHubNamespace","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","Get-AzEventHubNamespace","Get-AzEventHubNamespace","0","3000","The type of property 'KeySource' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeySource]' to 'System.String'.","Change the type of property 'KeySource' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeySource]'." +"Az.EventHub","Get-AzEventHubNamespace","Get-AzEventHubNamespace","0","3000","The type of property 'IdentityType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType]' to 'System.String'.","Change the type of property 'IdentityType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType]'." +"Az.EventHub","Get-AzEventHubNamespace","Get-AzEventHubNamespace","0","3000","The type of property 'PublicNetworkAccess' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess]' to 'System.String'.","Change the type of property 'PublicNetworkAccess' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess]'." +"Az.EventHub","Get-AzEventHubNamespace","Get-AzEventHubNamespace","0","3000","The type of property 'SkuName' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuName]' to 'System.String'.","Change the type of property 'SkuName' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuName]'." +"Az.EventHub","Get-AzEventHubNamespace","Get-AzEventHubNamespace","0","3000","The type of property 'SkuTier' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuTier]' to 'System.String'.","Change the type of property 'SkuTier' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuTier]'." +"Az.EventHub","Get-AzEventHubNamespace","Get-AzEventHubNamespace","0","3000","The type of property 'MinimumTlsVersion' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.TlsVersion]' to 'System.String'.","Change the type of property 'MinimumTlsVersion' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.TlsVersion]'." +"Az.EventHub","Get-AzEventHubNetworkRuleSet","Get-AzEventHubNetworkRuleSet","0","3000","The type of property 'IPRule' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet' has changed from 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetIPRules' to 'System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetIPRules]'.","Change the type of property 'IPRule' back to 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetIPRules'." +"Az.EventHub","Get-AzEventHubNetworkRuleSet","Get-AzEventHubNetworkRuleSet","0","3000","The type of property 'VirtualNetworkRule' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet' has changed from 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetVirtualNetworkRules' to 'System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetVirtualNetworkRules]'.","Change the type of property 'VirtualNetworkRule' back to 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetVirtualNetworkRules'." +"Az.EventHub","Get-AzEventHubNetworkRuleSet","Get-AzEventHubNetworkRuleSet","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","Get-AzEventHubNetworkRuleSet","Get-AzEventHubNetworkRuleSet","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","Get-AzEventHubNetworkRuleSet","Get-AzEventHubNetworkRuleSet","0","3000","The type of property 'DefaultAction' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.DefaultAction]' to 'System.String'.","Change the type of property 'DefaultAction' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.DefaultAction]'." +"Az.EventHub","Get-AzEventHubNetworkRuleSet","Get-AzEventHubNetworkRuleSet","0","3000","The type of property 'PublicNetworkAccess' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccessFlag]' to 'System.String'.","Change the type of property 'PublicNetworkAccess' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccessFlag]'." +"Az.EventHub","Get-AzEventHubNetworkRuleSet","Get-AzEventHubNetworkRuleSet","0","3000","The type of property 'Value' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSetListResult' has changed from 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet' to 'System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet]'.","Change the type of property 'Value' back to 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INetworkRuleSet'." +"Az.EventHub","Get-AzEventHubPrivateEndpointConnection","Get-AzEventHubPrivateEndpointConnection","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","Get-AzEventHubPrivateEndpointConnection","Get-AzEventHubPrivateEndpointConnection","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","Get-AzEventHubPrivateEndpointConnection","Get-AzEventHubPrivateEndpointConnection","0","3000","The type of property 'ProvisioningState' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EndPointProvisioningState]' to 'System.String'.","Change the type of property 'ProvisioningState' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EndPointProvisioningState]'." +"Az.EventHub","Get-AzEventHubPrivateEndpointConnection","Get-AzEventHubPrivateEndpointConnection","0","3000","The type of property 'ConnectionState' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateEndpointConnection' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PrivateLinkConnectionStatus]' to 'System.String'.","Change the type of property 'ConnectionState' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PrivateLinkConnectionStatus]'." +"Az.EventHub","Get-AzEventHubPrivateLink","Get-AzEventHubPrivateLink","0","3000","The type of property 'Value' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IPrivateLinkResourcesListResult' has changed from 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResource' to 'System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResource]'.","Change the type of property 'Value' back to 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateLinkResource'." +"Az.EventHub","Get-AzEventHubSchemaGroup","Get-AzEventHubSchemaGroup","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","Get-AzEventHubSchemaGroup","Get-AzEventHubSchemaGroup","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","Get-AzEventHubSchemaGroup","Get-AzEventHubSchemaGroup","0","3000","The type of property 'SchemaCompatibility' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaCompatibility]' to 'System.String'.","Change the type of property 'SchemaCompatibility' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaCompatibility]'." +"Az.EventHub","Get-AzEventHubSchemaGroup","Get-AzEventHubSchemaGroup","0","3000","The type of property 'SchemaType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaType]' to 'System.String'.","Change the type of property 'SchemaType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaType]'." +"Az.EventHub","New-AzEventHub","New-AzEventHub","0","3000","The type of property 'IdentityType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType]' to 'System.String'.","Change the type of property 'IdentityType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType]'." +"Az.EventHub","New-AzEventHub","New-AzEventHub","0","3000","The type of property 'CleanupPolicy' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CleanupPolicyRetentionDescription]' to 'System.String'.","Change the type of property 'CleanupPolicy' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CleanupPolicyRetentionDescription]'." +"Az.EventHub","New-AzEventHub","New-AzEventHub","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","New-AzEventHub","New-AzEventHub","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","New-AzEventHub","New-AzEventHub","0","3000","The type of property 'Encoding' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription]' to 'System.String'.","Change the type of property 'Encoding' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription]'." +"Az.EventHub","New-AzEventHub","New-AzEventHub","0","3000","The type of property 'Status' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus]' to 'System.String'.","Change the type of property 'Status' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus]'." +"Az.EventHub","New-AzEventHub","New-AzEventHub","0","3000","The type of property 'PartitionId' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub' has changed from 'System.String[]' to 'System.Collections.Generic.List`1[System.String]'.","Change the type of property 'PartitionId' back to 'System.String[]'." +"Az.EventHub","New-AzEventHub","New-AzEventHub","0","2020","The cmdlet 'New-AzEventHub' no longer supports the type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CleanupPolicyRetentionDescription' for parameter 'CleanupPolicy'.","Change the type for parameter 'CleanupPolicy' back to 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CleanupPolicyRetentionDescription'." +"Az.EventHub","New-AzEventHub","New-AzEventHub","0","2020","The cmdlet 'New-AzEventHub' no longer supports the type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription' for parameter 'Encoding'.","Change the type for parameter 'Encoding' back to 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription'." +"Az.EventHub","New-AzEventHub","New-AzEventHub","0","2020","The cmdlet 'New-AzEventHub' no longer supports the type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType' for parameter 'IdentityType'.","Change the type for parameter 'IdentityType' back to 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType'." +"Az.EventHub","New-AzEventHub","New-AzEventHub","0","2020","The cmdlet 'New-AzEventHub' no longer supports the type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus' for parameter 'Status'.","Change the type for parameter 'Status' back to 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus'." +"Az.EventHub","New-AzEventHubApplicationGroup","New-AzEventHubApplicationGroup","0","3000","The type of property 'Policy' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup' has changed from 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicy' to 'System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicy]'.","Change the type of property 'Policy' back to 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicy'." +"Az.EventHub","New-AzEventHubApplicationGroup","New-AzEventHubApplicationGroup","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","New-AzEventHubApplicationGroup","New-AzEventHubApplicationGroup","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","New-AzEventHubAuthorizationRule","New-AzEventHubAuthorizationRule","0","3000","The type of property 'Rights' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule' has changed from 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights[]' to 'System.Collections.Generic.List`1[System.String]'.","Change the type of property 'Rights' back to 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights[]'." +"Az.EventHub","New-AzEventHubAuthorizationRule","New-AzEventHubAuthorizationRule","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","New-AzEventHubAuthorizationRule","New-AzEventHubAuthorizationRule","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","New-AzEventHubAuthorizationRule","New-AzEventHubAuthorizationRule","0","2110","The element type for parameter 'Rights' has been changed from 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights' to 'System.String'.","Change the element type for parameter 'Rights' back to 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights'." +"Az.EventHub","New-AzEventHubCluster","New-AzEventHubCluster","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","New-AzEventHubCluster","New-AzEventHubCluster","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","New-AzEventHubCluster","New-AzEventHubCluster","0","3000","The type of property 'ProvisioningState' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningState]' to 'System.String'.","Change the type of property 'ProvisioningState' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningState]'." +"Az.EventHub","New-AzEventHubConsumerGroup","New-AzEventHubConsumerGroup","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","New-AzEventHubConsumerGroup","New-AzEventHubConsumerGroup","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","New-AzEventHubGeoDRConfiguration","New-AzEventHubGeoDRConfiguration","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","New-AzEventHubGeoDRConfiguration","New-AzEventHubGeoDRConfiguration","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","New-AzEventHubGeoDRConfiguration","New-AzEventHubGeoDRConfiguration","0","3000","The type of property 'ProvisioningState' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningStateDr]' to 'System.String'.","Change the type of property 'ProvisioningState' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningStateDr]'." +"Az.EventHub","New-AzEventHubGeoDRConfiguration","New-AzEventHubGeoDRConfiguration","0","3000","The type of property 'Role' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IArmDisasterRecovery' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.RoleDisasterRecovery]' to 'System.String'.","Change the type of property 'Role' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.RoleDisasterRecovery]'." +"Az.EventHub","New-AzEventHubIPRuleConfig","New-AzEventHubIPRuleConfig","0","3000","The type of property 'Action' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetIPRules' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkRuleIPAction]' to 'System.String'.","Change the type of property 'Action' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkRuleIPAction]'." +"Az.EventHub","New-AzEventHubIPRuleConfig","New-AzEventHubIPRuleConfig","0","2020","The cmdlet 'New-AzEventHubIPRuleConfig' no longer supports the type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkRuleIPAction' for parameter 'Action'.","Change the type for parameter 'Action' back to 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkRuleIPAction'." +"Az.EventHub","New-AzEventHubKey","New-AzEventHubKey","0","2020","The cmdlet 'New-AzEventHubKey' no longer supports the type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeyType' for parameter 'KeyType'.","Change the type for parameter 'KeyType' back to 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeyType'." +"Az.EventHub","New-AzEventHubNamespace","New-AzEventHubNamespace","0","3000","The type of property 'KeyVaultProperty' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace' has changed from 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultProperties' to 'System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultProperties]'.","Change the type of property 'KeyVaultProperty' back to 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultProperties'." +"Az.EventHub","New-AzEventHubNamespace","New-AzEventHubNamespace","0","3000","The type of property 'GeoDataReplicationLocation' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace' has changed from 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INamespaceReplicaLocation' to 'System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INamespaceReplicaLocation]'.","Change the type of property 'GeoDataReplicationLocation' back to 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INamespaceReplicaLocation'." +"Az.EventHub","New-AzEventHubNamespace","New-AzEventHubNamespace","0","3000","The type of property 'PrivateEndpointConnection' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace' has changed from 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection' to 'System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection]'.","Change the type of property 'PrivateEndpointConnection' back to 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection'." +"Az.EventHub","New-AzEventHubNamespace","New-AzEventHubNamespace","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","New-AzEventHubNamespace","New-AzEventHubNamespace","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","New-AzEventHubNamespace","New-AzEventHubNamespace","0","3000","The type of property 'KeySource' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeySource]' to 'System.String'.","Change the type of property 'KeySource' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeySource]'." +"Az.EventHub","New-AzEventHubNamespace","New-AzEventHubNamespace","0","3000","The type of property 'IdentityType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType]' to 'System.String'.","Change the type of property 'IdentityType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType]'." +"Az.EventHub","New-AzEventHubNamespace","New-AzEventHubNamespace","0","3000","The type of property 'PublicNetworkAccess' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess]' to 'System.String'.","Change the type of property 'PublicNetworkAccess' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess]'." +"Az.EventHub","New-AzEventHubNamespace","New-AzEventHubNamespace","0","3000","The type of property 'SkuName' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuName]' to 'System.String'.","Change the type of property 'SkuName' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuName]'." +"Az.EventHub","New-AzEventHubNamespace","New-AzEventHubNamespace","0","3000","The type of property 'SkuTier' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuTier]' to 'System.String'.","Change the type of property 'SkuTier' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuTier]'." +"Az.EventHub","New-AzEventHubNamespace","New-AzEventHubNamespace","0","3000","The type of property 'MinimumTlsVersion' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.TlsVersion]' to 'System.String'.","Change the type of property 'MinimumTlsVersion' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.TlsVersion]'." +"Az.EventHub","New-AzEventHubNamespace","New-AzEventHubNamespace","0","2020","The cmdlet 'New-AzEventHubNamespace' no longer supports the type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType' for parameter 'IdentityType'.","Change the type for parameter 'IdentityType' back to 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType'." +"Az.EventHub","New-AzEventHubNamespace","New-AzEventHubNamespace","0","2020","The cmdlet 'New-AzEventHubNamespace' no longer supports the type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuName' for parameter 'SkuName'.","Change the type for parameter 'SkuName' back to 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuName'." +"Az.EventHub","New-AzEventHubNamespace","New-AzEventHubNamespace","0","2020","The cmdlet 'New-AzEventHubNamespace' no longer supports the type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess' for parameter 'PublicNetworkAccess'.","Change the type for parameter 'PublicNetworkAccess' back to 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess'." +"Az.EventHub","New-AzEventHubSchemaGroup","New-AzEventHubSchemaGroup","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","New-AzEventHubSchemaGroup","New-AzEventHubSchemaGroup","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","New-AzEventHubSchemaGroup","New-AzEventHubSchemaGroup","0","3000","The type of property 'SchemaCompatibility' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaCompatibility]' to 'System.String'.","Change the type of property 'SchemaCompatibility' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaCompatibility]'." +"Az.EventHub","New-AzEventHubSchemaGroup","New-AzEventHubSchemaGroup","0","3000","The type of property 'SchemaType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ISchemaGroup' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaType]' to 'System.String'.","Change the type of property 'SchemaType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaType]'." +"Az.EventHub","New-AzEventHubSchemaGroup","New-AzEventHubSchemaGroup","0","2020","The cmdlet 'New-AzEventHubSchemaGroup' no longer supports the type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaCompatibility' for parameter 'SchemaCompatibility'.","Change the type for parameter 'SchemaCompatibility' back to 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaCompatibility'." +"Az.EventHub","New-AzEventHubSchemaGroup","New-AzEventHubSchemaGroup","0","2020","The cmdlet 'New-AzEventHubSchemaGroup' no longer supports the type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaType' for parameter 'SchemaType'.","Change the type for parameter 'SchemaType' back to 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SchemaType'." +"Az.EventHub","New-AzEventHubThrottlingPolicyConfig","New-AzEventHubThrottlingPolicyConfig","0","3000","The type of property 'MetricId' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IThrottlingPolicy' has changed from 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.MetricId' to 'System.String'.","Change the type of property 'MetricId' back to 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.MetricId'." +"Az.EventHub","New-AzEventHubThrottlingPolicyConfig","New-AzEventHubThrottlingPolicyConfig","0","2020","The cmdlet 'New-AzEventHubThrottlingPolicyConfig' no longer supports the type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.MetricId' for parameter 'MetricId'.","Change the type for parameter 'MetricId' back to 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.MetricId'." +"Az.EventHub","Remove-AzEventHubAuthorizationRule","Remove-AzEventHubAuthorizationRule","0","3000","The type of property 'Rights' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule' has changed from 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights[]' to 'System.Collections.Generic.List`1[System.String]'.","Change the type of property 'Rights' back to 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights[]'." +"Az.EventHub","Remove-AzEventHubAuthorizationRule","Remove-AzEventHubAuthorizationRule","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","Remove-AzEventHubAuthorizationRule","Remove-AzEventHubAuthorizationRule","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","Set-AzEventHub","Set-AzEventHub","0","3000","The type of property 'IdentityType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType]' to 'System.String'.","Change the type of property 'IdentityType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CaptureIdentityType]'." +"Az.EventHub","Set-AzEventHub","Set-AzEventHub","0","3000","The type of property 'CleanupPolicy' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CleanupPolicyRetentionDescription]' to 'System.String'.","Change the type of property 'CleanupPolicy' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CleanupPolicyRetentionDescription]'." +"Az.EventHub","Set-AzEventHub","Set-AzEventHub","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","Set-AzEventHub","Set-AzEventHub","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","Set-AzEventHub","Set-AzEventHub","0","3000","The type of property 'Encoding' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription]' to 'System.String'.","Change the type of property 'Encoding' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription]'." +"Az.EventHub","Set-AzEventHub","Set-AzEventHub","0","3000","The type of property 'Status' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus]' to 'System.String'.","Change the type of property 'Status' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus]'." +"Az.EventHub","Set-AzEventHub","Set-AzEventHub","0","3000","The type of property 'PartitionId' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEventhub' has changed from 'System.String[]' to 'System.Collections.Generic.List`1[System.String]'.","Change the type of property 'PartitionId' back to 'System.String[]'." +"Az.EventHub","Set-AzEventHub","Set-AzEventHub","0","2020","The cmdlet 'Set-AzEventHub' no longer supports the type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription' for parameter 'Encoding'.","Change the type for parameter 'Encoding' back to 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EncodingCaptureDescription'." +"Az.EventHub","Set-AzEventHub","Set-AzEventHub","0","2020","The cmdlet 'Set-AzEventHub' no longer supports the type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus' for parameter 'Status'.","Change the type for parameter 'Status' back to 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.EntityStatus'." +"Az.EventHub","Set-AzEventHub","Set-AzEventHub","0","2020","The cmdlet 'Set-AzEventHub' no longer supports the type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType' for parameter 'IdentityType'.","Change the type for parameter 'IdentityType' back to 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType'." +"Az.EventHub","Set-AzEventHubApplicationGroup","Set-AzEventHubApplicationGroup","0","3000","The type of property 'Policy' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup' has changed from 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicy' to 'System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicy]'.","Change the type of property 'Policy' back to 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicy'." +"Az.EventHub","Set-AzEventHubApplicationGroup","Set-AzEventHubApplicationGroup","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","Set-AzEventHubApplicationGroup","Set-AzEventHubApplicationGroup","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IApplicationGroup' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","Set-AzEventHubAuthorizationRule","Set-AzEventHubAuthorizationRule","0","3000","The type of property 'Rights' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule' has changed from 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights[]' to 'System.Collections.Generic.List`1[System.String]'.","Change the type of property 'Rights' back to 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights[]'." +"Az.EventHub","Set-AzEventHubAuthorizationRule","Set-AzEventHubAuthorizationRule","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","Set-AzEventHubAuthorizationRule","Set-AzEventHubAuthorizationRule","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IAuthorizationRule' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","Set-AzEventHubAuthorizationRule","Set-AzEventHubAuthorizationRule","0","2110","The element type for parameter 'Rights' has been changed from 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights' to 'System.String'.","Change the element type for parameter 'Rights' back to 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.AccessRights'." +"Az.EventHub","Set-AzEventHubCluster","Set-AzEventHubCluster","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","Set-AzEventHubCluster","Set-AzEventHubCluster","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","Set-AzEventHubCluster","Set-AzEventHubCluster","0","3000","The type of property 'ProvisioningState' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICluster' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningState]' to 'System.String'.","Change the type of property 'ProvisioningState' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ProvisioningState]'." +"Az.EventHub","Set-AzEventHubConsumerGroup","Set-AzEventHubConsumerGroup","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","Set-AzEventHubConsumerGroup","Set-AzEventHubConsumerGroup","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IConsumerGroup' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","Set-AzEventHubNamespace","Set-AzEventHubNamespace","0","3000","The type of property 'KeyVaultProperty' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace' has changed from 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultProperties' to 'System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultProperties]'.","Change the type of property 'KeyVaultProperty' back to 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IKeyVaultProperties'." +"Az.EventHub","Set-AzEventHubNamespace","Set-AzEventHubNamespace","0","3000","The type of property 'GeoDataReplicationLocation' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace' has changed from 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INamespaceReplicaLocation' to 'System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INamespaceReplicaLocation]'.","Change the type of property 'GeoDataReplicationLocation' back to 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INamespaceReplicaLocation'." +"Az.EventHub","Set-AzEventHubNamespace","Set-AzEventHubNamespace","0","3000","The type of property 'PrivateEndpointConnection' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace' has changed from 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection' to 'System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection]'.","Change the type of property 'PrivateEndpointConnection' back to 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IPrivateEndpointConnection'." +"Az.EventHub","Set-AzEventHubNamespace","Set-AzEventHubNamespace","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","Set-AzEventHubNamespace","Set-AzEventHubNamespace","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","Set-AzEventHubNamespace","Set-AzEventHubNamespace","0","3000","The type of property 'KeySource' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeySource]' to 'System.String'.","Change the type of property 'KeySource' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.KeySource]'." +"Az.EventHub","Set-AzEventHubNamespace","Set-AzEventHubNamespace","0","3000","The type of property 'IdentityType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType]' to 'System.String'.","Change the type of property 'IdentityType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType]'." +"Az.EventHub","Set-AzEventHubNamespace","Set-AzEventHubNamespace","0","3000","The type of property 'PublicNetworkAccess' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess]' to 'System.String'.","Change the type of property 'PublicNetworkAccess' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess]'." +"Az.EventHub","Set-AzEventHubNamespace","Set-AzEventHubNamespace","0","3000","The type of property 'SkuName' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuName]' to 'System.String'.","Change the type of property 'SkuName' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuName]'." +"Az.EventHub","Set-AzEventHubNamespace","Set-AzEventHubNamespace","0","3000","The type of property 'SkuTier' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuTier]' to 'System.String'.","Change the type of property 'SkuTier' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.SkuTier]'." +"Az.EventHub","Set-AzEventHubNamespace","Set-AzEventHubNamespace","0","3000","The type of property 'MinimumTlsVersion' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.IEhNamespace' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.TlsVersion]' to 'System.String'.","Change the type of property 'MinimumTlsVersion' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.TlsVersion]'." +"Az.EventHub","Set-AzEventHubNamespace","Set-AzEventHubNamespace","0","2020","The cmdlet 'Set-AzEventHubNamespace' no longer supports the type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType' for parameter 'IdentityType'.","Change the type for parameter 'IdentityType' back to 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.ManagedServiceIdentityType'." +"Az.EventHub","Set-AzEventHubNamespace","Set-AzEventHubNamespace","0","2020","The cmdlet 'Set-AzEventHubNamespace' no longer supports the type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess' for parameter 'PublicNetworkAccess'.","Change the type for parameter 'PublicNetworkAccess' back to 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess'." +"Az.EventHub","Set-AzEventHubNetworkRuleSet","Set-AzEventHubNetworkRuleSet","0","3000","The type of property 'IPRule' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet' has changed from 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetIPRules' to 'System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetIPRules]'.","Change the type of property 'IPRule' back to 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetIPRules'." +"Az.EventHub","Set-AzEventHubNetworkRuleSet","Set-AzEventHubNetworkRuleSet","0","3000","The type of property 'VirtualNetworkRule' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet' has changed from 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetVirtualNetworkRules' to 'System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetVirtualNetworkRules]'.","Change the type of property 'VirtualNetworkRule' back to 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.INwRuleSetVirtualNetworkRules'." +"Az.EventHub","Set-AzEventHubNetworkRuleSet","Set-AzEventHubNetworkRuleSet","0","3000","The type of property 'SystemDataCreatedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataCreatedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","Set-AzEventHubNetworkRuleSet","Set-AzEventHubNetworkRuleSet","0","3000","The type of property 'SystemDataLastModifiedByType' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]' to 'System.String'.","Change the type of property 'SystemDataLastModifiedByType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.CreatedByType]'." +"Az.EventHub","Set-AzEventHubNetworkRuleSet","Set-AzEventHubNetworkRuleSet","0","3000","The type of property 'DefaultAction' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.DefaultAction]' to 'System.String'.","Change the type of property 'DefaultAction' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.DefaultAction]'." +"Az.EventHub","Set-AzEventHubNetworkRuleSet","Set-AzEventHubNetworkRuleSet","0","3000","The type of property 'PublicNetworkAccess' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INetworkRuleSet' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccessFlag]' to 'System.String'.","Change the type of property 'PublicNetworkAccess' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccessFlag]'." +"Az.EventHub","Set-AzEventHubNetworkRuleSet","Set-AzEventHubNetworkRuleSet","0","2020","The cmdlet 'Set-AzEventHubNetworkRuleSet' no longer supports the type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess' for parameter 'PublicNetworkAccess'.","Change the type for parameter 'PublicNetworkAccess' back to 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.PublicNetworkAccess'." +"Az.EventHub","Set-AzEventHubNetworkRuleSet","Set-AzEventHubNetworkRuleSet","0","2020","The cmdlet 'Set-AzEventHubNetworkRuleSet' no longer supports the type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.DefaultAction' for parameter 'DefaultAction'.","Change the type for parameter 'DefaultAction' back to 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.DefaultAction'." +"Az.EventHub","Set-AzEventHubNetworkRuleSet","Set-AzEventHubNetworkRuleSet","0","3000","The type of property 'Action' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.INwRuleSetIPRules' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkRuleIPAction]' to 'System.String'.","Change the type of property 'Action' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.NetworkRuleIPAction]'." +"Az.EventHub","Test-AzEventHubName","Test-AzEventHubName","0","3000","The type of property 'Reason' of type 'Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202301Preview.ICheckNameAvailabilityResult' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.UnavailableReason]' to 'System.String'.","Change the type of property 'Reason' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.EventHub.Support.UnavailableReason]'."